5 # Copyright 1998-2000 The OpenLDAP Foundation. All Rights Reserved.
7 # Redistribution and use in source and binary forms are permitted only
8 # as authorized by the OpenLDAP Public License. A copy of this
9 # license is available at http://www.OpenLDAP.org/license.html or
10 # in file LICENSE in the top-level directory of the distribution.
12 echo "Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved."
13 echo "Restrictions apply, see COPYRIGHT and LICENSE files."
15 # Guess values for system-dependent variables and create Makefiles.
16 # Generated automatically using autoconf version 2.13.1
17 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
19 # This configure script is free software; the Free Software Foundation
20 # gives unlimited permission to copy, distribute and modify it.
24 ac_default_prefix=/usr/local
25 # Any additions from configure.in:
26 ac_default_prefix=/usr/local
28 --with-subdir=DIR change default subdirectory used for installs"
30 --enable-debug enable debugging (yes)"
32 --enable-syslog enable syslog support (auto)"
34 --enable-proctitle enable proctitle support (yes)"
36 --enable-cache enable caching (yes)"
38 --enable-referrals enable V2 Referrals extension (yes)"
40 --enable-kbind enable V2 Kerberos IV bind (auto)"
42 --enable-cldap enable connectionless ldap (no)"
44 --enable-ipv6 enable IPv6 support (auto)"
46 --enable-unix enable UNIX domain socket support (auto)"
48 --enable-x-compile enable cross compiling (no)"
50 --with-cyrus-sasl with Cyrus SASL support (auto)"
52 --with-fetch with fetch URL support (auto)"
54 --with-kerberos with support (auto)"
56 --with-readline with readline support (auto)"
58 --with-threads use threads (auto)"
60 --with-tls with TLS/SSL support (auto)"
62 --with-yielding-select with implicitly yielding select (auto)"
64 SLAPD (Standalone LDAP Daemon) Options:"
66 --enable-slapd enable building slapd (yes)"
68 --enable-cleartext enable cleartext passwords (yes)"
70 --enable-crypt enable crypt(3) passwords (auto)"
72 --enable-kpasswd enable kerberos password verification (no)"
74 --enable-spasswd enable (Cyrus) SASL password verification (no)"
76 --enable-modules enable dynamic module support (no)"
78 --enable-multimaster enable multimaster replication (no)"
80 --enable-phonetic enable phonetic/soundex (no)"
82 --enable-rlookups enable reverse lookups (auto)"
84 --enable-aci enable per-object ACIs (no)"
86 --enable-wrappers enable tcp wrapper support (no)"
88 --enable-dynamic enable linking built binaries with dynamic libs (no)"
90 --enable-dnssrv enable dnssrv backend (no)"
92 --with-dnssrv-module module type (static)"
94 --enable-ldap enable ldap backend (no)"
96 --with-ldap-module module type (static)"
98 --enable-ldbm enable ldbm backend (yes)"
100 --with-ldbm-api use LDBM API (auto)"
102 --with-ldbm-module module type (static)"
104 --with-ldbm-type use LDBM type (auto)"
106 --enable-passwd enable passwd backend (no)"
108 --with-passwd-module module type (static)"
110 --enable-shell enable shell backend (no)"
112 --with-shell-module module type (static)"
114 --enable-sql enable sql backend (no)"
116 --with-sql-module module type (static)"
118 SLURPD (Replication Daemon) Options:"
120 --enable-slurpd enable building slurpd (auto)"
122 Library Generation & Linking Options"
124 --enable-static[=PKGS] build static libraries [default=yes]"
126 --enable-shared[=PKGS] build shared libraries [default=yes]"
128 --enable-fast-install[=PKGS] optimize for fast installation [default=yes]"
130 --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
132 --disable-libtool-lock avoid locking (might break parallel builds)"
134 # Initialize some variables set by options.
135 # The variables have the same names as the options, with
136 # dashes changed to underlines.
138 cache_file=./config.cache
147 program_transform_name=s,x,x,
155 bindir='${exec_prefix}/bin'
156 sbindir='${exec_prefix}/sbin'
157 libexecdir='${exec_prefix}/libexec'
158 datadir='${prefix}/share'
159 sysconfdir='${prefix}/etc'
160 sharedstatedir='${prefix}/com'
161 localstatedir='${prefix}/var'
162 libdir='${exec_prefix}/lib'
163 includedir='${prefix}/include'
164 oldincludedir='/usr/include'
165 infodir='${prefix}/info'
166 mandir='${prefix}/man'
168 # Initialize some other variables.
171 SHELL=${CONFIG_SHELL-/bin/sh}
172 # Maximum number of lines to put in a shell here document.
179 # If the previous option needs an argument, assign it.
180 if test -n "$ac_prev"; then
181 eval "$ac_prev=\$ac_option"
187 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
191 # Accept the important Cygnus configure options, so we can diagnose typos.
195 -bindir | --bindir | --bindi | --bind | --bin | --bi)
197 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
198 bindir="$ac_optarg" ;;
200 -build | --build | --buil | --bui | --bu)
202 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
203 build="$ac_optarg" ;;
205 -cache-file | --cache-file | --cache-fil | --cache-fi \
206 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
207 ac_prev=cache_file ;;
208 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
209 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
210 cache_file="$ac_optarg" ;;
212 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
214 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
216 datadir="$ac_optarg" ;;
218 -disable-* | --disable-*)
219 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
220 # Reject names that are not valid shell variable names.
221 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
222 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
224 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
225 eval "enable_${ac_feature}=no" ;;
227 -enable-* | --enable-*)
228 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
229 # Reject names that are not valid shell variable names.
230 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
231 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
233 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
238 eval "enable_${ac_feature}='$ac_optarg'" ;;
240 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
241 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
242 | --exec | --exe | --ex)
243 ac_prev=exec_prefix ;;
244 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
245 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
246 | --exec=* | --exe=* | --ex=*)
247 exec_prefix="$ac_optarg" ;;
249 -gas | --gas | --ga | --g)
250 # Obsolete; use --with-gas.
253 -help | --help | --hel | --he)
254 # Omit some internal or obsolete options to make the list less imposing.
255 # This message is too long to be a string in the A/UX 3.1 sh.
257 Usage: configure [options] [host]
258 Options: [defaults in brackets after descriptions]
260 --cache-file=FILE cache test results in FILE
261 --help print this message
262 --no-create do not create output files
263 --quiet, --silent do not print \`checking...' messages
264 --version print the version of autoconf that created configure
265 Directory and file names:
266 --prefix=PREFIX install architecture-independent files in PREFIX
268 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
270 --bindir=DIR user executables in DIR [EPREFIX/bin]
271 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
272 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
273 --datadir=DIR read-only architecture-independent data in DIR
275 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
276 --sharedstatedir=DIR modifiable architecture-independent data in DIR
278 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
279 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
280 --includedir=DIR C header files in DIR [PREFIX/include]
281 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
282 --infodir=DIR info documentation in DIR [PREFIX/info]
283 --mandir=DIR man documentation in DIR [PREFIX/man]
284 --srcdir=DIR find the sources in DIR [configure dir or ..]
285 --program-prefix=PREFIX prepend PREFIX to installed program names
286 --program-suffix=SUFFIX append SUFFIX to installed program names
287 --program-transform-name=PROGRAM
288 run sed PROGRAM on installed program names
292 --build=BUILD configure for building on BUILD [BUILD=HOST]
293 --host=HOST configure for HOST [guessed]
294 --target=TARGET configure for TARGET [TARGET=HOST]
295 Features and packages:
296 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
297 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
298 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
299 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
300 --x-includes=DIR X include files are in DIR
301 --x-libraries=DIR X library files are in DIR
303 if test -n "$ac_help"; then
304 echo "--enable and --with options recognized:$ac_help"
308 -host | --host | --hos | --ho)
310 -host=* | --host=* | --hos=* | --ho=*)
313 -includedir | --includedir | --includedi | --included | --include \
314 | --includ | --inclu | --incl | --inc)
315 ac_prev=includedir ;;
316 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
317 | --includ=* | --inclu=* | --incl=* | --inc=*)
318 includedir="$ac_optarg" ;;
320 -infodir | --infodir | --infodi | --infod | --info | --inf)
322 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
323 infodir="$ac_optarg" ;;
325 -libdir | --libdir | --libdi | --libd)
327 -libdir=* | --libdir=* | --libdi=* | --libd=*)
328 libdir="$ac_optarg" ;;
330 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
331 | --libexe | --libex | --libe)
332 ac_prev=libexecdir ;;
333 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
334 | --libexe=* | --libex=* | --libe=*)
335 libexecdir="$ac_optarg" ;;
337 -localstatedir | --localstatedir | --localstatedi | --localstated \
338 | --localstate | --localstat | --localsta | --localst \
339 | --locals | --local | --loca | --loc | --lo)
340 ac_prev=localstatedir ;;
341 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
342 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
343 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
344 localstatedir="$ac_optarg" ;;
346 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
348 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
349 mandir="$ac_optarg" ;;
352 # Obsolete; use --without-fp.
355 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
359 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
360 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
363 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
364 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
365 | --oldin | --oldi | --old | --ol | --o)
366 ac_prev=oldincludedir ;;
367 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
368 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
369 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
370 oldincludedir="$ac_optarg" ;;
372 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
374 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
375 prefix="$ac_optarg" ;;
377 -program-prefix | --program-prefix | --program-prefi | --program-pref \
378 | --program-pre | --program-pr | --program-p)
379 ac_prev=program_prefix ;;
380 -program-prefix=* | --program-prefix=* | --program-prefi=* \
381 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
382 program_prefix="$ac_optarg" ;;
384 -program-suffix | --program-suffix | --program-suffi | --program-suff \
385 | --program-suf | --program-su | --program-s)
386 ac_prev=program_suffix ;;
387 -program-suffix=* | --program-suffix=* | --program-suffi=* \
388 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
389 program_suffix="$ac_optarg" ;;
391 -program-transform-name | --program-transform-name \
392 | --program-transform-nam | --program-transform-na \
393 | --program-transform-n | --program-transform- \
394 | --program-transform | --program-transfor \
395 | --program-transfo | --program-transf \
396 | --program-trans | --program-tran \
397 | --progr-tra | --program-tr | --program-t)
398 ac_prev=program_transform_name ;;
399 -program-transform-name=* | --program-transform-name=* \
400 | --program-transform-nam=* | --program-transform-na=* \
401 | --program-transform-n=* | --program-transform-=* \
402 | --program-transform=* | --program-transfor=* \
403 | --program-transfo=* | --program-transf=* \
404 | --program-trans=* | --program-tran=* \
405 | --progr-tra=* | --program-tr=* | --program-t=*)
406 program_transform_name="$ac_optarg" ;;
408 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
409 | -silent | --silent | --silen | --sile | --sil)
412 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
414 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
416 sbindir="$ac_optarg" ;;
418 -sharedstatedir | --sharedstatedir | --sharedstatedi \
419 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
420 | --sharedst | --shareds | --shared | --share | --shar \
422 ac_prev=sharedstatedir ;;
423 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
424 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
425 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
427 sharedstatedir="$ac_optarg" ;;
429 -site | --site | --sit)
431 -site=* | --site=* | --sit=*)
434 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
436 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
437 srcdir="$ac_optarg" ;;
439 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
440 | --syscon | --sysco | --sysc | --sys | --sy)
441 ac_prev=sysconfdir ;;
442 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
443 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
444 sysconfdir="$ac_optarg" ;;
446 -target | --target | --targe | --targ | --tar | --ta | --t)
448 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
449 target="$ac_optarg" ;;
451 -v | -verbose | --verbose | --verbos | --verbo | --verb)
454 -version | --version | --versio | --versi | --vers)
455 echo "configure generated by autoconf version 2.13.1"
459 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
460 # Reject names that are not valid shell variable names.
461 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
462 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
464 ac_package=`echo $ac_package| sed 's/-/_/g'`
469 eval "with_${ac_package}='$ac_optarg'" ;;
471 -without-* | --without-*)
472 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
473 # Reject names that are not valid shell variable names.
474 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
475 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
477 ac_package=`echo $ac_package| sed 's/-/_/g'`
478 eval "with_${ac_package}=no" ;;
481 # Obsolete; use --with-x.
484 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
485 | --x-incl | --x-inc | --x-in | --x-i)
486 ac_prev=x_includes ;;
487 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
488 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
489 x_includes="$ac_optarg" ;;
491 -x-libraries | --x-libraries | --x-librarie | --x-librari \
492 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
493 ac_prev=x_libraries ;;
494 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
495 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
496 x_libraries="$ac_optarg" ;;
498 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
502 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
503 echo "configure: warning: $ac_option: invalid host type" 1>&2
505 if test "x$nonopt" != xNONE; then
506 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
514 if test -n "$ac_prev"; then
515 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
518 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
520 # File descriptor usage:
523 # 2 errors and warnings
524 # 3 some systems may open it to /dev/tty
525 # 4 used on the Kubota Titan
526 # 6 checking for... messages and results
527 # 5 compiler messages saved in config.log
528 if test "$silent" = yes; then
536 This file contains any messages produced by compilers while
537 running configure, to aid debugging if configure makes a mistake.
540 # Strip out --no-create and --no-recursion so they do not pile up.
541 # Also quote any args containing shell metacharacters.
546 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
547 | --no-cr | --no-c) ;;
548 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
549 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
550 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
551 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
552 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
557 # Only set these to C if already set. These must not be set unconditionally
558 # because not all systems understand e.g. LANG=C (notably SCO).
559 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
560 # Non-C LC_CTYPE values break the ctype check.
561 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
562 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
563 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
564 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
566 # confdefs.h avoids OS command line length limits that DEFS can exceed.
567 rm -rf conftest* confdefs.h
568 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
571 # A filename unique to this package, relative to the directory that
572 # configure is in, which we can look for to find out if srcdir is correct.
573 ac_unique_file=build/version
575 # Find the source files, if location was not specified.
576 if test -z "$srcdir"; then
577 ac_srcdir_defaulted=yes
578 # Try the directory containing this script, then its parent.
580 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
581 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
583 if test ! -r $srcdir/$ac_unique_file; then
587 ac_srcdir_defaulted=no
589 if test ! -r $srcdir/$ac_unique_file; then
590 if test "$ac_srcdir_defaulted" = yes; then
591 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
593 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
596 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
598 # Prefer explicitly selected file to automatically selected ones.
599 if test -z "$CONFIG_SITE"; then
600 if test "x$prefix" != xNONE; then
601 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
603 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
606 for ac_site_file in $CONFIG_SITE; do
607 if test -r "$ac_site_file"; then
608 echo "loading site script $ac_site_file"
615 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
616 ac_cpp='$CPP $CPPFLAGS'
617 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
618 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
619 cross_compiling=$ac_cv_prog_cc_cross
623 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
624 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
625 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
632 ac_n= ac_c='\c' ac_t=
636 # set unset (borrowed from autoconf 2.14a)
637 if (unset FOO) >/dev/null 2>&1; then
643 $ol_unset CDPATH || test "${CDPATH+set}" != set || CDPATH=: && export CDPATH
646 for ac_dir in build $srcdir/build; do
647 if test -f $ac_dir/install-sh; then
649 ac_install_sh="$ac_aux_dir/install-sh -c"
651 elif test -f $ac_dir/install.sh; then
653 ac_install_sh="$ac_aux_dir/install.sh -c"
655 elif test -f $ac_dir/shtool; then
657 ac_install_sh="$ac_aux_dir/shtool install -c"
661 if test -z "$ac_aux_dir"; then
662 { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
664 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
665 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
666 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
668 OL_VERSION=`cat $ac_aux_dir/version`
669 if test -z "$OL_VERSION"; then
670 { echo "configure: error: could not determine version" 1>&2; exit 1; }
673 echo "Configuring OpenLDAP $OL_VERSION ..."
676 echo $ac_n "checking host system type""... $ac_c" 1>&6
677 echo "configure:678: checking host system type" >&5
678 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
680 # Make sure we can run config.sub.
681 if $ac_config_sub sun4 >/dev/null 2>&1; then :
682 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
685 ac_cv_host_alias=$host
686 case "$ac_cv_host_alias" in
690 if ac_cv_host_alias=`$ac_config_guess`; then :
691 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
693 *) ac_cv_host_alias=$nonopt ;;
697 ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
698 ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
699 ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
700 ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
702 echo $ac_n "(cached) $ac_c" 1>&6
705 echo "$ac_t""$ac_cv_host" 1>&6
708 host_alias=$ac_cv_host_alias
709 host_cpu=$ac_cv_host_cpu
710 host_vendor=$ac_cv_host_vendor
711 host_os=$ac_cv_host_os
717 echo $ac_n "checking target system type""... $ac_c" 1>&6
718 echo "configure:719: checking target system type" >&5
719 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
721 # Make sure we can run config.sub.
722 if $ac_config_sub sun4 >/dev/null 2>&1; then :
723 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
726 ac_cv_target_alias=$target
727 case "$ac_cv_target_alias" in
731 ac_cv_target_alias=$host_alias ;;
733 *) ac_cv_target_alias=$nonopt ;;
737 ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
738 ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
739 ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
740 ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
742 echo $ac_n "(cached) $ac_c" 1>&6
745 echo "$ac_t""$ac_cv_target" 1>&6
748 target_alias=$ac_cv_target_alias
749 target_cpu=$ac_cv_target_cpu
750 target_vendor=$ac_cv_target_vendor
751 target_os=$ac_cv_target_os
757 echo $ac_n "checking build system type""... $ac_c" 1>&6
758 echo "configure:759: checking build system type" >&5
759 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
761 # Make sure we can run config.sub.
762 if $ac_config_sub sun4 >/dev/null 2>&1; then :
763 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
766 ac_cv_build_alias=$build
767 case "$ac_cv_build_alias" in
771 ac_cv_build_alias=$host_alias ;;
773 *) ac_cv_build_alias=$nonopt ;;
777 ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
778 ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
779 ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
780 ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
782 echo $ac_n "(cached) $ac_c" 1>&6
785 echo "$ac_t""$ac_cv_build" 1>&6
788 build_alias=$ac_cv_build_alias
789 build_cpu=$ac_cv_build_cpu
790 build_vendor=$ac_cv_build_vendor
791 build_os=$ac_cv_build_os
797 # Do some error checking and defaulting for the host and target type.
799 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
802 # 1. You are not allowed to specify --host, --target, and nonopt at the
804 # 2. Host defaults to nonopt.
805 # 3. If nonopt is not specified, then host defaults to the current host,
806 # as determined by config.guess.
807 # 4. Target and build default to nonopt.
808 # 5. If nonopt is not specified, then target and build default to host.
810 # The aliases save the names the user supplied, while $host etc.
811 # will get canonicalized.
812 case $host---$target---$nonopt in
813 NONE---*---* | *---NONE---* | *---*---NONE) ;;
814 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
817 test "$host_alias" != "$target_alias" &&
818 test "$program_prefix$program_suffix$program_transform_name" = \
820 program_prefix=${target_alias}-
823 # Find a good install program. We prefer a C program (faster),
824 # so one script is as good as another. But avoid the broken or
825 # incompatible versions:
826 # SysV /etc/install, /usr/sbin/install
827 # SunOS /usr/etc/install
830 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
831 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
832 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
833 # ./install, which can be erroneously created by make from ./install.sh.
834 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
835 echo "configure:836: checking for a BSD compatible install" >&5
836 if test -z "$INSTALL"; then
837 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
838 echo $ac_n "(cached) $ac_c" 1>&6
840 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
841 for ac_dir in $PATH; do
842 # Account for people who put trailing slashes in PATH elements.
844 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
846 # OSF1 and SCO ODT 3.0 have their own names for install.
847 # Don't use installbsd from OSF since it installs stuff as root
849 for ac_prog in ginstall scoinst install; do
850 if test -f $ac_dir/$ac_prog; then
851 if test $ac_prog = install &&
852 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
853 # AIX install. It has an incompatible calling convention.
855 elif test $ac_prog = install &&
856 grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
857 # program-specific install script used by HP pwplus--don't use.
860 ac_cv_path_install="$ac_dir/$ac_prog -c"
871 if test "${ac_cv_path_install+set}" = set; then
872 INSTALL="$ac_cv_path_install"
874 # As a last resort, use the slow shell script. We don't cache a
875 # path for INSTALL within a source directory, because that will
876 # break other packages using the cache if that directory is
877 # removed, or if the path is relative.
878 INSTALL="$ac_install_sh"
881 echo "$ac_t""$INSTALL" 1>&6
883 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
884 # It thinks the first close brace ends the variable substitution.
885 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
887 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
889 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
891 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
892 echo "configure:893: checking whether build environment is sane" >&5
895 echo timestamp > conftestfile
896 # Do `set' in a subshell so we don't clobber the current shell's
897 # arguments. Must try -L first in case configure is actually a
898 # symlink; some systems play weird games with the mod time of symlinks
899 # (eg FreeBSD returns the mod time of the symlink's containing
902 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
903 if test "$*" = "X"; then
905 set X `ls -t $srcdir/configure conftestfile`
907 if test "$*" != "X $srcdir/configure conftestfile" \
908 && test "$*" != "X conftestfile $srcdir/configure"; then
910 # If neither matched, then we have a broken ls. This can happen
911 # if, for instance, CONFIG_SHELL is bash and it inherits a
912 # broken ls alias from the environment. This has actually
913 # happened. Such a system could not be considered "sane".
914 { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
915 alias in your environment" 1>&2; exit 1; }
918 test "$2" = conftestfile
924 { echo "configure: error: newly created file is older than distributed files!
925 Check your system clock" 1>&2; exit 1; }
928 echo "$ac_t""yes" 1>&6
929 if test "$program_transform_name" = s,x,x,; then
930 program_transform_name=
932 # Double any \ or $. echo might interpret backslashes.
933 cat <<\EOF_SED > conftestsed
934 s,\\,\\\\,g; s,\$,$$,g
936 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
939 test "$program_prefix" != NONE &&
940 program_transform_name="s,^,${program_prefix},;$program_transform_name"
941 # Use a double $ so make ignores it.
942 test "$program_suffix" != NONE &&
943 program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
945 # sed with no file args requires a program.
946 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
948 for ac_prog in mawk gawk nawk awk
950 # Extract the first word of "$ac_prog", so it can be a program name with args.
951 set dummy $ac_prog; ac_word=$2
952 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
953 echo "configure:954: checking for $ac_word" >&5
954 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
955 echo $ac_n "(cached) $ac_c" 1>&6
957 if test -n "$AWK"; then
958 ac_cv_prog_AWK="$AWK" # Let the user override the test.
960 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
962 for ac_dir in $ac_dummy; do
963 test -z "$ac_dir" && ac_dir=.
964 if test -f $ac_dir/$ac_word; then
965 ac_cv_prog_AWK="$ac_prog"
972 AWK="$ac_cv_prog_AWK"
973 if test -n "$AWK"; then
974 echo "$ac_t""$AWK" 1>&6
976 echo "$ac_t""no" 1>&6
979 test -n "$AWK" && break
982 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
983 echo "configure:984: checking whether ${MAKE-make} sets \${MAKE}" >&5
984 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
985 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
986 echo $ac_n "(cached) $ac_c" 1>&6
988 cat > conftestmake <<\EOF
990 @echo 'ac_maketemp="${MAKE}"'
992 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
993 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
994 if test -n "$ac_maketemp"; then
995 eval ac_cv_prog_make_${ac_make}_set=yes
997 eval ac_cv_prog_make_${ac_make}_set=no
1001 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1002 echo "$ac_t""yes" 1>&6
1005 echo "$ac_t""no" 1>&6
1006 SET_MAKE="MAKE=${MAKE-make}"
1015 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1016 { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1021 missing_dir=`cd $ac_aux_dir && pwd`
1022 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1023 echo "configure:1024: checking for working aclocal" >&5
1024 # Run test in a subshell; some versions of sh will print an error if
1025 # an executable is not found, even if stderr is redirected.
1026 # Redirect stdin to placate older versions of autoconf. Sigh.
1027 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1029 echo "$ac_t""found" 1>&6
1031 ACLOCAL="$missing_dir/missing aclocal"
1032 echo "$ac_t""missing" 1>&6
1035 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1036 echo "configure:1037: checking for working autoconf" >&5
1037 # Run test in a subshell; some versions of sh will print an error if
1038 # an executable is not found, even if stderr is redirected.
1039 # Redirect stdin to placate older versions of autoconf. Sigh.
1040 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1042 echo "$ac_t""found" 1>&6
1044 AUTOCONF="$missing_dir/missing autoconf"
1045 echo "$ac_t""missing" 1>&6
1048 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1049 echo "configure:1050: checking for working automake" >&5
1050 # Run test in a subshell; some versions of sh will print an error if
1051 # an executable is not found, even if stderr is redirected.
1052 # Redirect stdin to placate older versions of autoconf. Sigh.
1053 if (automake --version) < /dev/null > /dev/null 2>&1; then
1055 echo "$ac_t""found" 1>&6
1057 AUTOMAKE="$missing_dir/missing automake"
1058 echo "$ac_t""missing" 1>&6
1061 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1062 echo "configure:1063: checking for working autoheader" >&5
1063 # Run test in a subshell; some versions of sh will print an error if
1064 # an executable is not found, even if stderr is redirected.
1065 # Redirect stdin to placate older versions of autoconf. Sigh.
1066 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1067 AUTOHEADER=autoheader
1068 echo "$ac_t""found" 1>&6
1070 AUTOHEADER="$missing_dir/missing autoheader"
1071 echo "$ac_t""missing" 1>&6
1074 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1075 echo "configure:1076: checking for working makeinfo" >&5
1076 # Run test in a subshell; some versions of sh will print an error if
1077 # an executable is not found, even if stderr is redirected.
1078 # Redirect stdin to placate older versions of autoconf. Sigh.
1079 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1081 echo "$ac_t""found" 1>&6
1083 MAKEINFO="$missing_dir/missing makeinfo"
1084 echo "$ac_t""missing" 1>&6
1087 install_sh="$missing_dir/install-sh"
1088 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1090 for ac_prog in gnutar gtar tar
1092 # Extract the first word of "$ac_prog", so it can be a program name with args.
1093 set dummy $ac_prog; ac_word=$2
1094 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1095 echo "configure:1096: checking for $ac_word" >&5
1096 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1097 echo $ac_n "(cached) $ac_c" 1>&6
1099 if test -n "$AMTAR"; then
1100 ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1102 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1104 for ac_dir in $ac_dummy; do
1105 test -z "$ac_dir" && ac_dir=.
1106 if test -f $ac_dir/$ac_word; then
1107 ac_cv_prog_AMTAR="$ac_prog"
1114 AMTAR="$ac_cv_prog_AMTAR"
1115 if test -n "$AMTAR"; then
1116 echo "$ac_t""$AMTAR" 1>&6
1118 echo "$ac_t""no" 1>&6
1121 test -n "$AMTAR" && break
1126 if test -n "$AMTAR"; then
1127 if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1134 cat >> confdefs.h <<EOF
1135 #define OPENLDAP_PACKAGE "$PACKAGE"
1138 cat >> confdefs.h <<EOF
1139 #define OPENLDAP_VERSION "$VERSION"
1145 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1146 echo "configure:1147: checking configure arguments" >&5
1151 ldap_subdir="/openldap"
1153 # Check whether --with-subdir or --without-subdir was given.
1154 if test "${with_subdir+set}" = set; then
1155 withval="$with_subdir"
1162 ldap_subdir="$withval"
1165 ldap_subdir="/$withval"
1172 # OpenLDAP --enable-debug
1173 # Check whether --enable-debug or --disable-debug was given.
1174 if test "${enable_debug+set}" = set; then
1175 enableval="$enable_debug"
1178 for ol_val in auto yes no ; do
1179 if test "$enableval" = "$ol_val" ; then
1183 if test "$ol_arg" = "invalid" ; then
1184 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1186 ol_enable_debug="$ol_arg"
1189 ol_enable_debug="yes"
1191 # end --enable-debug
1192 # OpenLDAP --enable-syslog
1193 # Check whether --enable-syslog or --disable-syslog was given.
1194 if test "${enable_syslog+set}" = set; then
1195 enableval="$enable_syslog"
1198 for ol_val in auto yes no ; do
1199 if test "$enableval" = "$ol_val" ; then
1203 if test "$ol_arg" = "invalid" ; then
1204 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1206 ol_enable_syslog="$ol_arg"
1209 ol_enable_syslog="auto"
1211 # end --enable-syslog
1212 # OpenLDAP --enable-proctitle
1213 # Check whether --enable-proctitle or --disable-proctitle was given.
1214 if test "${enable_proctitle+set}" = set; then
1215 enableval="$enable_proctitle"
1218 for ol_val in auto yes no ; do
1219 if test "$enableval" = "$ol_val" ; then
1223 if test "$ol_arg" = "invalid" ; then
1224 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1226 ol_enable_proctitle="$ol_arg"
1229 ol_enable_proctitle="yes"
1231 # end --enable-proctitle
1232 # OpenLDAP --enable-cache
1233 # Check whether --enable-cache or --disable-cache was given.
1234 if test "${enable_cache+set}" = set; then
1235 enableval="$enable_cache"
1238 for ol_val in auto yes no ; do
1239 if test "$enableval" = "$ol_val" ; then
1243 if test "$ol_arg" = "invalid" ; then
1244 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1246 ol_enable_cache="$ol_arg"
1249 ol_enable_cache="yes"
1251 # end --enable-cache
1252 # OpenLDAP --enable-referrals
1253 # Check whether --enable-referrals or --disable-referrals was given.
1254 if test "${enable_referrals+set}" = set; then
1255 enableval="$enable_referrals"
1258 for ol_val in auto yes no ; do
1259 if test "$enableval" = "$ol_val" ; then
1263 if test "$ol_arg" = "invalid" ; then
1264 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1266 ol_enable_referrals="$ol_arg"
1269 ol_enable_referrals="yes"
1271 # end --enable-referrals
1272 # OpenLDAP --enable-kbind
1273 # Check whether --enable-kbind or --disable-kbind was given.
1274 if test "${enable_kbind+set}" = set; then
1275 enableval="$enable_kbind"
1278 for ol_val in auto yes no ; do
1279 if test "$enableval" = "$ol_val" ; then
1283 if test "$ol_arg" = "invalid" ; then
1284 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1286 ol_enable_kbind="$ol_arg"
1289 ol_enable_kbind="auto"
1291 # end --enable-kbind
1292 # OpenLDAP --enable-cldap
1293 # Check whether --enable-cldap or --disable-cldap was given.
1294 if test "${enable_cldap+set}" = set; then
1295 enableval="$enable_cldap"
1298 for ol_val in auto yes no ; do
1299 if test "$enableval" = "$ol_val" ; then
1303 if test "$ol_arg" = "invalid" ; then
1304 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1306 ol_enable_cldap="$ol_arg"
1309 ol_enable_cldap="no"
1311 # end --enable-cldap
1312 # OpenLDAP --enable-ipv6
1313 # Check whether --enable-ipv6 or --disable-ipv6 was given.
1314 if test "${enable_ipv6+set}" = set; then
1315 enableval="$enable_ipv6"
1318 for ol_val in auto yes no ; do
1319 if test "$enableval" = "$ol_val" ; then
1323 if test "$ol_arg" = "invalid" ; then
1324 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1326 ol_enable_ipv6="$ol_arg"
1329 ol_enable_ipv6="auto"
1332 # OpenLDAP --enable-unix
1333 # Check whether --enable-unix or --disable-unix was given.
1334 if test "${enable_unix+set}" = set; then
1335 enableval="$enable_unix"
1338 for ol_val in auto yes no ; do
1339 if test "$enableval" = "$ol_val" ; then
1343 if test "$ol_arg" = "invalid" ; then
1344 { echo "configure: error: bad value $enableval for --enable-unix" 1>&2; exit 1; }
1346 ol_enable_unix="$ol_arg"
1349 ol_enable_unix="auto"
1352 # OpenLDAP --enable-x_compile
1353 # Check whether --enable-x_compile or --disable-x_compile was given.
1354 if test "${enable_x_compile+set}" = set; then
1355 enableval="$enable_x_compile"
1358 for ol_val in yes no ; do
1359 if test "$enableval" = "$ol_val" ; then
1363 if test "$ol_arg" = "invalid" ; then
1364 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1366 ol_enable_x_compile="$ol_arg"
1369 ol_enable_x_compile="no"
1371 # end --enable-x_compile
1374 # OpenLDAP --with-cyrus_sasl
1375 # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1376 if test "${with_cyrus_sasl+set}" = set; then
1377 withval="$with_cyrus_sasl"
1380 for ol_val in auto yes no ; do
1381 if test "$withval" = "$ol_val" ; then
1385 if test "$ol_arg" = "invalid" ; then
1386 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1388 ol_with_cyrus_sasl="$ol_arg"
1391 ol_with_cyrus_sasl="auto"
1393 # end --with-cyrus_sasl
1395 # OpenLDAP --with-fetch
1396 # Check whether --with-fetch or --without-fetch was given.
1397 if test "${with_fetch+set}" = set; then
1398 withval="$with_fetch"
1401 for ol_val in auto yes no ; do
1402 if test "$withval" = "$ol_val" ; then
1406 if test "$ol_arg" = "invalid" ; then
1407 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1409 ol_with_fetch="$ol_arg"
1412 ol_with_fetch="auto"
1416 # OpenLDAP --with-kerberos
1417 # Check whether --with-kerberos or --without-kerberos was given.
1418 if test "${with_kerberos+set}" = set; then
1419 withval="$with_kerberos"
1422 for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1423 if test "$withval" = "$ol_val" ; then
1427 if test "$ol_arg" = "invalid" ; then
1428 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1430 ol_with_kerberos="$ol_arg"
1433 ol_with_kerberos="auto"
1435 # end --with-kerberos
1437 # OpenLDAP --with-readline
1438 # Check whether --with-readline or --without-readline was given.
1439 if test "${with_readline+set}" = set; then
1440 withval="$with_readline"
1443 for ol_val in auto yes no ; do
1444 if test "$withval" = "$ol_val" ; then
1448 if test "$ol_arg" = "invalid" ; then
1449 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1451 ol_with_readline="$ol_arg"
1454 ol_with_readline="auto"
1456 # end --with-readline
1458 # OpenLDAP --with-threads
1459 # Check whether --with-threads or --without-threads was given.
1460 if test "${with_threads+set}" = set; then
1461 withval="$with_threads"
1464 for ol_val in auto nt posix mach pth lwp yes no manual ; do
1465 if test "$withval" = "$ol_val" ; then
1469 if test "$ol_arg" = "invalid" ; then
1470 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1472 ol_with_threads="$ol_arg"
1475 ol_with_threads="auto"
1477 # end --with-threads
1479 # OpenLDAP --with-tls
1480 # Check whether --with-tls or --without-tls was given.
1481 if test "${with_tls+set}" = set; then
1485 for ol_val in auto ssleay openssl yes no ; do
1486 if test "$withval" = "$ol_val" ; then
1490 if test "$ol_arg" = "invalid" ; then
1491 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1493 ol_with_tls="$ol_arg"
1500 # OpenLDAP --with-yielding_select
1501 # Check whether --with-yielding_select or --without-yielding_select was given.
1502 if test "${with_yielding_select+set}" = set; then
1503 withval="$with_yielding_select"
1506 for ol_val in auto yes no manual ; do
1507 if test "$withval" = "$ol_val" ; then
1511 if test "$ol_arg" = "invalid" ; then
1512 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1514 ol_with_yielding_select="$ol_arg"
1517 ol_with_yielding_select="auto"
1519 # end --with-yielding_select
1523 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1524 if test "${with_xxslapdoptions+set}" = set; then
1525 withval="$with_xxslapdoptions"
1529 # OpenLDAP --enable-slapd
1530 # Check whether --enable-slapd or --disable-slapd was given.
1531 if test "${enable_slapd+set}" = set; then
1532 enableval="$enable_slapd"
1535 for ol_val in auto yes no ; do
1536 if test "$enableval" = "$ol_val" ; then
1540 if test "$ol_arg" = "invalid" ; then
1541 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1543 ol_enable_slapd="$ol_arg"
1546 ol_enable_slapd="yes"
1548 # end --enable-slapd
1549 # OpenLDAP --enable-cleartext
1550 # Check whether --enable-cleartext or --disable-cleartext was given.
1551 if test "${enable_cleartext+set}" = set; then
1552 enableval="$enable_cleartext"
1555 for ol_val in auto yes no ; do
1556 if test "$enableval" = "$ol_val" ; then
1560 if test "$ol_arg" = "invalid" ; then
1561 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1563 ol_enable_cleartext="$ol_arg"
1566 ol_enable_cleartext="yes"
1568 # end --enable-cleartext
1569 # OpenLDAP --enable-crypt
1570 # Check whether --enable-crypt or --disable-crypt was given.
1571 if test "${enable_crypt+set}" = set; then
1572 enableval="$enable_crypt"
1575 for ol_val in auto yes no ; do
1576 if test "$enableval" = "$ol_val" ; then
1580 if test "$ol_arg" = "invalid" ; then
1581 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1583 ol_enable_crypt="$ol_arg"
1586 ol_enable_crypt="auto"
1588 # end --enable-crypt
1589 # OpenLDAP --enable-kpasswd
1590 # Check whether --enable-kpasswd or --disable-kpasswd was given.
1591 if test "${enable_kpasswd+set}" = set; then
1592 enableval="$enable_kpasswd"
1595 for ol_val in auto yes no ; do
1596 if test "$enableval" = "$ol_val" ; then
1600 if test "$ol_arg" = "invalid" ; then
1601 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1603 ol_enable_kpasswd="$ol_arg"
1606 ol_enable_kpasswd="no"
1608 # end --enable-kpasswd
1609 # OpenLDAP --enable-spasswd
1610 # Check whether --enable-spasswd or --disable-spasswd was given.
1611 if test "${enable_spasswd+set}" = set; then
1612 enableval="$enable_spasswd"
1615 for ol_val in auto yes no ; do
1616 if test "$enableval" = "$ol_val" ; then
1620 if test "$ol_arg" = "invalid" ; then
1621 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1623 ol_enable_spasswd="$ol_arg"
1626 ol_enable_spasswd="no"
1628 # end --enable-spasswd
1629 # OpenLDAP --enable-modules
1630 # Check whether --enable-modules or --disable-modules was given.
1631 if test "${enable_modules+set}" = set; then
1632 enableval="$enable_modules"
1635 for ol_val in auto yes no ; do
1636 if test "$enableval" = "$ol_val" ; then
1640 if test "$ol_arg" = "invalid" ; then
1641 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1643 ol_enable_modules="$ol_arg"
1646 ol_enable_modules="no"
1648 # end --enable-modules
1649 # OpenLDAP --enable-multimaster
1650 # Check whether --enable-multimaster or --disable-multimaster was given.
1651 if test "${enable_multimaster+set}" = set; then
1652 enableval="$enable_multimaster"
1655 for ol_val in auto yes no ; do
1656 if test "$enableval" = "$ol_val" ; then
1660 if test "$ol_arg" = "invalid" ; then
1661 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1663 ol_enable_multimaster="$ol_arg"
1666 ol_enable_multimaster="no"
1668 # end --enable-multimaster
1669 # OpenLDAP --enable-phonetic
1670 # Check whether --enable-phonetic or --disable-phonetic was given.
1671 if test "${enable_phonetic+set}" = set; then
1672 enableval="$enable_phonetic"
1675 for ol_val in auto yes no ; do
1676 if test "$enableval" = "$ol_val" ; then
1680 if test "$ol_arg" = "invalid" ; then
1681 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1683 ol_enable_phonetic="$ol_arg"
1686 ol_enable_phonetic="no"
1688 # end --enable-phonetic
1689 # OpenLDAP --enable-rlookups
1690 # Check whether --enable-rlookups or --disable-rlookups was given.
1691 if test "${enable_rlookups+set}" = set; then
1692 enableval="$enable_rlookups"
1695 for ol_val in auto yes no ; do
1696 if test "$enableval" = "$ol_val" ; then
1700 if test "$ol_arg" = "invalid" ; then
1701 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1703 ol_enable_rlookups="$ol_arg"
1706 ol_enable_rlookups="auto"
1708 # end --enable-rlookups
1709 # OpenLDAP --enable-aci
1710 # Check whether --enable-aci or --disable-aci was given.
1711 if test "${enable_aci+set}" = set; then
1712 enableval="$enable_aci"
1715 for ol_val in auto yes no ; do
1716 if test "$enableval" = "$ol_val" ; then
1720 if test "$ol_arg" = "invalid" ; then
1721 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1723 ol_enable_aci="$ol_arg"
1729 # OpenLDAP --enable-wrappers
1730 # Check whether --enable-wrappers or --disable-wrappers was given.
1731 if test "${enable_wrappers+set}" = set; then
1732 enableval="$enable_wrappers"
1735 for ol_val in auto yes no ; do
1736 if test "$enableval" = "$ol_val" ; then
1740 if test "$ol_arg" = "invalid" ; then
1741 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1743 ol_enable_wrappers="$ol_arg"
1746 ol_enable_wrappers="no"
1748 # end --enable-wrappers
1749 # OpenLDAP --enable-dynamic
1750 # Check whether --enable-dynamic or --disable-dynamic was given.
1751 if test "${enable_dynamic+set}" = set; then
1752 enableval="$enable_dynamic"
1755 for ol_val in auto yes no ; do
1756 if test "$enableval" = "$ol_val" ; then
1760 if test "$ol_arg" = "invalid" ; then
1761 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1763 ol_enable_dynamic="$ol_arg"
1766 ol_enable_dynamic="no"
1768 # end --enable-dynamic
1770 # OpenLDAP --enable-dnssrv
1771 # Check whether --enable-dnssrv or --disable-dnssrv was given.
1772 if test "${enable_dnssrv+set}" = set; then
1773 enableval="$enable_dnssrv"
1776 for ol_val in auto yes no ; do
1777 if test "$enableval" = "$ol_val" ; then
1781 if test "$ol_arg" = "invalid" ; then
1782 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1784 ol_enable_dnssrv="$ol_arg"
1787 ol_enable_dnssrv="no"
1789 # end --enable-dnssrv
1790 # OpenLDAP --with-dnssrv_module
1791 # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1792 if test "${with_dnssrv_module+set}" = set; then
1793 withval="$with_dnssrv_module"
1796 for ol_val in static dynamic ; do
1797 if test "$withval" = "$ol_val" ; then
1801 if test "$ol_arg" = "invalid" ; then
1802 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1804 ol_with_dnssrv_module="$ol_arg"
1807 ol_with_dnssrv_module="static"
1809 # end --with-dnssrv_module
1811 # OpenLDAP --enable-ldap
1812 # Check whether --enable-ldap or --disable-ldap was given.
1813 if test "${enable_ldap+set}" = set; then
1814 enableval="$enable_ldap"
1817 for ol_val in auto yes no ; do
1818 if test "$enableval" = "$ol_val" ; then
1822 if test "$ol_arg" = "invalid" ; then
1823 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1825 ol_enable_ldap="$ol_arg"
1831 # OpenLDAP --with-ldap_module
1832 # Check whether --with-ldap_module or --without-ldap_module was given.
1833 if test "${with_ldap_module+set}" = set; then
1834 withval="$with_ldap_module"
1837 for ol_val in static dynamic ; do
1838 if test "$withval" = "$ol_val" ; then
1842 if test "$ol_arg" = "invalid" ; then
1843 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1845 ol_with_ldap_module="$ol_arg"
1848 ol_with_ldap_module="static"
1850 # end --with-ldap_module
1852 # OpenLDAP --enable-ldbm
1853 # Check whether --enable-ldbm or --disable-ldbm was given.
1854 if test "${enable_ldbm+set}" = set; then
1855 enableval="$enable_ldbm"
1858 for ol_val in auto yes no ; do
1859 if test "$enableval" = "$ol_val" ; then
1863 if test "$ol_arg" = "invalid" ; then
1864 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1866 ol_enable_ldbm="$ol_arg"
1869 ol_enable_ldbm="yes"
1872 # OpenLDAP --with-ldbm_api
1873 # Check whether --with-ldbm_api or --without-ldbm_api was given.
1874 if test "${with_ldbm_api+set}" = set; then
1875 withval="$with_ldbm_api"
1878 for ol_val in auto berkeley bcompat mdbm gdbm ; do
1879 if test "$withval" = "$ol_val" ; then
1883 if test "$ol_arg" = "invalid" ; then
1884 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1886 ol_with_ldbm_api="$ol_arg"
1889 ol_with_ldbm_api="auto"
1891 # end --with-ldbm_api
1893 # OpenLDAP --with-ldbm_module
1894 # Check whether --with-ldbm_module or --without-ldbm_module was given.
1895 if test "${with_ldbm_module+set}" = set; then
1896 withval="$with_ldbm_module"
1899 for ol_val in static dynamic ; do
1900 if test "$withval" = "$ol_val" ; then
1904 if test "$ol_arg" = "invalid" ; then
1905 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1907 ol_with_ldbm_module="$ol_arg"
1910 ol_with_ldbm_module="static"
1912 # end --with-ldbm_module
1914 # OpenLDAP --with-ldbm_type
1915 # Check whether --with-ldbm_type or --without-ldbm_type was given.
1916 if test "${with_ldbm_type+set}" = set; then
1917 withval="$with_ldbm_type"
1920 for ol_val in auto btree hash ; do
1921 if test "$withval" = "$ol_val" ; then
1925 if test "$ol_arg" = "invalid" ; then
1926 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1928 ol_with_ldbm_type="$ol_arg"
1931 ol_with_ldbm_type="auto"
1933 # end --with-ldbm_type
1935 # OpenLDAP --enable-passwd
1936 # Check whether --enable-passwd or --disable-passwd was given.
1937 if test "${enable_passwd+set}" = set; then
1938 enableval="$enable_passwd"
1941 for ol_val in auto yes no ; do
1942 if test "$enableval" = "$ol_val" ; then
1946 if test "$ol_arg" = "invalid" ; then
1947 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1949 ol_enable_passwd="$ol_arg"
1952 ol_enable_passwd="no"
1954 # end --enable-passwd
1955 # OpenLDAP --with-passwd_module
1956 # Check whether --with-passwd_module or --without-passwd_module was given.
1957 if test "${with_passwd_module+set}" = set; then
1958 withval="$with_passwd_module"
1961 for ol_val in static dynamic ; do
1962 if test "$withval" = "$ol_val" ; then
1966 if test "$ol_arg" = "invalid" ; then
1967 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1969 ol_with_passwd_module="$ol_arg"
1972 ol_with_passwd_module="static"
1974 # end --with-passwd_module
1976 # OpenLDAP --enable-shell
1977 # Check whether --enable-shell or --disable-shell was given.
1978 if test "${enable_shell+set}" = set; then
1979 enableval="$enable_shell"
1982 for ol_val in auto yes no ; do
1983 if test "$enableval" = "$ol_val" ; then
1987 if test "$ol_arg" = "invalid" ; then
1988 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
1990 ol_enable_shell="$ol_arg"
1993 ol_enable_shell="no"
1995 # end --enable-shell
1996 # OpenLDAP --with-shell_module
1997 # Check whether --with-shell_module or --without-shell_module was given.
1998 if test "${with_shell_module+set}" = set; then
1999 withval="$with_shell_module"
2002 for ol_val in static dynamic ; do
2003 if test "$withval" = "$ol_val" ; then
2007 if test "$ol_arg" = "invalid" ; then
2008 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2010 ol_with_shell_module="$ol_arg"
2013 ol_with_shell_module="static"
2015 # end --with-shell_module
2017 # OpenLDAP --enable-sql
2018 # Check whether --enable-sql or --disable-sql was given.
2019 if test "${enable_sql+set}" = set; then
2020 enableval="$enable_sql"
2023 for ol_val in auto yes no ; do
2024 if test "$enableval" = "$ol_val" ; then
2028 if test "$ol_arg" = "invalid" ; then
2029 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2031 ol_enable_sql="$ol_arg"
2037 # OpenLDAP --with-sql_module
2038 # Check whether --with-sql_module or --without-sql_module was given.
2039 if test "${with_sql_module+set}" = set; then
2040 withval="$with_sql_module"
2043 for ol_val in static dynamic ; do
2044 if test "$withval" = "$ol_val" ; then
2048 if test "$ol_arg" = "invalid" ; then
2049 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2051 ol_with_sql_module="$ol_arg"
2054 ol_with_sql_module="static"
2056 # end --with-sql_module
2059 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2060 if test "${with_xxslurpdoptions+set}" = set; then
2061 withval="$with_xxslurpdoptions"
2065 # OpenLDAP --enable-slurpd
2066 # Check whether --enable-slurpd or --disable-slurpd was given.
2067 if test "${enable_slurpd+set}" = set; then
2068 enableval="$enable_slurpd"
2071 for ol_val in auto yes no ; do
2072 if test "$enableval" = "$ol_val" ; then
2076 if test "$ol_arg" = "invalid" ; then
2077 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2079 ol_enable_slurpd="$ol_arg"
2082 ol_enable_slurpd="auto"
2084 # end --enable-slurpd
2086 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2087 if test "${with_xxliboptions+set}" = set; then
2088 withval="$with_xxliboptions"
2092 # Check whether --enable-static or --disable-static was given.
2093 if test "${enable_static+set}" = set; then
2094 enableval="$enable_static"
2095 p=${PACKAGE-default}
2096 case "$enableval" in
2097 yes) enable_static=yes ;;
2098 no) enable_static=no ;;
2101 # Look at the argument we got. We use all the common list separators.
2102 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2103 for pkg in $enableval; do
2104 if test "X$pkg" = "X$p"; then
2115 # Check whether --enable-shared or --disable-shared was given.
2116 if test "${enable_shared+set}" = set; then
2117 enableval="$enable_shared"
2118 p=${PACKAGE-default}
2119 case "$enableval" in
2120 yes) enable_shared=yes ;;
2121 no) enable_shared=no ;;
2124 # Look at the argument we got. We use all the common list separators.
2125 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2126 for pkg in $enableval; do
2127 if test "X$pkg" = "X$p"; then
2141 if test $ol_enable_slapd = no ; then
2142 if test $ol_enable_dnssrv = yes ; then
2143 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2145 if test $ol_enable_ldap = yes ; then
2146 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2148 if test $ol_enable_ldbm = yes ; then
2149 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2151 if test $ol_enable_passwd = yes ; then
2152 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2154 if test $ol_enable_shell = yes ; then
2155 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2157 if test $ol_enable_sql = yes ; then
2158 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2160 if test $ol_enable_modules = yes ; then
2161 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2163 if test $ol_enable_multimaster = yes ; then
2164 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2166 if test $ol_enable_wrappers = yes ; then
2167 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2169 if test $ol_enable_phonetic = yes ; then
2170 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2172 if test $ol_enable_rlookups = yes ; then
2173 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2175 if test $ol_enable_aci = yes ; then
2176 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2178 if test $ol_with_ldbm_api != auto ; then
2179 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2181 if test $ol_with_ldbm_type != auto ; then
2182 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2184 if test $ol_with_dnssrv_module != static ; then
2185 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2187 if test $ol_with_ldap_module != static ; then
2188 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2190 if test $ol_with_ldbm_module != static ; then
2191 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2193 if test $ol_with_passwd_module != static ; then
2194 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2196 if test $ol_with_shell_module != static ; then
2197 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2199 if test $ol_with_sql_module != static ; then
2200 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2202 if test $ol_enable_slurpd = yes ; then
2203 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2206 # force settings to no
2214 ol_enable_modules=no
2215 ol_enable_multimaster=no
2216 ol_enable_phonetic=no
2217 ol_enable_rlookups=no
2219 ol_enable_wrappers=no
2220 ol_enable_dynamic=no
2223 ol_with_ldbm_type=no
2225 ol_with_dnssrv_module=static
2226 ol_with_ldap_module=static
2227 ol_with_ldbm_module=static
2228 ol_with_passwd_module=static
2229 ol_with_shell_module=static
2230 ol_with_sql_module=static
2234 elif test $ol_enable_ldbm = no ; then
2236 if test $ol_with_ldbm_api != auto ; then
2237 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2240 if test $ol_with_ldbm_type != auto ; then
2241 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2244 if test $ol_with_ldbm_module != static ; then
2245 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2248 if test $ol_enable_modules != yes -a \
2249 $ol_enable_dnssrv = no -a \
2250 $ol_enable_ldap = no -a \
2251 $ol_enable_passwd = no -a \
2252 $ol_enable_shell = no -a \
2253 $ol_enable_sql = no ; then
2254 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2258 ol_with_ldbm_type=no
2259 ol_with_ldbm_module=static
2262 if test $ol_with_ldbm_api = gdbm -a \
2263 $ol_with_ldbm_type = btree ; then
2264 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2266 if test $ol_with_ldbm_api = mdbm -a \
2267 $ol_with_ldbm_type = btree ; then
2268 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2270 if test $ol_with_ldbm_api = ndbm -a \
2271 $ol_with_ldbm_type = btree ; then
2272 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2276 if test $ol_enable_slurpd = yes ; then
2277 if test $ol_with_threads = no ; then
2278 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2282 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2283 if test $ol_with_kerberos = no ; then
2284 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2286 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2287 if test $ol_with_kerberos != auto ; then
2288 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2294 if test $ol_enable_spasswd = yes ; then
2295 if test $ol_with_cyrus_sasl = no ; then
2296 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2301 echo "$ac_t""done" 1>&6
2324 BUILD_DNSSRV_DYNAMIC=static
2325 BUILD_LDAP_DYNAMIC=static
2326 BUILD_LDBM_DYNAMIC=static
2327 BUILD_PASSWD_DYNAMIC=static
2328 BUILD_SHELL_DYNAMIC=static
2329 BUILD_SQL_DYNAMIC=static
2331 SLAPD_MODULES_LDFLAGS=
2332 SLAPD_MODULES_CPPFLAGS=
2350 cat >> confdefs.h <<\EOF
2351 #define HAVE_MKVERSION 1
2359 *-*-aix*) if test -z "$CC" ; then
2360 case "$ol_with_threads" in
2361 auto | yes | posix) ol_aix_threads=yes ;;
2367 if test $ol_aix_threads = yes ; then
2368 if test -z "${CC}" ; then
2369 for ac_prog in cc_r xlc_r cc
2371 # Extract the first word of "$ac_prog", so it can be a program name with args.
2372 set dummy $ac_prog; ac_word=$2
2373 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2374 echo "configure:2375: checking for $ac_word" >&5
2375 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2376 echo $ac_n "(cached) $ac_c" 1>&6
2378 if test -n "$CC"; then
2379 ac_cv_prog_CC="$CC" # Let the user override the test.
2381 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2383 for ac_dir in $ac_dummy; do
2384 test -z "$ac_dir" && ac_dir=.
2385 if test -f $ac_dir/$ac_word; then
2386 ac_cv_prog_CC="$ac_prog"
2394 if test -n "$CC"; then
2395 echo "$ac_t""$CC" 1>&6
2397 echo "$ac_t""no" 1>&6
2400 test -n "$CC" && break
2404 if test "$CC" = cc ; then
2405 if test $ol_with_threads != auto ; then
2406 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2408 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2414 if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2415 ol_with_threads=posix
2416 ol_cv_pthread_create=yes
2420 if test -z "${CC}"; then
2423 # Extract the first word of "$ac_prog", so it can be a program name with args.
2424 set dummy $ac_prog; ac_word=$2
2425 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2426 echo "configure:2427: checking for $ac_word" >&5
2427 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2428 echo $ac_n "(cached) $ac_c" 1>&6
2430 if test -n "$CC"; then
2431 ac_cv_prog_CC="$CC" # Let the user override the test.
2433 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2435 for ac_dir in $ac_dummy; do
2436 test -z "$ac_dir" && ac_dir=.
2437 if test -f $ac_dir/$ac_word; then
2438 ac_cv_prog_CC="$ac_prog"
2446 if test -n "$CC"; then
2447 echo "$ac_t""$CC" 1>&6
2449 echo "$ac_t""no" 1>&6
2452 test -n "$CC" && break
2460 # Check whether --enable-fast-install or --disable-fast-install was given.
2461 if test "${enable_fast_install+set}" = set; then
2462 enableval="$enable_fast_install"
2463 p=${PACKAGE-default}
2464 case "$enableval" in
2465 yes) enable_fast_install=yes ;;
2466 no) enable_fast_install=no ;;
2468 enable_fast_install=no
2469 # Look at the argument we got. We use all the common list separators.
2470 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2471 for pkg in $enableval; do
2472 if test "X$pkg" = "X$p"; then
2473 enable_fast_install=yes
2480 enable_fast_install=yes
2483 # Extract the first word of "ranlib", so it can be a program name with args.
2484 set dummy ranlib; ac_word=$2
2485 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2486 echo "configure:2487: checking for $ac_word" >&5
2487 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2488 echo $ac_n "(cached) $ac_c" 1>&6
2490 if test -n "$RANLIB"; then
2491 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2493 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2495 for ac_dir in $ac_dummy; do
2496 test -z "$ac_dir" && ac_dir=.
2497 if test -f $ac_dir/$ac_word; then
2498 ac_cv_prog_RANLIB="ranlib"
2503 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2506 RANLIB="$ac_cv_prog_RANLIB"
2507 if test -n "$RANLIB"; then
2508 echo "$ac_t""$RANLIB" 1>&6
2510 echo "$ac_t""no" 1>&6
2513 # Extract the first word of "gcc", so it can be a program name with args.
2514 set dummy gcc; ac_word=$2
2515 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2516 echo "configure:2517: checking for $ac_word" >&5
2517 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2518 echo $ac_n "(cached) $ac_c" 1>&6
2520 if test -n "$CC"; then
2521 ac_cv_prog_CC="$CC" # Let the user override the test.
2523 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2525 for ac_dir in $ac_dummy; do
2526 test -z "$ac_dir" && ac_dir=.
2527 if test -f $ac_dir/$ac_word; then
2536 if test -n "$CC"; then
2537 echo "$ac_t""$CC" 1>&6
2539 echo "$ac_t""no" 1>&6
2542 if test -z "$CC"; then
2543 # Extract the first word of "cc", so it can be a program name with args.
2544 set dummy cc; ac_word=$2
2545 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2546 echo "configure:2547: checking for $ac_word" >&5
2547 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2548 echo $ac_n "(cached) $ac_c" 1>&6
2550 if test -n "$CC"; then
2551 ac_cv_prog_CC="$CC" # Let the user override the test.
2553 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2556 for ac_dir in $ac_dummy; do
2557 test -z "$ac_dir" && ac_dir=.
2558 if test -f $ac_dir/$ac_word; then
2559 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2560 ac_prog_rejected=yes
2568 if test $ac_prog_rejected = yes; then
2569 # We found a bogon in the path, so make sure we never use it.
2570 set dummy $ac_cv_prog_CC
2572 if test $# -gt 0; then
2573 # We chose a different compiler from the bogus one.
2574 # However, it has the same basename, so the bogon will be chosen
2575 # first if we set CC to just the basename; use the full file name.
2577 set dummy "$ac_dir/$ac_word" "$@"
2585 if test -n "$CC"; then
2586 echo "$ac_t""$CC" 1>&6
2588 echo "$ac_t""no" 1>&6
2591 if test -z "$CC"; then
2592 case "`uname -s`" in
2593 *win32* | *WIN32* | *CYGWIN*)
2594 # Extract the first word of "cl", so it can be a program name with args.
2595 set dummy cl; ac_word=$2
2596 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2597 echo "configure:2598: checking for $ac_word" >&5
2598 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2599 echo $ac_n "(cached) $ac_c" 1>&6
2601 if test -n "$CC"; then
2602 ac_cv_prog_CC="$CC" # Let the user override the test.
2604 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2606 for ac_dir in $ac_dummy; do
2607 test -z "$ac_dir" && ac_dir=.
2608 if test -f $ac_dir/$ac_word; then
2617 if test -n "$CC"; then
2618 echo "$ac_t""$CC" 1>&6
2620 echo "$ac_t""no" 1>&6
2625 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2628 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2629 echo "configure:2630: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2632 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2633 ac_cpp='$CPP $CPPFLAGS'
2634 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2635 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2636 cross_compiling=$ac_cv_prog_cc_cross
2638 cat > conftest.$ac_ext << EOF
2640 #line 2641 "configure"
2641 #include "confdefs.h"
2645 if { (eval echo configure:2646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2646 ac_cv_prog_cc_works=yes
2647 # If we can't run a trivial program, we are probably using a cross compiler.
2648 if (./conftest; exit) 2>/dev/null; then
2649 ac_cv_prog_cc_cross=no
2651 ac_cv_prog_cc_cross=yes
2654 echo "configure: failed program was:" >&5
2655 cat conftest.$ac_ext >&5
2656 ac_cv_prog_cc_works=no
2660 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2661 ac_cpp='$CPP $CPPFLAGS'
2662 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2663 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2664 cross_compiling=$ac_cv_prog_cc_cross
2666 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2667 if test $ac_cv_prog_cc_works = no; then
2668 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2670 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2671 echo "configure:2672: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2672 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2673 cross_compiling=$ac_cv_prog_cc_cross
2675 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2676 echo "configure:2677: checking whether we are using GNU C" >&5
2677 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2678 echo $ac_n "(cached) $ac_c" 1>&6
2680 cat > conftest.c <<EOF
2685 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2686: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2692 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2694 if test $ac_cv_prog_gcc = yes; then
2700 ac_test_CFLAGS="${CFLAGS+set}"
2701 ac_save_CFLAGS="$CFLAGS"
2703 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2704 echo "configure:2705: checking whether ${CC-cc} accepts -g" >&5
2705 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2706 echo $ac_n "(cached) $ac_c" 1>&6
2708 echo 'void f(){}' > conftest.c
2709 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2718 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2719 if test "$ac_test_CFLAGS" = set; then
2720 CFLAGS="$ac_save_CFLAGS"
2721 elif test $ac_cv_prog_cc_g = yes; then
2722 if test "$GCC" = yes; then
2728 if test "$GCC" = yes; then
2735 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2736 if test "${with_gnu_ld+set}" = set; then
2737 withval="$with_gnu_ld"
2738 test "$withval" = no || with_gnu_ld=yes
2744 if test "$ac_cv_prog_gcc" = yes; then
2745 # Check if gcc -print-prog-name=ld gives a path.
2746 echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2747 echo "configure:2748: checking for ld used by GCC" >&5
2748 ac_prog=`($CC -print-prog-name=ld) 2>&5`
2750 # Accept absolute paths.
2751 [\\/]* | [A-Za-z]:[\\/]*)
2752 re_direlt='/[^/][^/]*/\.\./'
2753 # Canonicalize the path of ld
2754 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2755 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2756 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2758 test -z "$LD" && LD="$ac_prog"
2761 # If it fails, then pretend we aren't using GCC.
2765 # If it is relative, then search for the first ld in PATH.
2769 elif test "$with_gnu_ld" = yes; then
2770 echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2771 echo "configure:2772: checking for GNU ld" >&5
2773 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2774 echo "configure:2775: checking for non-GNU ld" >&5
2776 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2777 echo $ac_n "(cached) $ac_c" 1>&6
2779 if test -z "$LD"; then
2780 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2781 for ac_dir in $PATH; do
2782 test -z "$ac_dir" && ac_dir=.
2783 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2784 ac_cv_path_LD="$ac_dir/$ac_prog"
2785 # Check to see if the program is GNU ld. I'd rather use --version,
2786 # but apparently some GNU ld's only accept -v.
2787 # Break only if it was the GNU/non-GNU ld that we prefer.
2788 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2789 test "$with_gnu_ld" != no && break
2791 test "$with_gnu_ld" != yes && break
2797 ac_cv_path_LD="$LD" # Let the user override the test with a path.
2802 if test -n "$LD"; then
2803 echo "$ac_t""$LD" 1>&6
2805 echo "$ac_t""no" 1>&6
2807 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2808 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2809 echo "configure:2810: checking if the linker ($LD) is GNU ld" >&5
2810 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2811 echo $ac_n "(cached) $ac_c" 1>&6
2813 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2814 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2815 ac_cv_prog_gnu_ld=yes
2817 ac_cv_prog_gnu_ld=no
2821 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2824 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2825 echo "configure:2826: checking for BSD-compatible nm" >&5
2826 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2827 echo $ac_n "(cached) $ac_c" 1>&6
2829 if test -n "$NM"; then
2830 # Let the user override the test.
2833 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2834 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2835 test -z "$ac_dir" && ac_dir=.
2836 if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2837 # Check to see if the nm accepts a BSD-compat flag.
2838 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2839 # nm: unknown option "B" ignored
2840 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2841 ac_cv_path_NM="$ac_dir/nm -B"
2843 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2844 ac_cv_path_NM="$ac_dir/nm -p"
2847 ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2848 continue # so that we can try to find one that supports BSD flags
2853 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2858 echo "$ac_t""$NM" 1>&6
2860 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2861 echo "configure:2862: checking whether ln -s works" >&5
2862 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2863 echo $ac_n "(cached) $ac_c" 1>&6
2866 if ln -s X conftestdata 2>/dev/null
2869 ac_cv_prog_LN_S="ln -s"
2874 LN_S="$ac_cv_prog_LN_S"
2875 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2876 echo "$ac_t""yes" 1>&6
2878 echo "$ac_t""no" 1>&6
2881 if test $host != $build; then
2882 ac_tool_prefix=${host_alias}-
2889 NONE) lt_target="$host" ;;
2890 *) lt_target="$target" ;;
2893 # Check for any special flags to pass to ltconfig.
2894 libtool_flags="--cache-file=$cache_file"
2895 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2896 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2897 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2898 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2899 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2900 libtool_flags="$libtool_flags --enable-dlopen"
2901 libtool_flags="$libtool_flags --enable-win32-dll"
2902 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2903 if test "${enable_libtool_lock+set}" = set; then
2904 enableval="$enable_libtool_lock"
2908 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2909 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2911 # Some flags need to be propagated to the compiler or linker for good
2913 case "$lt_target" in
2915 # Find out which ABI we are using.
2916 echo '#line 2917 "configure"' > conftest.$ac_ext
2917 if { (eval echo configure:2918: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2918 case "`/usr/bin/file conftest.o`" in
2934 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2935 SAVE_CFLAGS="$CFLAGS"
2936 CFLAGS="$CFLAGS -belf"
2937 echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2938 echo "configure:2939: checking whether the C compiler needs -belf" >&5
2939 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
2940 echo $ac_n "(cached) $ac_c" 1>&6
2942 cat > conftest.$ac_ext <<EOF
2943 #line 2944 "configure"
2944 #include "confdefs.h"
2950 if { (eval echo configure:2951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2952 lt_cv_cc_needs_belf=yes
2954 echo "configure: failed program was:" >&5
2955 cat conftest.$ac_ext >&5
2957 lt_cv_cc_needs_belf=no
2962 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
2963 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2964 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2965 CFLAGS="$SAVE_CFLAGS"
2969 *-*-cygwin* | *-*-mingw*)
2970 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
2971 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
2972 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2973 echo "configure:2974: checking for $ac_word" >&5
2974 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
2975 echo $ac_n "(cached) $ac_c" 1>&6
2977 if test -n "$DLLTOOL"; then
2978 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
2980 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2982 for ac_dir in $ac_dummy; do
2983 test -z "$ac_dir" && ac_dir=.
2984 if test -f $ac_dir/$ac_word; then
2985 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
2992 DLLTOOL="$ac_cv_prog_DLLTOOL"
2993 if test -n "$DLLTOOL"; then
2994 echo "$ac_t""$DLLTOOL" 1>&6
2996 echo "$ac_t""no" 1>&6
3000 if test -z "$ac_cv_prog_DLLTOOL"; then
3001 if test -n "$ac_tool_prefix"; then
3002 # Extract the first word of "dlltool", so it can be a program name with args.
3003 set dummy dlltool; ac_word=$2
3004 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3005 echo "configure:3006: checking for $ac_word" >&5
3006 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3007 echo $ac_n "(cached) $ac_c" 1>&6
3009 if test -n "$DLLTOOL"; then
3010 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3012 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3014 for ac_dir in $ac_dummy; do
3015 test -z "$ac_dir" && ac_dir=.
3016 if test -f $ac_dir/$ac_word; then
3017 ac_cv_prog_DLLTOOL="dlltool"
3022 test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3025 DLLTOOL="$ac_cv_prog_DLLTOOL"
3026 if test -n "$DLLTOOL"; then
3027 echo "$ac_t""$DLLTOOL" 1>&6
3029 echo "$ac_t""no" 1>&6
3037 # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3038 set dummy ${ac_tool_prefix}as; ac_word=$2
3039 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3040 echo "configure:3041: checking for $ac_word" >&5
3041 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3042 echo $ac_n "(cached) $ac_c" 1>&6
3044 if test -n "$AS"; then
3045 ac_cv_prog_AS="$AS" # Let the user override the test.
3047 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3049 for ac_dir in $ac_dummy; do
3050 test -z "$ac_dir" && ac_dir=.
3051 if test -f $ac_dir/$ac_word; then
3052 ac_cv_prog_AS="${ac_tool_prefix}as"
3060 if test -n "$AS"; then
3061 echo "$ac_t""$AS" 1>&6
3063 echo "$ac_t""no" 1>&6
3067 if test -z "$ac_cv_prog_AS"; then
3068 if test -n "$ac_tool_prefix"; then
3069 # Extract the first word of "as", so it can be a program name with args.
3070 set dummy as; ac_word=$2
3071 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3072 echo "configure:3073: checking for $ac_word" >&5
3073 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3074 echo $ac_n "(cached) $ac_c" 1>&6
3076 if test -n "$AS"; then
3077 ac_cv_prog_AS="$AS" # Let the user override the test.
3079 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3081 for ac_dir in $ac_dummy; do
3082 test -z "$ac_dir" && ac_dir=.
3083 if test -f $ac_dir/$ac_word; then
3089 test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3093 if test -n "$AS"; then
3094 echo "$ac_t""$AS" 1>&6
3096 echo "$ac_t""no" 1>&6
3104 # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3105 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3106 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3107 echo "configure:3108: checking for $ac_word" >&5
3108 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3109 echo $ac_n "(cached) $ac_c" 1>&6
3111 if test -n "$OBJDUMP"; then
3112 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3114 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3116 for ac_dir in $ac_dummy; do
3117 test -z "$ac_dir" && ac_dir=.
3118 if test -f $ac_dir/$ac_word; then
3119 ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3126 OBJDUMP="$ac_cv_prog_OBJDUMP"
3127 if test -n "$OBJDUMP"; then
3128 echo "$ac_t""$OBJDUMP" 1>&6
3130 echo "$ac_t""no" 1>&6
3134 if test -z "$ac_cv_prog_OBJDUMP"; then
3135 if test -n "$ac_tool_prefix"; then
3136 # Extract the first word of "objdump", so it can be a program name with args.
3137 set dummy objdump; ac_word=$2
3138 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3139 echo "configure:3140: checking for $ac_word" >&5
3140 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3141 echo $ac_n "(cached) $ac_c" 1>&6
3143 if test -n "$OBJDUMP"; then
3144 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3146 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3148 for ac_dir in $ac_dummy; do
3149 test -z "$ac_dir" && ac_dir=.
3150 if test -f $ac_dir/$ac_word; then
3151 ac_cv_prog_OBJDUMP="objdump"
3156 test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3159 OBJDUMP="$ac_cv_prog_OBJDUMP"
3160 if test -n "$OBJDUMP"; then
3161 echo "$ac_t""$OBJDUMP" 1>&6
3163 echo "$ac_t""no" 1>&6
3176 # Save cache, so that ltconfig can load it
3179 # Actually configure libtool. ac_aux_dir is where install-sh is found.
3180 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3181 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3182 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3183 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3184 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3185 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
3186 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3188 # Reload cache, that may have been modified by ltconfig
3191 # This can be used to rebuild libtool when needed
3192 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3194 # Always use our own libtool.
3195 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3197 # Redirect the config.log output again, so that the ltconfig log is not
3198 # clobbered by the next message.
3199 exec 5>>./config.log
3202 for ac_prog in mawk gawk nawk awk
3204 # Extract the first word of "$ac_prog", so it can be a program name with args.
3205 set dummy $ac_prog; ac_word=$2
3206 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3207 echo "configure:3208: checking for $ac_word" >&5
3208 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3209 echo $ac_n "(cached) $ac_c" 1>&6
3211 if test -n "$AWK"; then
3212 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3214 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3216 for ac_dir in $ac_dummy; do
3217 test -z "$ac_dir" && ac_dir=.
3218 if test -f $ac_dir/$ac_word; then
3219 ac_cv_prog_AWK="$ac_prog"
3226 AWK="$ac_cv_prog_AWK"
3227 if test -n "$AWK"; then
3228 echo "$ac_t""$AWK" 1>&6
3230 echo "$ac_t""no" 1>&6
3233 test -n "$AWK" && break
3236 # test for ln hardlink support
3237 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3238 echo "configure:3239: checking whether ln works" >&5
3239 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3240 echo $ac_n "(cached) $ac_c" 1>&6
3242 rm -f conftest.src conftest.dst
3243 echo "conftest" > conftest.src
3244 if ln conftest.src conftest.dst 2>/dev/null
3246 ol_cv_prog_LN_H="ln"
3248 ol_cv_prog_LN_H="cp"
3250 rm -f conftest.src conftest.dst
3253 LN_H="$ol_cv_prog_LN_H"
3254 if test "$ol_cv_prog_LN_H" = "ln"; then
3255 echo "$ac_t""yes" 1>&6
3257 echo "$ac_t""no" 1>&6
3260 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3261 echo "configure:3262: checking whether ln -s works" >&5
3262 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3263 echo $ac_n "(cached) $ac_c" 1>&6
3266 if ln -s X conftestdata 2>/dev/null
3269 ac_cv_prog_LN_S="ln -s"
3274 LN_S="$ac_cv_prog_LN_S"
3275 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3276 echo "$ac_t""yes" 1>&6
3278 echo "$ac_t""no" 1>&6
3282 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3286 # Extract the first word of "sendmail", so it can be a program name with args.
3287 set dummy sendmail; ac_word=$2
3288 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3289 echo "configure:3290: checking for $ac_word" >&5
3290 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3291 echo $ac_n "(cached) $ac_c" 1>&6
3295 ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3298 ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3301 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3302 ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3303 for ac_dir in $ac_dummy; do
3304 test -z "$ac_dir" && ac_dir=.
3305 if test -f $ac_dir/$ac_word; then
3306 ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3311 test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3315 SENDMAIL="$ac_cv_path_SENDMAIL"
3316 if test -n "$SENDMAIL"; then
3317 echo "$ac_t""$SENDMAIL" 1>&6
3319 echo "$ac_t""no" 1>&6
3322 # Extract the first word of "vi", so it can be a program name with args.
3323 set dummy vi; ac_word=$2
3324 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3325 echo "configure:3326: checking for $ac_word" >&5
3326 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3327 echo $ac_n "(cached) $ac_c" 1>&6
3331 ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3334 ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3337 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3338 ac_dummy="$PATH:/usr/ucb"
3339 for ac_dir in $ac_dummy; do
3340 test -z "$ac_dir" && ac_dir=.
3341 if test -f $ac_dir/$ac_word; then
3342 ac_cv_path_EDITOR="$ac_dir/$ac_word"
3347 test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3351 EDITOR="$ac_cv_path_EDITOR"
3352 if test -n "$EDITOR"; then
3353 echo "$ac_t""$EDITOR" 1>&6
3355 echo "$ac_t""no" 1>&6
3358 # Extract the first word of "finger", so it can be a program name with args.
3359 set dummy finger; ac_word=$2
3360 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3361 echo "configure:3362: checking for $ac_word" >&5
3362 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3363 echo $ac_n "(cached) $ac_c" 1>&6
3367 ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3370 ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3373 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3374 ac_dummy="$PATH:/usr/ucb"
3375 for ac_dir in $ac_dummy; do
3376 test -z "$ac_dir" && ac_dir=.
3377 if test -f $ac_dir/$ac_word; then
3378 ac_cv_path_FINGER="$ac_dir/$ac_word"
3383 test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3387 FINGER="$ac_cv_path_FINGER"
3388 if test -n "$FINGER"; then
3389 echo "$ac_t""$FINGER" 1>&6
3391 echo "$ac_t""no" 1>&6
3395 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3396 echo "configure:3397: checking how to run the C preprocessor" >&5
3397 # On Suns, sometimes $CPP names a directory.
3398 if test -n "$CPP" && test -d "$CPP"; then
3401 if test -z "$CPP"; then
3402 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3403 echo $ac_n "(cached) $ac_c" 1>&6
3405 # This must be in double quotes, not single quotes, because CPP may get
3406 # substituted into the Makefile and "${CC-cc}" will confuse make.
3408 # On the NeXT, cc -E runs the code through the compiler's parser,
3409 # not just through cpp.
3410 cat > conftest.$ac_ext <<EOF
3411 #line 3412 "configure"
3412 #include "confdefs.h"
3416 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3417 { (eval echo configure:3418: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3418 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3419 if test -z "$ac_err"; then
3423 echo "configure: failed program was:" >&5
3424 cat conftest.$ac_ext >&5
3426 CPP="${CC-cc} -E -traditional-cpp"
3427 cat > conftest.$ac_ext <<EOF
3428 #line 3429 "configure"
3429 #include "confdefs.h"
3433 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3434 { (eval echo configure:3435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3435 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3436 if test -z "$ac_err"; then
3440 echo "configure: failed program was:" >&5
3441 cat conftest.$ac_ext >&5
3443 CPP="${CC-cc} -nologo -E"
3444 cat > conftest.$ac_ext <<EOF
3445 #line 3446 "configure"
3446 #include "confdefs.h"
3450 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3451 { (eval echo configure:3452: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3452 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3453 if test -z "$ac_err"; then
3457 echo "configure: failed program was:" >&5
3458 cat conftest.$ac_ext >&5
3467 ac_cv_prog_CPP="$CPP"
3469 CPP="$ac_cv_prog_CPP"
3471 ac_cv_prog_CPP="$CPP"
3473 echo "$ac_t""$CPP" 1>&6
3476 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3477 echo "configure: warning: cross compiling.... some functionality will be removed." 1>&2
3479 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3480 echo "configure: warning: programs compiled here do run here..." 1>&2
3481 { echo "configure: error: if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3483 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3484 echo "configure: warning: programs compiled here do not run here..." 1>&2
3485 { echo "configure: error: if cross compiling, add --enable-x-compile." 1>&2; exit 1; }
3488 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3489 echo "configure:3490: checking for AIX" >&5
3490 cat > conftest.$ac_ext <<EOF
3491 #line 3492 "configure"
3492 #include "confdefs.h"
3498 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3499 egrep "yes" >/dev/null 2>&1; then
3501 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3502 #define _ALL_SOURCE 1
3507 echo "$ac_t""no" 1>&6
3512 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3513 echo "configure:3514: checking for POSIXized ISC" >&5
3514 if test -d /etc/conf/kconfig.d &&
3515 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3517 echo "$ac_t""yes" 1>&6
3518 ISC=yes # If later tests want to check for ISC.
3519 cat >> confdefs.h <<\EOF
3520 #define _POSIX_SOURCE 1
3523 if test "$GCC" = yes; then
3529 echo "$ac_t""no" 1>&6
3533 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3534 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3535 echo "configure:3536: checking for minix/config.h" >&5
3536 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3537 echo $ac_n "(cached) $ac_c" 1>&6
3539 cat > conftest.$ac_ext <<EOF
3540 #line 3541 "configure"
3541 #include "confdefs.h"
3542 #include <minix/config.h>
3544 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3545 { (eval echo configure:3546: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3546 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3547 if test -z "$ac_err"; then
3549 eval "ac_cv_header_$ac_safe=yes"
3552 echo "configure: failed program was:" >&5
3553 cat conftest.$ac_ext >&5
3555 eval "ac_cv_header_$ac_safe=no"
3559 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3560 echo "$ac_t""yes" 1>&6
3563 echo "$ac_t""no" 1>&6
3567 if test "$MINIX" = yes; then
3568 cat >> confdefs.h <<\EOF
3569 #define _POSIX_SOURCE 1
3572 cat >> confdefs.h <<\EOF
3573 #define _POSIX_1_SOURCE 2
3576 cat >> confdefs.h <<\EOF
3583 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3584 echo "configure:3585: checking for Cygwin environment" >&5
3585 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3586 echo $ac_n "(cached) $ac_c" 1>&6
3588 cat > conftest.$ac_ext <<EOF
3589 #line 3590 "configure"
3590 #include "confdefs.h"
3595 #define __CYGWIN__ __CYGWIN32__
3600 if { (eval echo configure:3601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3604 echo "configure: failed program was:" >&5
3605 cat conftest.$ac_ext >&5
3612 echo "$ac_t""$ac_cv_cygwin" 1>&6
3614 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3615 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3616 echo "configure:3617: checking for mingw32 environment" >&5
3617 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3618 echo $ac_n "(cached) $ac_c" 1>&6
3620 cat > conftest.$ac_ext <<EOF
3621 #line 3622 "configure"
3622 #include "confdefs.h"
3628 if { (eval echo configure:3629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3632 echo "configure: failed program was:" >&5
3633 cat conftest.$ac_ext >&5
3640 echo "$ac_t""$ac_cv_mingw32" 1>&6
3642 test "$ac_cv_mingw32" = yes && MINGW32=yes
3643 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3644 echo "configure:3645: checking for EMX OS/2 environment" >&5
3645 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3646 echo $ac_n "(cached) $ac_c" 1>&6
3648 cat > conftest.$ac_ext <<EOF
3649 #line 3650 "configure"
3650 #include "confdefs.h"
3656 if { (eval echo configure:3657: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3660 echo "configure: failed program was:" >&5
3661 cat conftest.$ac_ext >&5
3668 echo "$ac_t""$ac_cv_emxos2" 1>&6
3670 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3674 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3675 echo "configure:3676: checking for executable suffix" >&5
3676 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3677 echo $ac_n "(cached) $ac_c" 1>&6
3679 if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3683 echo 'int main () { return 0; }' > conftest.$ac_ext
3685 if { (eval echo configure:3686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3686 for file in conftest.*; do
3688 *.c | *.C | *.o | *.obj | *.xcoff) ;;
3689 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3693 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3696 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3701 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3702 echo "$ac_t""${ac_cv_exeext}" 1>&6
3705 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3706 echo "configure:3707: checking for object suffix" >&5
3707 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3708 echo $ac_n "(cached) $ac_c" 1>&6
3711 echo 'int i = 1;' > conftest.$ac_ext
3712 if { (eval echo configure:3713: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3713 for ac_file in conftest.*; do
3716 *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3720 { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3725 echo "$ac_t""$ac_cv_objext" 1>&6
3726 OBJEXT=$ac_cv_objext
3727 ac_objext=$ac_cv_objext
3730 cat >> confdefs.h <<EOF
3731 #define EXEEXT "${EXEEXT}"
3735 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3736 echo "configure:3737: checking for be_app in -lbe" >&5
3737 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3738 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3739 echo $ac_n "(cached) $ac_c" 1>&6
3741 ac_save_LIBS="$LIBS"
3742 LIBS="-lbe -lroot -lnet $LIBS"
3743 cat > conftest.$ac_ext <<EOF
3744 #line 3745 "configure"
3745 #include "confdefs.h"
3746 /* Override any gcc2 internal prototype to avoid an error. */
3747 /* We use char because int might match the return type of a gcc2
3748 builtin and then its argument prototype would still apply. */
3755 if { (eval echo configure:3756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3757 eval "ac_cv_lib_$ac_lib_var=yes"
3759 echo "configure: failed program was:" >&5
3760 cat conftest.$ac_ext >&5
3762 eval "ac_cv_lib_$ac_lib_var=no"
3765 LIBS="$ac_save_LIBS"
3768 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3769 echo "$ac_t""yes" 1>&6
3770 LIBS="$LIBS -lbe -lroot -lnet"
3772 echo "$ac_t""no" 1>&6
3780 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3781 echo "configure:3782: checking for ${CC-cc} option to accept ANSI C" >&5
3782 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
3783 echo $ac_n "(cached) $ac_c" 1>&6
3785 am_cv_prog_cc_stdc=no
3787 # Don't try gcc -ansi; that turns off useful extensions and
3788 # breaks some systems' header files.
3789 # AIX -qlanglvl=ansi
3790 # Ultrix and OSF/1 -std1
3791 # HP-UX 10.20 and later -Ae
3792 # HP-UX older versions -Aa -D_HPUX_SOURCE
3793 # SVR4 -Xc -D__EXTENSIONS__
3794 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3796 CC="$ac_save_CC $ac_arg"
3797 cat > conftest.$ac_ext <<EOF
3798 #line 3799 "configure"
3799 #include "confdefs.h"
3802 #include <sys/types.h>
3803 #include <sys/stat.h>
3804 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3805 struct buf { int x; };
3806 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3807 static char *e (p, i)
3813 static char *f (char * (*g) (char **, int), char **p, ...)
3818 s = g (p, va_arg (v,int));
3822 int test (int i, double x);
3823 struct s1 {int (*f) (int a);};
3824 struct s2 {int (*f) (double a);};
3825 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3831 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3835 if { (eval echo configure:3836: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3837 am_cv_prog_cc_stdc="$ac_arg"; break
3839 echo "configure: failed program was:" >&5
3840 cat conftest.$ac_ext >&5
3848 if test -z "$am_cv_prog_cc_stdc"; then
3849 echo "$ac_t""none needed" 1>&6
3851 echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
3853 case "x$am_cv_prog_cc_stdc" in
3855 *) CC="$CC $am_cv_prog_cc_stdc" ;;
3858 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
3859 { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
3862 # test for make depend flag
3865 if test -z "${MKDEP}"; then
3867 if test -z "${MKDEP_FLAGS}"; then
3868 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
3869 echo "configure:3870: checking for ${OL_MKDEP} depend flag" >&5
3870 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
3871 echo $ac_n "(cached) $ac_c" 1>&6
3875 for flag in "-M" "-xM"; do
3876 cat > conftest.c <<EOF
3879 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:3880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
3880 | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
3882 if test ! -f conftest."${ac_object}" ; then
3884 OL_MKDEP_FLAGS="$flag"
3893 echo "$ac_t""$ol_cv_mkdep" 1>&6
3896 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3901 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3906 if test "${ol_cv_mkdep}" = no ; then
3907 # this will soon become an error
3908 echo "configure: warning: do not know how to generate dependencies" 1>&2
3911 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
3912 echo "configure:3913: checking for afopen in -ls" >&5
3913 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
3914 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3915 echo $ac_n "(cached) $ac_c" 1>&6
3917 ac_save_LIBS="$LIBS"
3919 cat > conftest.$ac_ext <<EOF
3920 #line 3921 "configure"
3921 #include "confdefs.h"
3922 /* Override any gcc2 internal prototype to avoid an error. */
3923 /* We use char because int might match the return type of a gcc2
3924 builtin and then its argument prototype would still apply. */
3931 if { (eval echo configure:3932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3933 eval "ac_cv_lib_$ac_lib_var=yes"
3935 echo "configure: failed program was:" >&5
3936 cat conftest.$ac_ext >&5
3938 eval "ac_cv_lib_$ac_lib_var=no"
3941 LIBS="$ac_save_LIBS"
3944 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3945 echo "$ac_t""yes" 1>&6
3948 cat >> confdefs.h <<\EOF
3949 #define HAVE_AIX_SECURITY 1
3954 echo "$ac_t""no" 1>&6
3959 for ac_func in getaddrinfo
3961 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3962 echo "configure:3963: checking for $ac_func" >&5
3963 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
3964 echo $ac_n "(cached) $ac_c" 1>&6
3966 cat > conftest.$ac_ext <<EOF
3967 #line 3968 "configure"
3968 #include "confdefs.h"
3969 /* System header to define __stub macros and hopefully few prototypes,
3970 which can conflict with char $ac_func(); below. */
3972 /* Override any gcc2 internal prototype to avoid an error. */
3973 /* We use char because int might match the return type of a gcc2
3974 builtin and then its argument prototype would still apply. */
3980 /* The GNU C library defines this for functions which it implements
3981 to always fail with ENOSYS. Some functions are actually named
3982 something starting with __ and the normal name is an alias. */
3983 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3991 if { (eval echo configure:3992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3993 eval "ac_cv_func_$ac_func=yes"
3995 echo "configure: failed program was:" >&5
3996 cat conftest.$ac_ext >&5
3998 eval "ac_cv_func_$ac_func=no"
4003 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4004 echo "$ac_t""yes" 1>&6
4005 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4006 cat >> confdefs.h <<EOF
4007 #define $ac_tr_func 1
4011 echo "$ac_t""no" 1>&6
4016 if test $ac_cv_func_getaddrinfo = no ; then
4017 if test $ol_enable_ipv6 = yes ; then
4018 { echo "configure: error: IPv6 support requires getaddrinfo()" 1>&2; exit 1; }
4023 if test $ol_enable_unix != no ; then
4024 for ac_hdr in sys/un.h
4026 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4027 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4028 echo "configure:4029: checking for $ac_hdr" >&5
4029 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4030 echo $ac_n "(cached) $ac_c" 1>&6
4032 cat > conftest.$ac_ext <<EOF
4033 #line 4034 "configure"
4034 #include "confdefs.h"
4037 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4038 { (eval echo configure:4039: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4039 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4040 if test -z "$ac_err"; then
4042 eval "ac_cv_header_$ac_safe=yes"
4045 echo "configure: failed program was:" >&5
4046 cat conftest.$ac_ext >&5
4048 eval "ac_cv_header_$ac_safe=no"
4052 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4053 echo "$ac_t""yes" 1>&6
4054 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4055 cat >> confdefs.h <<EOF
4056 #define $ac_tr_hdr 1
4060 echo "$ac_t""no" 1>&6
4065 if test $ol_enable_unix = auto ; then
4066 ol_enable_unix=$ac_cv_header_sys_un_h
4067 elif test $ac_cv_header_sys_un_h = no ; then
4068 { echo "configure: error: UNIX domain support requires sys/un.h" 1>&2; exit 1; }
4073 if test $ol_enable_modules != no ; then
4074 for ac_hdr in ltdl.h
4076 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4077 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4078 echo "configure:4079: checking for $ac_hdr" >&5
4079 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4080 echo $ac_n "(cached) $ac_c" 1>&6
4082 cat > conftest.$ac_ext <<EOF
4083 #line 4084 "configure"
4084 #include "confdefs.h"
4087 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4088 { (eval echo configure:4089: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4089 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4090 if test -z "$ac_err"; then
4092 eval "ac_cv_header_$ac_safe=yes"
4095 echo "configure: failed program was:" >&5
4096 cat conftest.$ac_ext >&5
4098 eval "ac_cv_header_$ac_safe=no"
4102 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4103 echo "$ac_t""yes" 1>&6
4104 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4105 cat >> confdefs.h <<EOF
4106 #define $ac_tr_hdr 1
4110 echo "$ac_t""no" 1>&6
4115 if test $ac_cv_header_ltdl_h = no ; then
4116 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4119 echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4120 echo "configure:4121: checking for lt_dlinit in -lltdl" >&5
4121 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
4122 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4123 echo $ac_n "(cached) $ac_c" 1>&6
4125 ac_save_LIBS="$LIBS"
4127 cat > conftest.$ac_ext <<EOF
4128 #line 4129 "configure"
4129 #include "confdefs.h"
4130 /* Override any gcc2 internal prototype to avoid an error. */
4131 /* We use char because int might match the return type of a gcc2
4132 builtin and then its argument prototype would still apply. */
4139 if { (eval echo configure:4140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4141 eval "ac_cv_lib_$ac_lib_var=yes"
4143 echo "configure: failed program was:" >&5
4144 cat conftest.$ac_ext >&5
4146 eval "ac_cv_lib_$ac_lib_var=no"
4149 LIBS="$ac_save_LIBS"
4152 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4153 echo "$ac_t""yes" 1>&6
4156 cat >> confdefs.h <<\EOF
4157 #define HAVE_LIBLTDL 1
4162 echo "$ac_t""no" 1>&6
4166 if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4167 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4171 ol_with_dnssrv_module=static
4172 ol_with_ldap_module=static
4173 ol_with_ldbm_module=static
4174 ol_with_passwd_module=static
4175 ol_with_shell_module=static
4176 ol_with_sql_module=static
4180 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4181 echo "configure:4182: checking for EBCDIC" >&5
4182 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4183 echo $ac_n "(cached) $ac_c" 1>&6
4186 cat > conftest.$ac_ext <<EOF
4187 #line 4188 "configure"
4188 #include "confdefs.h"
4191 #include <__ASCII__/generate_error.h>
4195 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4196 { (eval echo configure:4197: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4197 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4198 if test -z "$ac_err"; then
4200 ol_cv_cpp_ebcdic=yes
4203 echo "configure: failed program was:" >&5
4204 cat conftest.$ac_ext >&5
4211 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4212 if test $ol_cv_cpp_ebcdic = yes ; then
4213 cat >> confdefs.h <<\EOF
4214 #define HAVE_EBCDIC 1
4219 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4220 echo "configure:4221: checking for ANSI C header files" >&5
4221 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4222 echo $ac_n "(cached) $ac_c" 1>&6
4224 cat > conftest.$ac_ext <<EOF
4225 #line 4226 "configure"
4226 #include "confdefs.h"
4232 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4233 { (eval echo configure:4234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4234 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4235 if test -z "$ac_err"; then
4237 ol_cv_header_stdc=yes
4240 echo "configure: failed program was:" >&5
4241 cat conftest.$ac_ext >&5
4243 ol_cv_header_stdc=no
4247 if test $ol_cv_header_stdc = yes; then
4248 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4249 cat > conftest.$ac_ext <<EOF
4250 #line 4251 "configure"
4251 #include "confdefs.h"
4254 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4255 egrep "memchr" >/dev/null 2>&1; then
4259 ol_cv_header_stdc=no
4265 if test $ol_cv_header_stdc = yes; then
4266 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4267 cat > conftest.$ac_ext <<EOF
4268 #line 4269 "configure"
4269 #include "confdefs.h"
4272 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4273 egrep "free" >/dev/null 2>&1; then
4277 ol_cv_header_stdc=no
4283 if test $ol_cv_header_stdc = yes; then
4284 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4285 if test "$cross_compiling" = yes; then
4288 cat > conftest.$ac_ext <<EOF
4289 #line 4290 "configure"
4290 #include "confdefs.h"
4293 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4294 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4296 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4297 || ('j' <= (c) && (c) <= 'r') \
4298 || ('s' <= (c) && (c) <= 'z'))
4299 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4301 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4302 int main () { int i; for (i = 0; i < 256; i++)
4303 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4307 if { (eval echo configure:4308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4311 echo "configure: failed program was:" >&5
4312 cat conftest.$ac_ext >&5
4314 ol_cv_header_stdc=no
4322 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4323 if test $ol_cv_header_stdc = yes; then
4324 cat >> confdefs.h <<\EOF
4325 #define STDC_HEADERS 1
4329 ac_cv_header_stdc=disable
4332 if test $ol_cv_header_stdc != yes; then
4333 echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4337 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4339 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4340 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4341 echo "configure:4342: checking for $ac_hdr that defines DIR" >&5
4342 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4343 echo $ac_n "(cached) $ac_c" 1>&6
4345 cat > conftest.$ac_ext <<EOF
4346 #line 4347 "configure"
4347 #include "confdefs.h"
4348 #include <sys/types.h>
4354 if { (eval echo configure:4355: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4356 eval "ac_cv_header_dirent_$ac_safe=yes"
4358 echo "configure: failed program was:" >&5
4359 cat conftest.$ac_ext >&5
4361 eval "ac_cv_header_dirent_$ac_safe=no"
4365 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4366 echo "$ac_t""yes" 1>&6
4367 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4368 cat >> confdefs.h <<EOF
4369 #define $ac_tr_hdr 1
4371 ac_header_dirent=$ac_hdr; break
4373 echo "$ac_t""no" 1>&6
4376 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4377 if test $ac_header_dirent = dirent.h; then
4378 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4379 echo "configure:4380: checking for opendir in -ldir" >&5
4380 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4381 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4382 echo $ac_n "(cached) $ac_c" 1>&6
4384 ac_save_LIBS="$LIBS"
4386 cat > conftest.$ac_ext <<EOF
4387 #line 4388 "configure"
4388 #include "confdefs.h"
4389 /* Override any gcc2 internal prototype to avoid an error. */
4390 /* We use char because int might match the return type of a gcc2
4391 builtin and then its argument prototype would still apply. */
4398 if { (eval echo configure:4399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4400 eval "ac_cv_lib_$ac_lib_var=yes"
4402 echo "configure: failed program was:" >&5
4403 cat conftest.$ac_ext >&5
4405 eval "ac_cv_lib_$ac_lib_var=no"
4408 LIBS="$ac_save_LIBS"
4411 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4412 echo "$ac_t""yes" 1>&6
4415 echo "$ac_t""no" 1>&6
4419 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4420 echo "configure:4421: checking for opendir in -lx" >&5
4421 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4422 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4423 echo $ac_n "(cached) $ac_c" 1>&6
4425 ac_save_LIBS="$LIBS"
4427 cat > conftest.$ac_ext <<EOF
4428 #line 4429 "configure"
4429 #include "confdefs.h"
4430 /* Override any gcc2 internal prototype to avoid an error. */
4431 /* We use char because int might match the return type of a gcc2
4432 builtin and then its argument prototype would still apply. */
4439 if { (eval echo configure:4440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4441 eval "ac_cv_lib_$ac_lib_var=yes"
4443 echo "configure: failed program was:" >&5
4444 cat conftest.$ac_ext >&5
4446 eval "ac_cv_lib_$ac_lib_var=no"
4449 LIBS="$ac_save_LIBS"
4452 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4453 echo "$ac_t""yes" 1>&6
4456 echo "$ac_t""no" 1>&6
4461 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4462 echo "configure:4463: checking for sys/wait.h that is POSIX.1 compatible" >&5
4463 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4464 echo $ac_n "(cached) $ac_c" 1>&6
4466 cat > conftest.$ac_ext <<EOF
4467 #line 4468 "configure"
4468 #include "confdefs.h"
4469 #include <sys/types.h>
4470 #include <sys/wait.h>
4472 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4475 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4480 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4483 if { (eval echo configure:4484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4485 ac_cv_header_sys_wait_h=yes
4487 echo "configure: failed program was:" >&5
4488 cat conftest.$ac_ext >&5
4490 ac_cv_header_sys_wait_h=no
4495 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4496 if test $ac_cv_header_sys_wait_h = yes; then
4497 cat >> confdefs.h <<\EOF
4498 #define HAVE_SYS_WAIT_H 1
4503 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4504 echo "configure:4505: checking POSIX termios" >&5
4505 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4506 echo $ac_n "(cached) $ac_c" 1>&6
4508 cat > conftest.$ac_ext <<EOF
4509 #line 4510 "configure"
4510 #include "confdefs.h"
4511 #include <sys/types.h>
4513 #include <termios.h>
4515 /* SunOS 4.0.3 has termios.h but not the library calls. */
4519 if { (eval echo configure:4520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4521 am_cv_sys_posix_termios=yes
4523 echo "configure: failed program was:" >&5
4524 cat conftest.$ac_ext >&5
4526 am_cv_sys_posix_termios=no
4531 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4534 echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4535 echo "configure:4536: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4536 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4537 echo $ac_n "(cached) $ac_c" 1>&6
4539 am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4541 gwinsz_in_termios_h=no
4542 if test $am_cv_sys_posix_termios = yes; then
4543 cat > conftest.$ac_ext <<EOF
4544 #line 4545 "configure"
4545 #include "confdefs.h"
4546 #include <sys/types.h>
4547 # include <termios.h>
4553 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4554 egrep "yes" >/dev/null 2>&1; then
4556 gwinsz_in_termios_h=yes
4562 if test $gwinsz_in_termios_h = no; then
4563 cat > conftest.$ac_ext <<EOF
4564 #line 4565 "configure"
4565 #include "confdefs.h"
4566 #include <sys/types.h>
4567 # include <sys/ioctl.h>
4573 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4574 egrep "yes" >/dev/null 2>&1; then
4576 am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4584 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4585 if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4586 cat >> confdefs.h <<\EOF
4587 #define GWINSZ_IN_SYS_IOCTL 1
4592 if test $am_cv_sys_posix_termios = yes ; then
4593 cat >> confdefs.h <<\EOF
4594 #define HAVE_POSIX_TERMIOS 1
4645 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4646 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4647 echo "configure:4648: checking for $ac_hdr" >&5
4648 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4649 echo $ac_n "(cached) $ac_c" 1>&6
4651 cat > conftest.$ac_ext <<EOF
4652 #line 4653 "configure"
4653 #include "confdefs.h"
4656 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4657 { (eval echo configure:4658: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4658 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4659 if test -z "$ac_err"; then
4661 eval "ac_cv_header_$ac_safe=yes"
4664 echo "configure: failed program was:" >&5
4665 cat conftest.$ac_ext >&5
4667 eval "ac_cv_header_$ac_safe=no"
4671 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4672 echo "$ac_t""yes" 1>&6
4673 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4674 cat >> confdefs.h <<EOF
4675 #define $ac_tr_hdr 1
4679 echo "$ac_t""no" 1>&6
4686 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4687 echo "configure:4688: checking for sigset in -lV3" >&5
4688 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4689 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4690 echo $ac_n "(cached) $ac_c" 1>&6
4692 ac_save_LIBS="$LIBS"
4694 cat > conftest.$ac_ext <<EOF
4695 #line 4696 "configure"
4696 #include "confdefs.h"
4697 /* Override any gcc2 internal prototype to avoid an error. */
4698 /* We use char because int might match the return type of a gcc2
4699 builtin and then its argument prototype would still apply. */
4706 if { (eval echo configure:4707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4708 eval "ac_cv_lib_$ac_lib_var=yes"
4710 echo "configure: failed program was:" >&5
4711 cat conftest.$ac_ext >&5
4713 eval "ac_cv_lib_$ac_lib_var=no"
4716 LIBS="$ac_save_LIBS"
4719 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4720 echo "$ac_t""yes" 1>&6
4721 ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4722 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4723 cat >> confdefs.h <<EOF
4724 #define $ac_tr_lib 1
4730 echo "$ac_t""no" 1>&6
4734 if test $ac_cv_header_winsock_h = yes; then
4735 echo $ac_n "checking for winsock""... $ac_c" 1>&6
4736 echo "configure:4737: checking for winsock" >&5
4737 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
4738 echo $ac_n "(cached) $ac_c" 1>&6
4740 cat > conftest.$ac_ext <<EOF
4741 #line 4742 "configure"
4742 #include "confdefs.h"
4743 #include <winsock.h>
4747 select(0,NULL,NULL,NULL,NULL);
4749 gethostname(NULL,0);
4753 if { (eval echo configure:4754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4757 echo "configure: failed program was:" >&5
4758 cat conftest.$ac_ext >&5
4765 echo "$ac_t""$ol_cv_winsock" 1>&6
4767 if test $ol_cv_winsock = yes ; then
4768 cat >> confdefs.h <<\EOF
4769 #define HAVE_WINSOCK 1
4772 ac_cv_func_socket=yes
4773 ac_cv_func_select=yes
4774 ac_cv_func_closesocket=yes
4775 ac_cv_func_gethostname=yes
4780 echo $ac_n "checking for socket""... $ac_c" 1>&6
4781 echo "configure:4782: checking for socket" >&5
4782 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4783 echo $ac_n "(cached) $ac_c" 1>&6
4785 cat > conftest.$ac_ext <<EOF
4786 #line 4787 "configure"
4787 #include "confdefs.h"
4788 /* System header to define __stub macros and hopefully few prototypes,
4789 which can conflict with char socket(); below. */
4791 /* Override any gcc2 internal prototype to avoid an error. */
4792 /* We use char because int might match the return type of a gcc2
4793 builtin and then its argument prototype would still apply. */
4799 /* The GNU C library defines this for functions which it implements
4800 to always fail with ENOSYS. Some functions are actually named
4801 something starting with __ and the normal name is an alias. */
4802 #if defined (__stub_socket) || defined (__stub___socket)
4810 if { (eval echo configure:4811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4812 eval "ac_cv_func_socket=yes"
4814 echo "configure: failed program was:" >&5
4815 cat conftest.$ac_ext >&5
4817 eval "ac_cv_func_socket=no"
4822 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4823 echo "$ac_t""yes" 1>&6
4826 echo "$ac_t""no" 1>&6
4828 echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4829 echo "configure:4830: checking for main in -lsocket" >&5
4830 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4831 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4832 echo $ac_n "(cached) $ac_c" 1>&6
4834 ac_save_LIBS="$LIBS"
4835 LIBS="-lsocket $LIBS"
4836 cat > conftest.$ac_ext <<EOF
4837 #line 4838 "configure"
4838 #include "confdefs.h"
4844 if { (eval echo configure:4845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4846 eval "ac_cv_lib_$ac_lib_var=yes"
4848 echo "configure: failed program was:" >&5
4849 cat conftest.$ac_ext >&5
4851 eval "ac_cv_lib_$ac_lib_var=no"
4854 LIBS="$ac_save_LIBS"
4857 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4858 echo "$ac_t""yes" 1>&6
4859 ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4860 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4861 cat >> confdefs.h <<EOF
4862 #define $ac_tr_lib 1
4865 LIBS="-lsocket $LIBS"
4868 echo "$ac_t""no" 1>&6
4871 echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4872 echo "configure:4873: checking for main in -lnet" >&5
4873 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
4874 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4875 echo $ac_n "(cached) $ac_c" 1>&6
4877 ac_save_LIBS="$LIBS"
4879 cat > conftest.$ac_ext <<EOF
4880 #line 4881 "configure"
4881 #include "confdefs.h"
4887 if { (eval echo configure:4888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4889 eval "ac_cv_lib_$ac_lib_var=yes"
4891 echo "configure: failed program was:" >&5
4892 cat conftest.$ac_ext >&5
4894 eval "ac_cv_lib_$ac_lib_var=no"
4897 LIBS="$ac_save_LIBS"
4900 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4901 echo "$ac_t""yes" 1>&6
4902 ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4903 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4904 cat >> confdefs.h <<EOF
4905 #define $ac_tr_lib 1
4911 echo "$ac_t""no" 1>&6
4914 echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
4915 echo "configure:4916: checking for main in -lnsl_s" >&5
4916 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
4917 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4918 echo $ac_n "(cached) $ac_c" 1>&6
4920 ac_save_LIBS="$LIBS"
4921 LIBS="-lnsl_s $LIBS"
4922 cat > conftest.$ac_ext <<EOF
4923 #line 4924 "configure"
4924 #include "confdefs.h"
4930 if { (eval echo configure:4931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4932 eval "ac_cv_lib_$ac_lib_var=yes"
4934 echo "configure: failed program was:" >&5
4935 cat conftest.$ac_ext >&5
4937 eval "ac_cv_lib_$ac_lib_var=no"
4940 LIBS="$ac_save_LIBS"
4943 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4944 echo "$ac_t""yes" 1>&6
4945 ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4946 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4947 cat >> confdefs.h <<EOF
4948 #define $ac_tr_lib 1
4951 LIBS="-lnsl_s $LIBS"
4954 echo "$ac_t""no" 1>&6
4957 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
4958 echo "configure:4959: checking for main in -lnsl" >&5
4959 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
4960 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4961 echo $ac_n "(cached) $ac_c" 1>&6
4963 ac_save_LIBS="$LIBS"
4965 cat > conftest.$ac_ext <<EOF
4966 #line 4967 "configure"
4967 #include "confdefs.h"
4973 if { (eval echo configure:4974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4975 eval "ac_cv_lib_$ac_lib_var=yes"
4977 echo "configure: failed program was:" >&5
4978 cat conftest.$ac_ext >&5
4980 eval "ac_cv_lib_$ac_lib_var=no"
4983 LIBS="$ac_save_LIBS"
4986 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4987 echo "$ac_t""yes" 1>&6
4988 ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4989 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4990 cat >> confdefs.h <<EOF
4991 #define $ac_tr_lib 1
4997 echo "$ac_t""no" 1>&6
5000 echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
5001 echo "configure:5002: checking for socket in -linet" >&5
5002 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
5003 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5004 echo $ac_n "(cached) $ac_c" 1>&6
5006 ac_save_LIBS="$LIBS"
5008 cat > conftest.$ac_ext <<EOF
5009 #line 5010 "configure"
5010 #include "confdefs.h"
5011 /* Override any gcc2 internal prototype to avoid an error. */
5012 /* We use char because int might match the return type of a gcc2
5013 builtin and then its argument prototype would still apply. */
5020 if { (eval echo configure:5021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5022 eval "ac_cv_lib_$ac_lib_var=yes"
5024 echo "configure: failed program was:" >&5
5025 cat conftest.$ac_ext >&5
5027 eval "ac_cv_lib_$ac_lib_var=no"
5030 LIBS="$ac_save_LIBS"
5033 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5034 echo "$ac_t""yes" 1>&6
5035 ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5036 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5037 cat >> confdefs.h <<EOF
5038 #define $ac_tr_lib 1
5044 echo "$ac_t""no" 1>&6
5047 echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5048 echo "configure:5049: checking for main in -lgen" >&5
5049 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5050 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5051 echo $ac_n "(cached) $ac_c" 1>&6
5053 ac_save_LIBS="$LIBS"
5055 cat > conftest.$ac_ext <<EOF
5056 #line 5057 "configure"
5057 #include "confdefs.h"
5063 if { (eval echo configure:5064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5065 eval "ac_cv_lib_$ac_lib_var=yes"
5067 echo "configure: failed program was:" >&5
5068 cat conftest.$ac_ext >&5
5070 eval "ac_cv_lib_$ac_lib_var=no"
5073 LIBS="$ac_save_LIBS"
5076 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5077 echo "$ac_t""yes" 1>&6
5078 ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5079 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5080 cat >> confdefs.h <<EOF
5081 #define $ac_tr_lib 1
5087 echo "$ac_t""no" 1>&6
5094 echo $ac_n "checking for select""... $ac_c" 1>&6
5095 echo "configure:5096: checking for select" >&5
5096 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5097 echo $ac_n "(cached) $ac_c" 1>&6
5099 cat > conftest.$ac_ext <<EOF
5100 #line 5101 "configure"
5101 #include "confdefs.h"
5102 /* System header to define __stub macros and hopefully few prototypes,
5103 which can conflict with char select(); below. */
5105 /* Override any gcc2 internal prototype to avoid an error. */
5106 /* We use char because int might match the return type of a gcc2
5107 builtin and then its argument prototype would still apply. */
5113 /* The GNU C library defines this for functions which it implements
5114 to always fail with ENOSYS. Some functions are actually named
5115 something starting with __ and the normal name is an alias. */
5116 #if defined (__stub_select) || defined (__stub___select)
5124 if { (eval echo configure:5125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5126 eval "ac_cv_func_select=yes"
5128 echo "configure: failed program was:" >&5
5129 cat conftest.$ac_ext >&5
5131 eval "ac_cv_func_select=no"
5136 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5137 echo "$ac_t""yes" 1>&6
5140 echo "$ac_t""no" 1>&6
5141 { echo "configure: error: select() required." 1>&2; exit 1; }
5145 if test "${ac_cv_header_winsock_h}" != yes; then
5146 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5147 echo "configure:5148: checking types of arguments for select()" >&5
5148 if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5149 echo $ac_n "(cached) $ac_c" 1>&6
5151 if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5152 echo $ac_n "(cached) $ac_c" 1>&6
5154 if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5155 echo $ac_n "(cached) $ac_c" 1>&6
5157 for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5158 for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5159 for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5160 cat > conftest.$ac_ext <<EOF
5161 #line 5162 "configure"
5162 #include "confdefs.h"
5163 #ifdef HAVE_SYS_TYPES_H
5164 #include <sys/types.h>
5166 #ifdef HAVE_SYS_TIME_H
5167 #include <sys/time.h>
5169 #ifdef HAVE_SYS_SELECT_H
5170 #include <sys/select.h>
5172 #ifdef HAVE_SYS_SOCKET_H
5173 #include <sys/socket.h>
5175 extern select ($ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5);
5180 if { (eval echo configure:5181: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5182 ac_not_found=no ; break 3
5184 echo "configure: failed program was:" >&5
5185 cat conftest.$ac_ext >&5
5199 if test "$ac_not_found" = yes; then
5200 ac_cv_func_select_arg1=int
5201 ac_cv_func_select_arg234='int *'
5202 ac_cv_func_select_arg5='struct timeval *'
5204 echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5205 cat >> confdefs.h <<EOF
5206 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5209 cat >> confdefs.h <<EOF
5210 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5213 cat >> confdefs.h <<EOF
5214 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5221 for ac_hdr in regex.h
5223 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5224 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5225 echo "configure:5226: checking for $ac_hdr" >&5
5226 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5227 echo $ac_n "(cached) $ac_c" 1>&6
5229 cat > conftest.$ac_ext <<EOF
5230 #line 5231 "configure"
5231 #include "confdefs.h"
5234 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5235 { (eval echo configure:5236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5236 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5237 if test -z "$ac_err"; then
5239 eval "ac_cv_header_$ac_safe=yes"
5242 echo "configure: failed program was:" >&5
5243 cat conftest.$ac_ext >&5
5245 eval "ac_cv_header_$ac_safe=no"
5249 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5250 echo "$ac_t""yes" 1>&6
5251 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5252 cat >> confdefs.h <<EOF
5253 #define $ac_tr_hdr 1
5257 echo "$ac_t""no" 1>&6
5261 if test "$ac_cv_header_regex_h" != yes ; then
5262 { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5264 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5265 echo "configure:5266: checking for regfree" >&5
5266 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5267 echo $ac_n "(cached) $ac_c" 1>&6
5269 cat > conftest.$ac_ext <<EOF
5270 #line 5271 "configure"
5271 #include "confdefs.h"
5272 /* System header to define __stub macros and hopefully few prototypes,
5273 which can conflict with char regfree(); below. */
5275 /* Override any gcc2 internal prototype to avoid an error. */
5276 /* We use char because int might match the return type of a gcc2
5277 builtin and then its argument prototype would still apply. */
5283 /* The GNU C library defines this for functions which it implements
5284 to always fail with ENOSYS. Some functions are actually named
5285 something starting with __ and the normal name is an alias. */
5286 #if defined (__stub_regfree) || defined (__stub___regfree)
5294 if { (eval echo configure:5295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5296 eval "ac_cv_func_regfree=yes"
5298 echo "configure: failed program was:" >&5
5299 cat conftest.$ac_ext >&5
5301 eval "ac_cv_func_regfree=no"
5306 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5307 echo "$ac_t""yes" 1>&6
5310 echo "$ac_t""no" 1>&6
5311 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5316 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5317 echo "configure:5318: checking for compatible POSIX regex" >&5
5318 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5319 echo $ac_n "(cached) $ac_c" 1>&6
5322 if test "$cross_compiling" = yes; then
5323 ol_cv_c_posix_regex=cross
5325 cat > conftest.$ac_ext <<EOF
5326 #line 5327 "configure"
5327 #include "confdefs.h"
5329 #include <sys/types.h>
5331 static char *pattern, *string;
5339 if(regcomp(&re, pattern, 0)) {
5343 string = "ALL MATCH";
5345 rc = regexec(&re, string, 0, (void*)0, 0);
5352 if { (eval echo configure:5353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5354 ol_cv_c_posix_regex=yes
5356 echo "configure: failed program was:" >&5
5357 cat conftest.$ac_ext >&5
5359 ol_cv_c_posix_regex=no
5366 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5368 if test "$ol_cv_c_posix_regex" = no ; then
5369 { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5373 echo $ac_n "checking for res_query""... $ac_c" 1>&6
5374 echo "configure:5375: checking for res_query" >&5
5375 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
5376 echo $ac_n "(cached) $ac_c" 1>&6
5378 cat > conftest.$ac_ext <<EOF
5379 #line 5380 "configure"
5380 #include "confdefs.h"
5381 /* System header to define __stub macros and hopefully few prototypes,
5382 which can conflict with char res_query(); below. */
5384 /* Override any gcc2 internal prototype to avoid an error. */
5385 /* We use char because int might match the return type of a gcc2
5386 builtin and then its argument prototype would still apply. */
5392 /* The GNU C library defines this for functions which it implements
5393 to always fail with ENOSYS. Some functions are actually named
5394 something starting with __ and the normal name is an alias. */
5395 #if defined (__stub_res_query) || defined (__stub___res_query)
5403 if { (eval echo configure:5404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5405 eval "ac_cv_func_res_query=yes"
5407 echo "configure: failed program was:" >&5
5408 cat conftest.$ac_ext >&5
5410 eval "ac_cv_func_res_query=no"
5415 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
5416 echo "$ac_t""yes" 1>&6
5419 echo "$ac_t""no" 1>&6
5422 if test $ac_cv_func_res_query = no ; then
5423 echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
5424 echo "configure:5425: checking for res_query in -lbind" >&5
5425 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
5426 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5427 echo $ac_n "(cached) $ac_c" 1>&6
5429 ac_save_LIBS="$LIBS"
5431 cat > conftest.$ac_ext <<EOF
5432 #line 5433 "configure"
5433 #include "confdefs.h"
5434 /* Override any gcc2 internal prototype to avoid an error. */
5435 /* We use char because int might match the return type of a gcc2
5436 builtin and then its argument prototype would still apply. */
5443 if { (eval echo configure:5444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5445 eval "ac_cv_lib_$ac_lib_var=yes"
5447 echo "configure: failed program was:" >&5
5448 cat conftest.$ac_ext >&5
5450 eval "ac_cv_lib_$ac_lib_var=no"
5453 LIBS="$ac_save_LIBS"
5456 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5457 echo "$ac_t""yes" 1>&6
5458 ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5459 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5460 cat >> confdefs.h <<EOF
5461 #define $ac_tr_lib 1
5467 echo "$ac_t""no" 1>&6
5470 ac_cv_func_res_query=$ac_cv_lib_bind_res_query
5473 if test $ac_cv_func_res_query = no ; then
5474 echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
5475 echo "configure:5476: checking for __res_query in -lbind" >&5
5476 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
5477 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5478 echo $ac_n "(cached) $ac_c" 1>&6
5480 ac_save_LIBS="$LIBS"
5482 cat > conftest.$ac_ext <<EOF
5483 #line 5484 "configure"
5484 #include "confdefs.h"
5485 /* Override any gcc2 internal prototype to avoid an error. */
5486 /* We use char because int might match the return type of a gcc2
5487 builtin and then its argument prototype would still apply. */
5494 if { (eval echo configure:5495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5496 eval "ac_cv_lib_$ac_lib_var=yes"
5498 echo "configure: failed program was:" >&5
5499 cat conftest.$ac_ext >&5
5501 eval "ac_cv_lib_$ac_lib_var=no"
5504 LIBS="$ac_save_LIBS"
5507 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5508 echo "$ac_t""yes" 1>&6
5509 ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5510 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5511 cat >> confdefs.h <<EOF
5512 #define $ac_tr_lib 1
5518 echo "$ac_t""no" 1>&6
5521 ac_cv_func_res_query=$ac_cv_lib_bind___res_query
5524 if test $ac_cv_func_res_query = no ; then
5525 echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
5526 echo "configure:5527: checking for res_query in -lresolv" >&5
5527 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
5528 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5529 echo $ac_n "(cached) $ac_c" 1>&6
5531 ac_save_LIBS="$LIBS"
5532 LIBS="-lresolv $LIBS"
5533 cat > conftest.$ac_ext <<EOF
5534 #line 5535 "configure"
5535 #include "confdefs.h"
5536 /* Override any gcc2 internal prototype to avoid an error. */
5537 /* We use char because int might match the return type of a gcc2
5538 builtin and then its argument prototype would still apply. */
5545 if { (eval echo configure:5546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5547 eval "ac_cv_lib_$ac_lib_var=yes"
5549 echo "configure: failed program was:" >&5
5550 cat conftest.$ac_ext >&5
5552 eval "ac_cv_lib_$ac_lib_var=no"
5555 LIBS="$ac_save_LIBS"
5558 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5559 echo "$ac_t""yes" 1>&6
5560 ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5561 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5562 cat >> confdefs.h <<EOF
5563 #define $ac_tr_lib 1
5566 LIBS="-lresolv $LIBS"
5569 echo "$ac_t""no" 1>&6
5572 ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
5575 if test "$ac_cv_func_res_query" = yes ; then
5576 cat >> confdefs.h <<\EOF
5577 #define HAVE_RES_QUERY 1
5581 if test $ol_enable_dnssrv != no ; then
5586 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
5587 { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
5595 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 \
5596 -o $ol_with_kerberos = k5only -o $ol_with_kerberos = k425 ; then
5598 for ac_hdr in krb5.h
5600 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5601 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5602 echo "configure:5603: checking for $ac_hdr" >&5
5603 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5604 echo $ac_n "(cached) $ac_c" 1>&6
5606 cat > conftest.$ac_ext <<EOF
5607 #line 5608 "configure"
5608 #include "confdefs.h"
5611 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5612 { (eval echo configure:5613: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5613 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5614 if test -z "$ac_err"; then
5616 eval "ac_cv_header_$ac_safe=yes"
5619 echo "configure: failed program was:" >&5
5620 cat conftest.$ac_ext >&5
5622 eval "ac_cv_header_$ac_safe=no"
5626 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5627 echo "$ac_t""yes" 1>&6
5628 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5629 cat >> confdefs.h <<EOF
5630 #define $ac_tr_hdr 1
5634 echo "$ac_t""no" 1>&6
5639 if test $ac_cv_header_krb5_h = yes ; then
5640 for ac_hdr in heim_err.h
5642 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5643 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5644 echo "configure:5645: checking for $ac_hdr" >&5
5645 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5646 echo $ac_n "(cached) $ac_c" 1>&6
5648 cat > conftest.$ac_ext <<EOF
5649 #line 5650 "configure"
5650 #include "confdefs.h"
5653 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5654 { (eval echo configure:5655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5655 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5656 if test -z "$ac_err"; then
5658 eval "ac_cv_header_$ac_safe=yes"
5661 echo "configure: failed program was:" >&5
5662 cat conftest.$ac_ext >&5
5664 eval "ac_cv_header_$ac_safe=no"
5668 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5669 echo "$ac_t""yes" 1>&6
5670 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5671 cat >> confdefs.h <<EOF
5672 #define $ac_tr_hdr 1
5676 echo "$ac_t""no" 1>&6
5680 if test $ac_cv_header_heim_err_h = yes ; then
5686 if test $krb5_impl = mit; then
5687 echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5688 echo "configure:5689: checking for main in -lkrb5" >&5
5689 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5690 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5691 echo $ac_n "(cached) $ac_c" 1>&6
5693 ac_save_LIBS="$LIBS"
5694 LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
5695 cat > conftest.$ac_ext <<EOF
5696 #line 5697 "configure"
5697 #include "confdefs.h"
5703 if { (eval echo configure:5704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5705 eval "ac_cv_lib_$ac_lib_var=yes"
5707 echo "configure: failed program was:" >&5
5708 cat conftest.$ac_ext >&5
5710 eval "ac_cv_lib_$ac_lib_var=no"
5713 LIBS="$ac_save_LIBS"
5716 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5717 echo "$ac_t""yes" 1>&6
5719 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"
5721 echo "$ac_t""no" 1>&6
5726 elif test $krb5_impl = heimdal; then
5727 echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5728 echo "configure:5729: checking for main in -lkrb5" >&5
5729 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5730 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5731 echo $ac_n "(cached) $ac_c" 1>&6
5733 ac_save_LIBS="$LIBS"
5734 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
5735 cat > conftest.$ac_ext <<EOF
5736 #line 5737 "configure"
5737 #include "confdefs.h"
5743 if { (eval echo configure:5744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5745 eval "ac_cv_lib_$ac_lib_var=yes"
5747 echo "configure: failed program was:" >&5
5748 cat conftest.$ac_ext >&5
5750 eval "ac_cv_lib_$ac_lib_var=no"
5753 LIBS="$ac_save_LIBS"
5756 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5757 echo "$ac_t""yes" 1>&6
5759 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
5761 echo "$ac_t""no" 1>&6
5766 cat >> confdefs.h <<\EOF
5767 #define HAVE_HEIMDAL_KERBEROS 1
5772 echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
5775 if test $have_krb5 = yes ; then
5778 cat >> confdefs.h <<\EOF
5783 if test $ol_enable_kpasswd != no ; then
5784 ol_link_kpasswd=yes;
5787 if test $ol_with_kerberos = k5only ; then
5788 ol_with_kerberos=found
5791 elif test $ol_with_kerberos != auto ; then
5792 { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
5798 if test $ol_link_krb5 = yes -a \
5799 \( $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
5801 for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5803 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5804 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5805 echo "configure:5806: checking for $ac_hdr" >&5
5806 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5807 echo $ac_n "(cached) $ac_c" 1>&6
5809 cat > conftest.$ac_ext <<EOF
5810 #line 5811 "configure"
5811 #include "confdefs.h"
5814 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5815 { (eval echo configure:5816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5816 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5817 if test -z "$ac_err"; then
5819 eval "ac_cv_header_$ac_safe=yes"
5822 echo "configure: failed program was:" >&5
5823 cat conftest.$ac_ext >&5
5825 eval "ac_cv_header_$ac_safe=no"
5829 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5830 echo "$ac_t""yes" 1>&6
5831 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5832 cat >> confdefs.h <<EOF
5833 #define $ac_tr_hdr 1
5837 echo "$ac_t""no" 1>&6
5842 if test $ac_cv_header_kerberosIV_krb_h = yes ; then
5843 if test $krb5_impl = mit; then
5844 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5845 echo "configure:5846: checking for main in -lkrb4" >&5
5846 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5847 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5848 echo $ac_n "(cached) $ac_c" 1>&6
5850 ac_save_LIBS="$LIBS"
5851 LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
5852 cat > conftest.$ac_ext <<EOF
5853 #line 5854 "configure"
5854 #include "confdefs.h"
5860 if { (eval echo configure:5861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5862 eval "ac_cv_lib_$ac_lib_var=yes"
5864 echo "configure: failed program was:" >&5
5865 cat conftest.$ac_ext >&5
5867 eval "ac_cv_lib_$ac_lib_var=no"
5870 LIBS="$ac_save_LIBS"
5873 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5874 echo "$ac_t""yes" 1>&6
5876 KRB4_LIBS="-lkrb4 -ldes425"
5878 echo "$ac_t""no" 1>&6
5883 elif test $krb5_impl = heimdal; then
5884 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5885 echo "configure:5886: checking for main in -lkrb4" >&5
5886 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5887 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5888 echo $ac_n "(cached) $ac_c" 1>&6
5890 ac_save_LIBS="$LIBS"
5891 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
5892 cat > conftest.$ac_ext <<EOF
5893 #line 5894 "configure"
5894 #include "confdefs.h"
5900 if { (eval echo configure:5901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5902 eval "ac_cv_lib_$ac_lib_var=yes"
5904 echo "configure: failed program was:" >&5
5905 cat conftest.$ac_ext >&5
5907 eval "ac_cv_lib_$ac_lib_var=no"
5910 LIBS="$ac_save_LIBS"
5913 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5914 echo "$ac_t""yes" 1>&6
5918 echo "$ac_t""no" 1>&6
5925 echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
5928 if test $have_k425 = yes ; then
5929 ol_with_kerberos=found
5932 cat >> confdefs.h <<\EOF
5933 #define HAVE_KRB425 1
5936 cat >> confdefs.h <<\EOF
5941 echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
5942 echo "configure:5943: checking for des_debug in Kerberos libraries" >&5
5943 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
5944 echo $ac_n "(cached) $ac_c" 1>&6
5948 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
5949 cat > conftest.$ac_ext <<EOF
5950 #line 5951 "configure"
5951 #include "confdefs.h"
5953 #include <kerberosIV/krb.h>
5954 #include <kerberosIV/des.h>
5955 extern int des_debug;
5963 if { (eval echo configure:5964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5965 ol_cv_var_des_debug=yes
5967 echo "configure: failed program was:" >&5
5968 cat conftest.$ac_ext >&5
5970 ol_cv_var_des_debug=no
5977 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
5979 if test $ol_cv_var_des_debug = yes ; then
5980 cat >> confdefs.h <<\EOF
5981 #define HAVE_DES_DEBUG 1
5991 if test $ol_link_krb5 = yes ; then
5992 ol_with_kerberos=found
5995 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 \
5996 -o $ol_with_kerberos = kth ; then
5998 for ac_hdr in krb.h des.h krb-archaeology.h
6000 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6001 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6002 echo "configure:6003: checking for $ac_hdr" >&5
6003 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6004 echo $ac_n "(cached) $ac_c" 1>&6
6006 cat > conftest.$ac_ext <<EOF
6007 #line 6008 "configure"
6008 #include "confdefs.h"
6011 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6012 { (eval echo configure:6013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6013 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6014 if test -z "$ac_err"; then
6016 eval "ac_cv_header_$ac_safe=yes"
6019 echo "configure: failed program was:" >&5
6020 cat conftest.$ac_ext >&5
6022 eval "ac_cv_header_$ac_safe=no"
6026 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6027 echo "$ac_t""yes" 1>&6
6028 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6029 cat >> confdefs.h <<EOF
6030 #define $ac_tr_hdr 1
6034 echo "$ac_t""no" 1>&6
6039 if test $ac_cv_header_krb_h = yes ; then
6040 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6041 echo "configure:6042: checking for main in -lkrb" >&5
6042 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6043 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6044 echo $ac_n "(cached) $ac_c" 1>&6
6046 ac_save_LIBS="$LIBS"
6047 LIBS="-lkrb -ldes $LIBS"
6048 cat > conftest.$ac_ext <<EOF
6049 #line 6050 "configure"
6050 #include "confdefs.h"
6056 if { (eval echo configure:6057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6058 eval "ac_cv_lib_$ac_lib_var=yes"
6060 echo "configure: failed program was:" >&5
6061 cat conftest.$ac_ext >&5
6063 eval "ac_cv_lib_$ac_lib_var=no"
6066 LIBS="$ac_save_LIBS"
6069 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6070 echo "$ac_t""yes" 1>&6
6073 echo "$ac_t""no" 1>&6
6078 if test $have_k4 = yes ; then
6079 ol_with_kerberos=found
6082 cat >> confdefs.h <<\EOF
6087 KRB4_LIBS="-lkrb -ldes"
6089 if test $ac_cv_header_krb_archaeology_h = yes ; then
6090 cat >> confdefs.h <<\EOF
6091 #define HAVE_KTH_KERBEROS 1
6099 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6100 ol_link_kpasswd=yes;
6103 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6104 cat >> confdefs.h <<\EOF
6105 #define HAVE_KERBEROS 1
6109 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6110 { echo "configure: error: Kerberos detection failed." 1>&2; exit 1; }
6114 if test $ol_with_tls != no ; then
6116 for ac_hdr in openssl/ssl.h ssl.h
6118 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6119 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6120 echo "configure:6121: checking for $ac_hdr" >&5
6121 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6122 echo $ac_n "(cached) $ac_c" 1>&6
6124 cat > conftest.$ac_ext <<EOF
6125 #line 6126 "configure"
6126 #include "confdefs.h"
6129 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6130 { (eval echo configure:6131: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6131 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6132 if test -z "$ac_err"; then
6134 eval "ac_cv_header_$ac_safe=yes"
6137 echo "configure: failed program was:" >&5
6138 cat conftest.$ac_ext >&5
6140 eval "ac_cv_header_$ac_safe=no"
6144 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6145 echo "$ac_t""yes" 1>&6
6146 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6147 cat >> confdefs.h <<EOF
6148 #define $ac_tr_hdr 1
6152 echo "$ac_t""no" 1>&6
6157 if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6158 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6159 echo "configure:6160: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6160 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6161 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6162 echo $ac_n "(cached) $ac_c" 1>&6
6164 ac_save_LIBS="$LIBS"
6165 LIBS="-lssl -lcrypto $LIBS"
6166 cat > conftest.$ac_ext <<EOF
6167 #line 6168 "configure"
6168 #include "confdefs.h"
6169 /* Override any gcc2 internal prototype to avoid an error. */
6170 /* We use char because int might match the return type of a gcc2
6171 builtin and then its argument prototype would still apply. */
6172 char SSLeay_add_ssl_algorithms();
6175 SSLeay_add_ssl_algorithms()
6178 if { (eval echo configure:6179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6180 eval "ac_cv_lib_$ac_lib_var=yes"
6182 echo "configure: failed program was:" >&5
6183 cat conftest.$ac_ext >&5
6185 eval "ac_cv_lib_$ac_lib_var=no"
6188 LIBS="$ac_save_LIBS"
6191 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6192 echo "$ac_t""yes" 1>&6
6196 echo "$ac_t""no" 1>&6
6201 if test $have_ssleay = no ; then
6202 echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6203 echo "configure:6204: checking for SSL_library_init in -lssl" >&5
6204 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6205 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6206 echo $ac_n "(cached) $ac_c" 1>&6
6208 ac_save_LIBS="$LIBS"
6209 LIBS="-lssl -lcrypto $LIBS"
6210 cat > conftest.$ac_ext <<EOF
6211 #line 6212 "configure"
6212 #include "confdefs.h"
6213 /* Override any gcc2 internal prototype to avoid an error. */
6214 /* We use char because int might match the return type of a gcc2
6215 builtin and then its argument prototype would still apply. */
6216 char SSL_library_init();
6222 if { (eval echo configure:6223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6224 eval "ac_cv_lib_$ac_lib_var=yes"
6226 echo "configure: failed program was:" >&5
6227 cat conftest.$ac_ext >&5
6229 eval "ac_cv_lib_$ac_lib_var=no"
6232 LIBS="$ac_save_LIBS"
6235 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6236 echo "$ac_t""yes" 1>&6
6240 echo "$ac_t""no" 1>&6
6246 if test $have_ssleay = no ; then
6247 echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6248 echo "configure:6249: checking for ssl3_accept in -lssl" >&5
6249 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6250 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6251 echo $ac_n "(cached) $ac_c" 1>&6
6253 ac_save_LIBS="$LIBS"
6254 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6255 cat > conftest.$ac_ext <<EOF
6256 #line 6257 "configure"
6257 #include "confdefs.h"
6258 /* Override any gcc2 internal prototype to avoid an error. */
6259 /* We use char because int might match the return type of a gcc2
6260 builtin and then its argument prototype would still apply. */
6267 if { (eval echo configure:6268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6269 eval "ac_cv_lib_$ac_lib_var=yes"
6271 echo "configure: failed program was:" >&5
6272 cat conftest.$ac_ext >&5
6274 eval "ac_cv_lib_$ac_lib_var=no"
6277 LIBS="$ac_save_LIBS"
6280 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6281 echo "$ac_t""yes" 1>&6
6285 echo "$ac_t""no" 1>&6
6291 if test $have_ssleay = yes ; then
6295 cat >> confdefs.h <<\EOF
6296 #define HAVE_SSLEAY 1
6300 if test $need_rsaref = yes; then
6301 cat >> confdefs.h <<\EOF
6302 #define HAVE_RSAREF 1
6306 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6308 TLS_LIBS="-lssl -lcrypto"
6314 if test $ol_link_tls = yes ; then
6315 cat >> confdefs.h <<\EOF
6323 gethostbyname_r gethostbyaddr_r \
6326 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6327 echo "configure:6328: checking for $ac_func" >&5
6328 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6329 echo $ac_n "(cached) $ac_c" 1>&6
6331 cat > conftest.$ac_ext <<EOF
6332 #line 6333 "configure"
6333 #include "confdefs.h"
6334 /* System header to define __stub macros and hopefully few prototypes,
6335 which can conflict with char $ac_func(); below. */
6337 /* Override any gcc2 internal prototype to avoid an error. */
6338 /* We use char because int might match the return type of a gcc2
6339 builtin and then its argument prototype would still apply. */
6345 /* The GNU C library defines this for functions which it implements
6346 to always fail with ENOSYS. Some functions are actually named
6347 something starting with __ and the normal name is an alias. */
6348 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6356 if { (eval echo configure:6357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6358 eval "ac_cv_func_$ac_func=yes"
6360 echo "configure: failed program was:" >&5
6361 cat conftest.$ac_ext >&5
6363 eval "ac_cv_func_$ac_func=no"
6368 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6369 echo "$ac_t""yes" 1>&6
6370 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6371 cat >> confdefs.h <<EOF
6372 #define $ac_tr_func 1
6376 echo "$ac_t""no" 1>&6
6381 if test "$ac_cv_func_ctime_r" = no ; then
6382 ol_cv_func_ctime_r_nargs=0
6384 echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6385 echo "configure:6386: checking number of arguments of ctime_r" >&5
6386 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6387 echo $ac_n "(cached) $ac_c" 1>&6
6389 cat > conftest.$ac_ext <<EOF
6390 #line 6391 "configure"
6391 #include "confdefs.h"
6394 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6397 if { (eval echo configure:6398: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6399 ol_cv_func_ctime_r_nargs3=yes
6401 echo "configure: failed program was:" >&5
6402 cat conftest.$ac_ext >&5
6404 ol_cv_func_ctime_r_nargs3=no
6408 cat > conftest.$ac_ext <<EOF
6409 #line 6410 "configure"
6410 #include "confdefs.h"
6413 time_t ti; char *buffer; ctime_r(&ti,buffer);
6416 if { (eval echo configure:6417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6418 ol_cv_func_ctime_r_nargs2=yes
6420 echo "configure: failed program was:" >&5
6421 cat conftest.$ac_ext >&5
6423 ol_cv_func_ctime_r_nargs2=no
6427 if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6428 $ol_cv_func_ctime_r_nargs2 = no ; then
6430 ol_cv_func_ctime_r_nargs=3
6432 elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6433 $ol_cv_func_ctime_r_nargs2 = yes ; then
6435 ol_cv_func_ctime_r_nargs=2
6438 ol_cv_func_ctime_r_nargs=0
6443 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6445 if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6446 cat >> confdefs.h <<EOF
6447 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6454 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6455 echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6456 echo "configure:6457: checking number of arguments of gethostbyname_r" >&5
6457 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6458 echo $ac_n "(cached) $ac_c" 1>&6
6460 cat > conftest.$ac_ext <<EOF
6461 #line 6462 "configure"
6462 #include "confdefs.h"
6463 #include <sys/types.h>
6464 #include <sys/socket.h>
6465 #include <netinet/in.h>
6467 #define BUFSIZE (sizeof(struct hostent)+10)
6469 struct hostent hent; char buffer[BUFSIZE];
6470 int bufsize=BUFSIZE;int h_errno;
6471 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6472 buffer, bufsize, &h_errno);
6475 if { (eval echo configure:6476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6477 ol_cv_func_gethostbyname_r_nargs5=yes
6479 echo "configure: failed program was:" >&5
6480 cat conftest.$ac_ext >&5
6482 ol_cv_func_gethostbyname_r_nargs5=no
6486 cat > conftest.$ac_ext <<EOF
6487 #line 6488 "configure"
6488 #include "confdefs.h"
6489 #include <sys/types.h>
6490 #include <sys/socket.h>
6491 #include <netinet/in.h>
6493 #define BUFSIZE (sizeof(struct hostent)+10)
6495 struct hostent hent;struct hostent *rhent;
6496 char buffer[BUFSIZE];
6497 int bufsize=BUFSIZE;int h_errno;
6498 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6502 if { (eval echo configure:6503: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6504 ol_cv_func_gethostbyname_r_nargs6=yes
6506 echo "configure: failed program was:" >&5
6507 cat conftest.$ac_ext >&5
6509 ol_cv_func_gethostbyname_r_nargs6=no
6513 if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6514 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6516 ol_cv_func_gethostbyname_r_nargs=5
6518 elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
6519 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
6521 ol_cv_func_gethostbyname_r_nargs=6
6524 ol_cv_func_gethostbyname_r_nargs=0
6529 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6530 if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6531 cat >> confdefs.h <<EOF
6532 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6538 ol_cv_func_gethostbyname_r_nargs=0
6541 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6542 echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6543 echo "configure:6544: checking number of arguments of gethostbyaddr_r" >&5
6544 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6545 echo $ac_n "(cached) $ac_c" 1>&6
6547 cat > conftest.$ac_ext <<EOF
6548 #line 6549 "configure"
6549 #include "confdefs.h"
6550 #include <sys/types.h>
6551 #include <sys/socket.h>
6552 #include <netinet/in.h>
6554 #define BUFSIZE (sizeof(struct hostent)+10)
6556 struct hostent hent; char buffer[BUFSIZE];
6558 size_t alen=sizeof(struct in_addr);
6559 int bufsize=BUFSIZE;int h_errno;
6560 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6561 alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6564 if { (eval echo configure:6565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6566 ol_cv_func_gethostbyaddr_r_nargs7=yes
6568 echo "configure: failed program was:" >&5
6569 cat conftest.$ac_ext >&5
6571 ol_cv_func_gethostbyaddr_r_nargs7=no
6575 cat > conftest.$ac_ext <<EOF
6576 #line 6577 "configure"
6577 #include "confdefs.h"
6578 #include <sys/types.h>
6579 #include <sys/socket.h>
6580 #include <netinet/in.h>
6582 #define BUFSIZE (sizeof(struct hostent)+10)
6584 struct hostent hent;
6585 struct hostent *rhent; char buffer[BUFSIZE];
6587 size_t alen=sizeof(struct in_addr);
6588 int bufsize=BUFSIZE;int h_errno;
6589 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6590 alen, AF_INET, &hent, buffer, bufsize,
6594 if { (eval echo configure:6595: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6596 ol_cv_func_gethostbyaddr_r_nargs8=yes
6598 echo "configure: failed program was:" >&5
6599 cat conftest.$ac_ext >&5
6601 ol_cv_func_gethostbyaddr_r_nargs8=no
6605 if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
6606 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
6608 ol_cv_func_gethostbyaddr_r_nargs=7
6610 elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
6611 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
6613 ol_cv_func_gethostbyaddr_r_nargs=8
6616 ol_cv_func_gethostbyaddr_r_nargs=0
6621 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6622 if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6623 cat >> confdefs.h <<EOF
6624 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6630 ol_cv_func_gethostbyaddr_r_nargs=0
6633 if test "$ac_cv_func_ctime_r" = yes \
6634 -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6635 -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6636 -a "$ac_cv_func_gethostbyname_r" = yes \
6637 -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6638 -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6639 -a "$ac_cv_func_gethostbyaddr_r" = yes \
6640 -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6641 -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6644 cat >> confdefs.h <<\EOF
6645 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6652 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6653 -o $ol_with_threads = nt ; then
6656 echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
6657 echo "configure:6658: checking for NT Threads" >&5
6658 if eval "test \"\${ol_cv_nt_threads+set}\" = set"; then
6659 echo $ac_n "(cached) $ac_c" 1>&6
6662 echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
6663 echo "configure:6664: checking for _beginthread" >&5
6664 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
6665 echo $ac_n "(cached) $ac_c" 1>&6
6667 cat > conftest.$ac_ext <<EOF
6668 #line 6669 "configure"
6669 #include "confdefs.h"
6670 /* System header to define __stub macros and hopefully few prototypes,
6671 which can conflict with char _beginthread(); below. */
6673 /* Override any gcc2 internal prototype to avoid an error. */
6674 /* We use char because int might match the return type of a gcc2
6675 builtin and then its argument prototype would still apply. */
6676 char _beginthread();
6681 /* The GNU C library defines this for functions which it implements
6682 to always fail with ENOSYS. Some functions are actually named
6683 something starting with __ and the normal name is an alias. */
6684 #if defined (__stub__beginthread) || defined (__stub____beginthread)
6692 if { (eval echo configure:6693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6694 eval "ac_cv_func__beginthread=yes"
6696 echo "configure: failed program was:" >&5
6697 cat conftest.$ac_ext >&5
6699 eval "ac_cv_func__beginthread=no"
6704 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
6705 echo "$ac_t""yes" 1>&6
6706 ol_cv_nt_threads=yes
6708 echo "$ac_t""no" 1>&6
6715 echo "$ac_t""$ol_cv_nt_threads" 1>&6
6717 if test $ol_cv_nt_threads = yes ; then
6718 cat >> confdefs.h <<\EOF
6719 #define HAVE_NT_THREADS 1
6725 if test "$ol_cv_nt_threads" = yes ; then
6727 ol_with_threads=found
6728 ol_with_yielding_select=yes
6730 cat >> confdefs.h <<\EOF
6731 #define HAVE_NT_SERVICE_MANAGER 1
6734 cat >> confdefs.h <<\EOF
6735 #define HAVE_NT_EVENT_LOG 1
6740 if test $ol_with_threads = nt ; then
6741 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
6745 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6746 -o $ol_with_threads = posix ; then
6748 for ac_hdr in pthread.h
6750 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6751 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6752 echo "configure:6753: checking for $ac_hdr" >&5
6753 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6754 echo $ac_n "(cached) $ac_c" 1>&6
6756 cat > conftest.$ac_ext <<EOF
6757 #line 6758 "configure"
6758 #include "confdefs.h"
6761 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6762 { (eval echo configure:6763: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6763 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6764 if test -z "$ac_err"; then
6766 eval "ac_cv_header_$ac_safe=yes"
6769 echo "configure: failed program was:" >&5
6770 cat conftest.$ac_ext >&5
6772 eval "ac_cv_header_$ac_safe=no"
6776 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6777 echo "$ac_t""yes" 1>&6
6778 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6779 cat >> confdefs.h <<EOF
6780 #define $ac_tr_hdr 1
6784 echo "$ac_t""no" 1>&6
6789 if test $ac_cv_header_pthread_h = yes ; then
6790 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6791 echo "configure:6792: checking POSIX thread version" >&5
6792 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
6793 echo $ac_n "(cached) $ac_c" 1>&6
6796 cat > conftest.$ac_ext <<EOF
6797 #line 6798 "configure"
6798 #include "confdefs.h"
6800 # include <pthread.h>
6801 /* this check could be improved */
6802 # ifdef PTHREAD_ONCE_INIT
6803 pthread_version_final;
6807 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6808 egrep "pthread_version_final" >/dev/null 2>&1; then
6810 ol_pthread_final=yes
6818 cat > conftest.$ac_ext <<EOF
6819 #line 6820 "configure"
6820 #include "confdefs.h"
6822 # include <pthread.h>
6823 /* this check could be improved */
6824 # ifdef pthread_once_init
6825 pthread_version_draft4;
6829 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6830 egrep "pthread_version_draft4" >/dev/null 2>&1; then
6832 ol_pthread_draft4=yes
6835 ol_pthread_draft4=no
6840 if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
6841 ol_cv_pthread_version=final
6842 elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
6843 ol_cv_pthread_version=draft4
6845 ol_cv_pthread_version=unknown
6850 echo "$ac_t""$ol_cv_pthread_version" 1>&6
6853 if test $ol_cv_pthread_version = final ; then
6854 cat >> confdefs.h <<\EOF
6855 #define HAVE_PTHREADS_FINAL 1
6858 elif test $ol_cv_pthread_version = draft4 ; then
6859 cat >> confdefs.h <<\EOF
6860 #define HAVE_PTHREADS_D4 1
6864 { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
6867 # consider threads found
6868 ol_with_threads=found
6871 echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
6872 echo "configure:6873: checking for LinuxThreads pthread.h" >&5
6873 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
6874 echo $ac_n "(cached) $ac_c" 1>&6
6876 cat > conftest.$ac_ext <<EOF
6877 #line 6878 "configure"
6878 #include "confdefs.h"
6879 #include <pthread.h>
6881 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6882 egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
6884 ol_cv_header_linux_threads=yes
6887 ol_cv_header_linux_threads=no
6894 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
6895 if test $ol_cv_header_linux_threads = yes; then
6896 cat >> confdefs.h <<\EOF
6897 #define HAVE_LINUX_THREADS 1
6903 echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
6904 echo "configure:6905: checking for GNU Pth pthread.h" >&5
6905 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
6906 echo $ac_n "(cached) $ac_c" 1>&6
6908 cat > conftest.$ac_ext <<EOF
6909 #line 6910 "configure"
6910 #include "confdefs.h"
6911 #include <pthread.h>
6912 #ifdef _POSIX_THREAD_IS_GNU_PTH
6917 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6918 egrep "__gnu_pth__" >/dev/null 2>&1; then
6920 ol_cv_header_gnu_pth_pthread_h=yes
6923 ol_cv_header_gnu_pth_pthread_h=no
6930 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
6933 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
6934 for ac_hdr in sched.h
6936 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6937 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6938 echo "configure:6939: checking for $ac_hdr" >&5
6939 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6940 echo $ac_n "(cached) $ac_c" 1>&6
6942 cat > conftest.$ac_ext <<EOF
6943 #line 6944 "configure"
6944 #include "confdefs.h"
6947 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6948 { (eval echo configure:6949: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6949 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6950 if test -z "$ac_err"; then
6952 eval "ac_cv_header_$ac_safe=yes"
6955 echo "configure: failed program was:" >&5
6956 cat conftest.$ac_ext >&5
6958 eval "ac_cv_header_$ac_safe=no"
6962 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6963 echo "$ac_t""yes" 1>&6
6964 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6965 cat >> confdefs.h <<EOF
6966 #define $ac_tr_hdr 1
6970 echo "$ac_t""no" 1>&6
6977 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
6978 echo "configure:6979: checking for pthread_create in default libraries" >&5
6979 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
6980 echo $ac_n "(cached) $ac_c" 1>&6
6983 if test "$cross_compiling" = yes; then
6984 cat > conftest.$ac_ext <<EOF
6985 #line 6986 "configure"
6986 #include "confdefs.h"
6987 /* pthread test headers */
6988 #include <pthread.h>
6990 #define NULL (void*)0
6993 static void *task(p)
6996 return (void *) (p == NULL);
7001 /* pthread test function */
7004 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7005 /* This system (e.g. AIX) defaults detached; must override */
7006 pthread_attr_t attr;
7008 status = pthread_attr_init(&attr);
7009 if( status ) exit( status );
7011 status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7012 if( status ) exit( status );
7016 #if HAVE_PTHREADS_D4
7017 #define ATTR pthread_attr_default
7022 /* make sure pthread_create() isn't just a stub */
7023 status = pthread_create(&t, ATTR, task, NULL);
7024 if( status ) exit( status );
7026 /* make sure pthread_detach() isn't just a stub */
7027 #if HAVE_PTHREADS_D4
7028 status = pthread_detach( &t );
7030 status = pthread_detach( t );
7033 #ifdef HAVE_LINUX_THREADS
7034 pthread_kill_other_threads_np();
7041 if { (eval echo configure:7042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7043 ol_cv_pthread_create=yes
7045 echo "configure: failed program was:" >&5
7046 cat conftest.$ac_ext >&5
7048 ol_cv_pthread_create=no
7052 cat > conftest.$ac_ext <<EOF
7053 #line 7054 "configure"
7054 #include "confdefs.h"
7055 /* pthread test headers */
7056 #include <pthread.h>
7058 #define NULL (void*)0
7061 static void *task(p)
7064 return (void *) (p == NULL);
7068 int main(argc, argv)
7073 /* pthread test function */
7076 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7077 /* This system (e.g. AIX) defaults detached; must override */
7078 pthread_attr_t attr;
7080 status = pthread_attr_init(&attr);
7081 if( status ) exit( status );
7083 status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7084 if( status ) exit( status );
7088 #if HAVE_PTHREADS_D4
7089 #define ATTR pthread_attr_default
7094 /* make sure pthread_create() isn't just a stub */
7095 status = pthread_create(&t, ATTR, task, NULL);
7096 if( status ) exit( status );
7098 /* make sure pthread_detach() isn't just a stub */
7099 #if HAVE_PTHREADS_D4
7100 status = pthread_detach( &t );
7102 status = pthread_detach( t );
7105 #ifdef HAVE_LINUX_THREADS
7106 pthread_kill_other_threads_np();
7114 if { (eval echo configure:7115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7116 ol_cv_pthread_create=yes
7118 echo "configure: failed program was:" >&5
7119 cat conftest.$ac_ext >&5
7121 ol_cv_pthread_create=no
7128 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7130 if test $ol_cv_pthread_create != no ; then
7131 ol_link_threads=posix
7135 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7136 if test "$ol_link_threads" = no ; then
7138 echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7139 echo "configure:7140: checking for pthread link with -kthread" >&5
7140 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7141 echo $ac_n "(cached) $ac_c" 1>&6
7146 LIBS="-kthread $LIBS"
7148 if test "$cross_compiling" = yes; then
7149 cat > conftest.$ac_ext <<EOF
7150 #line 7151 "configure"
7151 #include "confdefs.h"
7152 /* pthread test headers */
7153 #include <pthread.h>
7155 #define NULL (void*)0
7158 static void *task(p)
7161 return (void *) (p == NULL);
7166 /* pthread test function */
7169 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7170 /* This system (e.g. AIX) defaults detached; must override */
7171 pthread_attr_t attr;
7173 status = pthread_attr_init(&attr);
7174 if( status ) exit( status );
7176 status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7177 if( status ) exit( status );
7181 #if HAVE_PTHREADS_D4
7182 #define ATTR pthread_attr_default
7187 /* make sure pthread_create() isn't just a stub */
7188 status = pthread_create(&t, ATTR, task, NULL);
7189 if( status ) exit( status );
7191 /* make sure pthread_detach() isn't just a stub */
7192 #if HAVE_PTHREADS_D4
7193 status = pthread_detach( &t );
7195 status = pthread_detach( t );
7198 #ifdef HAVE_LINUX_THREADS
7199 pthread_kill_other_threads_np();
7206 if { (eval echo configure:7207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7208 ol_cv_pthread_kthread=yes
7210 echo "configure: failed program was:" >&5
7211 cat conftest.$ac_ext >&5
7213 ol_cv_pthread_kthread=no
7217 cat > conftest.$ac_ext <<EOF
7218 #line 7219 "configure"
7219 #include "confdefs.h"
7220 /* pthread test headers */
7221 #include <pthread.h>
7223 #define NULL (void*)0
7226 static void *task(p)
7229 return (void *) (p == NULL);
7233 int main(argc, argv)
7238 /* pthread test function */
7241 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7242 /* This system (e.g. AIX) defaults detached; must override */
7243 pthread_attr_t attr;
7245 status = pthread_attr_init(&attr);
7246 if( status ) exit( status );
7248 status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7249 if( status ) exit( status );
7253 #if HAVE_PTHREADS_D4
7254 #define ATTR pthread_attr_default
7259 /* make sure pthread_create() isn't just a stub */
7260 status = pthread_create(&t, ATTR, task, NULL);
7261 if( status ) exit( status );
7263 /* make sure pthread_detach() isn't just a stub */
7264 #if HAVE_PTHREADS_D4
7265 status = pthread_detach( &t );
7267 status = pthread_detach( t );
7270 #ifdef HAVE_LINUX_THREADS
7271 pthread_kill_other_threads_np();
7279 if { (eval echo configure:7280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7281 ol_cv_pthread_kthread=yes
7283 echo "configure: failed program was:" >&5
7284 cat conftest.$ac_ext >&5
7286 ol_cv_pthread_kthread=no
7297 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7299 if test $ol_cv_pthread_kthread = yes ; then
7300 ol_link_pthreads="-kthread"
7301 ol_link_threads=posix
7305 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7306 if test "$ol_link_threads" = no ; then
7308 echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7309 echo "configure:7310: checking for pthread link with -pthread" >&5
7310 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7311 echo $ac_n "(cached) $ac_c" 1>&6
7316 LIBS="-pthread $LIBS"
7318 if test "$cross_compiling" = yes; then
7319 cat > conftest.$ac_ext <<EOF
7320 #line 7321 "configure"
7321 #include "confdefs.h"
7322 /* pthread test headers */
7323 #include <pthread.h>
7325 #define NULL (void*)0
7328 static void *task(p)
7331 return (void *) (p == NULL);
7336 /* pthread test function */
7339 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7340 /* This system (e.g. AIX) defaults detached; must override */
7341 pthread_attr_t attr;
7343 status = pthread_attr_init(&attr);
7344 if( status ) exit( status );
7346 status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7347 if( status ) exit( status );
7351 #if HAVE_PTHREADS_D4
7352 #define ATTR pthread_attr_default
7357 /* make sure pthread_create() isn't just a stub */
7358 status = pthread_create(&t, ATTR, task, NULL);
7359 if( status ) exit( status );
7361 /* make sure pthread_detach() isn't just a stub */
7362 #if HAVE_PTHREADS_D4
7363 status = pthread_detach( &t );
7365 status = pthread_detach( t );
7368 #ifdef HAVE_LINUX_THREADS
7369 pthread_kill_other_threads_np();
7376 if { (eval echo configure:7377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7378 ol_cv_pthread_pthread=yes
7380 echo "configure: failed program was:" >&5
7381 cat conftest.$ac_ext >&5
7383 ol_cv_pthread_pthread=no
7387 cat > conftest.$ac_ext <<EOF
7388 #line 7389 "configure"
7389 #include "confdefs.h"
7390 /* pthread test headers */
7391 #include <pthread.h>
7393 #define NULL (void*)0
7396 static void *task(p)
7399 return (void *) (p == NULL);
7403 int main(argc, argv)
7408 /* pthread test function */
7411 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7412 /* This system (e.g. AIX) defaults detached; must override */
7413 pthread_attr_t attr;
7415 status = pthread_attr_init(&attr);
7416 if( status ) exit( status );
7418 status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7419 if( status ) exit( status );
7423 #if HAVE_PTHREADS_D4
7424 #define ATTR pthread_attr_default
7429 /* make sure pthread_create() isn't just a stub */
7430 status = pthread_create(&t, ATTR, task, NULL);
7431 if( status ) exit( status );
7433 /* make sure pthread_detach() isn't just a stub */
7434 #if HAVE_PTHREADS_D4
7435 status = pthread_detach( &t );
7437 status = pthread_detach( t );
7440 #ifdef HAVE_LINUX_THREADS
7441 pthread_kill_other_threads_np();
7449 if { (eval echo configure:7450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7451 ol_cv_pthread_pthread=yes
7453 echo "configure: failed program was:" >&5
7454 cat conftest.$ac_ext >&5
7456 ol_cv_pthread_pthread=no
7467 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7469 if test $ol_cv_pthread_pthread = yes ; then
7470 ol_link_pthreads="-pthread"
7471 ol_link_threads=posix
7475 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7476 if test "$ol_link_threads" = no ; then
7478 echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7479 echo "configure:7480: checking for pthread link with -pthreads" >&5
7480 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7481 echo $ac_n "(cached) $ac_c" 1>&6
7486 LIBS="-pthreads $LIBS"
7488 if test "$cross_compiling" = yes; then
7489 cat > conftest.$ac_ext <<EOF
7490 #line 7491 "configure"
7491 #include "confdefs.h"
7492 /* pthread test headers */
7493 #include <pthread.h>
7495 #define NULL (void*)0
7498 static void *task(p)
7501 return (void *) (p == NULL);
7506 /* pthread test function */
7509 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7510 /* This system (e.g. AIX) defaults detached; must override */
7511 pthread_attr_t attr;
7513 status = pthread_attr_init(&attr);
7514 if( status ) exit( status );
7516 status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7517 if( status ) exit( status );
7521 #if HAVE_PTHREADS_D4
7522 #define ATTR pthread_attr_default
7527 /* make sure pthread_create() isn't just a stub */
7528 status = pthread_create(&t, ATTR, task, NULL);
7529 if( status ) exit( status );
7531 /* make sure pthread_detach() isn't just a stub */
7532 #if HAVE_PTHREADS_D4
7533 status = pthread_detach( &t );
7535 status = pthread_detach( t );
7538 #ifdef HAVE_LINUX_THREADS
7539 pthread_kill_other_threads_np();
7546 if { (eval echo configure:7547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7548 ol_cv_pthread_pthreads=yes
7550 echo "configure: failed program was:" >&5
7551 cat conftest.$ac_ext >&5
7553 ol_cv_pthread_pthreads=no
7557 cat > conftest.$ac_ext <<EOF
7558 #line 7559 "configure"
7559 #include "confdefs.h"
7560 /* pthread test headers */
7561 #include <pthread.h>
7563 #define NULL (void*)0
7566 static void *task(p)
7569 return (void *) (p == NULL);
7573 int main(argc, argv)
7578 /* pthread test function */
7581 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7582 /* This system (e.g. AIX) defaults detached; must override */
7583 pthread_attr_t attr;
7585 status = pthread_attr_init(&attr);
7586 if( status ) exit( status );
7588 status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7589 if( status ) exit( status );
7593 #if HAVE_PTHREADS_D4
7594 #define ATTR pthread_attr_default
7599 /* make sure pthread_create() isn't just a stub */
7600 status = pthread_create(&t, ATTR, task, NULL);
7601 if( status ) exit( status );
7603 /* make sure pthread_detach() isn't just a stub */
7604 #if HAVE_PTHREADS_D4
7605 status = pthread_detach( &t );
7607 status = pthread_detach( t );
7610 #ifdef HAVE_LINUX_THREADS
7611 pthread_kill_other_threads_np();
7619 if { (eval echo configure:7620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7621 ol_cv_pthread_pthreads=yes
7623 echo "configure: failed program was:" >&5
7624 cat conftest.$ac_ext >&5
7626 ol_cv_pthread_pthreads=no
7637 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7639 if test $ol_cv_pthread_pthreads = yes ; then
7640 ol_link_pthreads="-pthreads"
7641 ol_link_threads=posix
7645 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7646 if test "$ol_link_threads" = no ; then
7648 echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7649 echo "configure:7650: checking for pthread link with -mthreads" >&5
7650 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
7651 echo $ac_n "(cached) $ac_c" 1>&6
7656 LIBS="-mthreads $LIBS"
7658 if test "$cross_compiling" = yes; then
7659 cat > conftest.$ac_ext <<EOF
7660 #line 7661 "configure"
7661 #include "confdefs.h"
7662 /* pthread test headers */
7663 #include <pthread.h>
7665 #define NULL (void*)0
7668 static void *task(p)
7671 return (void *) (p == NULL);
7676 /* pthread test function */
7679 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7680 /* This system (e.g. AIX) defaults detached; must override */
7681 pthread_attr_t attr;
7683 status = pthread_attr_init(&attr);
7684 if( status ) exit( status );
7686 status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7687 if( status ) exit( status );
7691 #if HAVE_PTHREADS_D4
7692 #define ATTR pthread_attr_default
7697 /* make sure pthread_create() isn't just a stub */
7698 status = pthread_create(&t, ATTR, task, NULL);
7699 if( status ) exit( status );
7701 /* make sure pthread_detach() isn't just a stub */
7702 #if HAVE_PTHREADS_D4
7703 status = pthread_detach( &t );
7705 status = pthread_detach( t );
7708 #ifdef HAVE_LINUX_THREADS
7709 pthread_kill_other_threads_np();
7716 if { (eval echo configure:7717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7718 ol_cv_pthread_mthreads=yes
7720 echo "configure: failed program was:" >&5
7721 cat conftest.$ac_ext >&5
7723 ol_cv_pthread_mthreads=no
7727 cat > conftest.$ac_ext <<EOF
7728 #line 7729 "configure"
7729 #include "confdefs.h"
7730 /* pthread test headers */
7731 #include <pthread.h>
7733 #define NULL (void*)0
7736 static void *task(p)
7739 return (void *) (p == NULL);
7743 int main(argc, argv)
7748 /* pthread test function */
7751 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7752 /* This system (e.g. AIX) defaults detached; must override */
7753 pthread_attr_t attr;
7755 status = pthread_attr_init(&attr);
7756 if( status ) exit( status );
7758 status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7759 if( status ) exit( status );
7763 #if HAVE_PTHREADS_D4
7764 #define ATTR pthread_attr_default
7769 /* make sure pthread_create() isn't just a stub */
7770 status = pthread_create(&t, ATTR, task, NULL);
7771 if( status ) exit( status );
7773 /* make sure pthread_detach() isn't just a stub */
7774 #if HAVE_PTHREADS_D4
7775 status = pthread_detach( &t );
7777 status = pthread_detach( t );
7780 #ifdef HAVE_LINUX_THREADS
7781 pthread_kill_other_threads_np();
7789 if { (eval echo configure:7790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7791 ol_cv_pthread_mthreads=yes
7793 echo "configure: failed program was:" >&5
7794 cat conftest.$ac_ext >&5
7796 ol_cv_pthread_mthreads=no
7807 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
7809 if test $ol_cv_pthread_mthreads = yes ; then
7810 ol_link_pthreads="-mthreads"
7811 ol_link_threads=posix
7815 # Pthread try link: -thread (ol_cv_pthread_thread)
7816 if test "$ol_link_threads" = no ; then
7818 echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
7819 echo "configure:7820: checking for pthread link with -thread" >&5
7820 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
7821 echo $ac_n "(cached) $ac_c" 1>&6
7826 LIBS="-thread $LIBS"
7828 if test "$cross_compiling" = yes; then
7829 cat > conftest.$ac_ext <<EOF
7830 #line 7831 "configure"
7831 #include "confdefs.h"
7832 /* pthread test headers */
7833 #include <pthread.h>
7835 #define NULL (void*)0
7838 static void *task(p)
7841 return (void *) (p == NULL);
7846 /* pthread test function */
7849 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7850 /* This system (e.g. AIX) defaults detached; must override */
7851 pthread_attr_t attr;
7853 status = pthread_attr_init(&attr);
7854 if( status ) exit( status );
7856 status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7857 if( status ) exit( status );
7861 #if HAVE_PTHREADS_D4
7862 #define ATTR pthread_attr_default
7867 /* make sure pthread_create() isn't just a stub */
7868 status = pthread_create(&t, ATTR, task, NULL);
7869 if( status ) exit( status );
7871 /* make sure pthread_detach() isn't just a stub */
7872 #if HAVE_PTHREADS_D4
7873 status = pthread_detach( &t );
7875 status = pthread_detach( t );
7878 #ifdef HAVE_LINUX_THREADS
7879 pthread_kill_other_threads_np();
7886 if { (eval echo configure:7887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7888 ol_cv_pthread_thread=yes
7890 echo "configure: failed program was:" >&5
7891 cat conftest.$ac_ext >&5
7893 ol_cv_pthread_thread=no
7897 cat > conftest.$ac_ext <<EOF
7898 #line 7899 "configure"
7899 #include "confdefs.h"
7900 /* pthread test headers */
7901 #include <pthread.h>
7903 #define NULL (void*)0
7906 static void *task(p)
7909 return (void *) (p == NULL);
7913 int main(argc, argv)
7918 /* pthread test function */
7921 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7922 /* This system (e.g. AIX) defaults detached; must override */
7923 pthread_attr_t attr;
7925 status = pthread_attr_init(&attr);
7926 if( status ) exit( status );
7928 status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7929 if( status ) exit( status );
7933 #if HAVE_PTHREADS_D4
7934 #define ATTR pthread_attr_default
7939 /* make sure pthread_create() isn't just a stub */
7940 status = pthread_create(&t, ATTR, task, NULL);
7941 if( status ) exit( status );
7943 /* make sure pthread_detach() isn't just a stub */
7944 #if HAVE_PTHREADS_D4
7945 status = pthread_detach( &t );
7947 status = pthread_detach( t );
7950 #ifdef HAVE_LINUX_THREADS
7951 pthread_kill_other_threads_np();
7959 if { (eval echo configure:7960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7961 ol_cv_pthread_thread=yes
7963 echo "configure: failed program was:" >&5
7964 cat conftest.$ac_ext >&5
7966 ol_cv_pthread_thread=no
7977 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
7979 if test $ol_cv_pthread_thread = yes ; then
7980 ol_link_pthreads="-thread"
7981 ol_link_threads=posix
7986 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
7987 if test "$ol_link_threads" = no ; then
7988 # try -lpthread -lmach -lexc -lc_r
7989 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
7990 echo "configure:7991: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
7991 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
7992 echo $ac_n "(cached) $ac_c" 1>&6
7997 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
7999 if test "$cross_compiling" = yes; then
8000 cat > conftest.$ac_ext <<EOF
8001 #line 8002 "configure"
8002 #include "confdefs.h"
8003 /* pthread test headers */
8004 #include <pthread.h>
8006 #define NULL (void*)0
8009 static void *task(p)
8012 return (void *) (p == NULL);
8017 /* pthread test function */
8020 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8021 /* This system (e.g. AIX) defaults detached; must override */
8022 pthread_attr_t attr;
8024 status = pthread_attr_init(&attr);
8025 if( status ) exit( status );
8027 status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8028 if( status ) exit( status );
8032 #if HAVE_PTHREADS_D4
8033 #define ATTR pthread_attr_default
8038 /* make sure pthread_create() isn't just a stub */
8039 status = pthread_create(&t, ATTR, task, NULL);
8040 if( status ) exit( status );
8042 /* make sure pthread_detach() isn't just a stub */
8043 #if HAVE_PTHREADS_D4
8044 status = pthread_detach( &t );
8046 status = pthread_detach( t );
8049 #ifdef HAVE_LINUX_THREADS
8050 pthread_kill_other_threads_np();
8057 if { (eval echo configure:8058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8059 ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8061 echo "configure: failed program was:" >&5
8062 cat conftest.$ac_ext >&5
8064 ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8068 cat > conftest.$ac_ext <<EOF
8069 #line 8070 "configure"
8070 #include "confdefs.h"
8071 /* pthread test headers */
8072 #include <pthread.h>
8074 #define NULL (void*)0
8077 static void *task(p)
8080 return (void *) (p == NULL);
8084 int main(argc, argv)
8089 /* pthread test function */
8092 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8093 /* This system (e.g. AIX) defaults detached; must override */
8094 pthread_attr_t attr;
8096 status = pthread_attr_init(&attr);
8097 if( status ) exit( status );
8099 status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8100 if( status ) exit( status );
8104 #if HAVE_PTHREADS_D4
8105 #define ATTR pthread_attr_default
8110 /* make sure pthread_create() isn't just a stub */
8111 status = pthread_create(&t, ATTR, task, NULL);
8112 if( status ) exit( status );
8114 /* make sure pthread_detach() isn't just a stub */
8115 #if HAVE_PTHREADS_D4
8116 status = pthread_detach( &t );
8118 status = pthread_detach( t );
8121 #ifdef HAVE_LINUX_THREADS
8122 pthread_kill_other_threads_np();
8130 if { (eval echo configure:8131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8132 ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8134 echo "configure: failed program was:" >&5
8135 cat conftest.$ac_ext >&5
8137 ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8148 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
8150 if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
8151 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
8152 ol_link_threads=posix
8156 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
8157 if test "$ol_link_threads" = no ; then
8158 # try -lpthread -lmach -lexc
8159 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
8160 echo "configure:8161: checking for pthread link with -lpthread -lmach -lexc" >&5
8161 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
8162 echo $ac_n "(cached) $ac_c" 1>&6
8167 LIBS="-lpthread -lmach -lexc $LIBS"
8169 if test "$cross_compiling" = yes; then
8170 cat > conftest.$ac_ext <<EOF
8171 #line 8172 "configure"
8172 #include "confdefs.h"
8173 /* pthread test headers */
8174 #include <pthread.h>
8176 #define NULL (void*)0
8179 static void *task(p)
8182 return (void *) (p == NULL);
8187 /* pthread test function */
8190 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8191 /* This system (e.g. AIX) defaults detached; must override */
8192 pthread_attr_t attr;
8194 status = pthread_attr_init(&attr);
8195 if( status ) exit( status );
8197 status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8198 if( status ) exit( status );
8202 #if HAVE_PTHREADS_D4
8203 #define ATTR pthread_attr_default
8208 /* make sure pthread_create() isn't just a stub */
8209 status = pthread_create(&t, ATTR, task, NULL);
8210 if( status ) exit( status );
8212 /* make sure pthread_detach() isn't just a stub */
8213 #if HAVE_PTHREADS_D4
8214 status = pthread_detach( &t );
8216 status = pthread_detach( t );
8219 #ifdef HAVE_LINUX_THREADS
8220 pthread_kill_other_threads_np();
8227 if { (eval echo configure:8228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8229 ol_cv_pthread_lpthread_lmach_lexc=yes
8231 echo "configure: failed program was:" >&5
8232 cat conftest.$ac_ext >&5
8234 ol_cv_pthread_lpthread_lmach_lexc=no
8238 cat > conftest.$ac_ext <<EOF
8239 #line 8240 "configure"
8240 #include "confdefs.h"
8241 /* pthread test headers */
8242 #include <pthread.h>
8244 #define NULL (void*)0
8247 static void *task(p)
8250 return (void *) (p == NULL);
8254 int main(argc, argv)
8259 /* pthread test function */
8262 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8263 /* This system (e.g. AIX) defaults detached; must override */
8264 pthread_attr_t attr;
8266 status = pthread_attr_init(&attr);
8267 if( status ) exit( status );
8269 status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8270 if( status ) exit( status );
8274 #if HAVE_PTHREADS_D4
8275 #define ATTR pthread_attr_default
8280 /* make sure pthread_create() isn't just a stub */
8281 status = pthread_create(&t, ATTR, task, NULL);
8282 if( status ) exit( status );
8284 /* make sure pthread_detach() isn't just a stub */
8285 #if HAVE_PTHREADS_D4
8286 status = pthread_detach( &t );
8288 status = pthread_detach( t );
8291 #ifdef HAVE_LINUX_THREADS
8292 pthread_kill_other_threads_np();
8300 if { (eval echo configure:8301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8302 ol_cv_pthread_lpthread_lmach_lexc=yes
8304 echo "configure: failed program was:" >&5
8305 cat conftest.$ac_ext >&5
8307 ol_cv_pthread_lpthread_lmach_lexc=no
8318 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8320 if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8321 ol_link_pthreads="-lpthread -lmach -lexc"
8322 ol_link_threads=posix
8327 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8328 if test "$ol_link_threads" = no ; then
8329 # try -lpthread -Wl,-woff,85
8330 echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8331 echo "configure:8332: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8332 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8333 echo $ac_n "(cached) $ac_c" 1>&6
8338 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8340 if test "$cross_compiling" = yes; then
8341 cat > conftest.$ac_ext <<EOF
8342 #line 8343 "configure"
8343 #include "confdefs.h"
8344 /* pthread test headers */
8345 #include <pthread.h>
8347 #define NULL (void*)0
8350 static void *task(p)
8353 return (void *) (p == NULL);
8358 /* pthread test function */
8361 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8362 /* This system (e.g. AIX) defaults detached; must override */
8363 pthread_attr_t attr;
8365 status = pthread_attr_init(&attr);
8366 if( status ) exit( status );
8368 status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8369 if( status ) exit( status );
8373 #if HAVE_PTHREADS_D4
8374 #define ATTR pthread_attr_default
8379 /* make sure pthread_create() isn't just a stub */
8380 status = pthread_create(&t, ATTR, task, NULL);
8381 if( status ) exit( status );
8383 /* make sure pthread_detach() isn't just a stub */
8384 #if HAVE_PTHREADS_D4
8385 status = pthread_detach( &t );
8387 status = pthread_detach( t );
8390 #ifdef HAVE_LINUX_THREADS
8391 pthread_kill_other_threads_np();
8398 if { (eval echo configure:8399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8400 ol_cv_pthread_lib_lpthread_woff=yes
8402 echo "configure: failed program was:" >&5
8403 cat conftest.$ac_ext >&5
8405 ol_cv_pthread_lib_lpthread_woff=no
8409 cat > conftest.$ac_ext <<EOF
8410 #line 8411 "configure"
8411 #include "confdefs.h"
8412 /* pthread test headers */
8413 #include <pthread.h>
8415 #define NULL (void*)0
8418 static void *task(p)
8421 return (void *) (p == NULL);
8425 int main(argc, argv)
8430 /* pthread test function */
8433 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8434 /* This system (e.g. AIX) defaults detached; must override */
8435 pthread_attr_t attr;
8437 status = pthread_attr_init(&attr);
8438 if( status ) exit( status );
8440 status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8441 if( status ) exit( status );
8445 #if HAVE_PTHREADS_D4
8446 #define ATTR pthread_attr_default
8451 /* make sure pthread_create() isn't just a stub */
8452 status = pthread_create(&t, ATTR, task, NULL);
8453 if( status ) exit( status );
8455 /* make sure pthread_detach() isn't just a stub */
8456 #if HAVE_PTHREADS_D4
8457 status = pthread_detach( &t );
8459 status = pthread_detach( t );
8462 #ifdef HAVE_LINUX_THREADS
8463 pthread_kill_other_threads_np();
8471 if { (eval echo configure:8472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8473 ol_cv_pthread_lib_lpthread_woff=yes
8475 echo "configure: failed program was:" >&5
8476 cat conftest.$ac_ext >&5
8478 ol_cv_pthread_lib_lpthread_woff=no
8489 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8491 if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8492 ol_link_pthreads="-lpthread -Wl,-woff,85"
8493 ol_link_threads=posix
8498 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8499 if test "$ol_link_threads" = no ; then
8501 echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8502 echo "configure:8503: checking for pthread link with -lpthread" >&5
8503 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
8504 echo $ac_n "(cached) $ac_c" 1>&6
8509 LIBS="-lpthread $LIBS"
8511 if test "$cross_compiling" = yes; then
8512 cat > conftest.$ac_ext <<EOF
8513 #line 8514 "configure"
8514 #include "confdefs.h"
8515 /* pthread test headers */
8516 #include <pthread.h>
8518 #define NULL (void*)0
8521 static void *task(p)
8524 return (void *) (p == NULL);
8529 /* pthread test function */
8532 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8533 /* This system (e.g. AIX) defaults detached; must override */
8534 pthread_attr_t attr;
8536 status = pthread_attr_init(&attr);
8537 if( status ) exit( status );
8539 status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8540 if( status ) exit( status );
8544 #if HAVE_PTHREADS_D4
8545 #define ATTR pthread_attr_default
8550 /* make sure pthread_create() isn't just a stub */
8551 status = pthread_create(&t, ATTR, task, NULL);
8552 if( status ) exit( status );
8554 /* make sure pthread_detach() isn't just a stub */
8555 #if HAVE_PTHREADS_D4
8556 status = pthread_detach( &t );
8558 status = pthread_detach( t );
8561 #ifdef HAVE_LINUX_THREADS
8562 pthread_kill_other_threads_np();
8569 if { (eval echo configure:8570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8571 ol_cv_pthread_lpthread=yes
8573 echo "configure: failed program was:" >&5
8574 cat conftest.$ac_ext >&5
8576 ol_cv_pthread_lpthread=no
8580 cat > conftest.$ac_ext <<EOF
8581 #line 8582 "configure"
8582 #include "confdefs.h"
8583 /* pthread test headers */
8584 #include <pthread.h>
8586 #define NULL (void*)0
8589 static void *task(p)
8592 return (void *) (p == NULL);
8596 int main(argc, argv)
8601 /* pthread test function */
8604 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8605 /* This system (e.g. AIX) defaults detached; must override */
8606 pthread_attr_t attr;
8608 status = pthread_attr_init(&attr);
8609 if( status ) exit( status );
8611 status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8612 if( status ) exit( status );
8616 #if HAVE_PTHREADS_D4
8617 #define ATTR pthread_attr_default
8622 /* make sure pthread_create() isn't just a stub */
8623 status = pthread_create(&t, ATTR, task, NULL);
8624 if( status ) exit( status );
8626 /* make sure pthread_detach() isn't just a stub */
8627 #if HAVE_PTHREADS_D4
8628 status = pthread_detach( &t );
8630 status = pthread_detach( t );
8633 #ifdef HAVE_LINUX_THREADS
8634 pthread_kill_other_threads_np();
8642 if { (eval echo configure:8643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8644 ol_cv_pthread_lpthread=yes
8646 echo "configure: failed program was:" >&5
8647 cat conftest.$ac_ext >&5
8649 ol_cv_pthread_lpthread=no
8660 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
8662 if test $ol_cv_pthread_lpthread = yes ; then
8663 ol_link_pthreads="-lpthread"
8664 ol_link_threads=posix
8668 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
8669 if test "$ol_link_threads" = no ; then
8671 echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
8672 echo "configure:8673: checking for pthread link with -lc_r" >&5
8673 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
8674 echo $ac_n "(cached) $ac_c" 1>&6
8681 if test "$cross_compiling" = yes; then
8682 cat > conftest.$ac_ext <<EOF
8683 #line 8684 "configure"
8684 #include "confdefs.h"
8685 /* pthread test headers */
8686 #include <pthread.h>
8688 #define NULL (void*)0
8691 static void *task(p)
8694 return (void *) (p == NULL);
8699 /* pthread test function */
8702 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8703 /* This system (e.g. AIX) defaults detached; must override */
8704 pthread_attr_t attr;
8706 status = pthread_attr_init(&attr);
8707 if( status ) exit( status );
8709 status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8710 if( status ) exit( status );
8714 #if HAVE_PTHREADS_D4
8715 #define ATTR pthread_attr_default
8720 /* make sure pthread_create() isn't just a stub */
8721 status = pthread_create(&t, ATTR, task, NULL);
8722 if( status ) exit( status );
8724 /* make sure pthread_detach() isn't just a stub */
8725 #if HAVE_PTHREADS_D4
8726 status = pthread_detach( &t );
8728 status = pthread_detach( t );
8731 #ifdef HAVE_LINUX_THREADS
8732 pthread_kill_other_threads_np();
8739 if { (eval echo configure:8740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8741 ol_cv_pthread_lc_r=yes
8743 echo "configure: failed program was:" >&5
8744 cat conftest.$ac_ext >&5
8746 ol_cv_pthread_lc_r=no
8750 cat > conftest.$ac_ext <<EOF
8751 #line 8752 "configure"
8752 #include "confdefs.h"
8753 /* pthread test headers */
8754 #include <pthread.h>
8756 #define NULL (void*)0
8759 static void *task(p)
8762 return (void *) (p == NULL);
8766 int main(argc, argv)
8771 /* pthread test function */
8774 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8775 /* This system (e.g. AIX) defaults detached; must override */
8776 pthread_attr_t attr;
8778 status = pthread_attr_init(&attr);
8779 if( status ) exit( status );
8781 status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8782 if( status ) exit( status );
8786 #if HAVE_PTHREADS_D4
8787 #define ATTR pthread_attr_default
8792 /* make sure pthread_create() isn't just a stub */
8793 status = pthread_create(&t, ATTR, task, NULL);
8794 if( status ) exit( status );
8796 /* make sure pthread_detach() isn't just a stub */
8797 #if HAVE_PTHREADS_D4
8798 status = pthread_detach( &t );
8800 status = pthread_detach( t );
8803 #ifdef HAVE_LINUX_THREADS
8804 pthread_kill_other_threads_np();
8812 if { (eval echo configure:8813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8814 ol_cv_pthread_lc_r=yes
8816 echo "configure: failed program was:" >&5
8817 cat conftest.$ac_ext >&5
8819 ol_cv_pthread_lc_r=no
8830 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
8832 if test $ol_cv_pthread_lc_r = yes ; then
8833 ol_link_pthreads="-lc_r"
8834 ol_link_threads=posix
8839 # Pthread try link: -threads (ol_cv_pthread_threads)
8840 if test "$ol_link_threads" = no ; then
8842 echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
8843 echo "configure:8844: checking for pthread link with -threads" >&5
8844 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
8845 echo $ac_n "(cached) $ac_c" 1>&6
8850 LIBS="-threads $LIBS"
8852 if test "$cross_compiling" = yes; then
8853 cat > conftest.$ac_ext <<EOF
8854 #line 8855 "configure"
8855 #include "confdefs.h"
8856 /* pthread test headers */
8857 #include <pthread.h>
8859 #define NULL (void*)0
8862 static void *task(p)
8865 return (void *) (p == NULL);
8870 /* pthread test function */
8873 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8874 /* This system (e.g. AIX) defaults detached; must override */
8875 pthread_attr_t attr;
8877 status = pthread_attr_init(&attr);
8878 if( status ) exit( status );
8880 status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8881 if( status ) exit( status );
8885 #if HAVE_PTHREADS_D4
8886 #define ATTR pthread_attr_default
8891 /* make sure pthread_create() isn't just a stub */
8892 status = pthread_create(&t, ATTR, task, NULL);
8893 if( status ) exit( status );
8895 /* make sure pthread_detach() isn't just a stub */
8896 #if HAVE_PTHREADS_D4
8897 status = pthread_detach( &t );
8899 status = pthread_detach( t );
8902 #ifdef HAVE_LINUX_THREADS
8903 pthread_kill_other_threads_np();
8910 if { (eval echo configure:8911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8912 ol_cv_pthread_threads=yes
8914 echo "configure: failed program was:" >&5
8915 cat conftest.$ac_ext >&5
8917 ol_cv_pthread_threads=no
8921 cat > conftest.$ac_ext <<EOF
8922 #line 8923 "configure"
8923 #include "confdefs.h"
8924 /* pthread test headers */
8925 #include <pthread.h>
8927 #define NULL (void*)0
8930 static void *task(p)
8933 return (void *) (p == NULL);
8937 int main(argc, argv)
8942 /* pthread test function */
8945 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8946 /* This system (e.g. AIX) defaults detached; must override */
8947 pthread_attr_t attr;
8949 status = pthread_attr_init(&attr);
8950 if( status ) exit( status );
8952 status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8953 if( status ) exit( status );
8957 #if HAVE_PTHREADS_D4
8958 #define ATTR pthread_attr_default
8963 /* make sure pthread_create() isn't just a stub */
8964 status = pthread_create(&t, ATTR, task, NULL);
8965 if( status ) exit( status );
8967 /* make sure pthread_detach() isn't just a stub */
8968 #if HAVE_PTHREADS_D4
8969 status = pthread_detach( &t );
8971 status = pthread_detach( t );
8974 #ifdef HAVE_LINUX_THREADS
8975 pthread_kill_other_threads_np();
8983 if { (eval echo configure:8984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8985 ol_cv_pthread_threads=yes
8987 echo "configure: failed program was:" >&5
8988 cat conftest.$ac_ext >&5
8990 ol_cv_pthread_threads=no
9001 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
9003 if test $ol_cv_pthread_threads = yes ; then
9004 ol_link_pthreads="-threads"
9005 ol_link_threads=posix
9010 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
9011 if test "$ol_link_threads" = no ; then
9012 # try -lpthreads -lmach -lexc -lc_r
9013 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
9014 echo "configure:9015: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
9015 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
9016 echo $ac_n "(cached) $ac_c" 1>&6
9021 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
9023 if test "$cross_compiling" = yes; then
9024 cat > conftest.$ac_ext <<EOF
9025 #line 9026 "configure"
9026 #include "confdefs.h"
9027 /* pthread test headers */
9028 #include <pthread.h>
9030 #define NULL (void*)0
9033 static void *task(p)
9036 return (void *) (p == NULL);
9041 /* pthread test function */
9044 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9045 /* This system (e.g. AIX) defaults detached; must override */
9046 pthread_attr_t attr;
9048 status = pthread_attr_init(&attr);
9049 if( status ) exit( status );
9051 status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9052 if( status ) exit( status );
9056 #if HAVE_PTHREADS_D4
9057 #define ATTR pthread_attr_default
9062 /* make sure pthread_create() isn't just a stub */
9063 status = pthread_create(&t, ATTR, task, NULL);
9064 if( status ) exit( status );
9066 /* make sure pthread_detach() isn't just a stub */
9067 #if HAVE_PTHREADS_D4
9068 status = pthread_detach( &t );
9070 status = pthread_detach( t );
9073 #ifdef HAVE_LINUX_THREADS
9074 pthread_kill_other_threads_np();
9081 if { (eval echo configure:9082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9083 ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9085 echo "configure: failed program was:" >&5
9086 cat conftest.$ac_ext >&5
9088 ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9092 cat > conftest.$ac_ext <<EOF
9093 #line 9094 "configure"
9094 #include "confdefs.h"
9095 /* pthread test headers */
9096 #include <pthread.h>
9098 #define NULL (void*)0
9101 static void *task(p)
9104 return (void *) (p == NULL);
9108 int main(argc, argv)
9113 /* pthread test function */
9116 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9117 /* This system (e.g. AIX) defaults detached; must override */
9118 pthread_attr_t attr;
9120 status = pthread_attr_init(&attr);
9121 if( status ) exit( status );
9123 status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9124 if( status ) exit( status );
9128 #if HAVE_PTHREADS_D4
9129 #define ATTR pthread_attr_default
9134 /* make sure pthread_create() isn't just a stub */
9135 status = pthread_create(&t, ATTR, task, NULL);
9136 if( status ) exit( status );
9138 /* make sure pthread_detach() isn't just a stub */
9139 #if HAVE_PTHREADS_D4
9140 status = pthread_detach( &t );
9142 status = pthread_detach( t );
9145 #ifdef HAVE_LINUX_THREADS
9146 pthread_kill_other_threads_np();
9154 if { (eval echo configure:9155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9156 ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9158 echo "configure: failed program was:" >&5
9159 cat conftest.$ac_ext >&5
9161 ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9172 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
9174 if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
9175 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
9176 ol_link_threads=posix
9180 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
9181 if test "$ol_link_threads" = no ; then
9182 # try -lpthreads -lmach -lexc
9183 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
9184 echo "configure:9185: checking for pthread link with -lpthreads -lmach -lexc" >&5
9185 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
9186 echo $ac_n "(cached) $ac_c" 1>&6
9191 LIBS="-lpthreads -lmach -lexc $LIBS"
9193 if test "$cross_compiling" = yes; then
9194 cat > conftest.$ac_ext <<EOF
9195 #line 9196 "configure"
9196 #include "confdefs.h"
9197 /* pthread test headers */
9198 #include <pthread.h>
9200 #define NULL (void*)0
9203 static void *task(p)
9206 return (void *) (p == NULL);
9211 /* pthread test function */
9214 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9215 /* This system (e.g. AIX) defaults detached; must override */
9216 pthread_attr_t attr;
9218 status = pthread_attr_init(&attr);
9219 if( status ) exit( status );
9221 status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9222 if( status ) exit( status );
9226 #if HAVE_PTHREADS_D4
9227 #define ATTR pthread_attr_default
9232 /* make sure pthread_create() isn't just a stub */
9233 status = pthread_create(&t, ATTR, task, NULL);
9234 if( status ) exit( status );
9236 /* make sure pthread_detach() isn't just a stub */
9237 #if HAVE_PTHREADS_D4
9238 status = pthread_detach( &t );
9240 status = pthread_detach( t );
9243 #ifdef HAVE_LINUX_THREADS
9244 pthread_kill_other_threads_np();
9251 if { (eval echo configure:9252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9253 ol_cv_pthread_lpthreads_lmach_lexc=yes
9255 echo "configure: failed program was:" >&5
9256 cat conftest.$ac_ext >&5
9258 ol_cv_pthread_lpthreads_lmach_lexc=no
9262 cat > conftest.$ac_ext <<EOF
9263 #line 9264 "configure"
9264 #include "confdefs.h"
9265 /* pthread test headers */
9266 #include <pthread.h>
9268 #define NULL (void*)0
9271 static void *task(p)
9274 return (void *) (p == NULL);
9278 int main(argc, argv)
9283 /* pthread test function */
9286 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9287 /* This system (e.g. AIX) defaults detached; must override */
9288 pthread_attr_t attr;
9290 status = pthread_attr_init(&attr);
9291 if( status ) exit( status );
9293 status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9294 if( status ) exit( status );
9298 #if HAVE_PTHREADS_D4
9299 #define ATTR pthread_attr_default
9304 /* make sure pthread_create() isn't just a stub */
9305 status = pthread_create(&t, ATTR, task, NULL);
9306 if( status ) exit( status );
9308 /* make sure pthread_detach() isn't just a stub */
9309 #if HAVE_PTHREADS_D4
9310 status = pthread_detach( &t );
9312 status = pthread_detach( t );
9315 #ifdef HAVE_LINUX_THREADS
9316 pthread_kill_other_threads_np();
9324 if { (eval echo configure:9325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9326 ol_cv_pthread_lpthreads_lmach_lexc=yes
9328 echo "configure: failed program was:" >&5
9329 cat conftest.$ac_ext >&5
9331 ol_cv_pthread_lpthreads_lmach_lexc=no
9342 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
9344 if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
9345 ol_link_pthreads="-lpthreads -lmach -lexc"
9346 ol_link_threads=posix
9350 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
9351 if test "$ol_link_threads" = no ; then
9352 # try -lpthreads -lexc
9353 echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
9354 echo "configure:9355: checking for pthread link with -lpthreads -lexc" >&5
9355 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
9356 echo $ac_n "(cached) $ac_c" 1>&6
9361 LIBS="-lpthreads -lexc $LIBS"
9363 if test "$cross_compiling" = yes; then
9364 cat > conftest.$ac_ext <<EOF
9365 #line 9366 "configure"
9366 #include "confdefs.h"
9367 /* pthread test headers */
9368 #include <pthread.h>
9370 #define NULL (void*)0
9373 static void *task(p)
9376 return (void *) (p == NULL);
9381 /* pthread test function */
9384 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9385 /* This system (e.g. AIX) defaults detached; must override */
9386 pthread_attr_t attr;
9388 status = pthread_attr_init(&attr);
9389 if( status ) exit( status );
9391 status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9392 if( status ) exit( status );
9396 #if HAVE_PTHREADS_D4
9397 #define ATTR pthread_attr_default
9402 /* make sure pthread_create() isn't just a stub */
9403 status = pthread_create(&t, ATTR, task, NULL);
9404 if( status ) exit( status );
9406 /* make sure pthread_detach() isn't just a stub */
9407 #if HAVE_PTHREADS_D4
9408 status = pthread_detach( &t );
9410 status = pthread_detach( t );
9413 #ifdef HAVE_LINUX_THREADS
9414 pthread_kill_other_threads_np();
9421 if { (eval echo configure:9422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9423 ol_cv_pthread_lpthreads_lexc=yes
9425 echo "configure: failed program was:" >&5
9426 cat conftest.$ac_ext >&5
9428 ol_cv_pthread_lpthreads_lexc=no
9432 cat > conftest.$ac_ext <<EOF
9433 #line 9434 "configure"
9434 #include "confdefs.h"
9435 /* pthread test headers */
9436 #include <pthread.h>
9438 #define NULL (void*)0
9441 static void *task(p)
9444 return (void *) (p == NULL);
9448 int main(argc, argv)
9453 /* pthread test function */
9456 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9457 /* This system (e.g. AIX) defaults detached; must override */
9458 pthread_attr_t attr;
9460 status = pthread_attr_init(&attr);
9461 if( status ) exit( status );
9463 status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9464 if( status ) exit( status );
9468 #if HAVE_PTHREADS_D4
9469 #define ATTR pthread_attr_default
9474 /* make sure pthread_create() isn't just a stub */
9475 status = pthread_create(&t, ATTR, task, NULL);
9476 if( status ) exit( status );
9478 /* make sure pthread_detach() isn't just a stub */
9479 #if HAVE_PTHREADS_D4
9480 status = pthread_detach( &t );
9482 status = pthread_detach( t );
9485 #ifdef HAVE_LINUX_THREADS
9486 pthread_kill_other_threads_np();
9494 if { (eval echo configure:9495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9496 ol_cv_pthread_lpthreads_lexc=yes
9498 echo "configure: failed program was:" >&5
9499 cat conftest.$ac_ext >&5
9501 ol_cv_pthread_lpthreads_lexc=no
9512 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9514 if test $ol_cv_pthread_lpthreads_lexc = yes ; then
9515 ol_link_pthreads="-lpthreads -lexc"
9516 ol_link_threads=posix
9521 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
9522 if test "$ol_link_threads" = no ; then
9524 echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
9525 echo "configure:9526: checking for pthread link with -lpthreads" >&5
9526 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
9527 echo $ac_n "(cached) $ac_c" 1>&6
9532 LIBS="-lpthreads $LIBS"
9534 if test "$cross_compiling" = yes; then
9535 cat > conftest.$ac_ext <<EOF
9536 #line 9537 "configure"
9537 #include "confdefs.h"
9538 /* pthread test headers */
9539 #include <pthread.h>
9541 #define NULL (void*)0
9544 static void *task(p)
9547 return (void *) (p == NULL);
9552 /* pthread test function */
9555 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9556 /* This system (e.g. AIX) defaults detached; must override */
9557 pthread_attr_t attr;
9559 status = pthread_attr_init(&attr);
9560 if( status ) exit( status );
9562 status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9563 if( status ) exit( status );
9567 #if HAVE_PTHREADS_D4
9568 #define ATTR pthread_attr_default
9573 /* make sure pthread_create() isn't just a stub */
9574 status = pthread_create(&t, ATTR, task, NULL);
9575 if( status ) exit( status );
9577 /* make sure pthread_detach() isn't just a stub */
9578 #if HAVE_PTHREADS_D4
9579 status = pthread_detach( &t );
9581 status = pthread_detach( t );
9584 #ifdef HAVE_LINUX_THREADS
9585 pthread_kill_other_threads_np();
9592 if { (eval echo configure:9593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9594 ol_cv_pthread_lib_lpthreads=yes
9596 echo "configure: failed program was:" >&5
9597 cat conftest.$ac_ext >&5
9599 ol_cv_pthread_lib_lpthreads=no
9603 cat > conftest.$ac_ext <<EOF
9604 #line 9605 "configure"
9605 #include "confdefs.h"
9606 /* pthread test headers */
9607 #include <pthread.h>
9609 #define NULL (void*)0
9612 static void *task(p)
9615 return (void *) (p == NULL);
9619 int main(argc, argv)
9624 /* pthread test function */
9627 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9628 /* This system (e.g. AIX) defaults detached; must override */
9629 pthread_attr_t attr;
9631 status = pthread_attr_init(&attr);
9632 if( status ) exit( status );
9634 status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9635 if( status ) exit( status );
9639 #if HAVE_PTHREADS_D4
9640 #define ATTR pthread_attr_default
9645 /* make sure pthread_create() isn't just a stub */
9646 status = pthread_create(&t, ATTR, task, NULL);
9647 if( status ) exit( status );
9649 /* make sure pthread_detach() isn't just a stub */
9650 #if HAVE_PTHREADS_D4
9651 status = pthread_detach( &t );
9653 status = pthread_detach( t );
9656 #ifdef HAVE_LINUX_THREADS
9657 pthread_kill_other_threads_np();
9665 if { (eval echo configure:9666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9667 ol_cv_pthread_lib_lpthreads=yes
9669 echo "configure: failed program was:" >&5
9670 cat conftest.$ac_ext >&5
9672 ol_cv_pthread_lib_lpthreads=no
9683 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
9685 if test $ol_cv_pthread_lib_lpthreads = yes ; then
9686 ol_link_pthreads="-lpthreads"
9687 ol_link_threads=posix
9692 if test $ol_link_threads != no ; then
9693 cat >> confdefs.h <<\EOF
9694 #define HAVE_PTHREADS 1
9698 LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
9700 save_CPPFLAGS="$CPPFLAGS"
9702 LIBS="$LTHREAD_LIBS $LIBS"
9704 for ac_func in sched_yield pthread_yield
9706 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9707 echo "configure:9708: checking for $ac_func" >&5
9708 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9709 echo $ac_n "(cached) $ac_c" 1>&6
9711 cat > conftest.$ac_ext <<EOF
9712 #line 9713 "configure"
9713 #include "confdefs.h"
9714 /* System header to define __stub macros and hopefully few prototypes,
9715 which can conflict with char $ac_func(); below. */
9717 /* Override any gcc2 internal prototype to avoid an error. */
9718 /* We use char because int might match the return type of a gcc2
9719 builtin and then its argument prototype would still apply. */
9725 /* The GNU C library defines this for functions which it implements
9726 to always fail with ENOSYS. Some functions are actually named
9727 something starting with __ and the normal name is an alias. */
9728 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9736 if { (eval echo configure:9737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9738 eval "ac_cv_func_$ac_func=yes"
9740 echo "configure: failed program was:" >&5
9741 cat conftest.$ac_ext >&5
9743 eval "ac_cv_func_$ac_func=no"
9748 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9749 echo "$ac_t""yes" 1>&6
9750 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9751 cat >> confdefs.h <<EOF
9752 #define $ac_tr_func 1
9756 echo "$ac_t""no" 1>&6
9761 if test $ac_cv_func_sched_yield = no -a \
9762 $ac_cv_func_pthread_yield = no ; then
9763 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
9764 echo "configure:9765: checking for sched_yield in -lrt" >&5
9765 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
9766 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9767 echo $ac_n "(cached) $ac_c" 1>&6
9769 ac_save_LIBS="$LIBS"
9771 cat > conftest.$ac_ext <<EOF
9772 #line 9773 "configure"
9773 #include "confdefs.h"
9774 /* Override any gcc2 internal prototype to avoid an error. */
9775 /* We use char because int might match the return type of a gcc2
9776 builtin and then its argument prototype would still apply. */
9783 if { (eval echo configure:9784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9785 eval "ac_cv_lib_$ac_lib_var=yes"
9787 echo "configure: failed program was:" >&5
9788 cat conftest.$ac_ext >&5
9790 eval "ac_cv_lib_$ac_lib_var=no"
9793 LIBS="$ac_save_LIBS"
9796 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9797 echo "$ac_t""yes" 1>&6
9798 LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
9799 cat >> confdefs.h <<\EOF
9800 #define HAVE_SCHED_YIELD 1
9803 ac_cv_func_sched_yield=yes
9805 echo "$ac_t""no" 1>&6
9806 ac_cv_func_sched_yield=no
9810 if test $ac_cv_func_sched_yield = no -a \
9811 $ac_cv_func_pthread_yield = no ; then
9812 for ac_func in thr_yield
9814 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9815 echo "configure:9816: checking for $ac_func" >&5
9816 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9817 echo $ac_n "(cached) $ac_c" 1>&6
9819 cat > conftest.$ac_ext <<EOF
9820 #line 9821 "configure"
9821 #include "confdefs.h"
9822 /* System header to define __stub macros and hopefully few prototypes,
9823 which can conflict with char $ac_func(); below. */
9825 /* Override any gcc2 internal prototype to avoid an error. */
9826 /* We use char because int might match the return type of a gcc2
9827 builtin and then its argument prototype would still apply. */
9833 /* The GNU C library defines this for functions which it implements
9834 to always fail with ENOSYS. Some functions are actually named
9835 something starting with __ and the normal name is an alias. */
9836 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9844 if { (eval echo configure:9845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9846 eval "ac_cv_func_$ac_func=yes"
9848 echo "configure: failed program was:" >&5
9849 cat conftest.$ac_ext >&5
9851 eval "ac_cv_func_$ac_func=no"
9856 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9857 echo "$ac_t""yes" 1>&6
9858 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9859 cat >> confdefs.h <<EOF
9860 #define $ac_tr_func 1
9864 echo "$ac_t""no" 1>&6
9869 if test $ac_cv_func_sched_yield = no -a \
9870 $ac_cv_func_pthread_yield = no -a \
9871 "$ac_cv_func_thr_yield" = no ; then
9872 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
9875 for ac_func in pthread_kill pthread_rwlock_destroy
9877 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9878 echo "configure:9879: checking for $ac_func" >&5
9879 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9880 echo $ac_n "(cached) $ac_c" 1>&6
9882 cat > conftest.$ac_ext <<EOF
9883 #line 9884 "configure"
9884 #include "confdefs.h"
9885 /* System header to define __stub macros and hopefully few prototypes,
9886 which can conflict with char $ac_func(); below. */
9888 /* Override any gcc2 internal prototype to avoid an error. */
9889 /* We use char because int might match the return type of a gcc2
9890 builtin and then its argument prototype would still apply. */
9896 /* The GNU C library defines this for functions which it implements
9897 to always fail with ENOSYS. Some functions are actually named
9898 something starting with __ and the normal name is an alias. */
9899 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9907 if { (eval echo configure:9908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9909 eval "ac_cv_func_$ac_func=yes"
9911 echo "configure: failed program was:" >&5
9912 cat conftest.$ac_ext >&5
9914 eval "ac_cv_func_$ac_func=no"
9919 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9920 echo "$ac_t""yes" 1>&6
9921 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9922 cat >> confdefs.h <<EOF
9923 #define $ac_tr_func 1
9927 echo "$ac_t""no" 1>&6
9932 echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
9933 echo "configure:9934: checking for pthread_detach with <pthread.h>" >&5
9934 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
9935 echo $ac_n "(cached) $ac_c" 1>&6
9938 cat > conftest.$ac_ext <<EOF
9939 #line 9940 "configure"
9940 #include "confdefs.h"
9942 #include <pthread.h>
9944 #define NULL (void*)0
9948 pthread_detach(NULL);
9951 if { (eval echo configure:9952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9953 ol_cv_func_pthread_detach=yes
9955 echo "configure: failed program was:" >&5
9956 cat conftest.$ac_ext >&5
9958 ol_cv_func_pthread_detach=no
9964 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
9966 if test $ol_cv_func_pthread_detach = no ; then
9967 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
9970 cat >> confdefs.h <<\EOF
9971 #define HAVE_PTHREAD_DETACH 1
9976 pthread_setconcurrency \
9977 pthread_getconcurrency \
9978 thr_setconcurrency \
9979 thr_getconcurrency \
9982 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9983 echo "configure:9984: checking for $ac_func" >&5
9984 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9985 echo $ac_n "(cached) $ac_c" 1>&6
9987 cat > conftest.$ac_ext <<EOF
9988 #line 9989 "configure"
9989 #include "confdefs.h"
9990 /* System header to define __stub macros and hopefully few prototypes,
9991 which can conflict with char $ac_func(); below. */
9993 /* Override any gcc2 internal prototype to avoid an error. */
9994 /* We use char because int might match the return type of a gcc2
9995 builtin and then its argument prototype would still apply. */
10001 /* The GNU C library defines this for functions which it implements
10002 to always fail with ENOSYS. Some functions are actually named
10003 something starting with __ and the normal name is an alias. */
10004 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10012 if { (eval echo configure:10013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10014 eval "ac_cv_func_$ac_func=yes"
10016 echo "configure: failed program was:" >&5
10017 cat conftest.$ac_ext >&5
10019 eval "ac_cv_func_$ac_func=no"
10024 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10025 echo "$ac_t""yes" 1>&6
10026 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10027 cat >> confdefs.h <<EOF
10028 #define $ac_tr_func 1
10032 echo "$ac_t""no" 1>&6
10038 for ac_func in pthread_kill_other_threads_np
10040 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10041 echo "configure:10042: checking for $ac_func" >&5
10042 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10043 echo $ac_n "(cached) $ac_c" 1>&6
10045 cat > conftest.$ac_ext <<EOF
10046 #line 10047 "configure"
10047 #include "confdefs.h"
10048 /* System header to define __stub macros and hopefully few prototypes,
10049 which can conflict with char $ac_func(); below. */
10050 #include <assert.h>
10051 /* Override any gcc2 internal prototype to avoid an error. */
10052 /* We use char because int might match the return type of a gcc2
10053 builtin and then its argument prototype would still apply. */
10059 /* The GNU C library defines this for functions which it implements
10060 to always fail with ENOSYS. Some functions are actually named
10061 something starting with __ and the normal name is an alias. */
10062 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10070 if { (eval echo configure:10071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10072 eval "ac_cv_func_$ac_func=yes"
10074 echo "configure: failed program was:" >&5
10075 cat conftest.$ac_ext >&5
10077 eval "ac_cv_func_$ac_func=no"
10082 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10083 echo "$ac_t""yes" 1>&6
10084 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10085 cat >> confdefs.h <<EOF
10086 #define $ac_tr_func 1
10090 echo "$ac_t""no" 1>&6
10094 echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
10095 echo "configure:10096: checking for LinuxThreads implementation" >&5
10096 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
10097 echo $ac_n "(cached) $ac_c" 1>&6
10099 ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
10102 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
10107 echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
10108 echo "configure:10109: checking for LinuxThreads consistency" >&5
10109 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
10110 echo $ac_n "(cached) $ac_c" 1>&6
10113 if test $ol_cv_header_linux_threads = yes -a \
10114 $ol_cv_sys_linux_threads = yes; then
10115 ol_cv_linux_threads=yes
10116 elif test $ol_cv_header_linux_threads = no -a \
10117 $ol_cv_sys_linux_threads = no; then
10118 ol_cv_linux_threads=no
10120 ol_cv_linux_threads=error
10125 echo "$ac_t""$ol_cv_linux_threads" 1>&6
10128 if test $ol_cv_linux_threads = error; then
10129 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
10132 echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
10133 echo "configure:10134: checking if pthread_create() works" >&5
10134 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
10135 echo $ac_n "(cached) $ac_c" 1>&6
10138 if test "$cross_compiling" = yes; then
10139 ol_cv_pthread_create_works=yes
10141 cat > conftest.$ac_ext <<EOF
10142 #line 10143 "configure"
10143 #include "confdefs.h"
10144 /* pthread test headers */
10145 #include <pthread.h>
10147 #define NULL (void*)0
10150 static void *task(p)
10153 return (void *) (p == NULL);
10157 int main(argc, argv)
10162 /* pthread test function */
10165 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10166 /* This system (e.g. AIX) defaults detached; must override */
10167 pthread_attr_t attr;
10169 status = pthread_attr_init(&attr);
10170 if( status ) exit( status );
10172 status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10173 if( status ) exit( status );
10177 #if HAVE_PTHREADS_D4
10178 #define ATTR pthread_attr_default
10183 /* make sure pthread_create() isn't just a stub */
10184 status = pthread_create(&t, ATTR, task, NULL);
10185 if( status ) exit( status );
10187 /* make sure pthread_detach() isn't just a stub */
10188 #if HAVE_PTHREADS_D4
10189 status = pthread_detach( &t );
10191 status = pthread_detach( t );
10194 #ifdef HAVE_LINUX_THREADS
10195 pthread_kill_other_threads_np();
10203 if { (eval echo configure:10204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10205 ol_cv_pthread_create_works=yes
10207 echo "configure: failed program was:" >&5
10208 cat conftest.$ac_ext >&5
10210 ol_cv_pthread_create_works=no
10217 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
10219 if test $ol_cv_pthread_create_works = no ; then
10220 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
10223 if test $ol_with_yielding_select = auto ; then
10224 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
10225 echo "configure:10226: checking if select yields when using pthreads" >&5
10226 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
10227 echo $ac_n "(cached) $ac_c" 1>&6
10230 if test "$cross_compiling" = yes; then
10231 ol_cv_pthread_select_yields=cross
10233 cat > conftest.$ac_ext <<EOF
10234 #line 10235 "configure"
10235 #include "confdefs.h"
10237 #include <sys/types.h>
10238 #include <sys/time.h>
10239 #include <unistd.h>
10240 #include <pthread.h>
10242 #define NULL (void*) 0
10245 static int fildes[2];
10247 static void *task(p)
10259 FD_SET(fildes[0], &rfds);
10261 /* we're not interested in any fds */
10262 i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
10269 exit(0); /* if we exit here, the select blocked the whole process */
10272 int main(argc, argv)
10278 /* create a pipe to select */
10279 if(pipe(&fildes[0])) {
10284 #ifdef HAVE_PTHREAD_SETCONCURRENCY
10285 (void) pthread_setconcurrency(2);
10287 #ifdef HAVE_THR_SETCONCURRENCY
10288 /* Set Solaris LWP concurrency to 2 */
10289 thr_setconcurrency(2);
10293 #if HAVE_PTHREADS_D4
10294 pthread_create(&t, pthread_attr_default, task, NULL);
10296 pthread_create(&t, NULL, task, NULL);
10299 #if HAVE_SCHED_YIELD
10300 sched_yield(); /* make sure task runs first */
10302 #ifdef HAVE_PTHREAD_YIELD
10303 pthread_yield(); /* make sure task runs first */
10310 if { (eval echo configure:10311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10312 ol_cv_pthread_select_yields=no
10314 echo "configure: failed program was:" >&5
10315 cat conftest.$ac_ext >&5
10317 ol_cv_pthread_select_yields=yes
10324 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
10326 if test $ol_cv_pthread_select_yields = cross ; then
10327 { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
10330 if test $ol_cv_pthread_select_yields = yes ; then
10331 ol_with_yielding_select=yes
10335 CPPFLAGS="$save_CPPFLAGS"
10338 { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
10342 if test $ol_with_threads = posix ; then
10343 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
10347 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10348 -o $ol_with_threads = mach ; then
10350 for ac_hdr in mach/cthreads.h
10352 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10353 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10354 echo "configure:10355: checking for $ac_hdr" >&5
10355 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10356 echo $ac_n "(cached) $ac_c" 1>&6
10358 cat > conftest.$ac_ext <<EOF
10359 #line 10360 "configure"
10360 #include "confdefs.h"
10363 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10364 { (eval echo configure:10365: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10365 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10366 if test -z "$ac_err"; then
10368 eval "ac_cv_header_$ac_safe=yes"
10371 echo "configure: failed program was:" >&5
10372 cat conftest.$ac_ext >&5
10374 eval "ac_cv_header_$ac_safe=no"
10378 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10379 echo "$ac_t""yes" 1>&6
10380 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10381 cat >> confdefs.h <<EOF
10382 #define $ac_tr_hdr 1
10386 echo "$ac_t""no" 1>&6
10390 if test $ac_cv_header_mach_cthreads_h = yes ; then
10391 ol_with_threads=found
10393 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
10394 echo "configure:10395: checking for cthread_fork" >&5
10395 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
10396 echo $ac_n "(cached) $ac_c" 1>&6
10398 cat > conftest.$ac_ext <<EOF
10399 #line 10400 "configure"
10400 #include "confdefs.h"
10401 /* System header to define __stub macros and hopefully few prototypes,
10402 which can conflict with char cthread_fork(); below. */
10403 #include <assert.h>
10404 /* Override any gcc2 internal prototype to avoid an error. */
10405 /* We use char because int might match the return type of a gcc2
10406 builtin and then its argument prototype would still apply. */
10407 char cthread_fork();
10412 /* The GNU C library defines this for functions which it implements
10413 to always fail with ENOSYS. Some functions are actually named
10414 something starting with __ and the normal name is an alias. */
10415 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
10423 if { (eval echo configure:10424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10425 eval "ac_cv_func_cthread_fork=yes"
10427 echo "configure: failed program was:" >&5
10428 cat conftest.$ac_ext >&5
10430 eval "ac_cv_func_cthread_fork=no"
10435 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
10436 echo "$ac_t""yes" 1>&6
10437 ol_link_threads=yes
10439 echo "$ac_t""no" 1>&6
10443 if test $ol_link_threads = no ; then
10444 echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10445 echo "configure:10446: checking for cthread_fork with -all_load" >&5
10446 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
10447 echo $ac_n "(cached) $ac_c" 1>&6
10451 LIBS="-all_load $LIBS"
10452 cat > conftest.$ac_ext <<EOF
10453 #line 10454 "configure"
10454 #include "confdefs.h"
10455 #include <mach/cthreads.h>
10458 cthread_fork((void *)0, (void *)0);
10462 if { (eval echo configure:10463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10464 ol_cv_cthread_all_load=yes
10466 echo "configure: failed program was:" >&5
10467 cat conftest.$ac_ext >&5
10469 ol_cv_cthread_all_load=no
10476 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10478 if test $ol_cv_cthread_all_load = yes ; then
10479 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10480 ol_link_threads=mach
10484 if test $ol_link_threads != no ; then
10485 : check for cthread specific functionality here
10486 cat >> confdefs.h <<\EOF
10487 #define HAVE_MACH_CTHREADS 1
10491 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10495 if test $ol_with_threads = mach ; then
10496 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10500 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10501 -o $ol_with_threads = pth ; then
10503 for ac_hdr in pth.h
10505 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10506 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10507 echo "configure:10508: checking for $ac_hdr" >&5
10508 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10509 echo $ac_n "(cached) $ac_c" 1>&6
10511 cat > conftest.$ac_ext <<EOF
10512 #line 10513 "configure"
10513 #include "confdefs.h"
10516 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10517 { (eval echo configure:10518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10518 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10519 if test -z "$ac_err"; then
10521 eval "ac_cv_header_$ac_safe=yes"
10524 echo "configure: failed program was:" >&5
10525 cat conftest.$ac_ext >&5
10527 eval "ac_cv_header_$ac_safe=no"
10531 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10532 echo "$ac_t""yes" 1>&6
10533 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10534 cat >> confdefs.h <<EOF
10535 #define $ac_tr_hdr 1
10539 echo "$ac_t""no" 1>&6
10544 if test $ac_cv_header_pth_h = yes ; then
10545 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
10546 echo "configure:10547: checking for pth_version in -lpth" >&5
10547 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
10548 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10549 echo $ac_n "(cached) $ac_c" 1>&6
10551 ac_save_LIBS="$LIBS"
10553 cat > conftest.$ac_ext <<EOF
10554 #line 10555 "configure"
10555 #include "confdefs.h"
10556 /* Override any gcc2 internal prototype to avoid an error. */
10557 /* We use char because int might match the return type of a gcc2
10558 builtin and then its argument prototype would still apply. */
10559 char pth_version();
10565 if { (eval echo configure:10566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10567 eval "ac_cv_lib_$ac_lib_var=yes"
10569 echo "configure: failed program was:" >&5
10570 cat conftest.$ac_ext >&5
10572 eval "ac_cv_lib_$ac_lib_var=no"
10575 LIBS="$ac_save_LIBS"
10578 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10579 echo "$ac_t""yes" 1>&6
10582 echo "$ac_t""no" 1>&6
10587 if test $have_pth = yes ; then
10588 cat >> confdefs.h <<\EOF
10589 #define HAVE_GNU_PTH 1
10592 LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
10593 ol_link_threads=pth
10595 if test $ol_with_yielding_select = auto ; then
10596 ol_with_yielding_select=yes
10602 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10603 -o $ol_with_threads = lwp ; then
10605 for ac_hdr in thread.h synch.h
10607 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10608 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10609 echo "configure:10610: checking for $ac_hdr" >&5
10610 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10611 echo $ac_n "(cached) $ac_c" 1>&6
10613 cat > conftest.$ac_ext <<EOF
10614 #line 10615 "configure"
10615 #include "confdefs.h"
10618 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10619 { (eval echo configure:10620: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10620 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10621 if test -z "$ac_err"; then
10623 eval "ac_cv_header_$ac_safe=yes"
10626 echo "configure: failed program was:" >&5
10627 cat conftest.$ac_ext >&5
10629 eval "ac_cv_header_$ac_safe=no"
10633 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10634 echo "$ac_t""yes" 1>&6
10635 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10636 cat >> confdefs.h <<EOF
10637 #define $ac_tr_hdr 1
10641 echo "$ac_t""no" 1>&6
10645 if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
10646 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
10647 echo "configure:10648: checking for thr_create in -lthread" >&5
10648 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
10649 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10650 echo $ac_n "(cached) $ac_c" 1>&6
10652 ac_save_LIBS="$LIBS"
10653 LIBS="-lthread $LIBS"
10654 cat > conftest.$ac_ext <<EOF
10655 #line 10656 "configure"
10656 #include "confdefs.h"
10657 /* Override any gcc2 internal prototype to avoid an error. */
10658 /* We use char because int might match the return type of a gcc2
10659 builtin and then its argument prototype would still apply. */
10666 if { (eval echo configure:10667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10668 eval "ac_cv_lib_$ac_lib_var=yes"
10670 echo "configure: failed program was:" >&5
10671 cat conftest.$ac_ext >&5
10673 eval "ac_cv_lib_$ac_lib_var=no"
10676 LIBS="$ac_save_LIBS"
10679 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10680 echo "$ac_t""yes" 1>&6
10683 echo "$ac_t""no" 1>&6
10688 if test $have_thr = yes ; then
10689 cat >> confdefs.h <<\EOF
10693 LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
10694 ol_link_threads=thr
10696 if test $ol_with_yielding_select = auto ; then
10697 ol_with_yielding_select=yes
10701 thr_setconcurrency \
10702 thr_getconcurrency \
10705 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10706 echo "configure:10707: checking for $ac_func" >&5
10707 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10708 echo $ac_n "(cached) $ac_c" 1>&6
10710 cat > conftest.$ac_ext <<EOF
10711 #line 10712 "configure"
10712 #include "confdefs.h"
10713 /* System header to define __stub macros and hopefully few prototypes,
10714 which can conflict with char $ac_func(); below. */
10715 #include <assert.h>
10716 /* Override any gcc2 internal prototype to avoid an error. */
10717 /* We use char because int might match the return type of a gcc2
10718 builtin and then its argument prototype would still apply. */
10724 /* The GNU C library defines this for functions which it implements
10725 to always fail with ENOSYS. Some functions are actually named
10726 something starting with __ and the normal name is an alias. */
10727 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10735 if { (eval echo configure:10736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10737 eval "ac_cv_func_$ac_func=yes"
10739 echo "configure: failed program was:" >&5
10740 cat conftest.$ac_ext >&5
10742 eval "ac_cv_func_$ac_func=no"
10747 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10748 echo "$ac_t""yes" 1>&6
10749 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10750 cat >> confdefs.h <<EOF
10751 #define $ac_tr_func 1
10755 echo "$ac_t""no" 1>&6
10762 for ac_hdr in lwp/lwp.h
10764 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10765 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10766 echo "configure:10767: checking for $ac_hdr" >&5
10767 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10768 echo $ac_n "(cached) $ac_c" 1>&6
10770 cat > conftest.$ac_ext <<EOF
10771 #line 10772 "configure"
10772 #include "confdefs.h"
10775 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10776 { (eval echo configure:10777: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10777 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10778 if test -z "$ac_err"; then
10780 eval "ac_cv_header_$ac_safe=yes"
10783 echo "configure: failed program was:" >&5
10784 cat conftest.$ac_ext >&5
10786 eval "ac_cv_header_$ac_safe=no"
10790 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10791 echo "$ac_t""yes" 1>&6
10792 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10793 cat >> confdefs.h <<EOF
10794 #define $ac_tr_hdr 1
10798 echo "$ac_t""no" 1>&6
10802 if test $ac_cv_header_lwp_lwp_h = yes ; then
10803 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
10804 echo "configure:10805: checking for lwp_create in -llwp" >&5
10805 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
10806 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10807 echo $ac_n "(cached) $ac_c" 1>&6
10809 ac_save_LIBS="$LIBS"
10811 cat > conftest.$ac_ext <<EOF
10812 #line 10813 "configure"
10813 #include "confdefs.h"
10814 /* Override any gcc2 internal prototype to avoid an error. */
10815 /* We use char because int might match the return type of a gcc2
10816 builtin and then its argument prototype would still apply. */
10823 if { (eval echo configure:10824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10825 eval "ac_cv_lib_$ac_lib_var=yes"
10827 echo "configure: failed program was:" >&5
10828 cat conftest.$ac_ext >&5
10830 eval "ac_cv_lib_$ac_lib_var=no"
10833 LIBS="$ac_save_LIBS"
10836 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10837 echo "$ac_t""yes" 1>&6
10840 echo "$ac_t""no" 1>&6
10845 if test $have_lwp = yes ; then
10846 cat >> confdefs.h <<\EOF
10850 LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
10851 ol_link_threads=lwp
10853 if test $ol_with_yielding_select = auto ; then
10854 ol_with_yielding_select=no
10860 if test $ol_with_yielding_select = yes ; then
10861 cat >> confdefs.h <<\EOF
10862 #define HAVE_YIELDING_SELECT 1
10867 if test $ol_with_threads = manual ; then
10868 ol_link_threads=yes
10870 echo "configure: warning: thread defines and link options must be set manually" 1>&2
10872 for ac_hdr in pthread.h sched.h
10874 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10875 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10876 echo "configure:10877: checking for $ac_hdr" >&5
10877 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10878 echo $ac_n "(cached) $ac_c" 1>&6
10880 cat > conftest.$ac_ext <<EOF
10881 #line 10882 "configure"
10882 #include "confdefs.h"
10885 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10886 { (eval echo configure:10887: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10887 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10888 if test -z "$ac_err"; then
10890 eval "ac_cv_header_$ac_safe=yes"
10893 echo "configure: failed program was:" >&5
10894 cat conftest.$ac_ext >&5
10896 eval "ac_cv_header_$ac_safe=no"
10900 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10901 echo "$ac_t""yes" 1>&6
10902 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10903 cat >> confdefs.h <<EOF
10904 #define $ac_tr_hdr 1
10908 echo "$ac_t""no" 1>&6
10912 for ac_func in sched_yield pthread_yield
10914 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10915 echo "configure:10916: checking for $ac_func" >&5
10916 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10917 echo $ac_n "(cached) $ac_c" 1>&6
10919 cat > conftest.$ac_ext <<EOF
10920 #line 10921 "configure"
10921 #include "confdefs.h"
10922 /* System header to define __stub macros and hopefully few prototypes,
10923 which can conflict with char $ac_func(); below. */
10924 #include <assert.h>
10925 /* Override any gcc2 internal prototype to avoid an error. */
10926 /* We use char because int might match the return type of a gcc2
10927 builtin and then its argument prototype would still apply. */
10933 /* The GNU C library defines this for functions which it implements
10934 to always fail with ENOSYS. Some functions are actually named
10935 something starting with __ and the normal name is an alias. */
10936 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10944 if { (eval echo configure:10945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10946 eval "ac_cv_func_$ac_func=yes"
10948 echo "configure: failed program was:" >&5
10949 cat conftest.$ac_ext >&5
10951 eval "ac_cv_func_$ac_func=no"
10956 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10957 echo "$ac_t""yes" 1>&6
10958 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10959 cat >> confdefs.h <<EOF
10960 #define $ac_tr_func 1
10964 echo "$ac_t""no" 1>&6
10969 echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
10970 echo "configure:10971: checking for LinuxThreads pthread.h" >&5
10971 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
10972 echo $ac_n "(cached) $ac_c" 1>&6
10974 cat > conftest.$ac_ext <<EOF
10975 #line 10976 "configure"
10976 #include "confdefs.h"
10977 #include <pthread.h>
10979 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10980 egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
10982 ol_cv_header_linux_threads=yes
10985 ol_cv_header_linux_threads=no
10992 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
10993 if test $ol_cv_header_linux_threads = yes; then
10994 cat >> confdefs.h <<\EOF
10995 #define HAVE_LINUX_THREADS 1
11001 for ac_hdr in mach/cthreads.h
11003 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11004 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11005 echo "configure:11006: checking for $ac_hdr" >&5
11006 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11007 echo $ac_n "(cached) $ac_c" 1>&6
11009 cat > conftest.$ac_ext <<EOF
11010 #line 11011 "configure"
11011 #include "confdefs.h"
11014 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11015 { (eval echo configure:11016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11016 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11017 if test -z "$ac_err"; then
11019 eval "ac_cv_header_$ac_safe=yes"
11022 echo "configure: failed program was:" >&5
11023 cat conftest.$ac_ext >&5
11025 eval "ac_cv_header_$ac_safe=no"
11029 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11030 echo "$ac_t""yes" 1>&6
11031 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11032 cat >> confdefs.h <<EOF
11033 #define $ac_tr_hdr 1
11037 echo "$ac_t""no" 1>&6
11041 for ac_hdr in lwp/lwp.h
11043 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11044 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11045 echo "configure:11046: checking for $ac_hdr" >&5
11046 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11047 echo $ac_n "(cached) $ac_c" 1>&6
11049 cat > conftest.$ac_ext <<EOF
11050 #line 11051 "configure"
11051 #include "confdefs.h"
11054 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11055 { (eval echo configure:11056: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11056 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11057 if test -z "$ac_err"; then
11059 eval "ac_cv_header_$ac_safe=yes"
11062 echo "configure: failed program was:" >&5
11063 cat conftest.$ac_ext >&5
11065 eval "ac_cv_header_$ac_safe=no"
11069 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11070 echo "$ac_t""yes" 1>&6
11071 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11072 cat >> confdefs.h <<EOF
11073 #define $ac_tr_hdr 1
11077 echo "$ac_t""no" 1>&6
11081 for ac_hdr in thread.h synch.h
11083 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11084 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11085 echo "configure:11086: checking for $ac_hdr" >&5
11086 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11087 echo $ac_n "(cached) $ac_c" 1>&6
11089 cat > conftest.$ac_ext <<EOF
11090 #line 11091 "configure"
11091 #include "confdefs.h"
11094 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11095 { (eval echo configure:11096: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11096 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11097 if test -z "$ac_err"; then
11099 eval "ac_cv_header_$ac_safe=yes"
11102 echo "configure: failed program was:" >&5
11103 cat conftest.$ac_ext >&5
11105 eval "ac_cv_header_$ac_safe=no"
11109 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11110 echo "$ac_t""yes" 1>&6
11111 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11112 cat >> confdefs.h <<EOF
11113 #define $ac_tr_hdr 1
11117 echo "$ac_t""no" 1>&6
11123 if test $ol_link_threads != no -a $ol_link_threads != nt ; then
11124 cat >> confdefs.h <<\EOF
11125 #define REENTRANT 1
11128 cat >> confdefs.h <<\EOF
11129 #define _REENTRANT 1
11132 cat >> confdefs.h <<\EOF
11133 #define THREAD_SAFE 1
11136 cat >> confdefs.h <<\EOF
11137 #define _THREAD_SAFE 1
11140 cat >> confdefs.h <<\EOF
11141 #define THREADSAFE 1
11144 cat >> confdefs.h <<\EOF
11145 #define _THREADSAFE 1
11148 cat >> confdefs.h <<\EOF
11149 #define _SGI_MP_SOURCE 1
11153 echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
11154 echo "configure:11155: checking for thread specific errno" >&5
11155 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
11156 echo $ac_n "(cached) $ac_c" 1>&6
11159 cat > conftest.$ac_ext <<EOF
11160 #line 11161 "configure"
11161 #include "confdefs.h"
11167 if { (eval echo configure:11168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11169 ol_cv_errno_thread_specific=yes
11171 echo "configure: failed program was:" >&5
11172 cat conftest.$ac_ext >&5
11174 ol_cv_errno_thread_specific=no
11180 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
11182 echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
11183 echo "configure:11184: checking for thread specific h_errno" >&5
11184 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
11185 echo $ac_n "(cached) $ac_c" 1>&6
11188 cat > conftest.$ac_ext <<EOF
11189 #line 11190 "configure"
11190 #include "confdefs.h"
11196 if { (eval echo configure:11197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11198 ol_cv_h_errno_thread_specific=yes
11200 echo "configure: failed program was:" >&5
11201 cat conftest.$ac_ext >&5
11203 ol_cv_h_errno_thread_specific=no
11209 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
11211 if test $ol_cv_errno_thread_specific != yes \
11212 -o $ol_cv_h_errno_thread_specific != yes ; then
11213 LIBS="$LTHREAD_LIBS $LIBS"
11219 if test $ol_link_threads = no ; then
11220 if test $ol_with_threads = yes ; then
11221 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
11224 if test $ol_with_threads = auto ; then
11225 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
11229 cat >> confdefs.h <<\EOF
11230 #define NO_THREADS 1
11236 if test $ol_link_threads != no ; then
11237 cat >> confdefs.h <<\EOF
11238 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
11245 if test $ol_with_ldbm_api = auto \
11246 -o $ol_with_ldbm_api = berkeley \
11247 -o $ol_with_ldbm_api = bcompat ; then
11249 if test $ol_with_ldbm_api = bcompat; then \
11250 ol_cv_berkeley_db=no
11251 for ac_hdr in db_185.h db.h
11253 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11254 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11255 echo "configure:11256: checking for $ac_hdr" >&5
11256 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11257 echo $ac_n "(cached) $ac_c" 1>&6
11259 cat > conftest.$ac_ext <<EOF
11260 #line 11261 "configure"
11261 #include "confdefs.h"
11264 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11265 { (eval echo configure:11266: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11266 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11267 if test -z "$ac_err"; then
11269 eval "ac_cv_header_$ac_safe=yes"
11272 echo "configure: failed program was:" >&5
11273 cat conftest.$ac_ext >&5
11275 eval "ac_cv_header_$ac_safe=no"
11279 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11280 echo "$ac_t""yes" 1>&6
11281 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11282 cat >> confdefs.h <<EOF
11283 #define $ac_tr_hdr 1
11287 echo "$ac_t""no" 1>&6
11291 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
11292 echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
11293 echo "configure:11294: checking if Berkeley DB header compatibility" >&5
11294 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
11295 echo $ac_n "(cached) $ac_c" 1>&6
11298 cat > conftest.$ac_ext <<EOF
11299 #line 11300 "configure"
11300 #include "confdefs.h"
11303 # include <db_185.h>
11308 /* this check could be improved */
11309 #ifndef DB_VERSION_MAJOR
11310 # define DB_VERSION_MAJOR 1
11313 #if DB_VERSION_MAJOR == 1
11318 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11319 egrep "__db_version_1" >/dev/null 2>&1; then
11321 ol_cv_header_db1=yes
11324 ol_cv_header_db1=no
11330 echo "$ac_t""$ol_cv_header_db1" 1>&6
11332 if test ol_cv_header_db1=yes ; then
11334 if test $ol_cv_lib_db = no ; then
11335 echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11336 echo "configure:11337: checking for Berkeley DB link (default)" >&5
11337 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11338 echo $ac_n "(cached) $ac_c" 1>&6
11343 LIBS="$ol_DB_LIB $LIBS"
11345 cat > conftest.$ac_ext <<EOF
11346 #line 11347 "configure"
11347 #include "confdefs.h"
11349 #ifdef HAVE_DB_185_H
11350 # include <db_185.h>
11355 #ifndef DB_VERSION_MAJOR
11356 # define DB_VERSION_MAJOR 1
11360 #define NULL ((void*)0)
11365 #if DB_VERSION_MAJOR > 2
11366 db_env_create( NULL, 0 );
11367 #elif DB_VERSION_MAJOR > 1
11368 db_appexit( NULL );
11370 (void) dbopen( NULL, 0, 0, 0, NULL);
11375 if { (eval echo configure:11376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11379 echo "configure: failed program was:" >&5
11380 cat conftest.$ac_ext >&5
11390 echo "$ac_t""$ol_cv_db_none" 1>&6
11392 if test $ol_cv_db_none = yes ; then
11397 if test $ol_cv_lib_db = no ; then
11398 echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11399 echo "configure:11400: checking for Berkeley DB link (-ldb)" >&5
11400 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11401 echo $ac_n "(cached) $ac_c" 1>&6
11406 LIBS="$ol_DB_LIB $LIBS"
11408 cat > conftest.$ac_ext <<EOF
11409 #line 11410 "configure"
11410 #include "confdefs.h"
11412 #ifdef HAVE_DB_185_H
11413 # include <db_185.h>
11418 #ifndef DB_VERSION_MAJOR
11419 # define DB_VERSION_MAJOR 1
11423 #define NULL ((void*)0)
11428 #if DB_VERSION_MAJOR > 2
11429 db_env_create( NULL, 0 );
11430 #elif DB_VERSION_MAJOR > 1
11431 db_appexit( NULL );
11433 (void) dbopen( NULL, 0, 0, 0, NULL);
11438 if { (eval echo configure:11439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11442 echo "configure: failed program was:" >&5
11443 cat conftest.$ac_ext >&5
11453 echo "$ac_t""$ol_cv_db_db" 1>&6
11455 if test $ol_cv_db_db = yes ; then
11460 if test $ol_cv_lib_db = no ; then
11461 echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11462 echo "configure:11463: checking for Berkeley DB link (-ldb3)" >&5
11463 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
11464 echo $ac_n "(cached) $ac_c" 1>&6
11469 LIBS="$ol_DB_LIB $LIBS"
11471 cat > conftest.$ac_ext <<EOF
11472 #line 11473 "configure"
11473 #include "confdefs.h"
11475 #ifdef HAVE_DB_185_H
11476 # include <db_185.h>
11481 #ifndef DB_VERSION_MAJOR
11482 # define DB_VERSION_MAJOR 1
11486 #define NULL ((void*)0)
11491 #if DB_VERSION_MAJOR > 2
11492 db_env_create( NULL, 0 );
11493 #elif DB_VERSION_MAJOR > 1
11494 db_appexit( NULL );
11496 (void) dbopen( NULL, 0, 0, 0, NULL);
11501 if { (eval echo configure:11502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11505 echo "configure: failed program was:" >&5
11506 cat conftest.$ac_ext >&5
11516 echo "$ac_t""$ol_cv_db_db3" 1>&6
11518 if test $ol_cv_db_db3 = yes ; then
11523 if test $ol_cv_lib_db = no ; then
11524 echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
11525 echo "configure:11526: checking for Berkeley DB link (-ldb2)" >&5
11526 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
11527 echo $ac_n "(cached) $ac_c" 1>&6
11532 LIBS="$ol_DB_LIB $LIBS"
11534 cat > conftest.$ac_ext <<EOF
11535 #line 11536 "configure"
11536 #include "confdefs.h"
11538 #ifdef HAVE_DB_185_H
11539 # include <db_185.h>
11544 #ifndef DB_VERSION_MAJOR
11545 # define DB_VERSION_MAJOR 1
11549 #define NULL ((void*)0)
11554 #if DB_VERSION_MAJOR > 2
11555 db_env_create( NULL, 0 );
11556 #elif DB_VERSION_MAJOR > 1
11557 db_appexit( NULL );
11559 (void) dbopen( NULL, 0, 0, 0, NULL);
11564 if { (eval echo configure:11565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11568 echo "configure: failed program was:" >&5
11569 cat conftest.$ac_ext >&5
11579 echo "$ac_t""$ol_cv_db_db2" 1>&6
11581 if test $ol_cv_db_db2 = yes ; then
11586 if test $ol_cv_lib_db = no ; then
11587 echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
11588 echo "configure:11589: checking for Berkeley DB link (-ldb1)" >&5
11589 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
11590 echo $ac_n "(cached) $ac_c" 1>&6
11595 LIBS="$ol_DB_LIB $LIBS"
11597 cat > conftest.$ac_ext <<EOF
11598 #line 11599 "configure"
11599 #include "confdefs.h"
11601 #ifdef HAVE_DB_185_H
11602 # include <db_185.h>
11607 #ifndef DB_VERSION_MAJOR
11608 # define DB_VERSION_MAJOR 1
11612 #define NULL ((void*)0)
11617 #if DB_VERSION_MAJOR > 2
11618 db_env_create( NULL, 0 );
11619 #elif DB_VERSION_MAJOR > 1
11620 db_appexit( NULL );
11622 (void) dbopen( NULL, 0, 0, 0, NULL);
11627 if { (eval echo configure:11628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11631 echo "configure: failed program was:" >&5
11632 cat conftest.$ac_ext >&5
11642 echo "$ac_t""$ol_cv_db_db1" 1>&6
11644 if test $ol_cv_db_db1 = yes ; then
11650 if test "$ol_cv_lib_db" != no ; then
11651 ol_cv_berkeley_db=yes
11657 ol_cv_berkeley_db=no
11660 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11661 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11662 echo "configure:11663: checking for $ac_hdr" >&5
11663 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11664 echo $ac_n "(cached) $ac_c" 1>&6
11666 cat > conftest.$ac_ext <<EOF
11667 #line 11668 "configure"
11668 #include "confdefs.h"
11671 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11672 { (eval echo configure:11673: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11673 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11674 if test -z "$ac_err"; then
11676 eval "ac_cv_header_$ac_safe=yes"
11679 echo "configure: failed program was:" >&5
11680 cat conftest.$ac_ext >&5
11682 eval "ac_cv_header_$ac_safe=no"
11686 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11687 echo "$ac_t""yes" 1>&6
11688 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11689 cat >> confdefs.h <<EOF
11690 #define $ac_tr_hdr 1
11694 echo "$ac_t""no" 1>&6
11698 if test $ac_cv_header_db_h = yes; then
11700 if test $ol_cv_lib_db = no ; then
11701 echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11702 echo "configure:11703: checking for Berkeley DB link (default)" >&5
11703 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11704 echo $ac_n "(cached) $ac_c" 1>&6
11709 LIBS="$ol_DB_LIB $LIBS"
11711 cat > conftest.$ac_ext <<EOF
11712 #line 11713 "configure"
11713 #include "confdefs.h"
11715 #ifdef HAVE_DB_185_H
11716 # include <db_185.h>
11721 #ifndef DB_VERSION_MAJOR
11722 # define DB_VERSION_MAJOR 1
11726 #define NULL ((void*)0)
11731 #if DB_VERSION_MAJOR > 2
11732 db_env_create( NULL, 0 );
11733 #elif DB_VERSION_MAJOR > 1
11734 db_appexit( NULL );
11736 (void) dbopen( NULL, 0, 0, 0, NULL);
11741 if { (eval echo configure:11742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11745 echo "configure: failed program was:" >&5
11746 cat conftest.$ac_ext >&5
11756 echo "$ac_t""$ol_cv_db_none" 1>&6
11758 if test $ol_cv_db_none = yes ; then
11763 if test $ol_cv_lib_db = no ; then
11764 echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11765 echo "configure:11766: checking for Berkeley DB link (-ldb)" >&5
11766 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11767 echo $ac_n "(cached) $ac_c" 1>&6
11772 LIBS="$ol_DB_LIB $LIBS"
11774 cat > conftest.$ac_ext <<EOF
11775 #line 11776 "configure"
11776 #include "confdefs.h"
11778 #ifdef HAVE_DB_185_H
11779 # include <db_185.h>
11784 #ifndef DB_VERSION_MAJOR
11785 # define DB_VERSION_MAJOR 1
11789 #define NULL ((void*)0)
11794 #if DB_VERSION_MAJOR > 2
11795 db_env_create( NULL, 0 );
11796 #elif DB_VERSION_MAJOR > 1
11797 db_appexit( NULL );
11799 (void) dbopen( NULL, 0, 0, 0, NULL);
11804 if { (eval echo configure:11805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11808 echo "configure: failed program was:" >&5
11809 cat conftest.$ac_ext >&5
11819 echo "$ac_t""$ol_cv_db_db" 1>&6
11821 if test $ol_cv_db_db = yes ; then
11826 if test $ol_cv_lib_db = no ; then
11827 echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11828 echo "configure:11829: checking for Berkeley DB link (-ldb3)" >&5
11829 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
11830 echo $ac_n "(cached) $ac_c" 1>&6
11835 LIBS="$ol_DB_LIB $LIBS"
11837 cat > conftest.$ac_ext <<EOF
11838 #line 11839 "configure"
11839 #include "confdefs.h"
11841 #ifdef HAVE_DB_185_H
11842 # include <db_185.h>
11847 #ifndef DB_VERSION_MAJOR
11848 # define DB_VERSION_MAJOR 1
11852 #define NULL ((void*)0)
11857 #if DB_VERSION_MAJOR > 2
11858 db_env_create( NULL, 0 );
11859 #elif DB_VERSION_MAJOR > 1
11860 db_appexit( NULL );
11862 (void) dbopen( NULL, 0, 0, 0, NULL);
11867 if { (eval echo configure:11868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11871 echo "configure: failed program was:" >&5
11872 cat conftest.$ac_ext >&5
11882 echo "$ac_t""$ol_cv_db_db3" 1>&6
11884 if test $ol_cv_db_db3 = yes ; then
11889 if test $ol_cv_lib_db = no ; then
11890 echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
11891 echo "configure:11892: checking for Berkeley DB link (-ldb2)" >&5
11892 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
11893 echo $ac_n "(cached) $ac_c" 1>&6
11898 LIBS="$ol_DB_LIB $LIBS"
11900 cat > conftest.$ac_ext <<EOF
11901 #line 11902 "configure"
11902 #include "confdefs.h"
11904 #ifdef HAVE_DB_185_H
11905 # include <db_185.h>
11910 #ifndef DB_VERSION_MAJOR
11911 # define DB_VERSION_MAJOR 1
11915 #define NULL ((void*)0)
11920 #if DB_VERSION_MAJOR > 2
11921 db_env_create( NULL, 0 );
11922 #elif DB_VERSION_MAJOR > 1
11923 db_appexit( NULL );
11925 (void) dbopen( NULL, 0, 0, 0, NULL);
11930 if { (eval echo configure:11931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11934 echo "configure: failed program was:" >&5
11935 cat conftest.$ac_ext >&5
11945 echo "$ac_t""$ol_cv_db_db2" 1>&6
11947 if test $ol_cv_db_db2 = yes ; then
11952 if test $ol_cv_lib_db = no ; then
11953 echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
11954 echo "configure:11955: checking for Berkeley DB link (-ldb1)" >&5
11955 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
11956 echo $ac_n "(cached) $ac_c" 1>&6
11961 LIBS="$ol_DB_LIB $LIBS"
11963 cat > conftest.$ac_ext <<EOF
11964 #line 11965 "configure"
11965 #include "confdefs.h"
11967 #ifdef HAVE_DB_185_H
11968 # include <db_185.h>
11973 #ifndef DB_VERSION_MAJOR
11974 # define DB_VERSION_MAJOR 1
11978 #define NULL ((void*)0)
11983 #if DB_VERSION_MAJOR > 2
11984 db_env_create( NULL, 0 );
11985 #elif DB_VERSION_MAJOR > 1
11986 db_appexit( NULL );
11988 (void) dbopen( NULL, 0, 0, 0, NULL);
11993 if { (eval echo configure:11994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11997 echo "configure: failed program was:" >&5
11998 cat conftest.$ac_ext >&5
12008 echo "$ac_t""$ol_cv_db_db1" 1>&6
12010 if test $ol_cv_db_db1 = yes ; then
12016 if test "$ol_cv_lib_db" != no ; then
12017 ol_cv_berkeley_db=yes
12018 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
12019 echo "configure:12020: checking for Berkeley DB thread support" >&5
12020 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
12021 echo $ac_n "(cached) $ac_c" 1>&6
12025 if test $ol_cv_lib_db != yes ; then
12026 LIBS="$ol_cv_lib_db"
12029 if test "$cross_compiling" = yes; then
12030 ol_cv_berkeley_db_thread=cross
12032 cat > conftest.$ac_ext <<EOF
12033 #line 12034 "configure"
12034 #include "confdefs.h"
12036 #ifdef HAVE_DB_185_H
12042 #define NULL ((void *)0)
12047 u_int32_t flags = DB_CREATE | DB_THREAD;
12050 #if DB_VERSION_MAJOR > 2
12051 DB_ENV *env = NULL;
12053 rc = db_env_create( &env, 0 );
12056 rc = env->open( env, NULL, NULL, flags, 0 );
12061 memset( &env, '\0', sizeof(env) );
12063 rc = db_appinit( NULL, NULL, &env, flags );
12066 db_appexit( &env );
12073 if { (eval echo configure:12074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12075 ol_cv_berkeley_db_thread=yes
12077 echo "configure: failed program was:" >&5
12078 cat conftest.$ac_ext >&5
12080 ol_cv_berkeley_db_thread=no
12088 if test $ol_cv_berkeley_db_thread != no ; then
12089 cat >> confdefs.h <<\EOF
12090 #define HAVE_BERKELEY_DB_THREAD 1
12097 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
12103 if test $ol_cv_berkeley_db != no ; then
12104 cat >> confdefs.h <<\EOF
12105 #define HAVE_BERKELEY_DB 1
12109 ol_link_ldbm=berkeley
12110 ol_with_ldbm_api=db
12112 if test $ol_with_ldbm_type = hash ; then
12113 cat >> confdefs.h <<\EOF
12114 #define LDBM_USE_DBHASH 1
12118 cat >> confdefs.h <<\EOF
12119 #define LDBM_USE_DBBTREE 1
12124 if test $ol_cv_lib_db != yes ; then
12125 LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
12130 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
12131 echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
12132 ol_with_ldbm_api=none
12135 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
12136 echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
12137 echo "configure:12138: checking for MDBM library" >&5
12138 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
12139 echo $ac_n "(cached) $ac_c" 1>&6
12142 echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
12143 echo "configure:12144: checking for mdbm_set_chain" >&5
12144 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
12145 echo $ac_n "(cached) $ac_c" 1>&6
12147 cat > conftest.$ac_ext <<EOF
12148 #line 12149 "configure"
12149 #include "confdefs.h"
12150 /* System header to define __stub macros and hopefully few prototypes,
12151 which can conflict with char mdbm_set_chain(); below. */
12152 #include <assert.h>
12153 /* Override any gcc2 internal prototype to avoid an error. */
12154 /* We use char because int might match the return type of a gcc2
12155 builtin and then its argument prototype would still apply. */
12156 char mdbm_set_chain();
12161 /* The GNU C library defines this for functions which it implements
12162 to always fail with ENOSYS. Some functions are actually named
12163 something starting with __ and the normal name is an alias. */
12164 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
12167 f = mdbm_set_chain;
12172 if { (eval echo configure:12173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12174 eval "ac_cv_func_mdbm_set_chain=yes"
12176 echo "configure: failed program was:" >&5
12177 cat conftest.$ac_ext >&5
12179 eval "ac_cv_func_mdbm_set_chain=no"
12184 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
12185 echo "$ac_t""yes" 1>&6
12188 echo "$ac_t""no" 1>&6
12190 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
12191 echo "configure:12192: checking for mdbm_set_chain in -lmdbm" >&5
12192 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
12193 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12194 echo $ac_n "(cached) $ac_c" 1>&6
12196 ac_save_LIBS="$LIBS"
12197 LIBS="-lmdbm $LIBS"
12198 cat > conftest.$ac_ext <<EOF
12199 #line 12200 "configure"
12200 #include "confdefs.h"
12201 /* Override any gcc2 internal prototype to avoid an error. */
12202 /* We use char because int might match the return type of a gcc2
12203 builtin and then its argument prototype would still apply. */
12204 char mdbm_set_chain();
12210 if { (eval echo configure:12211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12212 eval "ac_cv_lib_$ac_lib_var=yes"
12214 echo "configure: failed program was:" >&5
12215 cat conftest.$ac_ext >&5
12217 eval "ac_cv_lib_$ac_lib_var=no"
12220 LIBS="$ac_save_LIBS"
12223 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12224 echo "$ac_t""yes" 1>&6
12225 ol_cv_lib_mdbm=-lmdbm
12227 echo "$ac_t""no" 1>&6
12238 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
12241 for ac_hdr in mdbm.h
12243 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12244 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12245 echo "configure:12246: checking for $ac_hdr" >&5
12246 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12247 echo $ac_n "(cached) $ac_c" 1>&6
12249 cat > conftest.$ac_ext <<EOF
12250 #line 12251 "configure"
12251 #include "confdefs.h"
12254 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12255 { (eval echo configure:12256: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12256 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12257 if test -z "$ac_err"; then
12259 eval "ac_cv_header_$ac_safe=yes"
12262 echo "configure: failed program was:" >&5
12263 cat conftest.$ac_ext >&5
12265 eval "ac_cv_header_$ac_safe=no"
12269 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12270 echo "$ac_t""yes" 1>&6
12271 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12272 cat >> confdefs.h <<EOF
12273 #define $ac_tr_hdr 1
12277 echo "$ac_t""no" 1>&6
12281 echo $ac_n "checking for db""... $ac_c" 1>&6
12282 echo "configure:12283: checking for db" >&5
12283 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
12284 echo $ac_n "(cached) $ac_c" 1>&6
12287 if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
12295 echo "$ac_t""$ol_cv_mdbm" 1>&6
12296 if test $ol_cv_mdbm = yes ; then
12297 cat >> confdefs.h <<\EOF
12298 #define HAVE_MDBM 1
12304 if test $ol_cv_mdbm = yes ; then
12306 ol_with_ldbm_api=mdbm
12307 if test $ol_cv_lib_mdbm != yes ; then
12308 LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
12313 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
12314 echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
12315 echo "configure:12316: checking for GDBM library" >&5
12316 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
12317 echo $ac_n "(cached) $ac_c" 1>&6
12320 echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
12321 echo "configure:12322: checking for gdbm_open" >&5
12322 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
12323 echo $ac_n "(cached) $ac_c" 1>&6
12325 cat > conftest.$ac_ext <<EOF
12326 #line 12327 "configure"
12327 #include "confdefs.h"
12328 /* System header to define __stub macros and hopefully few prototypes,
12329 which can conflict with char gdbm_open(); below. */
12330 #include <assert.h>
12331 /* Override any gcc2 internal prototype to avoid an error. */
12332 /* We use char because int might match the return type of a gcc2
12333 builtin and then its argument prototype would still apply. */
12339 /* The GNU C library defines this for functions which it implements
12340 to always fail with ENOSYS. Some functions are actually named
12341 something starting with __ and the normal name is an alias. */
12342 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
12350 if { (eval echo configure:12351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12352 eval "ac_cv_func_gdbm_open=yes"
12354 echo "configure: failed program was:" >&5
12355 cat conftest.$ac_ext >&5
12357 eval "ac_cv_func_gdbm_open=no"
12362 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
12363 echo "$ac_t""yes" 1>&6
12366 echo "$ac_t""no" 1>&6
12368 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
12369 echo "configure:12370: checking for gdbm_open in -lgdbm" >&5
12370 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
12371 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12372 echo $ac_n "(cached) $ac_c" 1>&6
12374 ac_save_LIBS="$LIBS"
12375 LIBS="-lgdbm $LIBS"
12376 cat > conftest.$ac_ext <<EOF
12377 #line 12378 "configure"
12378 #include "confdefs.h"
12379 /* Override any gcc2 internal prototype to avoid an error. */
12380 /* We use char because int might match the return type of a gcc2
12381 builtin and then its argument prototype would still apply. */
12388 if { (eval echo configure:12389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12390 eval "ac_cv_lib_$ac_lib_var=yes"
12392 echo "configure: failed program was:" >&5
12393 cat conftest.$ac_ext >&5
12395 eval "ac_cv_lib_$ac_lib_var=no"
12398 LIBS="$ac_save_LIBS"
12401 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12402 echo "$ac_t""yes" 1>&6
12403 ol_cv_lib_gdbm=-lgdbm
12405 echo "$ac_t""no" 1>&6
12416 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
12419 for ac_hdr in gdbm.h
12421 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12422 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12423 echo "configure:12424: checking for $ac_hdr" >&5
12424 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12425 echo $ac_n "(cached) $ac_c" 1>&6
12427 cat > conftest.$ac_ext <<EOF
12428 #line 12429 "configure"
12429 #include "confdefs.h"
12432 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12433 { (eval echo configure:12434: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12434 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12435 if test -z "$ac_err"; then
12437 eval "ac_cv_header_$ac_safe=yes"
12440 echo "configure: failed program was:" >&5
12441 cat conftest.$ac_ext >&5
12443 eval "ac_cv_header_$ac_safe=no"
12447 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12448 echo "$ac_t""yes" 1>&6
12449 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12450 cat >> confdefs.h <<EOF
12451 #define $ac_tr_hdr 1
12455 echo "$ac_t""no" 1>&6
12459 echo $ac_n "checking for db""... $ac_c" 1>&6
12460 echo "configure:12461: checking for db" >&5
12461 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
12462 echo $ac_n "(cached) $ac_c" 1>&6
12465 if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
12473 echo "$ac_t""$ol_cv_gdbm" 1>&6
12474 if test $ol_cv_gdbm = yes ; then
12475 cat >> confdefs.h <<\EOF
12476 #define HAVE_GDBM 1
12482 if test $ol_cv_gdbm = yes ; then
12484 ol_with_ldbm_api=gdbm
12486 if test $ol_cv_lib_gdbm != yes ; then
12487 LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
12492 if test $ol_with_ldbm_api = ndbm ; then
12493 echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
12494 echo "configure:12495: checking for NDBM library" >&5
12495 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
12496 echo $ac_n "(cached) $ac_c" 1>&6
12499 echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12500 echo "configure:12501: checking for dbm_open" >&5
12501 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
12502 echo $ac_n "(cached) $ac_c" 1>&6
12504 cat > conftest.$ac_ext <<EOF
12505 #line 12506 "configure"
12506 #include "confdefs.h"
12507 /* System header to define __stub macros and hopefully few prototypes,
12508 which can conflict with char dbm_open(); below. */
12509 #include <assert.h>
12510 /* Override any gcc2 internal prototype to avoid an error. */
12511 /* We use char because int might match the return type of a gcc2
12512 builtin and then its argument prototype would still apply. */
12518 /* The GNU C library defines this for functions which it implements
12519 to always fail with ENOSYS. Some functions are actually named
12520 something starting with __ and the normal name is an alias. */
12521 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12529 if { (eval echo configure:12530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12531 eval "ac_cv_func_dbm_open=yes"
12533 echo "configure: failed program was:" >&5
12534 cat conftest.$ac_ext >&5
12536 eval "ac_cv_func_dbm_open=no"
12541 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12542 echo "$ac_t""yes" 1>&6
12545 echo "$ac_t""no" 1>&6
12547 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
12548 echo "configure:12549: checking for dbm_open in -lndbm" >&5
12549 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12550 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12551 echo $ac_n "(cached) $ac_c" 1>&6
12553 ac_save_LIBS="$LIBS"
12554 LIBS="-lndbm $LIBS"
12555 cat > conftest.$ac_ext <<EOF
12556 #line 12557 "configure"
12557 #include "confdefs.h"
12558 /* Override any gcc2 internal prototype to avoid an error. */
12559 /* We use char because int might match the return type of a gcc2
12560 builtin and then its argument prototype would still apply. */
12567 if { (eval echo configure:12568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12569 eval "ac_cv_lib_$ac_lib_var=yes"
12571 echo "configure: failed program was:" >&5
12572 cat conftest.$ac_ext >&5
12574 eval "ac_cv_lib_$ac_lib_var=no"
12577 LIBS="$ac_save_LIBS"
12580 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12581 echo "$ac_t""yes" 1>&6
12582 ol_cv_lib_ndbm=-lndbm
12584 echo "$ac_t""no" 1>&6
12586 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12587 echo "configure:12588: checking for dbm_open in -ldbm" >&5
12588 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12589 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12590 echo $ac_n "(cached) $ac_c" 1>&6
12592 ac_save_LIBS="$LIBS"
12594 cat > conftest.$ac_ext <<EOF
12595 #line 12596 "configure"
12596 #include "confdefs.h"
12597 /* Override any gcc2 internal prototype to avoid an error. */
12598 /* We use char because int might match the return type of a gcc2
12599 builtin and then its argument prototype would still apply. */
12606 if { (eval echo configure:12607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12608 eval "ac_cv_lib_$ac_lib_var=yes"
12610 echo "configure: failed program was:" >&5
12611 cat conftest.$ac_ext >&5
12613 eval "ac_cv_lib_$ac_lib_var=no"
12616 LIBS="$ac_save_LIBS"
12619 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12620 echo "$ac_t""yes" 1>&6
12621 ol_cv_lib_ndbm=-ldbm
12623 echo "$ac_t""no" 1>&6
12636 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
12639 for ac_hdr in ndbm.h
12641 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12642 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12643 echo "configure:12644: checking for $ac_hdr" >&5
12644 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12645 echo $ac_n "(cached) $ac_c" 1>&6
12647 cat > conftest.$ac_ext <<EOF
12648 #line 12649 "configure"
12649 #include "confdefs.h"
12652 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12653 { (eval echo configure:12654: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12654 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12655 if test -z "$ac_err"; then
12657 eval "ac_cv_header_$ac_safe=yes"
12660 echo "configure: failed program was:" >&5
12661 cat conftest.$ac_ext >&5
12663 eval "ac_cv_header_$ac_safe=no"
12667 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12668 echo "$ac_t""yes" 1>&6
12669 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12670 cat >> confdefs.h <<EOF
12671 #define $ac_tr_hdr 1
12675 echo "$ac_t""no" 1>&6
12679 echo $ac_n "checking for db""... $ac_c" 1>&6
12680 echo "configure:12681: checking for db" >&5
12681 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
12682 echo $ac_n "(cached) $ac_c" 1>&6
12685 if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
12693 echo "$ac_t""$ol_cv_ndbm" 1>&6
12694 if test $ol_cv_ndbm = yes ; then
12695 cat >> confdefs.h <<\EOF
12696 #define HAVE_NDBM 1
12702 if test $ol_cv_ndbm = yes ; then
12704 ol_with_ldbm_api=ndbm
12706 if test $ol_cv_lib_ndbm != yes ; then
12707 LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
12712 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
12713 echo "configure: warning: could not find suitable LDBM backend" 1>&2
12714 if test $ol_enable_ldbm = yes ; then
12715 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
12718 echo "configure: warning: disabling LDBM" 1>&2
12722 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
12723 LINK_BINS_DYNAMIC="yes"
12725 LINK_BINS_DYNAMIC="no"
12728 if test $ol_enable_wrappers != no ; then
12729 for ac_hdr in tcpd.h
12731 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12732 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12733 echo "configure:12734: checking for $ac_hdr" >&5
12734 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12735 echo $ac_n "(cached) $ac_c" 1>&6
12737 cat > conftest.$ac_ext <<EOF
12738 #line 12739 "configure"
12739 #include "confdefs.h"
12742 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12743 { (eval echo configure:12744: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12744 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12745 if test -z "$ac_err"; then
12747 eval "ac_cv_header_$ac_safe=yes"
12750 echo "configure: failed program was:" >&5
12751 cat conftest.$ac_ext >&5
12753 eval "ac_cv_header_$ac_safe=no"
12757 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12758 echo "$ac_t""yes" 1>&6
12759 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12760 cat >> confdefs.h <<EOF
12761 #define $ac_tr_hdr 1
12765 echo "$ac_t""no" 1>&6
12770 if test $ac_cv_header_tcpd_h != yes ; then
12773 cat > conftest.$ac_ext <<EOF
12774 #line 12775 "configure"
12775 #include "confdefs.h"
12777 int allow_severity = 0;
12778 int deny_severity = 0;
12784 if { (eval echo configure:12785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12788 echo "configure: failed program was:" >&5
12789 cat conftest.$ac_ext >&5
12796 if test $have_wrappers = yes ; then
12797 cat >> confdefs.h <<\EOF
12798 #define HAVE_TCPD 1
12803 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
12804 echo "configure:12805: checking for main in -lnsl" >&5
12805 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
12806 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12807 echo $ac_n "(cached) $ac_c" 1>&6
12809 ac_save_LIBS="$LIBS"
12811 cat > conftest.$ac_ext <<EOF
12812 #line 12813 "configure"
12813 #include "confdefs.h"
12819 if { (eval echo configure:12820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12821 eval "ac_cv_lib_$ac_lib_var=yes"
12823 echo "configure: failed program was:" >&5
12824 cat conftest.$ac_ext >&5
12826 eval "ac_cv_lib_$ac_lib_var=no"
12829 LIBS="$ac_save_LIBS"
12832 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12833 echo "$ac_t""yes" 1>&6
12834 ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12835 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12836 cat >> confdefs.h <<EOF
12837 #define $ac_tr_lib 1
12843 echo "$ac_t""no" 1>&6
12847 echo "configure: warning: could not find -lwrap" 1>&2
12848 if test $ol_enable_wrappers = yes ; then
12849 { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
12852 echo "configure: warning: disabling wrappers support" 1>&2
12853 ol_enable_wrappers=no
12858 if test $ol_enable_syslog != no ; then
12859 echo $ac_n "checking for openlog""... $ac_c" 1>&6
12860 echo "configure:12861: checking for openlog" >&5
12861 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
12862 echo $ac_n "(cached) $ac_c" 1>&6
12864 cat > conftest.$ac_ext <<EOF
12865 #line 12866 "configure"
12866 #include "confdefs.h"
12867 /* System header to define __stub macros and hopefully few prototypes,
12868 which can conflict with char openlog(); below. */
12869 #include <assert.h>
12870 /* Override any gcc2 internal prototype to avoid an error. */
12871 /* We use char because int might match the return type of a gcc2
12872 builtin and then its argument prototype would still apply. */
12878 /* The GNU C library defines this for functions which it implements
12879 to always fail with ENOSYS. Some functions are actually named
12880 something starting with __ and the normal name is an alias. */
12881 #if defined (__stub_openlog) || defined (__stub___openlog)
12889 if { (eval echo configure:12890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12891 eval "ac_cv_func_openlog=yes"
12893 echo "configure: failed program was:" >&5
12894 cat conftest.$ac_ext >&5
12896 eval "ac_cv_func_openlog=no"
12901 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
12902 echo "$ac_t""yes" 1>&6
12905 echo "$ac_t""no" 1>&6
12908 if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
12909 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
12911 ol_enable_syslog=$ac_cv_func_openlog
12915 for ac_hdr in termcap.h ncurses.h
12917 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12918 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12919 echo "configure:12920: checking for $ac_hdr" >&5
12920 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12921 echo $ac_n "(cached) $ac_c" 1>&6
12923 cat > conftest.$ac_ext <<EOF
12924 #line 12925 "configure"
12925 #include "confdefs.h"
12928 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12929 { (eval echo configure:12930: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12930 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12931 if test -z "$ac_err"; then
12933 eval "ac_cv_header_$ac_safe=yes"
12936 echo "configure: failed program was:" >&5
12937 cat conftest.$ac_ext >&5
12939 eval "ac_cv_header_$ac_safe=no"
12943 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12944 echo "$ac_t""yes" 1>&6
12945 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12946 cat >> confdefs.h <<EOF
12947 #define $ac_tr_hdr 1
12951 echo "$ac_t""no" 1>&6
12956 if test $ol_link_termcap = no ; then
12957 echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
12958 echo "configure:12959: checking for tputs in -ltermcap" >&5
12959 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
12960 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12961 echo $ac_n "(cached) $ac_c" 1>&6
12963 ac_save_LIBS="$LIBS"
12964 LIBS="-ltermcap $LIBS"
12965 cat > conftest.$ac_ext <<EOF
12966 #line 12967 "configure"
12967 #include "confdefs.h"
12968 /* Override any gcc2 internal prototype to avoid an error. */
12969 /* We use char because int might match the return type of a gcc2
12970 builtin and then its argument prototype would still apply. */
12977 if { (eval echo configure:12978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12979 eval "ac_cv_lib_$ac_lib_var=yes"
12981 echo "configure: failed program was:" >&5
12982 cat conftest.$ac_ext >&5
12984 eval "ac_cv_lib_$ac_lib_var=no"
12987 LIBS="$ac_save_LIBS"
12990 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12991 echo "$ac_t""yes" 1>&6
12994 echo "$ac_t""no" 1>&6
12998 if test $have_termcap = yes ; then
12999 cat >> confdefs.h <<\EOF
13000 #define HAVE_TERMCAP 1
13003 ol_link_termcap=yes
13004 TERMCAP_LIBS=-ltermcap
13008 if test $ol_link_termcap = no ; then
13009 echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
13010 echo "configure:13011: checking for initscr in -lncurses" >&5
13011 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
13012 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13013 echo $ac_n "(cached) $ac_c" 1>&6
13015 ac_save_LIBS="$LIBS"
13016 LIBS="-lncurses $LIBS"
13017 cat > conftest.$ac_ext <<EOF
13018 #line 13019 "configure"
13019 #include "confdefs.h"
13020 /* Override any gcc2 internal prototype to avoid an error. */
13021 /* We use char because int might match the return type of a gcc2
13022 builtin and then its argument prototype would still apply. */
13029 if { (eval echo configure:13030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13031 eval "ac_cv_lib_$ac_lib_var=yes"
13033 echo "configure: failed program was:" >&5
13034 cat conftest.$ac_ext >&5
13036 eval "ac_cv_lib_$ac_lib_var=no"
13039 LIBS="$ac_save_LIBS"
13042 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13043 echo "$ac_t""yes" 1>&6
13046 echo "$ac_t""no" 1>&6
13050 if test $have_ncurses = yes ; then
13051 cat >> confdefs.h <<\EOF
13052 #define HAVE_NCURSES 1
13055 ol_link_termcap=yes
13056 TERMCAP_LIBS=-lncurses
13060 if test $ol_link_termcap = no ; then
13061 cat >> confdefs.h <<\EOF
13062 #define NO_TERMCAP 1
13070 if test $ol_with_cyrus_sasl != no ; then
13071 ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
13072 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
13073 echo "configure:13074: checking for sasl.h" >&5
13074 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13075 echo $ac_n "(cached) $ac_c" 1>&6
13077 cat > conftest.$ac_ext <<EOF
13078 #line 13079 "configure"
13079 #include "confdefs.h"
13082 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13083 { (eval echo configure:13084: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13084 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13085 if test -z "$ac_err"; then
13087 eval "ac_cv_header_$ac_safe=yes"
13090 echo "configure: failed program was:" >&5
13091 cat conftest.$ac_ext >&5
13093 eval "ac_cv_header_$ac_safe=no"
13097 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13098 echo "$ac_t""yes" 1>&6
13101 echo "$ac_t""no" 1>&6
13105 if test $ac_cv_header_sasl_h = yes ; then
13106 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
13107 echo "configure:13108: checking for sasl_client_init in -lsasl" >&5
13108 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
13109 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13110 echo $ac_n "(cached) $ac_c" 1>&6
13112 ac_save_LIBS="$LIBS"
13113 LIBS="-lsasl $LIBS"
13114 cat > conftest.$ac_ext <<EOF
13115 #line 13116 "configure"
13116 #include "confdefs.h"
13117 /* Override any gcc2 internal prototype to avoid an error. */
13118 /* We use char because int might match the return type of a gcc2
13119 builtin and then its argument prototype would still apply. */
13120 char sasl_client_init();
13126 if { (eval echo configure:13127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13128 eval "ac_cv_lib_$ac_lib_var=yes"
13130 echo "configure: failed program was:" >&5
13131 cat conftest.$ac_ext >&5
13133 eval "ac_cv_lib_$ac_lib_var=no"
13136 LIBS="$ac_save_LIBS"
13139 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13140 echo "$ac_t""yes" 1>&6
13141 have_cyrus_sasl=yes
13143 echo "$ac_t""no" 1>&6
13148 if test $have_cyrus_sasl != no ; then
13150 cat >> confdefs.h <<\EOF
13151 #define HAVE_CYRUS_SASL 1
13158 if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
13159 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
13163 if test $cross_compiling != yes ; then
13165 if test -r /dev/urandom ; then
13166 dev="/dev/urandom";
13167 elif test -r /idev/urandom ; then
13168 dev="/idev/urandom";
13169 elif test -r /dev/srandom ; then
13170 dev="/dev/srandom";
13171 elif test -r /dev/random ; then
13173 elif test -r /idev/random ; then
13174 dev="/idev/random";
13177 if test $dev != no ; then
13178 cat >> confdefs.h <<EOF
13179 #define URANDOM_DEVICE "$dev"
13186 if test $ol_with_fetch != no ; then
13188 LIBS="-lfetch -lcom_err $LIBS"
13189 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
13190 echo "configure:13191: checking fetch(3) library" >&5
13191 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
13192 echo $ac_n "(cached) $ac_c" 1>&6
13195 cat > conftest.$ac_ext <<EOF
13196 #line 13197 "configure"
13197 #include "confdefs.h"
13199 #include <sys/param.h>
13203 struct url *u = fetchParseURL("file:///");
13206 if { (eval echo configure:13207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13208 ol_cv_lib_fetch=yes
13210 echo "configure: failed program was:" >&5
13211 cat conftest.$ac_ext >&5
13218 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
13220 if test $ol_cv_lib_fetch != no ; then
13221 ol_link_fetch="-lfetch -lcom_err"
13222 cat >> confdefs.h <<\EOF
13223 #define HAVE_FETCH 1
13229 if test $ol_cv_lib_fetch != no ; then
13230 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
13231 ol_link_fetch=freebsd
13233 elif test $ol_with_fetch != auto ; then
13234 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
13238 ol_link_readline=no
13239 if test $ol_with_readline != no ; then
13240 for ac_hdr in readline/readline.h readline/history.h
13242 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13243 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13244 echo "configure:13245: checking for $ac_hdr" >&5
13245 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13246 echo $ac_n "(cached) $ac_c" 1>&6
13248 cat > conftest.$ac_ext <<EOF
13249 #line 13250 "configure"
13250 #include "confdefs.h"
13253 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13254 { (eval echo configure:13255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13255 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13256 if test -z "$ac_err"; then
13258 eval "ac_cv_header_$ac_safe=yes"
13261 echo "configure: failed program was:" >&5
13262 cat conftest.$ac_ext >&5
13264 eval "ac_cv_header_$ac_safe=no"
13268 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13269 echo "$ac_t""yes" 1>&6
13270 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13271 cat >> confdefs.h <<EOF
13272 #define $ac_tr_hdr 1
13276 echo "$ac_t""no" 1>&6
13281 if test $ac_cv_header_readline_readline_h = yes ; then
13283 LIBS="$TERMCAP_LIBS $LIBS"
13284 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
13285 echo "configure:13286: checking for readline in -lreadline" >&5
13286 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
13287 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13288 echo $ac_n "(cached) $ac_c" 1>&6
13290 ac_save_LIBS="$LIBS"
13291 LIBS="-lreadline $LIBS"
13292 cat > conftest.$ac_ext <<EOF
13293 #line 13294 "configure"
13294 #include "confdefs.h"
13295 /* Override any gcc2 internal prototype to avoid an error. */
13296 /* We use char because int might match the return type of a gcc2
13297 builtin and then its argument prototype would still apply. */
13304 if { (eval echo configure:13305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13306 eval "ac_cv_lib_$ac_lib_var=yes"
13308 echo "configure: failed program was:" >&5
13309 cat conftest.$ac_ext >&5
13311 eval "ac_cv_lib_$ac_lib_var=no"
13314 LIBS="$ac_save_LIBS"
13317 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13318 echo "$ac_t""yes" 1>&6
13321 echo "$ac_t""no" 1>&6
13327 if test $have_readline = yes ; then
13328 ol_with_readline=found
13329 ol_link_readline=yes
13331 READLINE_LIBS="-lreadline"
13336 if test $ol_link_readline = yes ; then
13337 cat >> confdefs.h <<\EOF
13338 #define HAVE_READLINE 1
13344 if test $ol_enable_crypt != no ; then
13345 echo $ac_n "checking for crypt""... $ac_c" 1>&6
13346 echo "configure:13347: checking for crypt" >&5
13347 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
13348 echo $ac_n "(cached) $ac_c" 1>&6
13350 cat > conftest.$ac_ext <<EOF
13351 #line 13352 "configure"
13352 #include "confdefs.h"
13353 /* System header to define __stub macros and hopefully few prototypes,
13354 which can conflict with char crypt(); below. */
13355 #include <assert.h>
13356 /* Override any gcc2 internal prototype to avoid an error. */
13357 /* We use char because int might match the return type of a gcc2
13358 builtin and then its argument prototype would still apply. */
13364 /* The GNU C library defines this for functions which it implements
13365 to always fail with ENOSYS. Some functions are actually named
13366 something starting with __ and the normal name is an alias. */
13367 #if defined (__stub_crypt) || defined (__stub___crypt)
13375 if { (eval echo configure:13376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13377 eval "ac_cv_func_crypt=yes"
13379 echo "configure: failed program was:" >&5
13380 cat conftest.$ac_ext >&5
13382 eval "ac_cv_func_crypt=no"
13387 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
13388 echo "$ac_t""yes" 1>&6
13391 echo "$ac_t""no" 1>&6
13393 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
13394 echo "configure:13395: checking for crypt in -lcrypt" >&5
13395 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
13396 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13397 echo $ac_n "(cached) $ac_c" 1>&6
13399 ac_save_LIBS="$LIBS"
13400 LIBS="-lcrypt $LIBS"
13401 cat > conftest.$ac_ext <<EOF
13402 #line 13403 "configure"
13403 #include "confdefs.h"
13404 /* Override any gcc2 internal prototype to avoid an error. */
13405 /* We use char because int might match the return type of a gcc2
13406 builtin and then its argument prototype would still apply. */
13413 if { (eval echo configure:13414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13415 eval "ac_cv_lib_$ac_lib_var=yes"
13417 echo "configure: failed program was:" >&5
13418 cat conftest.$ac_ext >&5
13420 eval "ac_cv_lib_$ac_lib_var=no"
13423 LIBS="$ac_save_LIBS"
13426 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13427 echo "$ac_t""yes" 1>&6
13428 LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
13431 echo "$ac_t""no" 1>&6
13438 if test $have_crypt = yes ; then
13439 cat >> confdefs.h <<\EOF
13440 #define HAVE_CRYPT 1
13444 echo "configure: warning: could not find crypt" 1>&2
13445 if test $ol_enable_crypt = yes ; then
13446 { echo "configure: error: could not find crypt" 1>&2; exit 1; }
13449 echo "configure: warning: disabling crypt support" 1>&2
13454 if test $ol_enable_proctitle != no ; then
13455 echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
13456 echo "configure:13457: checking for setproctitle" >&5
13457 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
13458 echo $ac_n "(cached) $ac_c" 1>&6
13460 cat > conftest.$ac_ext <<EOF
13461 #line 13462 "configure"
13462 #include "confdefs.h"
13463 /* System header to define __stub macros and hopefully few prototypes,
13464 which can conflict with char setproctitle(); below. */
13465 #include <assert.h>
13466 /* Override any gcc2 internal prototype to avoid an error. */
13467 /* We use char because int might match the return type of a gcc2
13468 builtin and then its argument prototype would still apply. */
13469 char setproctitle();
13474 /* The GNU C library defines this for functions which it implements
13475 to always fail with ENOSYS. Some functions are actually named
13476 something starting with __ and the normal name is an alias. */
13477 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
13485 if { (eval echo configure:13486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13487 eval "ac_cv_func_setproctitle=yes"
13489 echo "configure: failed program was:" >&5
13490 cat conftest.$ac_ext >&5
13492 eval "ac_cv_func_setproctitle=no"
13497 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
13498 echo "$ac_t""yes" 1>&6
13499 have_setproctitle=yes
13501 echo "$ac_t""no" 1>&6
13503 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
13504 echo "configure:13505: checking for setproctitle in -lutil" >&5
13505 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
13506 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13507 echo $ac_n "(cached) $ac_c" 1>&6
13509 ac_save_LIBS="$LIBS"
13510 LIBS="-lutil $LIBS"
13511 cat > conftest.$ac_ext <<EOF
13512 #line 13513 "configure"
13513 #include "confdefs.h"
13514 /* Override any gcc2 internal prototype to avoid an error. */
13515 /* We use char because int might match the return type of a gcc2
13516 builtin and then its argument prototype would still apply. */
13517 char setproctitle();
13523 if { (eval echo configure:13524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13525 eval "ac_cv_lib_$ac_lib_var=yes"
13527 echo "configure: failed program was:" >&5
13528 cat conftest.$ac_ext >&5
13530 eval "ac_cv_lib_$ac_lib_var=no"
13533 LIBS="$ac_save_LIBS"
13536 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13537 echo "$ac_t""yes" 1>&6
13538 have_setproctitle=yes
13539 LUTIL_LIBS="$LUTIL_LIBS -lutil"
13541 echo "$ac_t""no" 1>&6
13542 have_setproctitle=no
13543 LIBOBJS="$LIBOBJS setproctitle.o"
13544 LIBSRCS="$LIBSRCS setproctitle.c"
13550 if test $have_setproctitle = yes ; then
13551 cat >> confdefs.h <<\EOF
13552 #define HAVE_SETPROCTITLE 1
13558 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
13559 echo "configure:13560: checking for ANSI C header files" >&5
13560 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
13561 echo $ac_n "(cached) $ac_c" 1>&6
13563 cat > conftest.$ac_ext <<EOF
13564 #line 13565 "configure"
13565 #include "confdefs.h"
13566 #include <stdlib.h>
13567 #include <stdarg.h>
13568 #include <string.h>
13571 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13572 { (eval echo configure:13573: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13573 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13574 if test -z "$ac_err"; then
13576 ac_cv_header_stdc=yes
13579 echo "configure: failed program was:" >&5
13580 cat conftest.$ac_ext >&5
13582 ac_cv_header_stdc=no
13586 if test $ac_cv_header_stdc = yes; then
13587 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13588 cat > conftest.$ac_ext <<EOF
13589 #line 13590 "configure"
13590 #include "confdefs.h"
13591 #include <string.h>
13593 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13594 egrep "memchr" >/dev/null 2>&1; then
13598 ac_cv_header_stdc=no
13604 if test $ac_cv_header_stdc = yes; then
13605 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13606 cat > conftest.$ac_ext <<EOF
13607 #line 13608 "configure"
13608 #include "confdefs.h"
13609 #include <stdlib.h>
13611 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13612 egrep "free" >/dev/null 2>&1; then
13616 ac_cv_header_stdc=no
13622 if test $ac_cv_header_stdc = yes; then
13623 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13624 if test "$cross_compiling" = yes; then
13627 cat > conftest.$ac_ext <<EOF
13628 #line 13629 "configure"
13629 #include "confdefs.h"
13631 #if ((' ' & 0x0FF) == 0x020)
13632 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13633 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13635 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13636 || ('j' <= (c) && (c) <= 'r') \
13637 || ('s' <= (c) && (c) <= 'z'))
13638 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13640 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13641 int main () { int i; for (i = 0; i < 256; i++)
13642 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
13646 if { (eval echo configure:13647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13650 echo "configure: failed program was:" >&5
13651 cat conftest.$ac_ext >&5
13653 ac_cv_header_stdc=no
13661 echo "$ac_t""$ac_cv_header_stdc" 1>&6
13662 if test $ac_cv_header_stdc = yes; then
13663 cat >> confdefs.h <<\EOF
13664 #define STDC_HEADERS 1
13669 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
13670 echo "configure:13671: checking for mode_t" >&5
13671 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
13672 echo $ac_n "(cached) $ac_c" 1>&6
13674 cat > conftest.$ac_ext <<EOF
13675 #line 13676 "configure"
13676 #include "confdefs.h"
13677 #include <sys/types.h>
13679 #include <stdlib.h>
13680 #include <stddef.h>
13684 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13685 egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13687 eval "ac_cv_type_mode_t=yes"
13690 eval "ac_cv_type_mode_t=no"
13695 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
13696 echo "$ac_t""yes" 1>&6
13698 echo "$ac_t""no" 1>&6
13699 cat >> confdefs.h <<EOF
13705 echo $ac_n "checking for off_t""... $ac_c" 1>&6
13706 echo "configure:13707: checking for off_t" >&5
13707 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
13708 echo $ac_n "(cached) $ac_c" 1>&6
13710 cat > conftest.$ac_ext <<EOF
13711 #line 13712 "configure"
13712 #include "confdefs.h"
13713 #include <sys/types.h>
13715 #include <stdlib.h>
13716 #include <stddef.h>
13720 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13721 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13723 eval "ac_cv_type_off_t=yes"
13726 eval "ac_cv_type_off_t=no"
13731 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
13732 echo "$ac_t""yes" 1>&6
13734 echo "$ac_t""no" 1>&6
13735 cat >> confdefs.h <<EOF
13741 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
13742 echo "configure:13743: checking for pid_t" >&5
13743 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
13744 echo $ac_n "(cached) $ac_c" 1>&6
13746 cat > conftest.$ac_ext <<EOF
13747 #line 13748 "configure"
13748 #include "confdefs.h"
13749 #include <sys/types.h>
13751 #include <stdlib.h>
13752 #include <stddef.h>
13756 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13757 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13759 eval "ac_cv_type_pid_t=yes"
13762 eval "ac_cv_type_pid_t=no"
13767 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
13768 echo "$ac_t""yes" 1>&6
13770 echo "$ac_t""no" 1>&6
13771 cat >> confdefs.h <<EOF
13777 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
13778 echo "configure:13779: checking for ptrdiff_t" >&5
13779 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
13780 echo $ac_n "(cached) $ac_c" 1>&6
13782 cat > conftest.$ac_ext <<EOF
13783 #line 13784 "configure"
13784 #include "confdefs.h"
13785 #include <stddef.h>
13790 if { (eval echo configure:13791: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13792 am_cv_type_ptrdiff_t=yes
13794 echo "configure: failed program was:" >&5
13795 cat conftest.$ac_ext >&5
13797 am_cv_type_ptrdiff_t=no
13802 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
13803 if test $am_cv_type_ptrdiff_t = yes; then
13804 cat >> confdefs.h <<\EOF
13805 #define HAVE_PTRDIFF_T 1
13810 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
13811 echo "configure:13812: checking return type of signal handlers" >&5
13812 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
13813 echo $ac_n "(cached) $ac_c" 1>&6
13815 cat > conftest.$ac_ext <<EOF
13816 #line 13817 "configure"
13817 #include "confdefs.h"
13818 #include <sys/types.h>
13819 #include <signal.h>
13824 extern "C" void (*signal (int, void (*)(int)))(int);
13826 void (*signal ()) ();
13833 if { (eval echo configure:13834: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13835 ac_cv_type_signal=void
13837 echo "configure: failed program was:" >&5
13838 cat conftest.$ac_ext >&5
13840 ac_cv_type_signal=int
13845 echo "$ac_t""$ac_cv_type_signal" 1>&6
13846 cat >> confdefs.h <<EOF
13847 #define RETSIGTYPE $ac_cv_type_signal
13851 echo $ac_n "checking for size_t""... $ac_c" 1>&6
13852 echo "configure:13853: checking for size_t" >&5
13853 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
13854 echo $ac_n "(cached) $ac_c" 1>&6
13856 cat > conftest.$ac_ext <<EOF
13857 #line 13858 "configure"
13858 #include "confdefs.h"
13859 #include <sys/types.h>
13861 #include <stdlib.h>
13862 #include <stddef.h>
13866 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13867 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13869 eval "ac_cv_type_size_t=yes"
13872 eval "ac_cv_type_size_t=no"
13877 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
13878 echo "$ac_t""yes" 1>&6
13880 echo "$ac_t""no" 1>&6
13881 cat >> confdefs.h <<EOF
13882 #define size_t unsigned
13888 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
13889 echo "configure:13890: checking for ssize_t" >&5
13890 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
13891 echo $ac_n "(cached) $ac_c" 1>&6
13893 cat > conftest.$ac_ext <<EOF
13894 #line 13895 "configure"
13895 #include "confdefs.h"
13896 #include <sys/types.h>
13898 #include <stdlib.h>
13899 #include <stddef.h>
13903 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13904 egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13906 eval "ac_cv_type_ssize_t=yes"
13909 eval "ac_cv_type_ssize_t=no"
13914 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
13915 echo "$ac_t""yes" 1>&6
13917 echo "$ac_t""no" 1>&6
13918 cat >> confdefs.h <<EOF
13919 #define ssize_t signed int
13924 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
13925 echo "configure:13926: checking for caddr_t" >&5
13926 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
13927 echo $ac_n "(cached) $ac_c" 1>&6
13929 cat > conftest.$ac_ext <<EOF
13930 #line 13931 "configure"
13931 #include "confdefs.h"
13932 #include <sys/types.h>
13934 #include <stdlib.h>
13935 #include <stddef.h>
13939 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13940 egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13942 eval "ac_cv_type_caddr_t=yes"
13945 eval "ac_cv_type_caddr_t=no"
13950 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
13951 echo "$ac_t""yes" 1>&6
13953 echo "$ac_t""no" 1>&6
13954 cat >> confdefs.h <<EOF
13955 #define caddr_t char *
13961 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
13962 echo "configure:13963: checking for socklen_t" >&5
13963 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
13964 echo $ac_n "(cached) $ac_c" 1>&6
13966 cat > conftest.$ac_ext <<EOF
13967 #line 13968 "configure"
13968 #include "confdefs.h"
13970 #ifdef HAVE_SYS_TYPES_H
13971 #include <sys/types.h>
13973 #ifdef HAVE_SYS_SOCKET_H
13974 #include <sys/socket.h>
13981 if { (eval echo configure:13982: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13983 ol_cv_type_socklen_t=yes
13985 echo "configure: failed program was:" >&5
13986 cat conftest.$ac_ext >&5
13988 ol_cv_type_socklen_t=no
13993 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
13994 if test $ol_cv_type_socklen_t = no; then
13995 cat >> confdefs.h <<\EOF
13996 #define socklen_t int
14001 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
14002 echo "configure:14003: checking for member st_blksize in aggregate type struct stat" >&5
14003 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
14004 echo $ac_n "(cached) $ac_c" 1>&6
14006 cat > conftest.$ac_ext <<EOF
14007 #line 14008 "configure"
14008 #include "confdefs.h"
14009 #include <sys/types.h>
14010 #include <sys/stat.h>
14012 struct stat foo; foo.st_blksize;
14015 if { (eval echo configure:14016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14017 ac_cv_c_struct_member_st_blksize=yes
14019 echo "configure: failed program was:" >&5
14020 cat conftest.$ac_ext >&5
14022 ac_cv_c_struct_member_st_blksize=no
14027 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
14028 st_blksize="$ac_cv_c_struct_member_st_blksize"
14029 if test $ac_cv_c_struct_member_st_blksize = yes; then
14030 cat >> confdefs.h <<\EOF
14031 #define HAVE_ST_BLKSIZE 1
14036 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
14037 echo "configure:14038: checking whether time.h and sys/time.h may both be included" >&5
14038 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
14039 echo $ac_n "(cached) $ac_c" 1>&6
14041 cat > conftest.$ac_ext <<EOF
14042 #line 14043 "configure"
14043 #include "confdefs.h"
14044 #include <sys/types.h>
14045 #include <sys/time.h>
14051 if { (eval echo configure:14052: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14053 ac_cv_header_time=yes
14055 echo "configure: failed program was:" >&5
14056 cat conftest.$ac_ext >&5
14058 ac_cv_header_time=no
14063 echo "$ac_t""$ac_cv_header_time" 1>&6
14064 if test $ac_cv_header_time = yes; then
14065 cat >> confdefs.h <<\EOF
14066 #define TIME_WITH_SYS_TIME 1
14071 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
14072 echo "configure:14073: checking whether struct tm is in sys/time.h or time.h" >&5
14073 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
14074 echo $ac_n "(cached) $ac_c" 1>&6
14076 cat > conftest.$ac_ext <<EOF
14077 #line 14078 "configure"
14078 #include "confdefs.h"
14079 #include <sys/types.h>
14082 struct tm *tp; tp->tm_sec;
14085 if { (eval echo configure:14086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14087 ac_cv_struct_tm=time.h
14089 echo "configure: failed program was:" >&5
14090 cat conftest.$ac_ext >&5
14092 ac_cv_struct_tm=sys/time.h
14097 echo "$ac_t""$ac_cv_struct_tm" 1>&6
14098 if test $ac_cv_struct_tm = sys/time.h; then
14099 cat >> confdefs.h <<\EOF
14100 #define TM_IN_SYS_TIME 1
14105 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
14106 echo "configure:14107: checking for uid_t in sys/types.h" >&5
14107 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
14108 echo $ac_n "(cached) $ac_c" 1>&6
14110 cat > conftest.$ac_ext <<EOF
14111 #line 14112 "configure"
14112 #include "confdefs.h"
14113 #include <sys/types.h>
14115 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14116 egrep "uid_t" >/dev/null 2>&1; then
14118 ac_cv_type_uid_t=yes
14121 ac_cv_type_uid_t=no
14127 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
14128 if test $ac_cv_type_uid_t = no; then
14129 cat >> confdefs.h <<\EOF
14133 cat >> confdefs.h <<\EOF
14139 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
14140 echo "configure:14141: checking for sig_atomic_t" >&5
14141 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
14142 echo $ac_n "(cached) $ac_c" 1>&6
14144 cat > conftest.$ac_ext <<EOF
14145 #line 14146 "configure"
14146 #include "confdefs.h"
14147 #include <signal.h>
14149 sig_atomic_t atomic;
14152 if { (eval echo configure:14153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14154 ol_cv_type_sig_atomic_t=yes
14156 echo "configure: failed program was:" >&5
14157 cat conftest.$ac_ext >&5
14159 ol_cv_type_sig_atomic_t=no
14164 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
14165 if test $ol_cv_type_sig_atomic_t = no; then
14166 cat >> confdefs.h <<\EOF
14167 #define sig_atomic_t int
14174 # test for pw_gecos in struct passwd
14175 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
14176 echo "configure:14177: checking struct passwd for pw_gecos" >&5
14177 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
14178 echo $ac_n "(cached) $ac_c" 1>&6
14181 cat > conftest.$ac_ext <<EOF
14182 #line 14183 "configure"
14183 #include "confdefs.h"
14188 pwd.pw_gecos = pwd.pw_name;
14192 if { (eval echo configure:14193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14194 ol_cv_struct_passwd_pw_gecos=yes
14196 echo "configure: failed program was:" >&5
14197 cat conftest.$ac_ext >&5
14199 ol_cv_struct_passwd_pw_gecos=no
14204 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
14205 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
14206 cat >> confdefs.h <<\EOF
14207 #define HAVE_PW_GECOS 1
14212 # test for pw_passwd in struct passwd
14213 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
14214 echo "configure:14215: checking struct passwd for pw_passwd" >&5
14215 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
14216 echo $ac_n "(cached) $ac_c" 1>&6
14219 cat > conftest.$ac_ext <<EOF
14220 #line 14221 "configure"
14221 #include "confdefs.h"
14226 pwd.pw_passwd = pwd.pw_name;
14230 if { (eval echo configure:14231: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14232 ol_cv_struct_passwd_pw_passwd=yes
14234 echo "configure: failed program was:" >&5
14235 cat conftest.$ac_ext >&5
14237 ol_cv_struct_passwd_pw_passwd=no
14242 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
14243 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
14244 cat >> confdefs.h <<\EOF
14245 #define HAVE_PW_PASSWD 1
14251 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
14252 echo "configure:14253: checking if toupper() requires islower()" >&5
14253 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
14254 echo $ac_n "(cached) $ac_c" 1>&6
14257 if test "$cross_compiling" = yes; then
14258 ol_cv_c_upper_lower=safe
14260 cat > conftest.$ac_ext <<EOF
14261 #line 14262 "configure"
14262 #include "confdefs.h"
14267 if ('C' == toupper('C'))
14273 if { (eval echo configure:14274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14275 ol_cv_c_upper_lower=no
14277 echo "configure: failed program was:" >&5
14278 cat conftest.$ac_ext >&5
14280 ol_cv_c_upper_lower=yes
14287 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
14288 if test $ol_cv_c_upper_lower != no ; then
14289 cat >> confdefs.h <<\EOF
14290 #define C_UPPER_LOWER 1
14295 echo $ac_n "checking for working const""... $ac_c" 1>&6
14296 echo "configure:14297: checking for working const" >&5
14297 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
14298 echo $ac_n "(cached) $ac_c" 1>&6
14300 cat > conftest.$ac_ext <<EOF
14301 #line 14302 "configure"
14302 #include "confdefs.h"
14306 /* Ultrix mips cc rejects this. */
14307 typedef int charset[2]; const charset x;
14308 /* SunOS 4.1.1 cc rejects this. */
14309 char const *const *ccp;
14311 /* NEC SVR4.0.2 mips cc rejects this. */
14312 struct point {int x, y;};
14313 static struct point const zero = {0,0};
14314 /* AIX XL C 1.02.0.0 rejects this.
14315 It does not let you subtract one const X* pointer from another in an arm
14316 of an if-expression whose if-part is not a constant expression */
14317 const char *g = "string";
14318 ccp = &g + (g ? g-g : 0);
14319 /* HPUX 7.0 cc rejects these. */
14322 ccp = (char const *const *) p;
14323 { /* SCO 3.2v4 cc rejects this. */
14325 char const *s = 0 ? (char *) 0 : (char const *) 0;
14329 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
14330 int x[] = {25, 17};
14331 const int *foo = &x[0];
14334 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14335 typedef const int *iptr;
14339 { /* AIX XL C 1.02.0.0 rejects this saying
14340 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14341 struct s { int j; const int *ap[3]; };
14342 struct s *b; b->j = 5;
14344 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14345 const int foo = 10;
14350 if { (eval echo configure:14351: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14354 echo "configure: failed program was:" >&5
14355 cat conftest.$ac_ext >&5
14362 echo "$ac_t""$ac_cv_c_const" 1>&6
14363 if test $ac_cv_c_const = no; then
14364 cat >> confdefs.h <<\EOF
14370 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
14371 echo "configure:14372: checking if compiler understands volatile" >&5
14372 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
14373 echo $ac_n "(cached) $ac_c" 1>&6
14375 cat > conftest.$ac_ext <<EOF
14376 #line 14377 "configure"
14377 #include "confdefs.h"
14380 volatile int a; int * volatile b = x ? &y : &z;
14381 /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
14385 if { (eval echo configure:14386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14387 ol_cv_c_volatile=yes
14389 echo "configure: failed program was:" >&5
14390 cat conftest.$ac_ext >&5
14392 ol_cv_c_volatile=no
14397 echo "$ac_t""$ol_cv_c_volatile" 1>&6
14398 if test $ol_cv_c_volatile = yes; then
14401 cat >> confdefs.h <<\EOF
14408 if test $cross_compiling = yes ; then
14409 cat >> confdefs.h <<\EOF
14410 #define CROSS_COMPILING 1
14414 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
14415 echo "configure:14416: checking whether byte ordering is bigendian" >&5
14416 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
14417 echo $ac_n "(cached) $ac_c" 1>&6
14419 ac_cv_c_bigendian=unknown
14420 # See if sys/param.h defines the BYTE_ORDER macro.
14421 cat > conftest.$ac_ext <<EOF
14422 #line 14423 "configure"
14423 #include "confdefs.h"
14424 #include <sys/types.h>
14425 #include <sys/param.h>
14428 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
14429 bogus endian macros
14433 if { (eval echo configure:14434: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14435 # It does; now see whether it defined to BIG_ENDIAN or not.
14436 cat > conftest.$ac_ext <<EOF
14437 #line 14438 "configure"
14438 #include "confdefs.h"
14439 #include <sys/types.h>
14440 #include <sys/param.h>
14443 #if BYTE_ORDER != BIG_ENDIAN
14448 if { (eval echo configure:14449: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14450 ac_cv_c_bigendian=yes
14452 echo "configure: failed program was:" >&5
14453 cat conftest.$ac_ext >&5
14455 ac_cv_c_bigendian=no
14459 echo "configure: failed program was:" >&5
14460 cat conftest.$ac_ext >&5
14463 if test $ac_cv_c_bigendian = unknown; then
14464 if test "$cross_compiling" = yes; then
14465 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
14467 cat > conftest.$ac_ext <<EOF
14468 #line 14469 "configure"
14469 #include "confdefs.h"
14471 /* Are we little or big endian? From Harbison&Steele. */
14475 char c[sizeof (long)];
14478 exit (u.c[sizeof (long) - 1] == 1);
14481 if { (eval echo configure:14482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14483 ac_cv_c_bigendian=no
14485 echo "configure: failed program was:" >&5
14486 cat conftest.$ac_ext >&5
14488 ac_cv_c_bigendian=yes
14496 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
14497 if test $ac_cv_c_bigendian = yes; then
14498 cat >> confdefs.h <<\EOF
14499 #define WORDS_BIGENDIAN 1
14506 echo $ac_n "checking size of short""... $ac_c" 1>&6
14507 echo "configure:14508: checking size of short" >&5
14508 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
14509 echo $ac_n "(cached) $ac_c" 1>&6
14511 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
14512 cat > conftest.$ac_ext <<EOF
14513 #line 14514 "configure"
14514 #include "confdefs.h"
14515 #include "confdefs.h"
14516 #include <sys/types.h>
14520 switch (0) case 0: case (sizeof (short) == $ac_size):;
14523 if { (eval echo configure:14524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14525 ac_cv_sizeof_short=$ac_size
14527 echo "configure: failed program was:" >&5
14528 cat conftest.$ac_ext >&5
14531 if test x$ac_cv_sizeof_short != x ; then break; fi
14536 if test x$ac_cv_sizeof_short = x ; then
14537 { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; }
14539 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
14540 cat >> confdefs.h <<EOF
14541 #define SIZEOF_SHORT $ac_cv_sizeof_short
14545 echo $ac_n "checking size of int""... $ac_c" 1>&6
14546 echo "configure:14547: checking size of int" >&5
14547 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
14548 echo $ac_n "(cached) $ac_c" 1>&6
14550 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
14551 cat > conftest.$ac_ext <<EOF
14552 #line 14553 "configure"
14553 #include "confdefs.h"
14554 #include "confdefs.h"
14555 #include <sys/types.h>
14559 switch (0) case 0: case (sizeof (int) == $ac_size):;
14562 if { (eval echo configure:14563: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14564 ac_cv_sizeof_int=$ac_size
14566 echo "configure: failed program was:" >&5
14567 cat conftest.$ac_ext >&5
14570 if test x$ac_cv_sizeof_int != x ; then break; fi
14575 if test x$ac_cv_sizeof_int = x ; then
14576 { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; }
14578 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
14579 cat >> confdefs.h <<EOF
14580 #define SIZEOF_INT $ac_cv_sizeof_int
14584 echo $ac_n "checking size of long""... $ac_c" 1>&6
14585 echo "configure:14586: checking size of long" >&5
14586 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
14587 echo $ac_n "(cached) $ac_c" 1>&6
14589 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
14590 cat > conftest.$ac_ext <<EOF
14591 #line 14592 "configure"
14592 #include "confdefs.h"
14593 #include "confdefs.h"
14594 #include <sys/types.h>
14598 switch (0) case 0: case (sizeof (long) == $ac_size):;
14601 if { (eval echo configure:14602: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14603 ac_cv_sizeof_long=$ac_size
14605 echo "configure: failed program was:" >&5
14606 cat conftest.$ac_ext >&5
14609 if test x$ac_cv_sizeof_long != x ; then break; fi
14614 if test x$ac_cv_sizeof_long = x ; then
14615 { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; }
14617 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
14618 cat >> confdefs.h <<EOF
14619 #define SIZEOF_LONG $ac_cv_sizeof_long
14624 if test "$ac_cv_sizeof_int" -lt 4 ; then
14625 echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
14627 cat >> confdefs.h <<\EOF
14628 #define LBER_INT_T long
14632 cat >> confdefs.h <<\EOF
14633 #define LBER_INT_T int
14638 cat >> confdefs.h <<\EOF
14639 #define LBER_LEN_T long
14642 cat >> confdefs.h <<\EOF
14643 #define LBER_SOCKET_T int
14646 cat >> confdefs.h <<\EOF
14647 #define LBER_TAG_T long
14651 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
14652 echo "configure:14653: checking for 8-bit clean memcmp" >&5
14653 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
14654 echo $ac_n "(cached) $ac_c" 1>&6
14656 if test "$cross_compiling" = yes; then
14657 ac_cv_func_memcmp_clean=no
14659 cat > conftest.$ac_ext <<EOF
14660 #line 14661 "configure"
14661 #include "confdefs.h"
14665 char c0 = 0x40, c1 = 0x80, c2 = 0x81;
14666 exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
14670 if { (eval echo configure:14671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14672 ac_cv_func_memcmp_clean=yes
14674 echo "configure: failed program was:" >&5
14675 cat conftest.$ac_ext >&5
14677 ac_cv_func_memcmp_clean=no
14684 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
14685 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
14687 echo $ac_n "checking for strftime""... $ac_c" 1>&6
14688 echo "configure:14689: checking for strftime" >&5
14689 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
14690 echo $ac_n "(cached) $ac_c" 1>&6
14692 cat > conftest.$ac_ext <<EOF
14693 #line 14694 "configure"
14694 #include "confdefs.h"
14695 /* System header to define __stub macros and hopefully few prototypes,
14696 which can conflict with char strftime(); below. */
14697 #include <assert.h>
14698 /* Override any gcc2 internal prototype to avoid an error. */
14699 /* We use char because int might match the return type of a gcc2
14700 builtin and then its argument prototype would still apply. */
14706 /* The GNU C library defines this for functions which it implements
14707 to always fail with ENOSYS. Some functions are actually named
14708 something starting with __ and the normal name is an alias. */
14709 #if defined (__stub_strftime) || defined (__stub___strftime)
14717 if { (eval echo configure:14718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14719 eval "ac_cv_func_strftime=yes"
14721 echo "configure: failed program was:" >&5
14722 cat conftest.$ac_ext >&5
14724 eval "ac_cv_func_strftime=no"
14729 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
14730 echo "$ac_t""yes" 1>&6
14731 cat >> confdefs.h <<\EOF
14732 #define HAVE_STRFTIME 1
14736 echo "$ac_t""no" 1>&6
14737 # strftime is in -lintl on SCO UNIX.
14738 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
14739 echo "configure:14740: checking for strftime in -lintl" >&5
14740 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
14741 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14742 echo $ac_n "(cached) $ac_c" 1>&6
14744 ac_save_LIBS="$LIBS"
14745 LIBS="-lintl $LIBS"
14746 cat > conftest.$ac_ext <<EOF
14747 #line 14748 "configure"
14748 #include "confdefs.h"
14749 /* Override any gcc2 internal prototype to avoid an error. */
14750 /* We use char because int might match the return type of a gcc2
14751 builtin and then its argument prototype would still apply. */
14758 if { (eval echo configure:14759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14760 eval "ac_cv_lib_$ac_lib_var=yes"
14762 echo "configure: failed program was:" >&5
14763 cat conftest.$ac_ext >&5
14765 eval "ac_cv_lib_$ac_lib_var=no"
14768 LIBS="$ac_save_LIBS"
14771 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14772 echo "$ac_t""yes" 1>&6
14773 cat >> confdefs.h <<\EOF
14774 #define HAVE_STRFTIME 1
14777 LIBS="-lintl $LIBS"
14779 echo "$ac_t""no" 1>&6
14785 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
14786 echo "configure:14787: checking for inet_aton()" >&5
14787 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
14788 echo $ac_n "(cached) $ac_c" 1>&6
14790 cat > conftest.$ac_ext <<EOF
14791 #line 14792 "configure"
14792 #include "confdefs.h"
14794 #ifdef HAVE_SYS_TYPES_H
14795 # include <sys/types.h>
14797 #ifdef HAVE_SYS_SOCKET_H
14798 # include <sys/socket.h>
14799 # ifdef HAVE_SYS_SELECT_H
14800 # include <sys/select.h>
14802 # include <netinet/in.h>
14803 # ifdef HAVE_ARPA_INET_H
14804 # include <arpa/inet.h>
14810 int rc = inet_aton( "255.255.255.255", &in );
14813 if { (eval echo configure:14814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14815 ol_cv_func_inet_aton=yes
14817 echo "configure: failed program was:" >&5
14818 cat conftest.$ac_ext >&5
14820 ol_cv_func_inet_aton=no
14825 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
14826 if test $ol_cv_func_inet_aton != no; then
14827 cat >> confdefs.h <<\EOF
14828 #define HAVE_INET_ATON 1
14834 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
14835 echo "configure:14836: checking for _spawnlp" >&5
14836 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
14837 echo $ac_n "(cached) $ac_c" 1>&6
14839 cat > conftest.$ac_ext <<EOF
14840 #line 14841 "configure"
14841 #include "confdefs.h"
14842 /* System header to define __stub macros and hopefully few prototypes,
14843 which can conflict with char _spawnlp(); below. */
14844 #include <assert.h>
14845 /* Override any gcc2 internal prototype to avoid an error. */
14846 /* We use char because int might match the return type of a gcc2
14847 builtin and then its argument prototype would still apply. */
14853 /* The GNU C library defines this for functions which it implements
14854 to always fail with ENOSYS. Some functions are actually named
14855 something starting with __ and the normal name is an alias. */
14856 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
14864 if { (eval echo configure:14865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14866 eval "ac_cv_func__spawnlp=yes"
14868 echo "configure: failed program was:" >&5
14869 cat conftest.$ac_ext >&5
14871 eval "ac_cv_func__spawnlp=no"
14876 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
14877 echo "$ac_t""yes" 1>&6
14878 cat >> confdefs.h <<\EOF
14879 #define HAVE_SPAWNLP 1
14883 echo "$ac_t""no" 1>&6
14887 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
14888 echo "configure:14889: checking for _snprintf" >&5
14889 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
14890 echo $ac_n "(cached) $ac_c" 1>&6
14892 cat > conftest.$ac_ext <<EOF
14893 #line 14894 "configure"
14894 #include "confdefs.h"
14895 /* System header to define __stub macros and hopefully few prototypes,
14896 which can conflict with char _snprintf(); below. */
14897 #include <assert.h>
14898 /* Override any gcc2 internal prototype to avoid an error. */
14899 /* We use char because int might match the return type of a gcc2
14900 builtin and then its argument prototype would still apply. */
14906 /* The GNU C library defines this for functions which it implements
14907 to always fail with ENOSYS. Some functions are actually named
14908 something starting with __ and the normal name is an alias. */
14909 #if defined (__stub__snprintf) || defined (__stub____snprintf)
14917 if { (eval echo configure:14918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14919 eval "ac_cv_func__snprintf=yes"
14921 echo "configure: failed program was:" >&5
14922 cat conftest.$ac_ext >&5
14924 eval "ac_cv_func__snprintf=no"
14929 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
14930 echo "$ac_t""yes" 1>&6
14931 ac_cv_func_snprintf=yes
14932 cat >> confdefs.h <<\EOF
14933 #define snprintf _snprintf
14938 echo "$ac_t""no" 1>&6
14942 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
14943 echo "configure:14944: checking for _vsnprintf" >&5
14944 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
14945 echo $ac_n "(cached) $ac_c" 1>&6
14947 cat > conftest.$ac_ext <<EOF
14948 #line 14949 "configure"
14949 #include "confdefs.h"
14950 /* System header to define __stub macros and hopefully few prototypes,
14951 which can conflict with char _vsnprintf(); below. */
14952 #include <assert.h>
14953 /* Override any gcc2 internal prototype to avoid an error. */
14954 /* We use char because int might match the return type of a gcc2
14955 builtin and then its argument prototype would still apply. */
14961 /* The GNU C library defines this for functions which it implements
14962 to always fail with ENOSYS. Some functions are actually named
14963 something starting with __ and the normal name is an alias. */
14964 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
14972 if { (eval echo configure:14973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14974 eval "ac_cv_func__vsnprintf=yes"
14976 echo "configure: failed program was:" >&5
14977 cat conftest.$ac_ext >&5
14979 eval "ac_cv_func__vsnprintf=no"
14984 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
14985 echo "$ac_t""yes" 1>&6
14986 ac_cv_func_vsnprintf=yes
14987 cat >> confdefs.h <<\EOF
14988 #define vsnprintf _vsnprintf
14993 echo "$ac_t""no" 1>&6
14997 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
14998 echo "configure:14999: checking for vprintf" >&5
14999 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
15000 echo $ac_n "(cached) $ac_c" 1>&6
15002 cat > conftest.$ac_ext <<EOF
15003 #line 15004 "configure"
15004 #include "confdefs.h"
15005 /* System header to define __stub macros and hopefully few prototypes,
15006 which can conflict with char vprintf(); below. */
15007 #include <assert.h>
15008 /* Override any gcc2 internal prototype to avoid an error. */
15009 /* We use char because int might match the return type of a gcc2
15010 builtin and then its argument prototype would still apply. */
15016 /* The GNU C library defines this for functions which it implements
15017 to always fail with ENOSYS. Some functions are actually named
15018 something starting with __ and the normal name is an alias. */
15019 #if defined (__stub_vprintf) || defined (__stub___vprintf)
15027 if { (eval echo configure:15028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15029 eval "ac_cv_func_vprintf=yes"
15031 echo "configure: failed program was:" >&5
15032 cat conftest.$ac_ext >&5
15034 eval "ac_cv_func_vprintf=no"
15039 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
15040 echo "$ac_t""yes" 1>&6
15041 cat >> confdefs.h <<\EOF
15042 #define HAVE_VPRINTF 1
15046 echo "$ac_t""no" 1>&6
15049 if test "$ac_cv_func_vprintf" != yes; then
15050 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
15051 echo "configure:15052: checking for _doprnt" >&5
15052 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
15053 echo $ac_n "(cached) $ac_c" 1>&6
15055 cat > conftest.$ac_ext <<EOF
15056 #line 15057 "configure"
15057 #include "confdefs.h"
15058 /* System header to define __stub macros and hopefully few prototypes,
15059 which can conflict with char _doprnt(); below. */
15060 #include <assert.h>
15061 /* Override any gcc2 internal prototype to avoid an error. */
15062 /* We use char because int might match the return type of a gcc2
15063 builtin and then its argument prototype would still apply. */
15069 /* The GNU C library defines this for functions which it implements
15070 to always fail with ENOSYS. Some functions are actually named
15071 something starting with __ and the normal name is an alias. */
15072 #if defined (__stub__doprnt) || defined (__stub____doprnt)
15080 if { (eval echo configure:15081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15082 eval "ac_cv_func__doprnt=yes"
15084 echo "configure: failed program was:" >&5
15085 cat conftest.$ac_ext >&5
15087 eval "ac_cv_func__doprnt=no"
15092 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
15093 echo "$ac_t""yes" 1>&6
15094 cat >> confdefs.h <<\EOF
15095 #define HAVE_DOPRNT 1
15099 echo "$ac_t""no" 1>&6
15105 if test $ac_cv_func_vprintf = yes ; then
15106 for ac_func in vsnprintf vsprintf
15108 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15109 echo "configure:15110: checking for $ac_func" >&5
15110 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15111 echo $ac_n "(cached) $ac_c" 1>&6
15113 cat > conftest.$ac_ext <<EOF
15114 #line 15115 "configure"
15115 #include "confdefs.h"
15116 /* System header to define __stub macros and hopefully few prototypes,
15117 which can conflict with char $ac_func(); below. */
15118 #include <assert.h>
15119 /* Override any gcc2 internal prototype to avoid an error. */
15120 /* We use char because int might match the return type of a gcc2
15121 builtin and then its argument prototype would still apply. */
15127 /* The GNU C library defines this for functions which it implements
15128 to always fail with ENOSYS. Some functions are actually named
15129 something starting with __ and the normal name is an alias. */
15130 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15138 if { (eval echo configure:15139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15140 eval "ac_cv_func_$ac_func=yes"
15142 echo "configure: failed program was:" >&5
15143 cat conftest.$ac_ext >&5
15145 eval "ac_cv_func_$ac_func=no"
15150 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15151 echo "$ac_t""yes" 1>&6
15152 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15153 cat >> confdefs.h <<EOF
15154 #define $ac_tr_func 1
15158 echo "$ac_t""no" 1>&6
15216 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15217 echo "configure:15218: checking for $ac_func" >&5
15218 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15219 echo $ac_n "(cached) $ac_c" 1>&6
15221 cat > conftest.$ac_ext <<EOF
15222 #line 15223 "configure"
15223 #include "confdefs.h"
15224 /* System header to define __stub macros and hopefully few prototypes,
15225 which can conflict with char $ac_func(); below. */
15226 #include <assert.h>
15227 /* Override any gcc2 internal prototype to avoid an error. */
15228 /* We use char because int might match the return type of a gcc2
15229 builtin and then its argument prototype would still apply. */
15235 /* The GNU C library defines this for functions which it implements
15236 to always fail with ENOSYS. Some functions are actually named
15237 something starting with __ and the normal name is an alias. */
15238 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15246 if { (eval echo configure:15247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15248 eval "ac_cv_func_$ac_func=yes"
15250 echo "configure: failed program was:" >&5
15251 cat conftest.$ac_ext >&5
15253 eval "ac_cv_func_$ac_func=no"
15258 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15259 echo "$ac_t""yes" 1>&6
15260 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15261 cat >> confdefs.h <<EOF
15262 #define $ac_tr_func 1
15266 echo "$ac_t""no" 1>&6
15271 for ac_func in getopt tempnam
15273 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15274 echo "configure:15275: checking for $ac_func" >&5
15275 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15276 echo $ac_n "(cached) $ac_c" 1>&6
15278 cat > conftest.$ac_ext <<EOF
15279 #line 15280 "configure"
15280 #include "confdefs.h"
15281 /* System header to define __stub macros and hopefully few prototypes,
15282 which can conflict with char $ac_func(); below. */
15283 #include <assert.h>
15284 /* Override any gcc2 internal prototype to avoid an error. */
15285 /* We use char because int might match the return type of a gcc2
15286 builtin and then its argument prototype would still apply. */
15292 /* The GNU C library defines this for functions which it implements
15293 to always fail with ENOSYS. Some functions are actually named
15294 something starting with __ and the normal name is an alias. */
15295 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15303 if { (eval echo configure:15304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15305 eval "ac_cv_func_$ac_func=yes"
15307 echo "configure: failed program was:" >&5
15308 cat conftest.$ac_ext >&5
15310 eval "ac_cv_func_$ac_func=no"
15315 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15316 echo "$ac_t""yes" 1>&6
15317 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15318 cat >> confdefs.h <<EOF
15319 #define $ac_tr_func 1
15323 echo "$ac_t""no" 1>&6
15324 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
15330 if test "$ac_cv_func_getopt" != yes; then
15331 LIBSRCS="$LIBSRCS getopt.c"
15334 if test "$ac_cv_func_tempnam" != yes; then
15335 LIBSRCS="$LIBSRCS tempnam.c"
15338 # Check Configuration
15339 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
15340 echo "configure:15341: checking declaration of sys_errlist" >&5
15341 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
15342 echo $ac_n "(cached) $ac_c" 1>&6
15345 cat > conftest.$ac_ext <<EOF
15346 #line 15347 "configure"
15347 #include "confdefs.h"
15350 #include <sys/types.h>
15353 #include <stdlib.h>
15356 char *c = (char *) *sys_errlist
15359 if { (eval echo configure:15360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15361 ol_cv_dcl_sys_errlist=yes
15362 ol_cv_have_sys_errlist=yes
15364 echo "configure: failed program was:" >&5
15365 cat conftest.$ac_ext >&5
15367 ol_cv_dcl_sys_errlist=no
15372 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
15374 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
15375 if test $ol_cv_dcl_sys_errlist = no ; then
15376 cat >> confdefs.h <<\EOF
15377 #define DECL_SYS_ERRLIST 1
15381 echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
15382 echo "configure:15383: checking existence of sys_errlist" >&5
15383 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
15384 echo $ac_n "(cached) $ac_c" 1>&6
15387 cat > conftest.$ac_ext <<EOF
15388 #line 15389 "configure"
15389 #include "confdefs.h"
15392 char *c = (char *) *sys_errlist
15395 if { (eval echo configure:15396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15397 ol_cv_have_sys_errlist=yes
15399 echo "configure: failed program was:" >&5
15400 cat conftest.$ac_ext >&5
15402 ol_cv_have_sys_errlist=no
15407 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
15409 if test $ol_cv_have_sys_errlist = yes ; then
15410 cat >> confdefs.h <<\EOF
15411 #define HAVE_SYS_ERRLIST 1
15418 if test "$ol_enable_debug" != no ; then
15419 cat >> confdefs.h <<\EOF
15420 #define LDAP_DEBUG 1
15424 if test "$ol_enable_syslog" = yes ; then
15425 cat >> confdefs.h <<\EOF
15426 #define LDAP_SYSLOG 1
15430 if test "$ol_enable_libui" = yes ; then
15431 cat >> confdefs.h <<\EOF
15432 #define LDAP_LIBUI 1
15436 if test "$ol_enable_cache" = no ; then
15437 cat >> confdefs.h <<\EOF
15438 #define LDAP_NOCACHE 1
15442 if test "$ol_link_kbind" != no ; then
15443 cat >> confdefs.h <<\EOF
15444 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
15448 if test "$ol_enable_proctitle" != no ; then
15449 cat >> confdefs.h <<\EOF
15450 #define LDAP_PROCTITLE 1
15454 if test "$ol_enable_referrals" != no ; then
15455 cat >> confdefs.h <<\EOF
15456 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
15460 if test "$ol_enable_cldap" != no ; then
15461 cat >> confdefs.h <<\EOF
15462 #define LDAP_CONNECTIONLESS 1
15466 if test "$ol_enable_unix" != no; then
15467 cat >> confdefs.h <<\EOF
15468 #define LDAP_PF_UNIX 1
15472 if test "$ol_enable_ipv6" != no; then
15473 cat >> confdefs.h <<\EOF
15474 #define LDAP_PF_INET6 1
15478 if test "$ol_enable_cleartext" != no ; then
15479 cat >> confdefs.h <<\EOF
15480 #define SLAPD_CLEARTEXT 1
15484 if test "$ol_enable_crypt" != no ; then
15485 cat >> confdefs.h <<\EOF
15486 #define SLAPD_CRYPT 1
15490 if test "$ol_link_kpasswd" != no ; then
15491 cat >> confdefs.h <<\EOF
15492 #define SLAPD_KPASSWD 1
15496 if test "$ol_link_spasswd" != no ; then
15497 cat >> confdefs.h <<\EOF
15498 #define SLAPD_SPASSWD 1
15502 if test "$ol_enable_multimaster" != no ; then
15503 cat >> confdefs.h <<\EOF
15504 #define SLAPD_MULTIMASTER 1
15508 if test "$ol_enable_phonetic" != no ; then
15509 cat >> confdefs.h <<\EOF
15510 #define SLAPD_PHONETIC 1
15514 if test "$ol_enable_rlookups" != no ; then
15515 cat >> confdefs.h <<\EOF
15516 #define SLAPD_RLOOKUPS 1
15520 if test "$ol_enable_aci" != no ; then
15521 cat >> confdefs.h <<\EOF
15522 #define SLAPD_ACI_ENABLED 1
15527 if test "$ol_link_modules" != no ; then
15528 cat >> confdefs.h <<\EOF
15529 #define SLAPD_MODULES 1
15533 SLAPD_MODULES_LDFLAGS="-dlopen self"
15536 if test "$ol_link_dnssrv" != no ; then
15537 cat >> confdefs.h <<\EOF
15538 #define SLAPD_DNSSRV 1
15543 if test "$ol_with_dnssrv_module" != static ; then
15544 cat >> confdefs.h <<\EOF
15545 #define SLAPD_DNSSRV_DYNAMIC 1
15549 BUILD_DNSSRV_DYNAMIC=shared
15550 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
15554 if test "$ol_enable_ldap" != no ; then
15555 cat >> confdefs.h <<\EOF
15556 #define SLAPD_LDAP 1
15561 if test "$ol_with_ldap_module" != static ; then
15562 cat >> confdefs.h <<\EOF
15563 #define SLAPD_LDAP_DYNAMIC 1
15567 BUILD_LDAP_DYNAMIC=shared
15568 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
15572 if test "$ol_link_ldbm" != no ; then
15573 cat >> confdefs.h <<\EOF
15574 #define SLAPD_LDBM 1
15579 if test "$ol_with_ldbm_module" != static ; then
15580 cat >> confdefs.h <<\EOF
15581 #define SLAPD_LDBM_DYNAMIC 1
15585 BUILD_LDBM_DYNAMIC=shared
15586 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
15590 if test "$ol_enable_passwd" != no ; then
15591 cat >> confdefs.h <<\EOF
15592 #define SLAPD_PASSWD 1
15597 if test "$ol_with_passwd_module" != static ; then
15598 cat >> confdefs.h <<\EOF
15599 #define SLAPD_PASSWD_DYNAMIC 1
15603 BUILD_PASSWD_DYNAMIC=shared
15604 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
15608 if test "$ol_enable_shell" != no ; then
15609 cat >> confdefs.h <<\EOF
15610 #define SLAPD_SHELL 1
15615 if test "$ol_with_shell_module" != static ; then
15616 cat >> confdefs.h <<\EOF
15617 #define SLAPD_SHELL_DYNAMIC 1
15621 BUILD_SHELL_DYNAMIC=shared
15622 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
15626 if test "$ol_enable_sql" != no ; then
15627 cat >> confdefs.h <<\EOF
15628 #define SLAPD_SQL 1
15633 SLAPD_SQL_LIBS=-liodbc
15634 if test "$ol_with_sql_module" != static; then
15635 cat >> confdefs.h <<\EOF
15636 #define SLAPD_SQL_DYNAMIC 1
15640 BUILD_SQL_DYNAMIC=shared
15641 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
15645 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
15646 $BUILD_SLAPD = yes ; then
15651 if test "$LINK_BINS_DYNAMIC" = yes; then
15653 LT_LIB_LINKAGE=shared
15656 LT_LIB_LINKAGE=static
15659 if test "$ac_cv_mingw32" = yes ; then
15719 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15721 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15722 # Let make expand exec_prefix.
15723 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15725 # Any assignment to VPATH causes Sun make to only execute
15726 # the first set of double-colon rules, so remove it if not needed.
15727 # If there is a colon in the path, we need to keep it.
15728 if test "x$srcdir" = x.; then
15729 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
15732 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15734 DEFS=-DHAVE_CONFIG_H
15736 # Without the "./", some shells look in PATH for config.status.
15737 : ${CONFIG_STATUS=./config.status}
15739 echo creating $CONFIG_STATUS
15740 rm -f $CONFIG_STATUS
15741 cat > $CONFIG_STATUS <<EOF
15743 # Generated automatically by configure.
15744 # Run this file to recreate the current configuration.
15745 # This directory was configured as follows,
15746 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15748 # $0 $ac_configure_args
15750 # Compiler output produced by configure, useful for debugging
15751 # configure, is in ./config.log if it exists.
15753 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15756 case "\$ac_option" in
15757 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15758 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15759 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15760 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15761 echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
15763 -help | --help | --hel | --he | --h)
15764 echo "\$ac_cs_usage"; exit 0 ;;
15765 *) echo "\$ac_cs_usage"; exit 1 ;;
15769 ac_given_srcdir=$srcdir
15770 ac_given_INSTALL="$INSTALL"
15772 trap 'rm -fr `echo "\
15773 Makefile:build/top.mk:Makefile.in:build/dir.mk \
15774 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
15775 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
15776 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
15777 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
15778 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
15779 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
15780 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
15781 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
15782 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
15783 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
15784 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
15785 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
15786 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
15787 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
15788 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
15789 include/Makefile:build/top.mk:include/Makefile.in \
15790 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk \
15791 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk \
15792 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk \
15793 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk \
15794 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk \
15795 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk \
15796 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk \
15797 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk \
15798 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk \
15799 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
15800 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
15801 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
15802 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
15803 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
15804 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
15805 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
15806 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
15807 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
15808 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
15809 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
15810 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
15811 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
15812 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
15813 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
15814 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
15815 include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15817 cat >> $CONFIG_STATUS <<EOF
15819 # Protect against being on the right side of a sed subst in config.status.
15820 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
15821 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
15825 s%@CFLAGS@%$CFLAGS%g
15826 s%@CPPFLAGS@%$CPPFLAGS%g
15827 s%@CXXFLAGS@%$CXXFLAGS%g
15828 s%@FFLAGS@%$FFLAGS%g
15830 s%@LDFLAGS@%$LDFLAGS%g
15832 s%@exec_prefix@%$exec_prefix%g
15833 s%@prefix@%$prefix%g
15834 s%@program_transform_name@%$program_transform_name%g
15835 s%@bindir@%$bindir%g
15836 s%@sbindir@%$sbindir%g
15837 s%@libexecdir@%$libexecdir%g
15838 s%@datadir@%$datadir%g
15839 s%@sysconfdir@%$sysconfdir%g
15840 s%@sharedstatedir@%$sharedstatedir%g
15841 s%@localstatedir@%$localstatedir%g
15842 s%@libdir@%$libdir%g
15843 s%@includedir@%$includedir%g
15844 s%@oldincludedir@%$oldincludedir%g
15845 s%@infodir@%$infodir%g
15846 s%@mandir@%$mandir%g
15848 s%@host_alias@%$host_alias%g
15849 s%@host_cpu@%$host_cpu%g
15850 s%@host_vendor@%$host_vendor%g
15851 s%@host_os@%$host_os%g
15852 s%@target@%$target%g
15853 s%@target_alias@%$target_alias%g
15854 s%@target_cpu@%$target_cpu%g
15855 s%@target_vendor@%$target_vendor%g
15856 s%@target_os@%$target_os%g
15858 s%@build_alias@%$build_alias%g
15859 s%@build_cpu@%$build_cpu%g
15860 s%@build_vendor@%$build_vendor%g
15861 s%@build_os@%$build_os%g
15862 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
15863 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
15864 s%@INSTALL_DATA@%$INSTALL_DATA%g
15865 s%@PACKAGE@%$PACKAGE%g
15866 s%@VERSION@%$VERSION%g
15867 s%@ACLOCAL@%$ACLOCAL%g
15868 s%@AUTOCONF@%$AUTOCONF%g
15869 s%@AUTOMAKE@%$AUTOMAKE%g
15870 s%@AUTOHEADER@%$AUTOHEADER%g
15871 s%@MAKEINFO@%$MAKEINFO%g
15872 s%@install_sh@%$install_sh%g
15875 s%@AMTARFLAGS@%$AMTARFLAGS%g
15876 s%@SET_MAKE@%$SET_MAKE%g
15877 s%@top_builddir@%$top_builddir%g
15878 s%@ldap_subdir@%$ldap_subdir%g
15880 s%@RANLIB@%$RANLIB%g
15882 s%@DLLTOOL@%$DLLTOOL%g
15884 s%@OBJDUMP@%$OBJDUMP%g
15885 s%@LIBTOOL@%$LIBTOOL%g
15887 s%@SENDMAIL@%$SENDMAIL%g
15888 s%@EDITOR@%$EDITOR%g
15889 s%@FINGER@%$FINGER%g
15891 s%@EXEEXT@%$EXEEXT%g
15892 s%@OBJEXT@%$OBJEXT%g
15893 s%@OL_MKDEP@%$OL_MKDEP%g
15894 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
15895 s%@LIBOBJS@%$LIBOBJS%g
15896 s%@LIBSRCS@%$LIBSRCS%g
15898 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
15899 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
15900 s%@DYN_EXT@%$DYN_EXT%g
15901 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
15902 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
15903 s%@BUILD_LDAP@%$BUILD_LDAP%g
15904 s%@BUILD_LDBM@%$BUILD_LDBM%g
15905 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
15906 s%@BUILD_SHELL@%$BUILD_SHELL%g
15907 s%@BUILD_SQL@%$BUILD_SQL%g
15908 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
15909 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
15910 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
15911 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
15912 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
15913 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
15914 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
15915 s%@LDAP_LIBS@%$LDAP_LIBS%g
15916 s%@LDIF_LIBS@%$LDIF_LIBS%g
15917 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
15918 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
15919 s%@LDBM_LIBS@%$LDBM_LIBS%g
15920 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
15921 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
15922 s%@WRAP_LIBS@%$WRAP_LIBS%g
15923 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
15924 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
15925 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
15926 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
15927 s%@KRB4_LIBS@%$KRB4_LIBS%g
15928 s%@KRB5_LIBS@%$KRB5_LIBS%g
15929 s%@READLINE_LIBS@%$READLINE_LIBS%g
15930 s%@SASL_LIBS@%$SASL_LIBS%g
15931 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
15932 s%@TLS_LIBS@%$TLS_LIBS%g
15933 s%@MODULES_LIBS@%$MODULES_LIBS%g
15934 s%@AUTH_LIBS@%$AUTH_LIBS%g
15935 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
15936 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
15937 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
15942 cat >> $CONFIG_STATUS <<\EOF
15944 # Split the substitutions into bite-sized pieces for seds with
15945 # small command number limits, like on Digital OSF/1 and HP-UX.
15946 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
15947 ac_file=1 # Number of current file.
15948 ac_beg=1 # First line for current file.
15949 ac_end=$ac_max_sed_cmds # Line after last line for current file.
15952 while $ac_more_lines; do
15953 if test $ac_beg -gt 1; then
15954 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
15956 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
15958 if test ! -s conftest.s$ac_file; then
15959 ac_more_lines=false
15960 rm -f conftest.s$ac_file
15962 if test -z "$ac_sed_cmds"; then
15963 ac_sed_cmds="sed -f conftest.s$ac_file"
15965 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
15967 ac_file=`expr $ac_file + 1`
15969 ac_end=`expr $ac_end + $ac_max_sed_cmds`
15972 if test -z "$ac_sed_cmds"; then
15977 cat >> $CONFIG_STATUS <<EOF
15979 CONFIG_FILES=\${CONFIG_FILES-"\
15980 Makefile:build/top.mk:Makefile.in:build/dir.mk \
15981 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
15982 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
15983 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
15984 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
15985 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
15986 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
15987 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
15988 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
15989 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
15990 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
15991 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
15992 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
15993 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
15994 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
15995 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
15996 include/Makefile:build/top.mk:include/Makefile.in \
15997 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk \
15998 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk \
15999 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk \
16000 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk \
16001 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk \
16002 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk \
16003 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk \
16004 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk \
16005 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk \
16006 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16007 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16008 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16009 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16010 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16011 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16012 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16013 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16014 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16015 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16016 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16017 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16018 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16019 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16020 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16021 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16024 cat >> $CONFIG_STATUS <<\EOF
16025 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16026 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16028 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16029 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16030 *) ac_file_in="${ac_file}.in" ;;
16033 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16035 # Remove last slash and all that follows it. Not all systems have dirname.
16036 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16037 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16038 # The file is in a subdirectory.
16039 test ! -d "$ac_dir" && mkdir "$ac_dir"
16040 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16041 # A "../" for each directory in $ac_dir_suffix.
16042 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16044 ac_dir_suffix= ac_dots=
16047 case "$ac_given_srcdir" in
16049 if test -z "$ac_dots"; then top_srcdir=.
16050 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16051 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16052 *) # Relative path.
16053 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16054 top_srcdir="$ac_dots$ac_given_srcdir" ;;
16057 case "$ac_given_INSTALL" in
16058 [/$]*) INSTALL="$ac_given_INSTALL" ;;
16059 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16062 echo creating "$ac_file"
16064 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16066 *[Mm]akefile*) ac_comsub="1i\\
16067 # $configure_input" ;;
16071 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16073 s%@configure_input@%$configure_input%g
16074 s%@srcdir@%$srcdir%g
16075 s%@top_srcdir@%$top_srcdir%g
16076 s%@INSTALL@%$INSTALL%g
16077 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16081 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16082 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16084 # ac_d sets the value in "#define NAME VALUE" lines.
16085 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
16086 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
16089 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16090 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
16091 ac_uB='\([ ]\)%\1#\2define\3'
16094 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16095 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
16096 ac_eB='$%\1#\2define\3'
16100 if test "${CONFIG_HEADERS+set}" != set; then
16102 cat >> $CONFIG_STATUS <<EOF
16103 CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
16105 cat >> $CONFIG_STATUS <<\EOF
16107 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16108 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16110 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16111 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16112 *) ac_file_in="${ac_file}.in" ;;
16115 echo creating $ac_file
16117 rm -f conftest.frag conftest.in conftest.out
16118 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16119 cat $ac_file_inputs > conftest.in
16123 # Transform confdefs.h into a sed script conftest.vals that substitutes
16124 # the proper values into config.h.in to produce config.h. And first:
16125 # Protect against being on the right side of a sed subst in config.status.
16126 # Protect against being in an unquoted here document in config.status.
16127 rm -f conftest.vals
16128 cat > conftest.hdr <<\EOF
16131 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16135 sed -n -f conftest.hdr confdefs.h > conftest.vals
16138 # This sed command replaces #undef with comments. This is necessary, for
16139 # example, in the case of _POSIX_SOURCE, which is predefined and required
16140 # on some systems where configure will not decide to define it.
16141 cat >> conftest.vals <<\EOF
16142 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16145 # Break up conftest.vals because some shells have a limit on
16146 # the size of here documents, and old seds have small limits too.
16148 rm -f conftest.tail
16151 ac_lines=`grep -c . conftest.vals`
16152 # grep -c gives empty output for an empty file on some AIX systems.
16153 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16154 # Write a limited-size here document to conftest.frag.
16155 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16156 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16158 sed -f conftest.frag conftest.in > conftest.out
16160 mv conftest.out conftest.in
16161 ' >> $CONFIG_STATUS
16162 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16163 rm -f conftest.vals
16164 mv conftest.tail conftest.vals
16166 rm -f conftest.vals
16168 cat >> $CONFIG_STATUS <<\EOF
16169 rm -f conftest.frag conftest.h
16170 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
16171 cat conftest.in >> conftest.h
16173 if cmp -s $ac_file conftest.h 2>/dev/null; then
16174 echo "$ac_file is unchanged"
16177 # Remove last slash and all that follows it. Not all systems have dirname.
16178 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16179 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16180 # The file is in a subdirectory.
16181 test ! -d "$ac_dir" && mkdir "$ac_dir"
16184 mv conftest.h $ac_file
16189 cat >> $CONFIG_STATUS <<EOF
16192 cat >> $CONFIG_STATUS <<\EOF
16195 echo Please \"make depend\" to build dependencies
16199 chmod +x $CONFIG_STATUS
16200 rm -fr confdefs* $ac_clean_files
16201 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1