3 # from OpenLDAP: pkg/ldap/configure.in,v 1.223.2.37 2002/01/04 20:38:05 kurt Exp
5 # Copyright 1998-2002 The OpenLDAP Foundation. All Rights Reserved.
7 # Redistribution and use in source and binary forms, with or without
8 # modification, are permitted only as authorized by the OpenLDAP
9 # Public License. A copy of this license is available at
10 # http://www.OpenLDAP.org/license.html or in file LICENSE in the
11 # top-level directory of the distribution.
13 echo "Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved."
14 echo "Restrictions apply, see COPYRIGHT and LICENSE files."
16 # Guess values for system-dependent variables and create Makefiles.
17 # Generated automatically using autoconf version 2.13.1
18 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
20 # This configure script is free software; the Free Software Foundation
21 # gives unlimited permission to copy, distribute and modify it.
25 ac_default_prefix=/usr/local
26 # Any additions from configure.in:
27 ac_default_prefix=/usr/local
29 --with-subdir=DIR change default subdirectory used for installs"
31 --enable-debug enable debugging [yes]"
33 --enable-syslog enable syslog support [auto]"
35 --enable-proctitle enable proctitle support [yes]"
37 --enable-cache enable caching (experimental) [no]"
39 --enable-referrals enable LDAPv2+ Referrals (experimental) [no]"
41 --enable-kbind enable LDAPv2+ Kerberos IV bind (deprecated) [no]"
43 --enable-ipv6 enable IPv6 support [auto]"
45 --enable-local enable AF_LOCAL (AF_UNIX) socket support [auto]"
47 --enable-x-compile enable cross compiling [no]"
49 --with-cyrus-sasl with Cyrus SASL support [auto]"
51 --with-fetch with fetch URL support [auto]"
53 --with-kerberos with Kerberos support [auto]"
55 --with-readline with readline support [auto]"
57 --with-threads with threads [auto]"
59 --with-tls with TLS/SSL support [auto]"
61 --with-yielding-select with implicitly yielding select [auto]"
63 SLAPD (Standalone LDAP Daemon) Options:"
65 --enable-slapd enable building slapd [yes]"
67 --enable-cleartext enable cleartext passwords [yes]"
69 --enable-crypt enable crypt(3) passwords [auto]"
71 --enable-kpasswd enable kerberos password verification [no]"
73 --enable-spasswd enable (Cyrus) SASL password verification [no]"
75 --enable-modules enable dynamic module support [no]"
77 --enable-phonetic enable phonetic/soundex [no]"
79 --enable-rlookups enable reverse lookups [no]"
81 --enable-aci enable per-object ACIs [no]"
83 --enable-wrappers enable tcp wrapper support [no]"
85 --enable-dynamic enable linking built binaries with dynamic libs [no]"
87 --enable-dnssrv enable dnssrv backend [no]"
89 --with-dnssrv-module module type [static]"
91 --enable-ldap enable ldap backend [no]"
93 --with-ldap-module module type [static]"
95 --enable-ldbm enable ldbm backend [yes]"
97 --with-ldbm-api with LDBM API [auto]"
99 --with-ldbm-module module type [static]"
101 --with-ldbm-type use LDBM type [auto]"
103 --enable-passwd enable passwd backend [no]"
105 --with-passwd-module module type [static]"
107 --enable-shell enable shell backend [no]"
109 --with-shell-module module type [static]"
111 --enable-sql enable sql backend [no]"
113 --with-sql-module module type [static]"
115 SLURPD (Replication Daemon) Options:"
117 --enable-slurpd enable building slurpd [auto]"
119 Library Generation & Linking Options"
121 --enable-static[=PKGS] build static libraries [default=yes]"
123 --enable-shared[=PKGS] build shared libraries [default=yes]"
125 --enable-fast-install[=PKGS] optimize for fast installation [default=yes]"
127 --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
129 --disable-libtool-lock avoid locking (might break parallel builds)"
131 # Initialize some variables set by options.
132 # The variables have the same names as the options, with
133 # dashes changed to underlines.
135 cache_file=./config.cache
144 program_transform_name=s,x,x,
152 bindir='${exec_prefix}/bin'
153 sbindir='${exec_prefix}/sbin'
154 libexecdir='${exec_prefix}/libexec'
155 datadir='${prefix}/share'
156 sysconfdir='${prefix}/etc'
157 sharedstatedir='${prefix}/com'
158 localstatedir='${prefix}/var'
159 libdir='${exec_prefix}/lib'
160 includedir='${prefix}/include'
161 oldincludedir='/usr/include'
162 infodir='${prefix}/info'
163 mandir='${prefix}/man'
165 # Initialize some other variables.
168 SHELL=${CONFIG_SHELL-/bin/sh}
169 # Maximum number of lines to put in a shell here document.
176 # If the previous option needs an argument, assign it.
177 if test -n "$ac_prev"; then
178 eval "$ac_prev=\$ac_option"
184 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
188 # Accept the important Cygnus configure options, so we can diagnose typos.
192 -bindir | --bindir | --bindi | --bind | --bin | --bi)
194 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
195 bindir="$ac_optarg" ;;
197 -build | --build | --buil | --bui | --bu)
199 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
200 build="$ac_optarg" ;;
202 -cache-file | --cache-file | --cache-fil | --cache-fi \
203 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
204 ac_prev=cache_file ;;
205 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
206 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
207 cache_file="$ac_optarg" ;;
209 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
211 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
213 datadir="$ac_optarg" ;;
215 -disable-* | --disable-*)
216 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
217 # Reject names that are not valid shell variable names.
218 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
219 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
221 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
222 eval "enable_${ac_feature}=no" ;;
224 -enable-* | --enable-*)
225 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
226 # Reject names that are not valid shell variable names.
227 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
228 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
230 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
235 eval "enable_${ac_feature}='$ac_optarg'" ;;
237 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
238 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
239 | --exec | --exe | --ex)
240 ac_prev=exec_prefix ;;
241 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
242 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
243 | --exec=* | --exe=* | --ex=*)
244 exec_prefix="$ac_optarg" ;;
246 -gas | --gas | --ga | --g)
247 # Obsolete; use --with-gas.
250 -help | --help | --hel | --he)
251 # Omit some internal or obsolete options to make the list less imposing.
252 # This message is too long to be a string in the A/UX 3.1 sh.
254 Usage: configure [options] [host]
255 Options: [defaults in brackets after descriptions]
257 --cache-file=FILE cache test results in FILE
258 --help print this message
259 --no-create do not create output files
260 --quiet, --silent do not print \`checking...' messages
261 --version print the version of autoconf that created configure
262 Directory and file names:
263 --prefix=PREFIX install architecture-independent files in PREFIX
265 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
267 --bindir=DIR user executables in DIR [EPREFIX/bin]
268 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
269 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
270 --datadir=DIR read-only architecture-independent data in DIR
272 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
273 --sharedstatedir=DIR modifiable architecture-independent data in DIR
275 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
276 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
277 --includedir=DIR C header files in DIR [PREFIX/include]
278 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
279 --infodir=DIR info documentation in DIR [PREFIX/info]
280 --mandir=DIR man documentation in DIR [PREFIX/man]
281 --srcdir=DIR find the sources in DIR [configure dir or ..]
282 --program-prefix=PREFIX prepend PREFIX to installed program names
283 --program-suffix=SUFFIX append SUFFIX to installed program names
284 --program-transform-name=PROGRAM
285 run sed PROGRAM on installed program names
289 --build=BUILD configure for building on BUILD [BUILD=HOST]
290 --host=HOST configure for HOST [guessed]
291 --target=TARGET configure for TARGET [TARGET=HOST]
292 Features and packages:
293 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
294 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
295 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
296 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
297 --x-includes=DIR X include files are in DIR
298 --x-libraries=DIR X library files are in DIR
300 if test -n "$ac_help"; then
301 echo "--enable and --with options recognized:$ac_help"
305 -host | --host | --hos | --ho)
307 -host=* | --host=* | --hos=* | --ho=*)
310 -includedir | --includedir | --includedi | --included | --include \
311 | --includ | --inclu | --incl | --inc)
312 ac_prev=includedir ;;
313 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
314 | --includ=* | --inclu=* | --incl=* | --inc=*)
315 includedir="$ac_optarg" ;;
317 -infodir | --infodir | --infodi | --infod | --info | --inf)
319 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
320 infodir="$ac_optarg" ;;
322 -libdir | --libdir | --libdi | --libd)
324 -libdir=* | --libdir=* | --libdi=* | --libd=*)
325 libdir="$ac_optarg" ;;
327 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
328 | --libexe | --libex | --libe)
329 ac_prev=libexecdir ;;
330 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
331 | --libexe=* | --libex=* | --libe=*)
332 libexecdir="$ac_optarg" ;;
334 -localstatedir | --localstatedir | --localstatedi | --localstated \
335 | --localstate | --localstat | --localsta | --localst \
336 | --locals | --local | --loca | --loc | --lo)
337 ac_prev=localstatedir ;;
338 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
339 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
340 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
341 localstatedir="$ac_optarg" ;;
343 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
345 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
346 mandir="$ac_optarg" ;;
349 # Obsolete; use --without-fp.
352 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
356 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
357 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
360 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
361 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
362 | --oldin | --oldi | --old | --ol | --o)
363 ac_prev=oldincludedir ;;
364 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
365 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
366 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
367 oldincludedir="$ac_optarg" ;;
369 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
371 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
372 prefix="$ac_optarg" ;;
374 -program-prefix | --program-prefix | --program-prefi | --program-pref \
375 | --program-pre | --program-pr | --program-p)
376 ac_prev=program_prefix ;;
377 -program-prefix=* | --program-prefix=* | --program-prefi=* \
378 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
379 program_prefix="$ac_optarg" ;;
381 -program-suffix | --program-suffix | --program-suffi | --program-suff \
382 | --program-suf | --program-su | --program-s)
383 ac_prev=program_suffix ;;
384 -program-suffix=* | --program-suffix=* | --program-suffi=* \
385 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
386 program_suffix="$ac_optarg" ;;
388 -program-transform-name | --program-transform-name \
389 | --program-transform-nam | --program-transform-na \
390 | --program-transform-n | --program-transform- \
391 | --program-transform | --program-transfor \
392 | --program-transfo | --program-transf \
393 | --program-trans | --program-tran \
394 | --progr-tra | --program-tr | --program-t)
395 ac_prev=program_transform_name ;;
396 -program-transform-name=* | --program-transform-name=* \
397 | --program-transform-nam=* | --program-transform-na=* \
398 | --program-transform-n=* | --program-transform-=* \
399 | --program-transform=* | --program-transfor=* \
400 | --program-transfo=* | --program-transf=* \
401 | --program-trans=* | --program-tran=* \
402 | --progr-tra=* | --program-tr=* | --program-t=*)
403 program_transform_name="$ac_optarg" ;;
405 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
406 | -silent | --silent | --silen | --sile | --sil)
409 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
411 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
413 sbindir="$ac_optarg" ;;
415 -sharedstatedir | --sharedstatedir | --sharedstatedi \
416 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
417 | --sharedst | --shareds | --shared | --share | --shar \
419 ac_prev=sharedstatedir ;;
420 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
421 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
422 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
424 sharedstatedir="$ac_optarg" ;;
426 -site | --site | --sit)
428 -site=* | --site=* | --sit=*)
431 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
433 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
434 srcdir="$ac_optarg" ;;
436 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
437 | --syscon | --sysco | --sysc | --sys | --sy)
438 ac_prev=sysconfdir ;;
439 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
440 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
441 sysconfdir="$ac_optarg" ;;
443 -target | --target | --targe | --targ | --tar | --ta | --t)
445 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
446 target="$ac_optarg" ;;
448 -v | -verbose | --verbose | --verbos | --verbo | --verb)
451 -version | --version | --versio | --versi | --vers)
452 echo "configure generated by autoconf version 2.13.1"
456 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
457 # Reject names that are not valid shell variable names.
458 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
459 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
461 ac_package=`echo $ac_package| sed 's/-/_/g'`
466 eval "with_${ac_package}='$ac_optarg'" ;;
468 -without-* | --without-*)
469 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
470 # Reject names that are not valid shell variable names.
471 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
472 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
474 ac_package=`echo $ac_package| sed 's/-/_/g'`
475 eval "with_${ac_package}=no" ;;
478 # Obsolete; use --with-x.
481 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
482 | --x-incl | --x-inc | --x-in | --x-i)
483 ac_prev=x_includes ;;
484 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
485 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
486 x_includes="$ac_optarg" ;;
488 -x-libraries | --x-libraries | --x-librarie | --x-librari \
489 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
490 ac_prev=x_libraries ;;
491 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
492 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
493 x_libraries="$ac_optarg" ;;
495 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
499 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
500 echo "configure: warning: $ac_option: invalid host type" 1>&2
502 if test "x$nonopt" != xNONE; then
503 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
511 if test -n "$ac_prev"; then
512 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
515 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
517 # File descriptor usage:
520 # 2 errors and warnings
521 # 3 some systems may open it to /dev/tty
522 # 4 used on the Kubota Titan
523 # 6 checking for... messages and results
524 # 5 compiler messages saved in config.log
525 if test "$silent" = yes; then
533 This file contains any messages produced by compilers while
534 running configure, to aid debugging if configure makes a mistake.
537 # Strip out --no-create and --no-recursion so they do not pile up.
538 # Also quote any args containing shell metacharacters.
543 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
544 | --no-cr | --no-c) ;;
545 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
546 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
547 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
548 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
549 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
554 # Only set these to C if already set. These must not be set unconditionally
555 # because not all systems understand e.g. LANG=C (notably SCO).
556 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
557 # Non-C LC_CTYPE values break the ctype check.
558 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
559 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
560 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
561 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
563 # confdefs.h avoids OS command line length limits that DEFS can exceed.
564 rm -rf conftest* confdefs.h
565 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
568 # A filename unique to this package, relative to the directory that
569 # configure is in, which we can look for to find out if srcdir is correct.
570 ac_unique_file=build/version
572 # Find the source files, if location was not specified.
573 if test -z "$srcdir"; then
574 ac_srcdir_defaulted=yes
575 # Try the directory containing this script, then its parent.
577 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
578 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
580 if test ! -r $srcdir/$ac_unique_file; then
584 ac_srcdir_defaulted=no
586 if test ! -r $srcdir/$ac_unique_file; then
587 if test "$ac_srcdir_defaulted" = yes; then
588 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
590 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
593 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
595 # Prefer explicitly selected file to automatically selected ones.
596 if test -z "$CONFIG_SITE"; then
597 if test "x$prefix" != xNONE; then
598 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
600 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
603 for ac_site_file in $CONFIG_SITE; do
604 if test -r "$ac_site_file"; then
605 echo "loading site script $ac_site_file"
612 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
613 ac_cpp='$CPP $CPPFLAGS'
614 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
615 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
616 cross_compiling=$ac_cv_prog_cc_cross
620 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
621 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
622 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
629 ac_n= ac_c='\c' ac_t=
633 # set unset (borrowed from autoconf 2.49c)
634 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
640 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
643 for ac_dir in build $srcdir/build; do
644 if test -f $ac_dir/install-sh; then
646 ac_install_sh="$ac_aux_dir/install-sh -c"
648 elif test -f $ac_dir/install.sh; then
650 ac_install_sh="$ac_aux_dir/install.sh -c"
652 elif test -f $ac_dir/shtool; then
654 ac_install_sh="$ac_aux_dir/shtool install -c"
658 if test -z "$ac_aux_dir"; then
659 { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
661 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
662 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
663 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
665 OL_VERSION=`cat $ac_aux_dir/version`
666 if test -z "$OL_VERSION"; then
667 { echo "configure: error: could not determine version" 1>&2; exit 1; }
670 echo "Configuring OpenLDAP $OL_VERSION ..."
673 echo $ac_n "checking host system type""... $ac_c" 1>&6
674 echo "configure:675: checking host system type" >&5
675 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
677 # Make sure we can run config.sub.
678 if $ac_config_sub sun4 >/dev/null 2>&1; then :
679 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
682 ac_cv_host_alias=$host
683 case "$ac_cv_host_alias" in
687 if ac_cv_host_alias=`$ac_config_guess`; then :
688 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
690 *) ac_cv_host_alias=$nonopt ;;
694 ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
695 ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
696 ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
697 ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
699 echo $ac_n "(cached) $ac_c" 1>&6
702 echo "$ac_t""$ac_cv_host" 1>&6
705 host_alias=$ac_cv_host_alias
706 host_cpu=$ac_cv_host_cpu
707 host_vendor=$ac_cv_host_vendor
708 host_os=$ac_cv_host_os
714 echo $ac_n "checking target system type""... $ac_c" 1>&6
715 echo "configure:716: checking target system type" >&5
716 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
718 # Make sure we can run config.sub.
719 if $ac_config_sub sun4 >/dev/null 2>&1; then :
720 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
723 ac_cv_target_alias=$target
724 case "$ac_cv_target_alias" in
728 ac_cv_target_alias=$host_alias ;;
730 *) ac_cv_target_alias=$nonopt ;;
734 ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
735 ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
736 ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
737 ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
739 echo $ac_n "(cached) $ac_c" 1>&6
742 echo "$ac_t""$ac_cv_target" 1>&6
745 target_alias=$ac_cv_target_alias
746 target_cpu=$ac_cv_target_cpu
747 target_vendor=$ac_cv_target_vendor
748 target_os=$ac_cv_target_os
754 echo $ac_n "checking build system type""... $ac_c" 1>&6
755 echo "configure:756: checking build system type" >&5
756 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
758 # Make sure we can run config.sub.
759 if $ac_config_sub sun4 >/dev/null 2>&1; then :
760 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
763 ac_cv_build_alias=$build
764 case "$ac_cv_build_alias" in
768 ac_cv_build_alias=$host_alias ;;
770 *) ac_cv_build_alias=$nonopt ;;
774 ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
775 ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
776 ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
777 ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
779 echo $ac_n "(cached) $ac_c" 1>&6
782 echo "$ac_t""$ac_cv_build" 1>&6
785 build_alias=$ac_cv_build_alias
786 build_cpu=$ac_cv_build_cpu
787 build_vendor=$ac_cv_build_vendor
788 build_os=$ac_cv_build_os
794 # Do some error checking and defaulting for the host and target type.
796 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
799 # 1. You are not allowed to specify --host, --target, and nonopt at the
801 # 2. Host defaults to nonopt.
802 # 3. If nonopt is not specified, then host defaults to the current host,
803 # as determined by config.guess.
804 # 4. Target and build default to nonopt.
805 # 5. If nonopt is not specified, then target and build default to host.
807 # The aliases save the names the user supplied, while $host etc.
808 # will get canonicalized.
809 case $host---$target---$nonopt in
810 NONE---*---* | *---NONE---* | *---*---NONE) ;;
811 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
814 test "$host_alias" != "$target_alias" &&
815 test "$program_prefix$program_suffix$program_transform_name" = \
817 program_prefix=${target_alias}-
820 # Find a good install program. We prefer a C program (faster),
821 # so one script is as good as another. But avoid the broken or
822 # incompatible versions:
823 # SysV /etc/install, /usr/sbin/install
824 # SunOS /usr/etc/install
827 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
828 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
829 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
830 # ./install, which can be erroneously created by make from ./install.sh.
831 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
832 echo "configure:833: checking for a BSD compatible install" >&5
833 if test -z "$INSTALL"; then
834 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
835 echo $ac_n "(cached) $ac_c" 1>&6
837 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
838 for ac_dir in $PATH; do
839 # Account for people who put trailing slashes in PATH elements.
841 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
843 # OSF1 and SCO ODT 3.0 have their own names for install.
844 # Don't use installbsd from OSF since it installs stuff as root
846 for ac_prog in ginstall scoinst install; do
847 if test -f $ac_dir/$ac_prog; then
848 if test $ac_prog = install &&
849 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
850 # AIX install. It has an incompatible calling convention.
852 elif test $ac_prog = install &&
853 grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
854 # program-specific install script used by HP pwplus--don't use.
857 ac_cv_path_install="$ac_dir/$ac_prog -c"
868 if test "${ac_cv_path_install+set}" = set; then
869 INSTALL="$ac_cv_path_install"
871 # As a last resort, use the slow shell script. We don't cache a
872 # path for INSTALL within a source directory, because that will
873 # break other packages using the cache if that directory is
874 # removed, or if the path is relative.
875 INSTALL="$ac_install_sh"
878 echo "$ac_t""$INSTALL" 1>&6
880 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
881 # It thinks the first close brace ends the variable substitution.
882 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
884 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
886 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
888 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
889 echo "configure:890: checking whether build environment is sane" >&5
892 echo timestamp > conftestfile
893 # Do `set' in a subshell so we don't clobber the current shell's
894 # arguments. Must try -L first in case configure is actually a
895 # symlink; some systems play weird games with the mod time of symlinks
896 # (eg FreeBSD returns the mod time of the symlink's containing
899 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
900 if test "$*" = "X"; then
902 set X `ls -t $srcdir/configure conftestfile`
904 if test "$*" != "X $srcdir/configure conftestfile" \
905 && test "$*" != "X conftestfile $srcdir/configure"; then
907 # If neither matched, then we have a broken ls. This can happen
908 # if, for instance, CONFIG_SHELL is bash and it inherits a
909 # broken ls alias from the environment. This has actually
910 # happened. Such a system could not be considered "sane".
911 { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
912 alias in your environment" 1>&2; exit 1; }
915 test "$2" = conftestfile
921 { echo "configure: error: newly created file is older than distributed files!
922 Check your system clock" 1>&2; exit 1; }
925 echo "$ac_t""yes" 1>&6
926 if test "$program_transform_name" = s,x,x,; then
927 program_transform_name=
929 # Double any \ or $. echo might interpret backslashes.
930 cat <<\EOF_SED > conftestsed
931 s,\\,\\\\,g; s,\$,$$,g
933 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
936 test "$program_prefix" != NONE &&
937 program_transform_name="s,^,${program_prefix},;$program_transform_name"
938 # Use a double $ so make ignores it.
939 test "$program_suffix" != NONE &&
940 program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
942 # sed with no file args requires a program.
943 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
945 for ac_prog in mawk gawk nawk awk
947 # Extract the first word of "$ac_prog", so it can be a program name with args.
948 set dummy $ac_prog; ac_word=$2
949 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
950 echo "configure:951: checking for $ac_word" >&5
951 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
952 echo $ac_n "(cached) $ac_c" 1>&6
954 if test -n "$AWK"; then
955 ac_cv_prog_AWK="$AWK" # Let the user override the test.
957 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
959 for ac_dir in $ac_dummy; do
960 test -z "$ac_dir" && ac_dir=.
961 if test -f $ac_dir/$ac_word; then
962 ac_cv_prog_AWK="$ac_prog"
969 AWK="$ac_cv_prog_AWK"
970 if test -n "$AWK"; then
971 echo "$ac_t""$AWK" 1>&6
973 echo "$ac_t""no" 1>&6
976 test -n "$AWK" && break
979 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
980 echo "configure:981: checking whether ${MAKE-make} sets \${MAKE}" >&5
981 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
982 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
983 echo $ac_n "(cached) $ac_c" 1>&6
985 cat > conftestmake <<\EOF
987 @echo 'ac_maketemp="${MAKE}"'
989 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
990 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
991 if test -n "$ac_maketemp"; then
992 eval ac_cv_prog_make_${ac_make}_set=yes
994 eval ac_cv_prog_make_${ac_make}_set=no
998 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
999 echo "$ac_t""yes" 1>&6
1002 echo "$ac_t""no" 1>&6
1003 SET_MAKE="MAKE=${MAKE-make}"
1012 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1013 { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1018 missing_dir=`cd $ac_aux_dir && pwd`
1019 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1020 echo "configure:1021: checking for working aclocal" >&5
1021 # Run test in a subshell; some versions of sh will print an error if
1022 # an executable is not found, even if stderr is redirected.
1023 # Redirect stdin to placate older versions of autoconf. Sigh.
1024 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1026 echo "$ac_t""found" 1>&6
1028 ACLOCAL="$missing_dir/missing aclocal"
1029 echo "$ac_t""missing" 1>&6
1032 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1033 echo "configure:1034: checking for working autoconf" >&5
1034 # Run test in a subshell; some versions of sh will print an error if
1035 # an executable is not found, even if stderr is redirected.
1036 # Redirect stdin to placate older versions of autoconf. Sigh.
1037 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1039 echo "$ac_t""found" 1>&6
1041 AUTOCONF="$missing_dir/missing autoconf"
1042 echo "$ac_t""missing" 1>&6
1045 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1046 echo "configure:1047: checking for working automake" >&5
1047 # Run test in a subshell; some versions of sh will print an error if
1048 # an executable is not found, even if stderr is redirected.
1049 # Redirect stdin to placate older versions of autoconf. Sigh.
1050 if (automake --version) < /dev/null > /dev/null 2>&1; then
1052 echo "$ac_t""found" 1>&6
1054 AUTOMAKE="$missing_dir/missing automake"
1055 echo "$ac_t""missing" 1>&6
1058 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1059 echo "configure:1060: checking for working autoheader" >&5
1060 # Run test in a subshell; some versions of sh will print an error if
1061 # an executable is not found, even if stderr is redirected.
1062 # Redirect stdin to placate older versions of autoconf. Sigh.
1063 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1064 AUTOHEADER=autoheader
1065 echo "$ac_t""found" 1>&6
1067 AUTOHEADER="$missing_dir/missing autoheader"
1068 echo "$ac_t""missing" 1>&6
1071 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1072 echo "configure:1073: checking for working makeinfo" >&5
1073 # Run test in a subshell; some versions of sh will print an error if
1074 # an executable is not found, even if stderr is redirected.
1075 # Redirect stdin to placate older versions of autoconf. Sigh.
1076 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1078 echo "$ac_t""found" 1>&6
1080 MAKEINFO="$missing_dir/missing makeinfo"
1081 echo "$ac_t""missing" 1>&6
1084 install_sh="$missing_dir/install-sh"
1085 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1087 for ac_prog in gnutar gtar tar
1089 # Extract the first word of "$ac_prog", so it can be a program name with args.
1090 set dummy $ac_prog; ac_word=$2
1091 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1092 echo "configure:1093: checking for $ac_word" >&5
1093 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1094 echo $ac_n "(cached) $ac_c" 1>&6
1096 if test -n "$AMTAR"; then
1097 ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1099 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1101 for ac_dir in $ac_dummy; do
1102 test -z "$ac_dir" && ac_dir=.
1103 if test -f $ac_dir/$ac_word; then
1104 ac_cv_prog_AMTAR="$ac_prog"
1111 AMTAR="$ac_cv_prog_AMTAR"
1112 if test -n "$AMTAR"; then
1113 echo "$ac_t""$AMTAR" 1>&6
1115 echo "$ac_t""no" 1>&6
1118 test -n "$AMTAR" && break
1123 if test -n "$AMTAR"; then
1124 if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1129 cat >> confdefs.h <<EOF
1130 #define OPENLDAP_PACKAGE "$PACKAGE"
1133 cat >> confdefs.h <<EOF
1134 #define OPENLDAP_VERSION "$VERSION"
1140 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1141 echo "configure:1142: checking configure arguments" >&5
1146 ldap_subdir="/openldap"
1148 # Check whether --with-subdir or --without-subdir was given.
1149 if test "${with_subdir+set}" = set; then
1150 withval="$with_subdir"
1157 ldap_subdir="$withval"
1160 ldap_subdir="/$withval"
1167 # OpenLDAP --enable-debug
1168 # Check whether --enable-debug or --disable-debug was given.
1169 if test "${enable_debug+set}" = set; then
1170 enableval="$enable_debug"
1173 for ol_val in auto yes no ; do
1174 if test "$enableval" = "$ol_val" ; then
1178 if test "$ol_arg" = "invalid" ; then
1179 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1181 ol_enable_debug="$ol_arg"
1184 ol_enable_debug="yes"
1186 # end --enable-debug
1187 # OpenLDAP --enable-syslog
1188 # Check whether --enable-syslog or --disable-syslog was given.
1189 if test "${enable_syslog+set}" = set; then
1190 enableval="$enable_syslog"
1193 for ol_val in auto yes no ; do
1194 if test "$enableval" = "$ol_val" ; then
1198 if test "$ol_arg" = "invalid" ; then
1199 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1201 ol_enable_syslog="$ol_arg"
1204 ol_enable_syslog="auto"
1206 # end --enable-syslog
1207 # OpenLDAP --enable-proctitle
1208 # Check whether --enable-proctitle or --disable-proctitle was given.
1209 if test "${enable_proctitle+set}" = set; then
1210 enableval="$enable_proctitle"
1213 for ol_val in auto yes no ; do
1214 if test "$enableval" = "$ol_val" ; then
1218 if test "$ol_arg" = "invalid" ; then
1219 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1221 ol_enable_proctitle="$ol_arg"
1224 ol_enable_proctitle="yes"
1226 # end --enable-proctitle
1227 # OpenLDAP --enable-cache
1228 # Check whether --enable-cache or --disable-cache was given.
1229 if test "${enable_cache+set}" = set; then
1230 enableval="$enable_cache"
1233 for ol_val in auto yes no ; do
1234 if test "$enableval" = "$ol_val" ; then
1238 if test "$ol_arg" = "invalid" ; then
1239 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1241 ol_enable_cache="$ol_arg"
1244 ol_enable_cache="no"
1246 # end --enable-cache
1247 # OpenLDAP --enable-referrals
1248 # Check whether --enable-referrals or --disable-referrals was given.
1249 if test "${enable_referrals+set}" = set; then
1250 enableval="$enable_referrals"
1253 for ol_val in auto yes no ; do
1254 if test "$enableval" = "$ol_val" ; then
1258 if test "$ol_arg" = "invalid" ; then
1259 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1261 ol_enable_referrals="$ol_arg"
1264 ol_enable_referrals="no"
1266 # end --enable-referrals
1267 # OpenLDAP --enable-kbind
1268 # Check whether --enable-kbind or --disable-kbind was given.
1269 if test "${enable_kbind+set}" = set; then
1270 enableval="$enable_kbind"
1273 for ol_val in auto yes no ; do
1274 if test "$enableval" = "$ol_val" ; then
1278 if test "$ol_arg" = "invalid" ; then
1279 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1281 ol_enable_kbind="$ol_arg"
1284 ol_enable_kbind="no"
1286 # end --enable-kbind
1287 # OpenLDAP --enable-ipv6
1288 # Check whether --enable-ipv6 or --disable-ipv6 was given.
1289 if test "${enable_ipv6+set}" = set; then
1290 enableval="$enable_ipv6"
1293 for ol_val in auto yes no ; do
1294 if test "$enableval" = "$ol_val" ; then
1298 if test "$ol_arg" = "invalid" ; then
1299 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1301 ol_enable_ipv6="$ol_arg"
1304 ol_enable_ipv6="auto"
1307 # OpenLDAP --enable-local
1308 # Check whether --enable-local or --disable-local was given.
1309 if test "${enable_local+set}" = set; then
1310 enableval="$enable_local"
1313 for ol_val in auto yes no ; do
1314 if test "$enableval" = "$ol_val" ; then
1318 if test "$ol_arg" = "invalid" ; then
1319 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1321 ol_enable_local="$ol_arg"
1324 ol_enable_local="auto"
1326 # end --enable-local
1327 # OpenLDAP --enable-x_compile
1328 # Check whether --enable-x_compile or --disable-x_compile was given.
1329 if test "${enable_x_compile+set}" = set; then
1330 enableval="$enable_x_compile"
1333 for ol_val in yes no ; do
1334 if test "$enableval" = "$ol_val" ; then
1338 if test "$ol_arg" = "invalid" ; then
1339 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1341 ol_enable_x_compile="$ol_arg"
1344 ol_enable_x_compile="no"
1346 # end --enable-x_compile
1349 # OpenLDAP --with-cyrus_sasl
1350 # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1351 if test "${with_cyrus_sasl+set}" = set; then
1352 withval="$with_cyrus_sasl"
1355 for ol_val in auto yes no ; do
1356 if test "$withval" = "$ol_val" ; then
1360 if test "$ol_arg" = "invalid" ; then
1361 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1363 ol_with_cyrus_sasl="$ol_arg"
1366 ol_with_cyrus_sasl="auto"
1368 # end --with-cyrus_sasl
1370 # OpenLDAP --with-fetch
1371 # Check whether --with-fetch or --without-fetch was given.
1372 if test "${with_fetch+set}" = set; then
1373 withval="$with_fetch"
1376 for ol_val in auto yes no ; do
1377 if test "$withval" = "$ol_val" ; then
1381 if test "$ol_arg" = "invalid" ; then
1382 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1384 ol_with_fetch="$ol_arg"
1387 ol_with_fetch="auto"
1391 # OpenLDAP --with-kerberos
1392 # Check whether --with-kerberos or --without-kerberos was given.
1393 if test "${with_kerberos+set}" = set; then
1394 withval="$with_kerberos"
1397 for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1398 if test "$withval" = "$ol_val" ; then
1402 if test "$ol_arg" = "invalid" ; then
1403 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1405 ol_with_kerberos="$ol_arg"
1408 ol_with_kerberos="auto"
1410 # end --with-kerberos
1412 # OpenLDAP --with-readline
1413 # Check whether --with-readline or --without-readline was given.
1414 if test "${with_readline+set}" = set; then
1415 withval="$with_readline"
1418 for ol_val in auto yes no ; do
1419 if test "$withval" = "$ol_val" ; then
1423 if test "$ol_arg" = "invalid" ; then
1424 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1426 ol_with_readline="$ol_arg"
1429 ol_with_readline="auto"
1431 # end --with-readline
1433 # OpenLDAP --with-threads
1434 # Check whether --with-threads or --without-threads was given.
1435 if test "${with_threads+set}" = set; then
1436 withval="$with_threads"
1439 for ol_val in auto nt posix mach pth lwp yes no manual ; do
1440 if test "$withval" = "$ol_val" ; then
1444 if test "$ol_arg" = "invalid" ; then
1445 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1447 ol_with_threads="$ol_arg"
1450 ol_with_threads="auto"
1452 # end --with-threads
1454 # OpenLDAP --with-tls
1455 # Check whether --with-tls or --without-tls was given.
1456 if test "${with_tls+set}" = set; then
1460 for ol_val in auto ssleay openssl yes no ; do
1461 if test "$withval" = "$ol_val" ; then
1465 if test "$ol_arg" = "invalid" ; then
1466 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1468 ol_with_tls="$ol_arg"
1475 # OpenLDAP --with-yielding_select
1476 # Check whether --with-yielding_select or --without-yielding_select was given.
1477 if test "${with_yielding_select+set}" = set; then
1478 withval="$with_yielding_select"
1481 for ol_val in auto yes no manual ; do
1482 if test "$withval" = "$ol_val" ; then
1486 if test "$ol_arg" = "invalid" ; then
1487 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1489 ol_with_yielding_select="$ol_arg"
1492 ol_with_yielding_select="auto"
1494 # end --with-yielding_select
1498 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1499 if test "${with_xxslapdoptions+set}" = set; then
1500 withval="$with_xxslapdoptions"
1504 # OpenLDAP --enable-slapd
1505 # Check whether --enable-slapd or --disable-slapd was given.
1506 if test "${enable_slapd+set}" = set; then
1507 enableval="$enable_slapd"
1510 for ol_val in auto yes no ; do
1511 if test "$enableval" = "$ol_val" ; then
1515 if test "$ol_arg" = "invalid" ; then
1516 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1518 ol_enable_slapd="$ol_arg"
1521 ol_enable_slapd="yes"
1523 # end --enable-slapd
1524 # OpenLDAP --enable-cleartext
1525 # Check whether --enable-cleartext or --disable-cleartext was given.
1526 if test "${enable_cleartext+set}" = set; then
1527 enableval="$enable_cleartext"
1530 for ol_val in auto yes no ; do
1531 if test "$enableval" = "$ol_val" ; then
1535 if test "$ol_arg" = "invalid" ; then
1536 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1538 ol_enable_cleartext="$ol_arg"
1541 ol_enable_cleartext="yes"
1543 # end --enable-cleartext
1544 # OpenLDAP --enable-crypt
1545 # Check whether --enable-crypt or --disable-crypt was given.
1546 if test "${enable_crypt+set}" = set; then
1547 enableval="$enable_crypt"
1550 for ol_val in auto yes no ; do
1551 if test "$enableval" = "$ol_val" ; then
1555 if test "$ol_arg" = "invalid" ; then
1556 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1558 ol_enable_crypt="$ol_arg"
1561 ol_enable_crypt="auto"
1563 # end --enable-crypt
1564 # OpenLDAP --enable-kpasswd
1565 # Check whether --enable-kpasswd or --disable-kpasswd was given.
1566 if test "${enable_kpasswd+set}" = set; then
1567 enableval="$enable_kpasswd"
1570 for ol_val in auto yes no ; do
1571 if test "$enableval" = "$ol_val" ; then
1575 if test "$ol_arg" = "invalid" ; then
1576 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1578 ol_enable_kpasswd="$ol_arg"
1581 ol_enable_kpasswd="no"
1583 # end --enable-kpasswd
1584 # OpenLDAP --enable-spasswd
1585 # Check whether --enable-spasswd or --disable-spasswd was given.
1586 if test "${enable_spasswd+set}" = set; then
1587 enableval="$enable_spasswd"
1590 for ol_val in auto yes no ; do
1591 if test "$enableval" = "$ol_val" ; then
1595 if test "$ol_arg" = "invalid" ; then
1596 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1598 ol_enable_spasswd="$ol_arg"
1601 ol_enable_spasswd="no"
1603 # end --enable-spasswd
1604 # OpenLDAP --enable-modules
1605 # Check whether --enable-modules or --disable-modules was given.
1606 if test "${enable_modules+set}" = set; then
1607 enableval="$enable_modules"
1610 for ol_val in auto yes no ; do
1611 if test "$enableval" = "$ol_val" ; then
1615 if test "$ol_arg" = "invalid" ; then
1616 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1618 ol_enable_modules="$ol_arg"
1621 ol_enable_modules="no"
1623 # end --enable-modules
1624 # OpenLDAP --enable-phonetic
1625 # Check whether --enable-phonetic or --disable-phonetic was given.
1626 if test "${enable_phonetic+set}" = set; then
1627 enableval="$enable_phonetic"
1630 for ol_val in auto yes no ; do
1631 if test "$enableval" = "$ol_val" ; then
1635 if test "$ol_arg" = "invalid" ; then
1636 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1638 ol_enable_phonetic="$ol_arg"
1641 ol_enable_phonetic="no"
1643 # end --enable-phonetic
1644 # OpenLDAP --enable-rlookups
1645 # Check whether --enable-rlookups or --disable-rlookups was given.
1646 if test "${enable_rlookups+set}" = set; then
1647 enableval="$enable_rlookups"
1650 for ol_val in auto yes no ; do
1651 if test "$enableval" = "$ol_val" ; then
1655 if test "$ol_arg" = "invalid" ; then
1656 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1658 ol_enable_rlookups="$ol_arg"
1661 ol_enable_rlookups="no"
1663 # end --enable-rlookups
1664 # OpenLDAP --enable-aci
1665 # Check whether --enable-aci or --disable-aci was given.
1666 if test "${enable_aci+set}" = set; then
1667 enableval="$enable_aci"
1670 for ol_val in auto yes no ; do
1671 if test "$enableval" = "$ol_val" ; then
1675 if test "$ol_arg" = "invalid" ; then
1676 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1678 ol_enable_aci="$ol_arg"
1684 # OpenLDAP --enable-wrappers
1685 # Check whether --enable-wrappers or --disable-wrappers was given.
1686 if test "${enable_wrappers+set}" = set; then
1687 enableval="$enable_wrappers"
1690 for ol_val in auto yes no ; do
1691 if test "$enableval" = "$ol_val" ; then
1695 if test "$ol_arg" = "invalid" ; then
1696 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1698 ol_enable_wrappers="$ol_arg"
1701 ol_enable_wrappers="no"
1703 # end --enable-wrappers
1704 # OpenLDAP --enable-dynamic
1705 # Check whether --enable-dynamic or --disable-dynamic was given.
1706 if test "${enable_dynamic+set}" = set; then
1707 enableval="$enable_dynamic"
1710 for ol_val in auto yes no ; do
1711 if test "$enableval" = "$ol_val" ; then
1715 if test "$ol_arg" = "invalid" ; then
1716 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1718 ol_enable_dynamic="$ol_arg"
1721 ol_enable_dynamic="no"
1723 # end --enable-dynamic
1725 # OpenLDAP --enable-dnssrv
1726 # Check whether --enable-dnssrv or --disable-dnssrv was given.
1727 if test "${enable_dnssrv+set}" = set; then
1728 enableval="$enable_dnssrv"
1731 for ol_val in auto yes no ; do
1732 if test "$enableval" = "$ol_val" ; then
1736 if test "$ol_arg" = "invalid" ; then
1737 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1739 ol_enable_dnssrv="$ol_arg"
1742 ol_enable_dnssrv="no"
1744 # end --enable-dnssrv
1745 # OpenLDAP --with-dnssrv_module
1746 # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1747 if test "${with_dnssrv_module+set}" = set; then
1748 withval="$with_dnssrv_module"
1751 for ol_val in static dynamic ; do
1752 if test "$withval" = "$ol_val" ; then
1756 if test "$ol_arg" = "invalid" ; then
1757 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1759 ol_with_dnssrv_module="$ol_arg"
1762 ol_with_dnssrv_module="static"
1764 # end --with-dnssrv_module
1766 # OpenLDAP --enable-ldap
1767 # Check whether --enable-ldap or --disable-ldap was given.
1768 if test "${enable_ldap+set}" = set; then
1769 enableval="$enable_ldap"
1772 for ol_val in auto yes no ; do
1773 if test "$enableval" = "$ol_val" ; then
1777 if test "$ol_arg" = "invalid" ; then
1778 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1780 ol_enable_ldap="$ol_arg"
1786 # OpenLDAP --with-ldap_module
1787 # Check whether --with-ldap_module or --without-ldap_module was given.
1788 if test "${with_ldap_module+set}" = set; then
1789 withval="$with_ldap_module"
1792 for ol_val in static dynamic ; do
1793 if test "$withval" = "$ol_val" ; then
1797 if test "$ol_arg" = "invalid" ; then
1798 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1800 ol_with_ldap_module="$ol_arg"
1803 ol_with_ldap_module="static"
1805 # end --with-ldap_module
1807 # OpenLDAP --enable-ldbm
1808 # Check whether --enable-ldbm or --disable-ldbm was given.
1809 if test "${enable_ldbm+set}" = set; then
1810 enableval="$enable_ldbm"
1813 for ol_val in auto yes no ; do
1814 if test "$enableval" = "$ol_val" ; then
1818 if test "$ol_arg" = "invalid" ; then
1819 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1821 ol_enable_ldbm="$ol_arg"
1824 ol_enable_ldbm="yes"
1827 # OpenLDAP --with-ldbm_api
1828 # Check whether --with-ldbm_api or --without-ldbm_api was given.
1829 if test "${with_ldbm_api+set}" = set; then
1830 withval="$with_ldbm_api"
1833 for ol_val in auto berkeley bcompat mdbm gdbm ; do
1834 if test "$withval" = "$ol_val" ; then
1838 if test "$ol_arg" = "invalid" ; then
1839 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1841 ol_with_ldbm_api="$ol_arg"
1844 ol_with_ldbm_api="auto"
1846 # end --with-ldbm_api
1848 # OpenLDAP --with-ldbm_module
1849 # Check whether --with-ldbm_module or --without-ldbm_module was given.
1850 if test "${with_ldbm_module+set}" = set; then
1851 withval="$with_ldbm_module"
1854 for ol_val in static dynamic ; do
1855 if test "$withval" = "$ol_val" ; then
1859 if test "$ol_arg" = "invalid" ; then
1860 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1862 ol_with_ldbm_module="$ol_arg"
1865 ol_with_ldbm_module="static"
1867 # end --with-ldbm_module
1869 # OpenLDAP --with-ldbm_type
1870 # Check whether --with-ldbm_type or --without-ldbm_type was given.
1871 if test "${with_ldbm_type+set}" = set; then
1872 withval="$with_ldbm_type"
1875 for ol_val in auto btree hash ; do
1876 if test "$withval" = "$ol_val" ; then
1880 if test "$ol_arg" = "invalid" ; then
1881 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1883 ol_with_ldbm_type="$ol_arg"
1886 ol_with_ldbm_type="auto"
1888 # end --with-ldbm_type
1890 # OpenLDAP --enable-passwd
1891 # Check whether --enable-passwd or --disable-passwd was given.
1892 if test "${enable_passwd+set}" = set; then
1893 enableval="$enable_passwd"
1896 for ol_val in auto yes no ; do
1897 if test "$enableval" = "$ol_val" ; then
1901 if test "$ol_arg" = "invalid" ; then
1902 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1904 ol_enable_passwd="$ol_arg"
1907 ol_enable_passwd="no"
1909 # end --enable-passwd
1910 # OpenLDAP --with-passwd_module
1911 # Check whether --with-passwd_module or --without-passwd_module was given.
1912 if test "${with_passwd_module+set}" = set; then
1913 withval="$with_passwd_module"
1916 for ol_val in static dynamic ; do
1917 if test "$withval" = "$ol_val" ; then
1921 if test "$ol_arg" = "invalid" ; then
1922 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1924 ol_with_passwd_module="$ol_arg"
1927 ol_with_passwd_module="static"
1929 # end --with-passwd_module
1931 # OpenLDAP --enable-shell
1932 # Check whether --enable-shell or --disable-shell was given.
1933 if test "${enable_shell+set}" = set; then
1934 enableval="$enable_shell"
1937 for ol_val in auto yes no ; do
1938 if test "$enableval" = "$ol_val" ; then
1942 if test "$ol_arg" = "invalid" ; then
1943 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
1945 ol_enable_shell="$ol_arg"
1948 ol_enable_shell="no"
1950 # end --enable-shell
1951 # OpenLDAP --with-shell_module
1952 # Check whether --with-shell_module or --without-shell_module was given.
1953 if test "${with_shell_module+set}" = set; then
1954 withval="$with_shell_module"
1957 for ol_val in static dynamic ; do
1958 if test "$withval" = "$ol_val" ; then
1962 if test "$ol_arg" = "invalid" ; then
1963 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
1965 ol_with_shell_module="$ol_arg"
1968 ol_with_shell_module="static"
1970 # end --with-shell_module
1972 # OpenLDAP --enable-sql
1973 # Check whether --enable-sql or --disable-sql was given.
1974 if test "${enable_sql+set}" = set; then
1975 enableval="$enable_sql"
1978 for ol_val in auto yes no ; do
1979 if test "$enableval" = "$ol_val" ; then
1983 if test "$ol_arg" = "invalid" ; then
1984 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
1986 ol_enable_sql="$ol_arg"
1992 # OpenLDAP --with-sql_module
1993 # Check whether --with-sql_module or --without-sql_module was given.
1994 if test "${with_sql_module+set}" = set; then
1995 withval="$with_sql_module"
1998 for ol_val in static dynamic ; do
1999 if test "$withval" = "$ol_val" ; then
2003 if test "$ol_arg" = "invalid" ; then
2004 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2006 ol_with_sql_module="$ol_arg"
2009 ol_with_sql_module="static"
2011 # end --with-sql_module
2014 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2015 if test "${with_xxslurpdoptions+set}" = set; then
2016 withval="$with_xxslurpdoptions"
2020 # OpenLDAP --enable-slurpd
2021 # Check whether --enable-slurpd or --disable-slurpd was given.
2022 if test "${enable_slurpd+set}" = set; then
2023 enableval="$enable_slurpd"
2026 for ol_val in auto yes no ; do
2027 if test "$enableval" = "$ol_val" ; then
2031 if test "$ol_arg" = "invalid" ; then
2032 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2034 ol_enable_slurpd="$ol_arg"
2037 ol_enable_slurpd="auto"
2039 # end --enable-slurpd
2041 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2042 if test "${with_xxliboptions+set}" = set; then
2043 withval="$with_xxliboptions"
2047 # Check whether --enable-static or --disable-static was given.
2048 if test "${enable_static+set}" = set; then
2049 enableval="$enable_static"
2050 p=${PACKAGE-default}
2051 case "$enableval" in
2052 yes) enable_static=yes ;;
2053 no) enable_static=no ;;
2056 # Look at the argument we got. We use all the common list separators.
2057 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2058 for pkg in $enableval; do
2059 if test "X$pkg" = "X$p"; then
2070 # Check whether --enable-shared or --disable-shared was given.
2071 if test "${enable_shared+set}" = set; then
2072 enableval="$enable_shared"
2073 p=${PACKAGE-default}
2074 case "$enableval" in
2075 yes) enable_shared=yes ;;
2076 no) enable_shared=no ;;
2079 # Look at the argument we got. We use all the common list separators.
2080 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2081 for pkg in $enableval; do
2082 if test "X$pkg" = "X$p"; then
2096 if test $ol_enable_slapd = no ; then
2097 if test $ol_enable_dnssrv = yes ; then
2098 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2100 if test $ol_enable_ldap = yes ; then
2101 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2103 if test $ol_enable_ldbm = yes ; then
2104 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2106 if test $ol_enable_passwd = yes ; then
2107 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2109 if test $ol_enable_shell = yes ; then
2110 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2112 if test $ol_enable_sql = yes ; then
2113 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2115 if test $ol_enable_modules = yes ; then
2116 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2118 if test $ol_enable_wrappers = yes ; then
2119 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2121 if test $ol_enable_phonetic = yes ; then
2122 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2124 if test $ol_enable_rlookups = yes ; then
2125 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2127 if test $ol_enable_aci = yes ; then
2128 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2130 if test $ol_with_ldbm_api != auto ; then
2131 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2133 if test $ol_with_ldbm_type != auto ; then
2134 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2136 if test $ol_with_dnssrv_module != static ; then
2137 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2139 if test $ol_with_ldap_module != static ; then
2140 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2142 if test $ol_with_ldbm_module != static ; then
2143 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2145 if test $ol_with_passwd_module != static ; then
2146 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2148 if test $ol_with_shell_module != static ; then
2149 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2151 if test $ol_with_sql_module != static ; then
2152 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2154 if test $ol_enable_slurpd = yes ; then
2155 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2158 # force settings to no
2166 ol_enable_modules=no
2167 ol_enable_phonetic=no
2168 ol_enable_rlookups=no
2170 ol_enable_wrappers=no
2171 ol_enable_dynamic=no
2174 ol_with_ldbm_type=no
2176 ol_with_dnssrv_module=static
2177 ol_with_ldap_module=static
2178 ol_with_ldbm_module=static
2179 ol_with_passwd_module=static
2180 ol_with_shell_module=static
2181 ol_with_sql_module=static
2185 elif test $ol_enable_ldbm = no ; then
2187 if test $ol_with_ldbm_api != auto ; then
2188 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2191 if test $ol_with_ldbm_type != auto ; then
2192 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2195 if test $ol_with_ldbm_module != static ; then
2196 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2199 if test $ol_enable_modules != yes -a \
2200 $ol_enable_dnssrv = no -a \
2201 $ol_enable_ldap = no -a \
2202 $ol_enable_passwd = no -a \
2203 $ol_enable_shell = no -a \
2204 $ol_enable_sql = no ; then
2205 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2209 ol_with_ldbm_type=no
2210 ol_with_ldbm_module=static
2213 if test $ol_with_ldbm_api = gdbm -a \
2214 $ol_with_ldbm_type = btree ; then
2215 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2217 if test $ol_with_ldbm_api = mdbm -a \
2218 $ol_with_ldbm_type = btree ; then
2219 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2221 if test $ol_with_ldbm_api = ndbm -a \
2222 $ol_with_ldbm_type = btree ; then
2223 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2227 if test $ol_enable_slurpd = yes ; then
2228 if test $ol_with_threads = no ; then
2229 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2233 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2234 if test $ol_with_kerberos = no ; then
2235 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2236 elif test $ol_with_kerberos = auto ; then
2237 ol_with_kerberos=yes
2240 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2241 if test $ol_with_kerberos = auto ; then
2243 elif test $ol_with_kerberos != no ; then
2244 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2249 if test $ol_enable_spasswd = yes ; then
2250 if test $ol_with_cyrus_sasl = no ; then
2251 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2253 ol_with_cyrus_sasl=yes
2256 echo "$ac_t""done" 1>&6
2279 BUILD_DNSSRV_DYNAMIC=static
2280 BUILD_LDAP_DYNAMIC=static
2281 BUILD_LDBM_DYNAMIC=static
2282 BUILD_PASSWD_DYNAMIC=static
2283 BUILD_SHELL_DYNAMIC=static
2284 BUILD_SQL_DYNAMIC=static
2286 SLAPD_MODULES_LDFLAGS=
2287 SLAPD_MODULES_CPPFLAGS=
2305 cat >> confdefs.h <<\EOF
2306 #define HAVE_MKVERSION 1
2314 *-*-aix*) if test -z "$CC" ; then
2315 case "$ol_with_threads" in
2316 auto | yes | posix) ol_aix_threads=yes ;;
2322 if test $ol_aix_threads = yes ; then
2323 if test -z "${CC}" ; then
2324 for ac_prog in cc_r xlc_r cc
2326 # Extract the first word of "$ac_prog", so it can be a program name with args.
2327 set dummy $ac_prog; ac_word=$2
2328 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2329 echo "configure:2330: checking for $ac_word" >&5
2330 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2331 echo $ac_n "(cached) $ac_c" 1>&6
2333 if test -n "$CC"; then
2334 ac_cv_prog_CC="$CC" # Let the user override the test.
2336 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2338 for ac_dir in $ac_dummy; do
2339 test -z "$ac_dir" && ac_dir=.
2340 if test -f $ac_dir/$ac_word; then
2341 ac_cv_prog_CC="$ac_prog"
2349 if test -n "$CC"; then
2350 echo "$ac_t""$CC" 1>&6
2352 echo "$ac_t""no" 1>&6
2355 test -n "$CC" && break
2359 if test "$CC" = cc ; then
2360 if test $ol_with_threads != auto ; then
2361 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2363 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2369 if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2370 ol_with_threads=posix
2371 ol_cv_pthread_create=yes
2375 if test -z "${CC}"; then
2378 # Extract the first word of "$ac_prog", so it can be a program name with args.
2379 set dummy $ac_prog; ac_word=$2
2380 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2381 echo "configure:2382: checking for $ac_word" >&5
2382 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2383 echo $ac_n "(cached) $ac_c" 1>&6
2385 if test -n "$CC"; then
2386 ac_cv_prog_CC="$CC" # Let the user override the test.
2388 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2390 for ac_dir in $ac_dummy; do
2391 test -z "$ac_dir" && ac_dir=.
2392 if test -f $ac_dir/$ac_word; then
2393 ac_cv_prog_CC="$ac_prog"
2401 if test -n "$CC"; then
2402 echo "$ac_t""$CC" 1>&6
2404 echo "$ac_t""no" 1>&6
2407 test -n "$CC" && break
2413 for ac_prog in ar gar
2415 # Extract the first word of "$ac_prog", so it can be a program name with args.
2416 set dummy $ac_prog; ac_word=$2
2417 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2418 echo "configure:2419: checking for $ac_word" >&5
2419 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
2420 echo $ac_n "(cached) $ac_c" 1>&6
2422 if test -n "$AR"; then
2423 ac_cv_prog_AR="$AR" # Let the user override the test.
2425 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2427 for ac_dir in $ac_dummy; do
2428 test -z "$ac_dir" && ac_dir=.
2429 if test -f $ac_dir/$ac_word; then
2430 ac_cv_prog_AR="$ac_prog"
2438 if test -n "$AR"; then
2439 echo "$ac_t""$AR" 1>&6
2441 echo "$ac_t""no" 1>&6
2444 test -n "$AR" && break
2450 # Check whether --enable-fast-install or --disable-fast-install was given.
2451 if test "${enable_fast_install+set}" = set; then
2452 enableval="$enable_fast_install"
2453 p=${PACKAGE-default}
2454 case "$enableval" in
2455 yes) enable_fast_install=yes ;;
2456 no) enable_fast_install=no ;;
2458 enable_fast_install=no
2459 # Look at the argument we got. We use all the common list separators.
2460 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2461 for pkg in $enableval; do
2462 if test "X$pkg" = "X$p"; then
2463 enable_fast_install=yes
2470 enable_fast_install=yes
2473 # Extract the first word of "ranlib", so it can be a program name with args.
2474 set dummy ranlib; ac_word=$2
2475 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2476 echo "configure:2477: checking for $ac_word" >&5
2477 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2478 echo $ac_n "(cached) $ac_c" 1>&6
2480 if test -n "$RANLIB"; then
2481 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2483 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2485 for ac_dir in $ac_dummy; do
2486 test -z "$ac_dir" && ac_dir=.
2487 if test -f $ac_dir/$ac_word; then
2488 ac_cv_prog_RANLIB="ranlib"
2493 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2496 RANLIB="$ac_cv_prog_RANLIB"
2497 if test -n "$RANLIB"; then
2498 echo "$ac_t""$RANLIB" 1>&6
2500 echo "$ac_t""no" 1>&6
2503 # Extract the first word of "gcc", so it can be a program name with args.
2504 set dummy gcc; ac_word=$2
2505 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2506 echo "configure:2507: checking for $ac_word" >&5
2507 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2508 echo $ac_n "(cached) $ac_c" 1>&6
2510 if test -n "$CC"; then
2511 ac_cv_prog_CC="$CC" # Let the user override the test.
2513 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2515 for ac_dir in $ac_dummy; do
2516 test -z "$ac_dir" && ac_dir=.
2517 if test -f $ac_dir/$ac_word; then
2526 if test -n "$CC"; then
2527 echo "$ac_t""$CC" 1>&6
2529 echo "$ac_t""no" 1>&6
2532 if test -z "$CC"; then
2533 # Extract the first word of "cc", so it can be a program name with args.
2534 set dummy cc; ac_word=$2
2535 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2536 echo "configure:2537: checking for $ac_word" >&5
2537 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2538 echo $ac_n "(cached) $ac_c" 1>&6
2540 if test -n "$CC"; then
2541 ac_cv_prog_CC="$CC" # Let the user override the test.
2543 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2546 for ac_dir in $ac_dummy; do
2547 test -z "$ac_dir" && ac_dir=.
2548 if test -f $ac_dir/$ac_word; then
2549 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2550 ac_prog_rejected=yes
2558 if test $ac_prog_rejected = yes; then
2559 # We found a bogon in the path, so make sure we never use it.
2560 set dummy $ac_cv_prog_CC
2562 if test $# -gt 0; then
2563 # We chose a different compiler from the bogus one.
2564 # However, it has the same basename, so the bogon will be chosen
2565 # first if we set CC to just the basename; use the full file name.
2567 set dummy "$ac_dir/$ac_word" "$@"
2575 if test -n "$CC"; then
2576 echo "$ac_t""$CC" 1>&6
2578 echo "$ac_t""no" 1>&6
2581 if test -z "$CC"; then
2582 case "`uname -s`" in
2583 *win32* | *WIN32* | *CYGWIN*)
2584 # Extract the first word of "cl", so it can be a program name with args.
2585 set dummy cl; ac_word=$2
2586 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2587 echo "configure:2588: checking for $ac_word" >&5
2588 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2589 echo $ac_n "(cached) $ac_c" 1>&6
2591 if test -n "$CC"; then
2592 ac_cv_prog_CC="$CC" # Let the user override the test.
2594 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2596 for ac_dir in $ac_dummy; do
2597 test -z "$ac_dir" && ac_dir=.
2598 if test -f $ac_dir/$ac_word; then
2607 if test -n "$CC"; then
2608 echo "$ac_t""$CC" 1>&6
2610 echo "$ac_t""no" 1>&6
2615 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2618 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2619 echo "configure:2620: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2622 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2623 ac_cpp='$CPP $CPPFLAGS'
2624 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2625 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2626 cross_compiling=$ac_cv_prog_cc_cross
2628 cat > conftest.$ac_ext << EOF
2630 #line 2631 "configure"
2631 #include "confdefs.h"
2635 if { (eval echo configure:2636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2636 ac_cv_prog_cc_works=yes
2637 # If we can't run a trivial program, we are probably using a cross compiler.
2638 if (./conftest; exit) 2>/dev/null; then
2639 ac_cv_prog_cc_cross=no
2641 ac_cv_prog_cc_cross=yes
2644 echo "configure: failed program was:" >&5
2645 cat conftest.$ac_ext >&5
2646 ac_cv_prog_cc_works=no
2650 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2651 ac_cpp='$CPP $CPPFLAGS'
2652 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2653 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2654 cross_compiling=$ac_cv_prog_cc_cross
2656 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2657 if test $ac_cv_prog_cc_works = no; then
2658 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2660 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2661 echo "configure:2662: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2662 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2663 cross_compiling=$ac_cv_prog_cc_cross
2665 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2666 echo "configure:2667: checking whether we are using GNU C" >&5
2667 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2668 echo $ac_n "(cached) $ac_c" 1>&6
2670 cat > conftest.c <<EOF
2675 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2676: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2682 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2684 if test $ac_cv_prog_gcc = yes; then
2690 ac_test_CFLAGS="${CFLAGS+set}"
2691 ac_save_CFLAGS="$CFLAGS"
2693 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2694 echo "configure:2695: checking whether ${CC-cc} accepts -g" >&5
2695 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2696 echo $ac_n "(cached) $ac_c" 1>&6
2698 echo 'void f(){}' > conftest.c
2699 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2708 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2709 if test "$ac_test_CFLAGS" = set; then
2710 CFLAGS="$ac_save_CFLAGS"
2711 elif test $ac_cv_prog_cc_g = yes; then
2712 if test "$GCC" = yes; then
2718 if test "$GCC" = yes; then
2725 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2726 if test "${with_gnu_ld+set}" = set; then
2727 withval="$with_gnu_ld"
2728 test "$withval" = no || with_gnu_ld=yes
2734 if test "$ac_cv_prog_gcc" = yes; then
2735 # Check if gcc -print-prog-name=ld gives a path.
2736 echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2737 echo "configure:2738: checking for ld used by GCC" >&5
2738 ac_prog=`($CC -print-prog-name=ld) 2>&5`
2740 # Accept absolute paths.
2741 [\\/]* | [A-Za-z]:[\\/]*)
2742 re_direlt='/[^/][^/]*/\.\./'
2743 # Canonicalize the path of ld
2744 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2745 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2746 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2748 test -z "$LD" && LD="$ac_prog"
2751 # If it fails, then pretend we aren't using GCC.
2755 # If it is relative, then search for the first ld in PATH.
2759 elif test "$with_gnu_ld" = yes; then
2760 echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2761 echo "configure:2762: checking for GNU ld" >&5
2763 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2764 echo "configure:2765: checking for non-GNU ld" >&5
2766 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2767 echo $ac_n "(cached) $ac_c" 1>&6
2769 if test -z "$LD"; then
2770 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2771 for ac_dir in $PATH; do
2772 test -z "$ac_dir" && ac_dir=.
2773 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2774 ac_cv_path_LD="$ac_dir/$ac_prog"
2775 # Check to see if the program is GNU ld. I'd rather use --version,
2776 # but apparently some GNU ld's only accept -v.
2777 # Break only if it was the GNU/non-GNU ld that we prefer.
2778 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2779 test "$with_gnu_ld" != no && break
2781 test "$with_gnu_ld" != yes && break
2787 ac_cv_path_LD="$LD" # Let the user override the test with a path.
2792 if test -n "$LD"; then
2793 echo "$ac_t""$LD" 1>&6
2795 echo "$ac_t""no" 1>&6
2797 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2798 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2799 echo "configure:2800: checking if the linker ($LD) is GNU ld" >&5
2800 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2801 echo $ac_n "(cached) $ac_c" 1>&6
2803 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2804 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2805 ac_cv_prog_gnu_ld=yes
2807 ac_cv_prog_gnu_ld=no
2811 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2814 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2815 echo "configure:2816: checking for BSD-compatible nm" >&5
2816 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2817 echo $ac_n "(cached) $ac_c" 1>&6
2819 if test -n "$NM"; then
2820 # Let the user override the test.
2823 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2824 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2825 test -z "$ac_dir" && ac_dir=.
2826 if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2827 # Check to see if the nm accepts a BSD-compat flag.
2828 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2829 # nm: unknown option "B" ignored
2830 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2831 ac_cv_path_NM="$ac_dir/nm -B"
2833 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2834 ac_cv_path_NM="$ac_dir/nm -p"
2837 ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2838 continue # so that we can try to find one that supports BSD flags
2843 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2848 echo "$ac_t""$NM" 1>&6
2850 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2851 echo "configure:2852: checking whether ln -s works" >&5
2852 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2853 echo $ac_n "(cached) $ac_c" 1>&6
2856 if ln -s X conftestdata 2>/dev/null
2859 ac_cv_prog_LN_S="ln -s"
2864 LN_S="$ac_cv_prog_LN_S"
2865 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2866 echo "$ac_t""yes" 1>&6
2868 echo "$ac_t""no" 1>&6
2871 if test $host != $build; then
2872 ac_tool_prefix=${host_alias}-
2879 NONE) lt_target="$host" ;;
2880 *) lt_target="$target" ;;
2883 # Check for any special flags to pass to ltconfig.
2884 libtool_flags="--cache-file=$cache_file"
2885 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2886 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2887 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2888 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2889 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2890 libtool_flags="$libtool_flags --enable-dlopen"
2891 libtool_flags="$libtool_flags --enable-win32-dll"
2892 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2893 if test "${enable_libtool_lock+set}" = set; then
2894 enableval="$enable_libtool_lock"
2898 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2899 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2901 # Some flags need to be propagated to the compiler or linker for good
2903 case "$lt_target" in
2905 # Find out which ABI we are using.
2906 echo '#line 2907 "configure"' > conftest.$ac_ext
2907 if { (eval echo configure:2908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2908 case "`/usr/bin/file conftest.o`" in
2924 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2925 SAVE_CFLAGS="$CFLAGS"
2926 CFLAGS="$CFLAGS -belf"
2927 echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2928 echo "configure:2929: checking whether the C compiler needs -belf" >&5
2929 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
2930 echo $ac_n "(cached) $ac_c" 1>&6
2932 cat > conftest.$ac_ext <<EOF
2933 #line 2934 "configure"
2934 #include "confdefs.h"
2940 if { (eval echo configure:2941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2942 lt_cv_cc_needs_belf=yes
2944 echo "configure: failed program was:" >&5
2945 cat conftest.$ac_ext >&5
2947 lt_cv_cc_needs_belf=no
2952 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
2953 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2954 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2955 CFLAGS="$SAVE_CFLAGS"
2959 *-*-cygwin* | *-*-mingw*)
2960 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
2961 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
2962 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2963 echo "configure:2964: checking for $ac_word" >&5
2964 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
2965 echo $ac_n "(cached) $ac_c" 1>&6
2967 if test -n "$DLLTOOL"; then
2968 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
2970 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2972 for ac_dir in $ac_dummy; do
2973 test -z "$ac_dir" && ac_dir=.
2974 if test -f $ac_dir/$ac_word; then
2975 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
2982 DLLTOOL="$ac_cv_prog_DLLTOOL"
2983 if test -n "$DLLTOOL"; then
2984 echo "$ac_t""$DLLTOOL" 1>&6
2986 echo "$ac_t""no" 1>&6
2990 if test -z "$ac_cv_prog_DLLTOOL"; then
2991 if test -n "$ac_tool_prefix"; then
2992 # Extract the first word of "dlltool", so it can be a program name with args.
2993 set dummy dlltool; ac_word=$2
2994 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2995 echo "configure:2996: checking for $ac_word" >&5
2996 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
2997 echo $ac_n "(cached) $ac_c" 1>&6
2999 if test -n "$DLLTOOL"; then
3000 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3002 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3004 for ac_dir in $ac_dummy; do
3005 test -z "$ac_dir" && ac_dir=.
3006 if test -f $ac_dir/$ac_word; then
3007 ac_cv_prog_DLLTOOL="dlltool"
3012 test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3015 DLLTOOL="$ac_cv_prog_DLLTOOL"
3016 if test -n "$DLLTOOL"; then
3017 echo "$ac_t""$DLLTOOL" 1>&6
3019 echo "$ac_t""no" 1>&6
3027 # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3028 set dummy ${ac_tool_prefix}as; ac_word=$2
3029 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3030 echo "configure:3031: checking for $ac_word" >&5
3031 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3032 echo $ac_n "(cached) $ac_c" 1>&6
3034 if test -n "$AS"; then
3035 ac_cv_prog_AS="$AS" # Let the user override the test.
3037 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3039 for ac_dir in $ac_dummy; do
3040 test -z "$ac_dir" && ac_dir=.
3041 if test -f $ac_dir/$ac_word; then
3042 ac_cv_prog_AS="${ac_tool_prefix}as"
3050 if test -n "$AS"; then
3051 echo "$ac_t""$AS" 1>&6
3053 echo "$ac_t""no" 1>&6
3057 if test -z "$ac_cv_prog_AS"; then
3058 if test -n "$ac_tool_prefix"; then
3059 # Extract the first word of "as", so it can be a program name with args.
3060 set dummy as; ac_word=$2
3061 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3062 echo "configure:3063: checking for $ac_word" >&5
3063 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3064 echo $ac_n "(cached) $ac_c" 1>&6
3066 if test -n "$AS"; then
3067 ac_cv_prog_AS="$AS" # Let the user override the test.
3069 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3071 for ac_dir in $ac_dummy; do
3072 test -z "$ac_dir" && ac_dir=.
3073 if test -f $ac_dir/$ac_word; then
3079 test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3083 if test -n "$AS"; then
3084 echo "$ac_t""$AS" 1>&6
3086 echo "$ac_t""no" 1>&6
3094 # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3095 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3096 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3097 echo "configure:3098: checking for $ac_word" >&5
3098 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3099 echo $ac_n "(cached) $ac_c" 1>&6
3101 if test -n "$OBJDUMP"; then
3102 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3104 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3106 for ac_dir in $ac_dummy; do
3107 test -z "$ac_dir" && ac_dir=.
3108 if test -f $ac_dir/$ac_word; then
3109 ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3116 OBJDUMP="$ac_cv_prog_OBJDUMP"
3117 if test -n "$OBJDUMP"; then
3118 echo "$ac_t""$OBJDUMP" 1>&6
3120 echo "$ac_t""no" 1>&6
3124 if test -z "$ac_cv_prog_OBJDUMP"; then
3125 if test -n "$ac_tool_prefix"; then
3126 # Extract the first word of "objdump", so it can be a program name with args.
3127 set dummy objdump; ac_word=$2
3128 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3129 echo "configure:3130: checking for $ac_word" >&5
3130 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3131 echo $ac_n "(cached) $ac_c" 1>&6
3133 if test -n "$OBJDUMP"; then
3134 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3136 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3138 for ac_dir in $ac_dummy; do
3139 test -z "$ac_dir" && ac_dir=.
3140 if test -f $ac_dir/$ac_word; then
3141 ac_cv_prog_OBJDUMP="objdump"
3146 test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3149 OBJDUMP="$ac_cv_prog_OBJDUMP"
3150 if test -n "$OBJDUMP"; then
3151 echo "$ac_t""$OBJDUMP" 1>&6
3153 echo "$ac_t""no" 1>&6
3166 # Save cache, so that ltconfig can load it
3169 # Actually configure libtool. ac_aux_dir is where install-sh is found.
3170 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3171 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3172 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3173 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3174 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3175 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
3176 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3178 # Reload cache, that may have been modified by ltconfig
3181 # This can be used to rebuild libtool when needed
3182 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3184 # Always use our own libtool.
3185 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3187 # Redirect the config.log output again, so that the ltconfig log is not
3188 # clobbered by the next message.
3189 exec 5>>./config.log
3192 for ac_prog in mawk gawk nawk awk
3194 # Extract the first word of "$ac_prog", so it can be a program name with args.
3195 set dummy $ac_prog; ac_word=$2
3196 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3197 echo "configure:3198: checking for $ac_word" >&5
3198 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3199 echo $ac_n "(cached) $ac_c" 1>&6
3201 if test -n "$AWK"; then
3202 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3204 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3206 for ac_dir in $ac_dummy; do
3207 test -z "$ac_dir" && ac_dir=.
3208 if test -f $ac_dir/$ac_word; then
3209 ac_cv_prog_AWK="$ac_prog"
3216 AWK="$ac_cv_prog_AWK"
3217 if test -n "$AWK"; then
3218 echo "$ac_t""$AWK" 1>&6
3220 echo "$ac_t""no" 1>&6
3223 test -n "$AWK" && break
3226 # test for ln hardlink support
3227 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3228 echo "configure:3229: checking whether ln works" >&5
3229 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3230 echo $ac_n "(cached) $ac_c" 1>&6
3232 rm -f conftest.src conftest.dst
3233 echo "conftest" > conftest.src
3234 if ln conftest.src conftest.dst 2>/dev/null
3236 ol_cv_prog_LN_H="ln"
3238 ol_cv_prog_LN_H="cp"
3240 rm -f conftest.src conftest.dst
3243 LN_H="$ol_cv_prog_LN_H"
3244 if test "$ol_cv_prog_LN_H" = "ln"; then
3245 echo "$ac_t""yes" 1>&6
3247 echo "$ac_t""no" 1>&6
3250 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3251 echo "configure:3252: checking whether ln -s works" >&5
3252 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3253 echo $ac_n "(cached) $ac_c" 1>&6
3256 if ln -s X conftestdata 2>/dev/null
3259 ac_cv_prog_LN_S="ln -s"
3264 LN_S="$ac_cv_prog_LN_S"
3265 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3266 echo "$ac_t""yes" 1>&6
3268 echo "$ac_t""no" 1>&6
3272 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3276 # Extract the first word of "sendmail", so it can be a program name with args.
3277 set dummy sendmail; ac_word=$2
3278 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3279 echo "configure:3280: checking for $ac_word" >&5
3280 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3281 echo $ac_n "(cached) $ac_c" 1>&6
3285 ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3288 ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3291 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3292 ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3293 for ac_dir in $ac_dummy; do
3294 test -z "$ac_dir" && ac_dir=.
3295 if test -f $ac_dir/$ac_word; then
3296 ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3301 test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3305 SENDMAIL="$ac_cv_path_SENDMAIL"
3306 if test -n "$SENDMAIL"; then
3307 echo "$ac_t""$SENDMAIL" 1>&6
3309 echo "$ac_t""no" 1>&6
3312 # Extract the first word of "vi", so it can be a program name with args.
3313 set dummy vi; ac_word=$2
3314 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3315 echo "configure:3316: checking for $ac_word" >&5
3316 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3317 echo $ac_n "(cached) $ac_c" 1>&6
3321 ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3324 ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3327 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3328 ac_dummy="$PATH:/usr/ucb"
3329 for ac_dir in $ac_dummy; do
3330 test -z "$ac_dir" && ac_dir=.
3331 if test -f $ac_dir/$ac_word; then
3332 ac_cv_path_EDITOR="$ac_dir/$ac_word"
3337 test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3341 EDITOR="$ac_cv_path_EDITOR"
3342 if test -n "$EDITOR"; then
3343 echo "$ac_t""$EDITOR" 1>&6
3345 echo "$ac_t""no" 1>&6
3348 # Extract the first word of "finger", so it can be a program name with args.
3349 set dummy finger; ac_word=$2
3350 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3351 echo "configure:3352: checking for $ac_word" >&5
3352 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3353 echo $ac_n "(cached) $ac_c" 1>&6
3357 ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3360 ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3363 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3364 ac_dummy="$PATH:/usr/ucb"
3365 for ac_dir in $ac_dummy; do
3366 test -z "$ac_dir" && ac_dir=.
3367 if test -f $ac_dir/$ac_word; then
3368 ac_cv_path_FINGER="$ac_dir/$ac_word"
3373 test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3377 FINGER="$ac_cv_path_FINGER"
3378 if test -n "$FINGER"; then
3379 echo "$ac_t""$FINGER" 1>&6
3381 echo "$ac_t""no" 1>&6
3385 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3386 echo "configure:3387: checking how to run the C preprocessor" >&5
3387 # On Suns, sometimes $CPP names a directory.
3388 if test -n "$CPP" && test -d "$CPP"; then
3391 if test -z "$CPP"; then
3392 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3393 echo $ac_n "(cached) $ac_c" 1>&6
3395 # This must be in double quotes, not single quotes, because CPP may get
3396 # substituted into the Makefile and "${CC-cc}" will confuse make.
3398 # On the NeXT, cc -E runs the code through the compiler's parser,
3399 # not just through cpp.
3400 cat > conftest.$ac_ext <<EOF
3401 #line 3402 "configure"
3402 #include "confdefs.h"
3406 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3407 { (eval echo configure:3408: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3408 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3409 if test -z "$ac_err"; then
3413 echo "configure: failed program was:" >&5
3414 cat conftest.$ac_ext >&5
3416 CPP="${CC-cc} -E -traditional-cpp"
3417 cat > conftest.$ac_ext <<EOF
3418 #line 3419 "configure"
3419 #include "confdefs.h"
3423 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3424 { (eval echo configure:3425: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3425 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3426 if test -z "$ac_err"; then
3430 echo "configure: failed program was:" >&5
3431 cat conftest.$ac_ext >&5
3433 CPP="${CC-cc} -nologo -E"
3434 cat > conftest.$ac_ext <<EOF
3435 #line 3436 "configure"
3436 #include "confdefs.h"
3440 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3441 { (eval echo configure:3442: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3442 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3443 if test -z "$ac_err"; then
3447 echo "configure: failed program was:" >&5
3448 cat conftest.$ac_ext >&5
3457 ac_cv_prog_CPP="$CPP"
3459 CPP="$ac_cv_prog_CPP"
3461 ac_cv_prog_CPP="$CPP"
3463 echo "$ac_t""$CPP" 1>&6
3466 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3467 echo "configure: warning: cross compiling.... some functionality will be removed." 1>&2
3469 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3470 echo "configure: warning: programs compiled here do run here..." 1>&2
3471 { echo "configure: error: if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3473 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3474 echo "configure: warning: programs compiled here do not run here..." 1>&2
3475 { echo "configure: error: if cross compiling, add --enable-x-compile." 1>&2; exit 1; }
3478 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3479 echo "configure:3480: checking for AIX" >&5
3480 cat > conftest.$ac_ext <<EOF
3481 #line 3482 "configure"
3482 #include "confdefs.h"
3488 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3489 egrep "yes" >/dev/null 2>&1; then
3491 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3492 #define _ALL_SOURCE 1
3497 echo "$ac_t""no" 1>&6
3502 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3503 echo "configure:3504: checking for POSIXized ISC" >&5
3504 if test -d /etc/conf/kconfig.d &&
3505 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3507 echo "$ac_t""yes" 1>&6
3508 ISC=yes # If later tests want to check for ISC.
3509 cat >> confdefs.h <<\EOF
3510 #define _POSIX_SOURCE 1
3513 if test "$GCC" = yes; then
3519 echo "$ac_t""no" 1>&6
3523 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3524 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3525 echo "configure:3526: checking for minix/config.h" >&5
3526 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3527 echo $ac_n "(cached) $ac_c" 1>&6
3529 cat > conftest.$ac_ext <<EOF
3530 #line 3531 "configure"
3531 #include "confdefs.h"
3532 #include <minix/config.h>
3534 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3535 { (eval echo configure:3536: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3536 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3537 if test -z "$ac_err"; then
3539 eval "ac_cv_header_$ac_safe=yes"
3542 echo "configure: failed program was:" >&5
3543 cat conftest.$ac_ext >&5
3545 eval "ac_cv_header_$ac_safe=no"
3549 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3550 echo "$ac_t""yes" 1>&6
3553 echo "$ac_t""no" 1>&6
3557 if test "$MINIX" = yes; then
3558 cat >> confdefs.h <<\EOF
3559 #define _POSIX_SOURCE 1
3562 cat >> confdefs.h <<\EOF
3563 #define _POSIX_1_SOURCE 2
3566 cat >> confdefs.h <<\EOF
3573 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3574 echo "configure:3575: checking for Cygwin environment" >&5
3575 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3576 echo $ac_n "(cached) $ac_c" 1>&6
3578 cat > conftest.$ac_ext <<EOF
3579 #line 3580 "configure"
3580 #include "confdefs.h"
3585 #define __CYGWIN__ __CYGWIN32__
3590 if { (eval echo configure:3591: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3594 echo "configure: failed program was:" >&5
3595 cat conftest.$ac_ext >&5
3602 echo "$ac_t""$ac_cv_cygwin" 1>&6
3604 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3605 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3606 echo "configure:3607: checking for mingw32 environment" >&5
3607 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3608 echo $ac_n "(cached) $ac_c" 1>&6
3610 cat > conftest.$ac_ext <<EOF
3611 #line 3612 "configure"
3612 #include "confdefs.h"
3618 if { (eval echo configure:3619: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3622 echo "configure: failed program was:" >&5
3623 cat conftest.$ac_ext >&5
3630 echo "$ac_t""$ac_cv_mingw32" 1>&6
3632 test "$ac_cv_mingw32" = yes && MINGW32=yes
3633 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3634 echo "configure:3635: checking for EMX OS/2 environment" >&5
3635 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3636 echo $ac_n "(cached) $ac_c" 1>&6
3638 cat > conftest.$ac_ext <<EOF
3639 #line 3640 "configure"
3640 #include "confdefs.h"
3646 if { (eval echo configure:3647: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3650 echo "configure: failed program was:" >&5
3651 cat conftest.$ac_ext >&5
3658 echo "$ac_t""$ac_cv_emxos2" 1>&6
3660 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3664 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3665 echo "configure:3666: checking for executable suffix" >&5
3666 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3667 echo $ac_n "(cached) $ac_c" 1>&6
3669 if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3673 echo 'int main () { return 0; }' > conftest.$ac_ext
3675 if { (eval echo configure:3676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3676 for file in conftest.*; do
3678 *.c | *.C | *.o | *.obj | *.xcoff) ;;
3679 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3683 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3686 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3691 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3692 echo "$ac_t""${ac_cv_exeext}" 1>&6
3695 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3696 echo "configure:3697: checking for object suffix" >&5
3697 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3698 echo $ac_n "(cached) $ac_c" 1>&6
3701 echo 'int i = 1;' > conftest.$ac_ext
3702 if { (eval echo configure:3703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3703 for ac_file in conftest.*; do
3706 *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3710 { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3715 echo "$ac_t""$ac_cv_objext" 1>&6
3716 OBJEXT=$ac_cv_objext
3717 ac_objext=$ac_cv_objext
3720 cat >> confdefs.h <<EOF
3721 #define EXEEXT "${EXEEXT}"
3725 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3726 echo "configure:3727: checking for be_app in -lbe" >&5
3727 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3728 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3729 echo $ac_n "(cached) $ac_c" 1>&6
3731 ac_save_LIBS="$LIBS"
3732 LIBS="-lbe -lroot -lnet $LIBS"
3733 cat > conftest.$ac_ext <<EOF
3734 #line 3735 "configure"
3735 #include "confdefs.h"
3736 /* Override any gcc2 internal prototype to avoid an error. */
3737 /* We use char because int might match the return type of a gcc2
3738 builtin and then its argument prototype would still apply. */
3745 if { (eval echo configure:3746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3747 eval "ac_cv_lib_$ac_lib_var=yes"
3749 echo "configure: failed program was:" >&5
3750 cat conftest.$ac_ext >&5
3752 eval "ac_cv_lib_$ac_lib_var=no"
3755 LIBS="$ac_save_LIBS"
3758 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3759 echo "$ac_t""yes" 1>&6
3760 LIBS="$LIBS -lbe -lroot -lnet"
3762 echo "$ac_t""no" 1>&6
3770 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3771 echo "configure:3772: checking for ${CC-cc} option to accept ANSI C" >&5
3772 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
3773 echo $ac_n "(cached) $ac_c" 1>&6
3775 am_cv_prog_cc_stdc=no
3777 # Don't try gcc -ansi; that turns off useful extensions and
3778 # breaks some systems' header files.
3779 # AIX -qlanglvl=ansi
3780 # Ultrix and OSF/1 -std1
3781 # HP-UX 10.20 and later -Ae
3782 # HP-UX older versions -Aa -D_HPUX_SOURCE
3783 # SVR4 -Xc -D__EXTENSIONS__
3784 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3786 CC="$ac_save_CC $ac_arg"
3787 cat > conftest.$ac_ext <<EOF
3788 #line 3789 "configure"
3789 #include "confdefs.h"
3792 #include <sys/types.h>
3793 #include <sys/stat.h>
3794 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3795 struct buf { int x; };
3796 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3797 static char *e (p, i)
3803 static char *f (char * (*g) (char **, int), char **p, ...)
3808 s = g (p, va_arg (v,int));
3812 int test (int i, double x);
3813 struct s1 {int (*f) (int a);};
3814 struct s2 {int (*f) (double a);};
3815 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3821 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3825 if { (eval echo configure:3826: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3827 am_cv_prog_cc_stdc="$ac_arg"; break
3829 echo "configure: failed program was:" >&5
3830 cat conftest.$ac_ext >&5
3838 if test -z "$am_cv_prog_cc_stdc"; then
3839 echo "$ac_t""none needed" 1>&6
3841 echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
3843 case "x$am_cv_prog_cc_stdc" in
3845 *) CC="$CC $am_cv_prog_cc_stdc" ;;
3848 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
3849 { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
3852 # test for make depend flag
3855 if test -z "${MKDEP}"; then
3857 if test -z "${MKDEP_FLAGS}"; then
3858 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
3859 echo "configure:3860: checking for ${OL_MKDEP} depend flag" >&5
3860 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
3861 echo $ac_n "(cached) $ac_c" 1>&6
3865 for flag in "-M" "-xM"; do
3866 cat > conftest.c <<EOF
3869 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:3870: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
3870 | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
3872 if test ! -f conftest."${ac_object}" ; then
3874 OL_MKDEP_FLAGS="$flag"
3883 echo "$ac_t""$ol_cv_mkdep" 1>&6
3886 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3891 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3896 if test "${ol_cv_mkdep}" = no ; then
3897 # this will soon become an error
3898 echo "configure: warning: do not know how to generate dependencies" 1>&2
3901 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
3902 echo "configure:3903: checking for afopen in -ls" >&5
3903 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
3904 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3905 echo $ac_n "(cached) $ac_c" 1>&6
3907 ac_save_LIBS="$LIBS"
3909 cat > conftest.$ac_ext <<EOF
3910 #line 3911 "configure"
3911 #include "confdefs.h"
3912 /* Override any gcc2 internal prototype to avoid an error. */
3913 /* We use char because int might match the return type of a gcc2
3914 builtin and then its argument prototype would still apply. */
3921 if { (eval echo configure:3922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3923 eval "ac_cv_lib_$ac_lib_var=yes"
3925 echo "configure: failed program was:" >&5
3926 cat conftest.$ac_ext >&5
3928 eval "ac_cv_lib_$ac_lib_var=no"
3931 LIBS="$ac_save_LIBS"
3934 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3935 echo "$ac_t""yes" 1>&6
3938 cat >> confdefs.h <<\EOF
3939 #define HAVE_AIX_SECURITY 1
3944 echo "$ac_t""no" 1>&6
3950 if test $ol_enable_modules != no ; then
3951 for ac_hdr in ltdl.h
3953 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3954 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3955 echo "configure:3956: checking for $ac_hdr" >&5
3956 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3957 echo $ac_n "(cached) $ac_c" 1>&6
3959 cat > conftest.$ac_ext <<EOF
3960 #line 3961 "configure"
3961 #include "confdefs.h"
3964 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3965 { (eval echo configure:3966: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3966 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3967 if test -z "$ac_err"; then
3969 eval "ac_cv_header_$ac_safe=yes"
3972 echo "configure: failed program was:" >&5
3973 cat conftest.$ac_ext >&5
3975 eval "ac_cv_header_$ac_safe=no"
3979 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3980 echo "$ac_t""yes" 1>&6
3981 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3982 cat >> confdefs.h <<EOF
3983 #define $ac_tr_hdr 1
3987 echo "$ac_t""no" 1>&6
3992 if test $ac_cv_header_ltdl_h = no ; then
3993 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
3996 echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
3997 echo "configure:3998: checking for lt_dlinit in -lltdl" >&5
3998 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
3999 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4000 echo $ac_n "(cached) $ac_c" 1>&6
4002 ac_save_LIBS="$LIBS"
4004 cat > conftest.$ac_ext <<EOF
4005 #line 4006 "configure"
4006 #include "confdefs.h"
4007 /* Override any gcc2 internal prototype to avoid an error. */
4008 /* We use char because int might match the return type of a gcc2
4009 builtin and then its argument prototype would still apply. */
4016 if { (eval echo configure:4017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4018 eval "ac_cv_lib_$ac_lib_var=yes"
4020 echo "configure: failed program was:" >&5
4021 cat conftest.$ac_ext >&5
4023 eval "ac_cv_lib_$ac_lib_var=no"
4026 LIBS="$ac_save_LIBS"
4029 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4030 echo "$ac_t""yes" 1>&6
4033 cat >> confdefs.h <<\EOF
4034 #define HAVE_LIBLTDL 1
4039 echo "$ac_t""no" 1>&6
4043 if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4044 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4048 ol_with_dnssrv_module=static
4049 ol_with_ldap_module=static
4050 ol_with_ldbm_module=static
4051 ol_with_passwd_module=static
4052 ol_with_shell_module=static
4053 ol_with_sql_module=static
4057 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4058 echo "configure:4059: checking for EBCDIC" >&5
4059 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4060 echo $ac_n "(cached) $ac_c" 1>&6
4063 cat > conftest.$ac_ext <<EOF
4064 #line 4065 "configure"
4065 #include "confdefs.h"
4068 #include <__ASCII__/generate_error.h>
4072 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4073 { (eval echo configure:4074: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4074 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4075 if test -z "$ac_err"; then
4077 ol_cv_cpp_ebcdic=yes
4080 echo "configure: failed program was:" >&5
4081 cat conftest.$ac_ext >&5
4088 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4089 if test $ol_cv_cpp_ebcdic = yes ; then
4090 cat >> confdefs.h <<\EOF
4091 #define HAVE_EBCDIC 1
4096 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4097 echo "configure:4098: checking for ANSI C header files" >&5
4098 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4099 echo $ac_n "(cached) $ac_c" 1>&6
4101 cat > conftest.$ac_ext <<EOF
4102 #line 4103 "configure"
4103 #include "confdefs.h"
4109 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4110 { (eval echo configure:4111: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4111 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4112 if test -z "$ac_err"; then
4114 ol_cv_header_stdc=yes
4117 echo "configure: failed program was:" >&5
4118 cat conftest.$ac_ext >&5
4120 ol_cv_header_stdc=no
4124 if test $ol_cv_header_stdc = yes; then
4125 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4126 cat > conftest.$ac_ext <<EOF
4127 #line 4128 "configure"
4128 #include "confdefs.h"
4131 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4132 egrep "memchr" >/dev/null 2>&1; then
4136 ol_cv_header_stdc=no
4142 if test $ol_cv_header_stdc = yes; then
4143 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4144 cat > conftest.$ac_ext <<EOF
4145 #line 4146 "configure"
4146 #include "confdefs.h"
4149 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4150 egrep "free" >/dev/null 2>&1; then
4154 ol_cv_header_stdc=no
4160 if test $ol_cv_header_stdc = yes; then
4161 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4162 if test "$cross_compiling" = yes; then
4165 cat > conftest.$ac_ext <<EOF
4166 #line 4167 "configure"
4167 #include "confdefs.h"
4170 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4171 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4173 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4174 || ('j' <= (c) && (c) <= 'r') \
4175 || ('s' <= (c) && (c) <= 'z'))
4176 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4178 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4179 int main () { int i; for (i = 0; i < 256; i++)
4180 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4184 if { (eval echo configure:4185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4188 echo "configure: failed program was:" >&5
4189 cat conftest.$ac_ext >&5
4191 ol_cv_header_stdc=no
4199 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4200 if test $ol_cv_header_stdc = yes; then
4201 cat >> confdefs.h <<\EOF
4202 #define STDC_HEADERS 1
4206 ac_cv_header_stdc=disable
4209 if test $ol_cv_header_stdc != yes; then
4210 echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4214 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4216 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4217 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4218 echo "configure:4219: checking for $ac_hdr that defines DIR" >&5
4219 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4220 echo $ac_n "(cached) $ac_c" 1>&6
4222 cat > conftest.$ac_ext <<EOF
4223 #line 4224 "configure"
4224 #include "confdefs.h"
4225 #include <sys/types.h>
4231 if { (eval echo configure:4232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4233 eval "ac_cv_header_dirent_$ac_safe=yes"
4235 echo "configure: failed program was:" >&5
4236 cat conftest.$ac_ext >&5
4238 eval "ac_cv_header_dirent_$ac_safe=no"
4242 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4243 echo "$ac_t""yes" 1>&6
4244 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4245 cat >> confdefs.h <<EOF
4246 #define $ac_tr_hdr 1
4248 ac_header_dirent=$ac_hdr; break
4250 echo "$ac_t""no" 1>&6
4253 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4254 if test $ac_header_dirent = dirent.h; then
4255 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4256 echo "configure:4257: checking for opendir in -ldir" >&5
4257 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4258 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4259 echo $ac_n "(cached) $ac_c" 1>&6
4261 ac_save_LIBS="$LIBS"
4263 cat > conftest.$ac_ext <<EOF
4264 #line 4265 "configure"
4265 #include "confdefs.h"
4266 /* Override any gcc2 internal prototype to avoid an error. */
4267 /* We use char because int might match the return type of a gcc2
4268 builtin and then its argument prototype would still apply. */
4275 if { (eval echo configure:4276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4277 eval "ac_cv_lib_$ac_lib_var=yes"
4279 echo "configure: failed program was:" >&5
4280 cat conftest.$ac_ext >&5
4282 eval "ac_cv_lib_$ac_lib_var=no"
4285 LIBS="$ac_save_LIBS"
4288 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4289 echo "$ac_t""yes" 1>&6
4292 echo "$ac_t""no" 1>&6
4296 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4297 echo "configure:4298: checking for opendir in -lx" >&5
4298 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4299 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4300 echo $ac_n "(cached) $ac_c" 1>&6
4302 ac_save_LIBS="$LIBS"
4304 cat > conftest.$ac_ext <<EOF
4305 #line 4306 "configure"
4306 #include "confdefs.h"
4307 /* Override any gcc2 internal prototype to avoid an error. */
4308 /* We use char because int might match the return type of a gcc2
4309 builtin and then its argument prototype would still apply. */
4316 if { (eval echo configure:4317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4318 eval "ac_cv_lib_$ac_lib_var=yes"
4320 echo "configure: failed program was:" >&5
4321 cat conftest.$ac_ext >&5
4323 eval "ac_cv_lib_$ac_lib_var=no"
4326 LIBS="$ac_save_LIBS"
4329 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4330 echo "$ac_t""yes" 1>&6
4333 echo "$ac_t""no" 1>&6
4338 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4339 echo "configure:4340: checking for sys/wait.h that is POSIX.1 compatible" >&5
4340 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4341 echo $ac_n "(cached) $ac_c" 1>&6
4343 cat > conftest.$ac_ext <<EOF
4344 #line 4345 "configure"
4345 #include "confdefs.h"
4346 #include <sys/types.h>
4347 #include <sys/wait.h>
4349 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4352 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4357 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4360 if { (eval echo configure:4361: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4362 ac_cv_header_sys_wait_h=yes
4364 echo "configure: failed program was:" >&5
4365 cat conftest.$ac_ext >&5
4367 ac_cv_header_sys_wait_h=no
4372 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4373 if test $ac_cv_header_sys_wait_h = yes; then
4374 cat >> confdefs.h <<\EOF
4375 #define HAVE_SYS_WAIT_H 1
4380 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4381 echo "configure:4382: checking POSIX termios" >&5
4382 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4383 echo $ac_n "(cached) $ac_c" 1>&6
4385 cat > conftest.$ac_ext <<EOF
4386 #line 4387 "configure"
4387 #include "confdefs.h"
4388 #include <sys/types.h>
4390 #include <termios.h>
4392 /* SunOS 4.0.3 has termios.h but not the library calls. */
4396 if { (eval echo configure:4397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4398 am_cv_sys_posix_termios=yes
4400 echo "configure: failed program was:" >&5
4401 cat conftest.$ac_ext >&5
4403 am_cv_sys_posix_termios=no
4408 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4411 echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4412 echo "configure:4413: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4413 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4414 echo $ac_n "(cached) $ac_c" 1>&6
4416 am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4418 gwinsz_in_termios_h=no
4419 if test $am_cv_sys_posix_termios = yes; then
4420 cat > conftest.$ac_ext <<EOF
4421 #line 4422 "configure"
4422 #include "confdefs.h"
4423 #include <sys/types.h>
4424 # include <termios.h>
4430 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4431 egrep "yes" >/dev/null 2>&1; then
4433 gwinsz_in_termios_h=yes
4439 if test $gwinsz_in_termios_h = no; then
4440 cat > conftest.$ac_ext <<EOF
4441 #line 4442 "configure"
4442 #include "confdefs.h"
4443 #include <sys/types.h>
4444 # include <sys/ioctl.h>
4450 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4451 egrep "yes" >/dev/null 2>&1; then
4453 am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4461 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4462 if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4463 cat >> confdefs.h <<\EOF
4464 #define GWINSZ_IN_SYS_IOCTL 1
4469 if test $am_cv_sys_posix_termios = yes ; then
4470 cat >> confdefs.h <<\EOF
4471 #define HAVE_POSIX_TERMIOS 1
4522 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4523 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4524 echo "configure:4525: checking for $ac_hdr" >&5
4525 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4526 echo $ac_n "(cached) $ac_c" 1>&6
4528 cat > conftest.$ac_ext <<EOF
4529 #line 4530 "configure"
4530 #include "confdefs.h"
4533 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4534 { (eval echo configure:4535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4535 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4536 if test -z "$ac_err"; then
4538 eval "ac_cv_header_$ac_safe=yes"
4541 echo "configure: failed program was:" >&5
4542 cat conftest.$ac_ext >&5
4544 eval "ac_cv_header_$ac_safe=no"
4548 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4549 echo "$ac_t""yes" 1>&6
4550 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4551 cat >> confdefs.h <<EOF
4552 #define $ac_tr_hdr 1
4556 echo "$ac_t""no" 1>&6
4563 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
4564 echo "configure:4565: checking for dlopen" >&5
4565 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
4566 echo $ac_n "(cached) $ac_c" 1>&6
4568 cat > conftest.$ac_ext <<EOF
4569 #line 4570 "configure"
4570 #include "confdefs.h"
4571 /* System header to define __stub macros and hopefully few prototypes,
4572 which can conflict with char dlopen(); below. */
4574 /* Override any gcc2 internal prototype to avoid an error. */
4575 /* We use char because int might match the return type of a gcc2
4576 builtin and then its argument prototype would still apply. */
4582 /* The GNU C library defines this for functions which it implements
4583 to always fail with ENOSYS. Some functions are actually named
4584 something starting with __ and the normal name is an alias. */
4585 #if defined (__stub_dlopen) || defined (__stub___dlopen)
4593 if { (eval echo configure:4594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4595 eval "ac_cv_func_dlopen=yes"
4597 echo "configure: failed program was:" >&5
4598 cat conftest.$ac_ext >&5
4600 eval "ac_cv_func_dlopen=no"
4605 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
4606 echo "$ac_t""yes" 1>&6
4609 echo "$ac_t""no" 1>&6
4610 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
4611 echo "configure:4612: checking for dlopen in -ldl" >&5
4612 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
4613 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4614 echo $ac_n "(cached) $ac_c" 1>&6
4616 ac_save_LIBS="$LIBS"
4618 cat > conftest.$ac_ext <<EOF
4619 #line 4620 "configure"
4620 #include "confdefs.h"
4621 /* Override any gcc2 internal prototype to avoid an error. */
4622 /* We use char because int might match the return type of a gcc2
4623 builtin and then its argument prototype would still apply. */
4630 if { (eval echo configure:4631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4632 eval "ac_cv_lib_$ac_lib_var=yes"
4634 echo "configure: failed program was:" >&5
4635 cat conftest.$ac_ext >&5
4637 eval "ac_cv_lib_$ac_lib_var=no"
4640 LIBS="$ac_save_LIBS"
4643 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4644 echo "$ac_t""yes" 1>&6
4645 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4646 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4647 cat >> confdefs.h <<EOF
4648 #define $ac_tr_lib 1
4654 echo "$ac_t""no" 1>&6
4660 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4661 echo "configure:4662: checking for sigset in -lV3" >&5
4662 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4663 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4664 echo $ac_n "(cached) $ac_c" 1>&6
4666 ac_save_LIBS="$LIBS"
4668 cat > conftest.$ac_ext <<EOF
4669 #line 4670 "configure"
4670 #include "confdefs.h"
4671 /* Override any gcc2 internal prototype to avoid an error. */
4672 /* We use char because int might match the return type of a gcc2
4673 builtin and then its argument prototype would still apply. */
4680 if { (eval echo configure:4681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4682 eval "ac_cv_lib_$ac_lib_var=yes"
4684 echo "configure: failed program was:" >&5
4685 cat conftest.$ac_ext >&5
4687 eval "ac_cv_lib_$ac_lib_var=no"
4690 LIBS="$ac_save_LIBS"
4693 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4694 echo "$ac_t""yes" 1>&6
4695 ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4696 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4697 cat >> confdefs.h <<EOF
4698 #define $ac_tr_lib 1
4704 echo "$ac_t""no" 1>&6
4708 if test $ac_cv_header_winsock_h = yes; then
4709 echo $ac_n "checking for winsock""... $ac_c" 1>&6
4710 echo "configure:4711: checking for winsock" >&5
4711 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
4712 echo $ac_n "(cached) $ac_c" 1>&6
4714 cat > conftest.$ac_ext <<EOF
4715 #line 4716 "configure"
4716 #include "confdefs.h"
4717 #include <winsock.h>
4721 select(0,NULL,NULL,NULL,NULL);
4723 gethostname(NULL,0);
4727 if { (eval echo configure:4728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4731 echo "configure: failed program was:" >&5
4732 cat conftest.$ac_ext >&5
4739 echo "$ac_t""$ol_cv_winsock" 1>&6
4741 if test $ol_cv_winsock = yes ; then
4742 cat >> confdefs.h <<\EOF
4743 #define HAVE_WINSOCK 1
4746 ac_cv_func_socket=yes
4747 ac_cv_func_select=yes
4748 ac_cv_func_closesocket=yes
4749 ac_cv_func_gethostname=yes
4754 echo $ac_n "checking for socket""... $ac_c" 1>&6
4755 echo "configure:4756: checking for socket" >&5
4756 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4757 echo $ac_n "(cached) $ac_c" 1>&6
4759 cat > conftest.$ac_ext <<EOF
4760 #line 4761 "configure"
4761 #include "confdefs.h"
4762 /* System header to define __stub macros and hopefully few prototypes,
4763 which can conflict with char socket(); below. */
4765 /* Override any gcc2 internal prototype to avoid an error. */
4766 /* We use char because int might match the return type of a gcc2
4767 builtin and then its argument prototype would still apply. */
4773 /* The GNU C library defines this for functions which it implements
4774 to always fail with ENOSYS. Some functions are actually named
4775 something starting with __ and the normal name is an alias. */
4776 #if defined (__stub_socket) || defined (__stub___socket)
4784 if { (eval echo configure:4785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4786 eval "ac_cv_func_socket=yes"
4788 echo "configure: failed program was:" >&5
4789 cat conftest.$ac_ext >&5
4791 eval "ac_cv_func_socket=no"
4796 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4797 echo "$ac_t""yes" 1>&6
4800 echo "$ac_t""no" 1>&6
4802 echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4803 echo "configure:4804: checking for main in -lsocket" >&5
4804 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4805 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4806 echo $ac_n "(cached) $ac_c" 1>&6
4808 ac_save_LIBS="$LIBS"
4809 LIBS="-lsocket $LIBS"
4810 cat > conftest.$ac_ext <<EOF
4811 #line 4812 "configure"
4812 #include "confdefs.h"
4818 if { (eval echo configure:4819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4820 eval "ac_cv_lib_$ac_lib_var=yes"
4822 echo "configure: failed program was:" >&5
4823 cat conftest.$ac_ext >&5
4825 eval "ac_cv_lib_$ac_lib_var=no"
4828 LIBS="$ac_save_LIBS"
4831 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4832 echo "$ac_t""yes" 1>&6
4833 ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4834 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4835 cat >> confdefs.h <<EOF
4836 #define $ac_tr_lib 1
4839 LIBS="-lsocket $LIBS"
4842 echo "$ac_t""no" 1>&6
4845 echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4846 echo "configure:4847: checking for main in -lnet" >&5
4847 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
4848 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4849 echo $ac_n "(cached) $ac_c" 1>&6
4851 ac_save_LIBS="$LIBS"
4853 cat > conftest.$ac_ext <<EOF
4854 #line 4855 "configure"
4855 #include "confdefs.h"
4861 if { (eval echo configure:4862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4863 eval "ac_cv_lib_$ac_lib_var=yes"
4865 echo "configure: failed program was:" >&5
4866 cat conftest.$ac_ext >&5
4868 eval "ac_cv_lib_$ac_lib_var=no"
4871 LIBS="$ac_save_LIBS"
4874 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4875 echo "$ac_t""yes" 1>&6
4876 ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4877 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4878 cat >> confdefs.h <<EOF
4879 #define $ac_tr_lib 1
4885 echo "$ac_t""no" 1>&6
4888 echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
4889 echo "configure:4890: checking for main in -lnsl_s" >&5
4890 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
4891 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4892 echo $ac_n "(cached) $ac_c" 1>&6
4894 ac_save_LIBS="$LIBS"
4895 LIBS="-lnsl_s $LIBS"
4896 cat > conftest.$ac_ext <<EOF
4897 #line 4898 "configure"
4898 #include "confdefs.h"
4904 if { (eval echo configure:4905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4906 eval "ac_cv_lib_$ac_lib_var=yes"
4908 echo "configure: failed program was:" >&5
4909 cat conftest.$ac_ext >&5
4911 eval "ac_cv_lib_$ac_lib_var=no"
4914 LIBS="$ac_save_LIBS"
4917 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4918 echo "$ac_t""yes" 1>&6
4919 ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4920 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4921 cat >> confdefs.h <<EOF
4922 #define $ac_tr_lib 1
4925 LIBS="-lnsl_s $LIBS"
4928 echo "$ac_t""no" 1>&6
4931 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
4932 echo "configure:4933: checking for main in -lnsl" >&5
4933 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
4934 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4935 echo $ac_n "(cached) $ac_c" 1>&6
4937 ac_save_LIBS="$LIBS"
4939 cat > conftest.$ac_ext <<EOF
4940 #line 4941 "configure"
4941 #include "confdefs.h"
4947 if { (eval echo configure:4948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4949 eval "ac_cv_lib_$ac_lib_var=yes"
4951 echo "configure: failed program was:" >&5
4952 cat conftest.$ac_ext >&5
4954 eval "ac_cv_lib_$ac_lib_var=no"
4957 LIBS="$ac_save_LIBS"
4960 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4961 echo "$ac_t""yes" 1>&6
4962 ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4963 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4964 cat >> confdefs.h <<EOF
4965 #define $ac_tr_lib 1
4971 echo "$ac_t""no" 1>&6
4974 echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
4975 echo "configure:4976: checking for socket in -linet" >&5
4976 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
4977 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4978 echo $ac_n "(cached) $ac_c" 1>&6
4980 ac_save_LIBS="$LIBS"
4982 cat > conftest.$ac_ext <<EOF
4983 #line 4984 "configure"
4984 #include "confdefs.h"
4985 /* Override any gcc2 internal prototype to avoid an error. */
4986 /* We use char because int might match the return type of a gcc2
4987 builtin and then its argument prototype would still apply. */
4994 if { (eval echo configure:4995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4996 eval "ac_cv_lib_$ac_lib_var=yes"
4998 echo "configure: failed program was:" >&5
4999 cat conftest.$ac_ext >&5
5001 eval "ac_cv_lib_$ac_lib_var=no"
5004 LIBS="$ac_save_LIBS"
5007 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5008 echo "$ac_t""yes" 1>&6
5009 ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5010 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5011 cat >> confdefs.h <<EOF
5012 #define $ac_tr_lib 1
5018 echo "$ac_t""no" 1>&6
5021 echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5022 echo "configure:5023: checking for main in -lgen" >&5
5023 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5024 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5025 echo $ac_n "(cached) $ac_c" 1>&6
5027 ac_save_LIBS="$LIBS"
5029 cat > conftest.$ac_ext <<EOF
5030 #line 5031 "configure"
5031 #include "confdefs.h"
5037 if { (eval echo configure:5038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5039 eval "ac_cv_lib_$ac_lib_var=yes"
5041 echo "configure: failed program was:" >&5
5042 cat conftest.$ac_ext >&5
5044 eval "ac_cv_lib_$ac_lib_var=no"
5047 LIBS="$ac_save_LIBS"
5050 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5051 echo "$ac_t""yes" 1>&6
5052 ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5053 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5054 cat >> confdefs.h <<EOF
5055 #define $ac_tr_lib 1
5061 echo "$ac_t""no" 1>&6
5068 echo $ac_n "checking for select""... $ac_c" 1>&6
5069 echo "configure:5070: checking for select" >&5
5070 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5071 echo $ac_n "(cached) $ac_c" 1>&6
5073 cat > conftest.$ac_ext <<EOF
5074 #line 5075 "configure"
5075 #include "confdefs.h"
5076 /* System header to define __stub macros and hopefully few prototypes,
5077 which can conflict with char select(); below. */
5079 /* Override any gcc2 internal prototype to avoid an error. */
5080 /* We use char because int might match the return type of a gcc2
5081 builtin and then its argument prototype would still apply. */
5087 /* The GNU C library defines this for functions which it implements
5088 to always fail with ENOSYS. Some functions are actually named
5089 something starting with __ and the normal name is an alias. */
5090 #if defined (__stub_select) || defined (__stub___select)
5098 if { (eval echo configure:5099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5100 eval "ac_cv_func_select=yes"
5102 echo "configure: failed program was:" >&5
5103 cat conftest.$ac_ext >&5
5105 eval "ac_cv_func_select=no"
5110 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5111 echo "$ac_t""yes" 1>&6
5114 echo "$ac_t""no" 1>&6
5115 { echo "configure: error: select() required." 1>&2; exit 1; }
5119 if test "${ac_cv_header_winsock_h}" != yes; then
5120 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5121 echo "configure:5122: checking types of arguments for select()" >&5
5122 if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5123 echo $ac_n "(cached) $ac_c" 1>&6
5125 if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5126 echo $ac_n "(cached) $ac_c" 1>&6
5128 if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5129 echo $ac_n "(cached) $ac_c" 1>&6
5131 for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5132 for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5133 for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5134 cat > conftest.$ac_ext <<EOF
5135 #line 5136 "configure"
5136 #include "confdefs.h"
5137 #ifdef HAVE_SYS_TYPES_H
5138 #include <sys/types.h>
5140 #ifdef HAVE_SYS_TIME_H
5141 #include <sys/time.h>
5143 #ifdef HAVE_SYS_SELECT_H
5144 #include <sys/select.h>
5146 #ifdef HAVE_SYS_SOCKET_H
5147 #include <sys/socket.h>
5149 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);
5154 if { (eval echo configure:5155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5156 ac_not_found=no ; break 3
5158 echo "configure: failed program was:" >&5
5159 cat conftest.$ac_ext >&5
5173 if test "$ac_not_found" = yes; then
5174 ac_cv_func_select_arg1=int
5175 ac_cv_func_select_arg234='int *'
5176 ac_cv_func_select_arg5='struct timeval *'
5178 echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5179 cat >> confdefs.h <<EOF
5180 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5183 cat >> confdefs.h <<EOF
5184 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5187 cat >> confdefs.h <<EOF
5188 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5195 for ac_hdr in regex.h
5197 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5198 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5199 echo "configure:5200: checking for $ac_hdr" >&5
5200 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5201 echo $ac_n "(cached) $ac_c" 1>&6
5203 cat > conftest.$ac_ext <<EOF
5204 #line 5205 "configure"
5205 #include "confdefs.h"
5208 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5209 { (eval echo configure:5210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5210 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5211 if test -z "$ac_err"; then
5213 eval "ac_cv_header_$ac_safe=yes"
5216 echo "configure: failed program was:" >&5
5217 cat conftest.$ac_ext >&5
5219 eval "ac_cv_header_$ac_safe=no"
5223 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5224 echo "$ac_t""yes" 1>&6
5225 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5226 cat >> confdefs.h <<EOF
5227 #define $ac_tr_hdr 1
5231 echo "$ac_t""no" 1>&6
5235 if test "$ac_cv_header_regex_h" != yes ; then
5236 { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5238 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5239 echo "configure:5240: checking for regfree" >&5
5240 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5241 echo $ac_n "(cached) $ac_c" 1>&6
5243 cat > conftest.$ac_ext <<EOF
5244 #line 5245 "configure"
5245 #include "confdefs.h"
5246 /* System header to define __stub macros and hopefully few prototypes,
5247 which can conflict with char regfree(); below. */
5249 /* Override any gcc2 internal prototype to avoid an error. */
5250 /* We use char because int might match the return type of a gcc2
5251 builtin and then its argument prototype would still apply. */
5257 /* The GNU C library defines this for functions which it implements
5258 to always fail with ENOSYS. Some functions are actually named
5259 something starting with __ and the normal name is an alias. */
5260 #if defined (__stub_regfree) || defined (__stub___regfree)
5268 if { (eval echo configure:5269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5270 eval "ac_cv_func_regfree=yes"
5272 echo "configure: failed program was:" >&5
5273 cat conftest.$ac_ext >&5
5275 eval "ac_cv_func_regfree=no"
5280 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5281 echo "$ac_t""yes" 1>&6
5284 echo "$ac_t""no" 1>&6
5285 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5290 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5291 echo "configure:5292: checking for compatible POSIX regex" >&5
5292 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5293 echo $ac_n "(cached) $ac_c" 1>&6
5296 if test "$cross_compiling" = yes; then
5297 ol_cv_c_posix_regex=cross
5299 cat > conftest.$ac_ext <<EOF
5300 #line 5301 "configure"
5301 #include "confdefs.h"
5303 #include <sys/types.h>
5305 static char *pattern, *string;
5313 if(regcomp(&re, pattern, 0)) {
5317 string = "ALL MATCH";
5319 rc = regexec(&re, string, 0, (void*)0, 0);
5326 if { (eval echo configure:5327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5328 ol_cv_c_posix_regex=yes
5330 echo "configure: failed program was:" >&5
5331 cat conftest.$ac_ext >&5
5333 ol_cv_c_posix_regex=no
5340 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5342 if test "$ol_cv_c_posix_regex" = no ; then
5343 { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5347 echo $ac_n "checking for res_query""... $ac_c" 1>&6
5348 echo "configure:5349: checking for res_query" >&5
5349 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
5350 echo $ac_n "(cached) $ac_c" 1>&6
5352 cat > conftest.$ac_ext <<EOF
5353 #line 5354 "configure"
5354 #include "confdefs.h"
5355 /* System header to define __stub macros and hopefully few prototypes,
5356 which can conflict with char res_query(); below. */
5358 /* Override any gcc2 internal prototype to avoid an error. */
5359 /* We use char because int might match the return type of a gcc2
5360 builtin and then its argument prototype would still apply. */
5366 /* The GNU C library defines this for functions which it implements
5367 to always fail with ENOSYS. Some functions are actually named
5368 something starting with __ and the normal name is an alias. */
5369 #if defined (__stub_res_query) || defined (__stub___res_query)
5377 if { (eval echo configure:5378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5379 eval "ac_cv_func_res_query=yes"
5381 echo "configure: failed program was:" >&5
5382 cat conftest.$ac_ext >&5
5384 eval "ac_cv_func_res_query=no"
5389 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
5390 echo "$ac_t""yes" 1>&6
5393 echo "$ac_t""no" 1>&6
5396 if test $ac_cv_func_res_query = no ; then
5397 echo $ac_n "checking for __res_query""... $ac_c" 1>&6
5398 echo "configure:5399: checking for __res_query" >&5
5399 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
5400 echo $ac_n "(cached) $ac_c" 1>&6
5402 cat > conftest.$ac_ext <<EOF
5403 #line 5404 "configure"
5404 #include "confdefs.h"
5405 /* System header to define __stub macros and hopefully few prototypes,
5406 which can conflict with char __res_query(); below. */
5408 /* Override any gcc2 internal prototype to avoid an error. */
5409 /* We use char because int might match the return type of a gcc2
5410 builtin and then its argument prototype would still apply. */
5416 /* The GNU C library defines this for functions which it implements
5417 to always fail with ENOSYS. Some functions are actually named
5418 something starting with __ and the normal name is an alias. */
5419 #if defined (__stub___res_query) || defined (__stub_____res_query)
5427 if { (eval echo configure:5428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5429 eval "ac_cv_func___res_query=yes"
5431 echo "configure: failed program was:" >&5
5432 cat conftest.$ac_ext >&5
5434 eval "ac_cv_func___res_query=no"
5439 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
5440 echo "$ac_t""yes" 1>&6
5443 echo "$ac_t""no" 1>&6
5446 ac_cv_func_res_query=$ac_cv_func___res_query
5449 if test $ac_cv_func_res_query = no ; then
5450 echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
5451 echo "configure:5452: checking for res_query in -lbind" >&5
5452 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
5453 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5454 echo $ac_n "(cached) $ac_c" 1>&6
5456 ac_save_LIBS="$LIBS"
5458 cat > conftest.$ac_ext <<EOF
5459 #line 5460 "configure"
5460 #include "confdefs.h"
5461 /* Override any gcc2 internal prototype to avoid an error. */
5462 /* We use char because int might match the return type of a gcc2
5463 builtin and then its argument prototype would still apply. */
5470 if { (eval echo configure:5471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5472 eval "ac_cv_lib_$ac_lib_var=yes"
5474 echo "configure: failed program was:" >&5
5475 cat conftest.$ac_ext >&5
5477 eval "ac_cv_lib_$ac_lib_var=no"
5480 LIBS="$ac_save_LIBS"
5483 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5484 echo "$ac_t""yes" 1>&6
5485 ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5486 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5487 cat >> confdefs.h <<EOF
5488 #define $ac_tr_lib 1
5494 echo "$ac_t""no" 1>&6
5497 ac_cv_func_res_query=$ac_cv_lib_bind_res_query
5500 if test $ac_cv_func_res_query = no ; then
5501 echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
5502 echo "configure:5503: checking for __res_query in -lbind" >&5
5503 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
5504 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5505 echo $ac_n "(cached) $ac_c" 1>&6
5507 ac_save_LIBS="$LIBS"
5509 cat > conftest.$ac_ext <<EOF
5510 #line 5511 "configure"
5511 #include "confdefs.h"
5512 /* Override any gcc2 internal prototype to avoid an error. */
5513 /* We use char because int might match the return type of a gcc2
5514 builtin and then its argument prototype would still apply. */
5521 if { (eval echo configure:5522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5523 eval "ac_cv_lib_$ac_lib_var=yes"
5525 echo "configure: failed program was:" >&5
5526 cat conftest.$ac_ext >&5
5528 eval "ac_cv_lib_$ac_lib_var=no"
5531 LIBS="$ac_save_LIBS"
5534 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5535 echo "$ac_t""yes" 1>&6
5536 ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5537 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5538 cat >> confdefs.h <<EOF
5539 #define $ac_tr_lib 1
5545 echo "$ac_t""no" 1>&6
5548 ac_cv_func_res_query=$ac_cv_lib_bind___res_query
5551 if test $ac_cv_func_res_query = no ; then
5552 echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
5553 echo "configure:5554: checking for res_query in -lresolv" >&5
5554 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
5555 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5556 echo $ac_n "(cached) $ac_c" 1>&6
5558 ac_save_LIBS="$LIBS"
5559 LIBS="-lresolv $LIBS"
5560 cat > conftest.$ac_ext <<EOF
5561 #line 5562 "configure"
5562 #include "confdefs.h"
5563 /* Override any gcc2 internal prototype to avoid an error. */
5564 /* We use char because int might match the return type of a gcc2
5565 builtin and then its argument prototype would still apply. */
5572 if { (eval echo configure:5573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5574 eval "ac_cv_lib_$ac_lib_var=yes"
5576 echo "configure: failed program was:" >&5
5577 cat conftest.$ac_ext >&5
5579 eval "ac_cv_lib_$ac_lib_var=no"
5582 LIBS="$ac_save_LIBS"
5585 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5586 echo "$ac_t""yes" 1>&6
5587 ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5588 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5589 cat >> confdefs.h <<EOF
5590 #define $ac_tr_lib 1
5593 LIBS="-lresolv $LIBS"
5596 echo "$ac_t""no" 1>&6
5599 ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
5602 if test $ac_cv_func_res_query = no ; then
5603 echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
5604 echo "configure:5605: checking for __res_query in -lresolv" >&5
5605 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
5606 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5607 echo $ac_n "(cached) $ac_c" 1>&6
5609 ac_save_LIBS="$LIBS"
5610 LIBS="-lresolv $LIBS"
5611 cat > conftest.$ac_ext <<EOF
5612 #line 5613 "configure"
5613 #include "confdefs.h"
5614 /* Override any gcc2 internal prototype to avoid an error. */
5615 /* We use char because int might match the return type of a gcc2
5616 builtin and then its argument prototype would still apply. */
5623 if { (eval echo configure:5624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5625 eval "ac_cv_lib_$ac_lib_var=yes"
5627 echo "configure: failed program was:" >&5
5628 cat conftest.$ac_ext >&5
5630 eval "ac_cv_lib_$ac_lib_var=no"
5633 LIBS="$ac_save_LIBS"
5636 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5637 echo "$ac_t""yes" 1>&6
5638 ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5639 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5640 cat >> confdefs.h <<EOF
5641 #define $ac_tr_lib 1
5644 LIBS="-lresolv $LIBS"
5647 echo "$ac_t""no" 1>&6
5650 ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
5653 if test "$ac_cv_func_res_query" = yes ; then
5654 cat >> confdefs.h <<\EOF
5655 #define HAVE_RES_QUERY 1
5659 if test $ol_enable_dnssrv != no ; then
5664 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
5665 { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
5668 for ac_func in getaddrinfo gai_strerror inet_ntop
5670 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5671 echo "configure:5672: checking for $ac_func" >&5
5672 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
5673 echo $ac_n "(cached) $ac_c" 1>&6
5675 cat > conftest.$ac_ext <<EOF
5676 #line 5677 "configure"
5677 #include "confdefs.h"
5678 /* System header to define __stub macros and hopefully few prototypes,
5679 which can conflict with char $ac_func(); below. */
5681 /* Override any gcc2 internal prototype to avoid an error. */
5682 /* We use char because int might match the return type of a gcc2
5683 builtin and then its argument prototype would still apply. */
5689 /* The GNU C library defines this for functions which it implements
5690 to always fail with ENOSYS. Some functions are actually named
5691 something starting with __ and the normal name is an alias. */
5692 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5700 if { (eval echo configure:5701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5702 eval "ac_cv_func_$ac_func=yes"
5704 echo "configure: failed program was:" >&5
5705 cat conftest.$ac_ext >&5
5707 eval "ac_cv_func_$ac_func=no"
5712 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5713 echo "$ac_t""yes" 1>&6
5714 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5715 cat >> confdefs.h <<EOF
5716 #define $ac_tr_func 1
5720 echo "$ac_t""no" 1>&6
5726 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
5727 if test $ol_enable_ipv6 = yes ; then
5728 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
5730 elif test $ol_enable_ipv6 != no ; then
5731 echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
5732 echo "configure:5733: checking INET6_ADDRSTRLEN" >&5
5733 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
5734 echo $ac_n "(cached) $ac_c" 1>&6
5737 cat > conftest.$ac_ext <<EOF
5738 #line 5739 "configure"
5739 #include "confdefs.h"
5741 # include <netinet/in.h>
5742 # ifdef INET6_ADDRSTRLEN
5743 __has_inet6_addrstrlen__;
5747 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5748 egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
5750 ol_cv_inet6_addrstrlen=yes
5753 ol_cv_inet6_addrstrlen=no
5759 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
5761 if test $ol_cv_inet6_addrstrlen = yes ; then
5763 elif test $ol_enable_ipv6 = yes ; then
5764 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
5768 if test $ol_enable_local != no ; then
5769 for ac_hdr in sys/un.h
5771 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5772 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5773 echo "configure:5774: checking for $ac_hdr" >&5
5774 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5775 echo $ac_n "(cached) $ac_c" 1>&6
5777 cat > conftest.$ac_ext <<EOF
5778 #line 5779 "configure"
5779 #include "confdefs.h"
5782 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5783 { (eval echo configure:5784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5784 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5785 if test -z "$ac_err"; then
5787 eval "ac_cv_header_$ac_safe=yes"
5790 echo "configure: failed program was:" >&5
5791 cat conftest.$ac_ext >&5
5793 eval "ac_cv_header_$ac_safe=no"
5797 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5798 echo "$ac_t""yes" 1>&6
5799 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5800 cat >> confdefs.h <<EOF
5801 #define $ac_tr_hdr 1
5805 echo "$ac_t""no" 1>&6
5810 if test $ol_enable_local = auto ; then
5811 ol_enable_local=$ac_cv_header_sys_un_h
5812 elif test $ac_cv_header_sys_un_h = no ; then
5813 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
5822 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
5823 -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
5824 -o $ol_with_kerberos = k425 ; then
5826 for ac_hdr in krb5.h
5828 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5829 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5830 echo "configure:5831: checking for $ac_hdr" >&5
5831 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5832 echo $ac_n "(cached) $ac_c" 1>&6
5834 cat > conftest.$ac_ext <<EOF
5835 #line 5836 "configure"
5836 #include "confdefs.h"
5839 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5840 { (eval echo configure:5841: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5841 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5842 if test -z "$ac_err"; then
5844 eval "ac_cv_header_$ac_safe=yes"
5847 echo "configure: failed program was:" >&5
5848 cat conftest.$ac_ext >&5
5850 eval "ac_cv_header_$ac_safe=no"
5854 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5855 echo "$ac_t""yes" 1>&6
5856 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5857 cat >> confdefs.h <<EOF
5858 #define $ac_tr_hdr 1
5862 echo "$ac_t""no" 1>&6
5867 if test $ac_cv_header_krb5_h = yes ; then
5868 for ac_hdr in heim_err.h
5870 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5871 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5872 echo "configure:5873: checking for $ac_hdr" >&5
5873 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5874 echo $ac_n "(cached) $ac_c" 1>&6
5876 cat > conftest.$ac_ext <<EOF
5877 #line 5878 "configure"
5878 #include "confdefs.h"
5881 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5882 { (eval echo configure:5883: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5883 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5884 if test -z "$ac_err"; then
5886 eval "ac_cv_header_$ac_safe=yes"
5889 echo "configure: failed program was:" >&5
5890 cat conftest.$ac_ext >&5
5892 eval "ac_cv_header_$ac_safe=no"
5896 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5897 echo "$ac_t""yes" 1>&6
5898 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5899 cat >> confdefs.h <<EOF
5900 #define $ac_tr_hdr 1
5904 echo "$ac_t""no" 1>&6
5908 if test $ac_cv_header_heim_err_h = yes ; then
5914 if test $krb5_impl = mit; then
5915 echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
5916 echo "configure:5917: checking for main in -lk5crypto" >&5
5917 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
5918 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5919 echo $ac_n "(cached) $ac_c" 1>&6
5921 ac_save_LIBS="$LIBS"
5922 LIBS="-lk5crypto $LIBS"
5923 cat > conftest.$ac_ext <<EOF
5924 #line 5925 "configure"
5925 #include "confdefs.h"
5931 if { (eval echo configure:5932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5933 eval "ac_cv_lib_$ac_lib_var=yes"
5935 echo "configure: failed program was:" >&5
5936 cat conftest.$ac_ext >&5
5938 eval "ac_cv_lib_$ac_lib_var=no"
5941 LIBS="$ac_save_LIBS"
5944 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5945 echo "$ac_t""yes" 1>&6
5948 echo "$ac_t""no" 1>&6
5953 echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5954 echo "configure:5955: checking for main in -lkrb5" >&5
5955 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5956 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5957 echo $ac_n "(cached) $ac_c" 1>&6
5959 ac_save_LIBS="$LIBS"
5960 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
5961 cat > conftest.$ac_ext <<EOF
5962 #line 5963 "configure"
5963 #include "confdefs.h"
5969 if { (eval echo configure:5970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5971 eval "ac_cv_lib_$ac_lib_var=yes"
5973 echo "configure: failed program was:" >&5
5974 cat conftest.$ac_ext >&5
5976 eval "ac_cv_lib_$ac_lib_var=no"
5979 LIBS="$ac_save_LIBS"
5982 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5983 echo "$ac_t""yes" 1>&6
5985 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
5987 echo "$ac_t""no" 1>&6
5992 elif test $krb5_impl = heimdal; then
5993 echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5994 echo "configure:5995: checking for main in -lkrb5" >&5
5995 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5996 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5997 echo $ac_n "(cached) $ac_c" 1>&6
5999 ac_save_LIBS="$LIBS"
6000 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6001 cat > conftest.$ac_ext <<EOF
6002 #line 6003 "configure"
6003 #include "confdefs.h"
6009 if { (eval echo configure:6010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6011 eval "ac_cv_lib_$ac_lib_var=yes"
6013 echo "configure: failed program was:" >&5
6014 cat conftest.$ac_ext >&5
6016 eval "ac_cv_lib_$ac_lib_var=no"
6019 LIBS="$ac_save_LIBS"
6022 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6023 echo "$ac_t""yes" 1>&6
6025 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
6027 echo "$ac_t""no" 1>&6
6032 cat >> confdefs.h <<\EOF
6033 #define HAVE_HEIMDAL_KERBEROS 1
6039 echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
6042 if test $have_krb5 = yes ; then
6045 cat >> confdefs.h <<\EOF
6050 if test $ol_enable_kpasswd != no ; then
6051 ol_link_kpasswd=yes;
6054 if test $ol_with_kerberos = k5only ; then
6055 ol_with_kerberos=found
6058 elif test $ol_with_kerberos != auto ; then
6059 { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
6065 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
6066 $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
6068 for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
6070 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6071 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6072 echo "configure:6073: checking for $ac_hdr" >&5
6073 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6074 echo $ac_n "(cached) $ac_c" 1>&6
6076 cat > conftest.$ac_ext <<EOF
6077 #line 6078 "configure"
6078 #include "confdefs.h"
6081 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6082 { (eval echo configure:6083: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6083 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6084 if test -z "$ac_err"; then
6086 eval "ac_cv_header_$ac_safe=yes"
6089 echo "configure: failed program was:" >&5
6090 cat conftest.$ac_ext >&5
6092 eval "ac_cv_header_$ac_safe=no"
6096 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6097 echo "$ac_t""yes" 1>&6
6098 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6099 cat >> confdefs.h <<EOF
6100 #define $ac_tr_hdr 1
6104 echo "$ac_t""no" 1>&6
6109 if test $ac_cv_header_kerberosIV_krb_h = yes ; then
6110 if test $krb5_impl = mit; then
6111 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6112 echo "configure:6113: checking for main in -lkrb4" >&5
6113 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6114 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6115 echo $ac_n "(cached) $ac_c" 1>&6
6117 ac_save_LIBS="$LIBS"
6118 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
6119 cat > conftest.$ac_ext <<EOF
6120 #line 6121 "configure"
6121 #include "confdefs.h"
6127 if { (eval echo configure:6128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6129 eval "ac_cv_lib_$ac_lib_var=yes"
6131 echo "configure: failed program was:" >&5
6132 cat conftest.$ac_ext >&5
6134 eval "ac_cv_lib_$ac_lib_var=no"
6137 LIBS="$ac_save_LIBS"
6140 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6141 echo "$ac_t""yes" 1>&6
6143 KRB4_LIBS="-lkrb4 -ldes425"
6145 echo "$ac_t""no" 1>&6
6150 elif test $krb5_impl = heimdal; then
6151 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6152 echo "configure:6153: checking for main in -lkrb4" >&5
6153 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6154 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6155 echo $ac_n "(cached) $ac_c" 1>&6
6157 ac_save_LIBS="$LIBS"
6158 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6159 cat > conftest.$ac_ext <<EOF
6160 #line 6161 "configure"
6161 #include "confdefs.h"
6167 if { (eval echo configure:6168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6169 eval "ac_cv_lib_$ac_lib_var=yes"
6171 echo "configure: failed program was:" >&5
6172 cat conftest.$ac_ext >&5
6174 eval "ac_cv_lib_$ac_lib_var=no"
6177 LIBS="$ac_save_LIBS"
6180 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6181 echo "$ac_t""yes" 1>&6
6185 echo "$ac_t""no" 1>&6
6192 echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6195 if test $have_k425 = yes ; then
6196 ol_with_kerberos=found
6199 cat >> confdefs.h <<\EOF
6200 #define HAVE_KRB425 1
6203 cat >> confdefs.h <<\EOF
6208 echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
6209 echo "configure:6210: checking for des_debug in Kerberos libraries" >&5
6210 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
6211 echo $ac_n "(cached) $ac_c" 1>&6
6215 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
6216 cat > conftest.$ac_ext <<EOF
6217 #line 6218 "configure"
6218 #include "confdefs.h"
6220 #include <kerberosIV/krb.h>
6221 #include <kerberosIV/des.h>
6222 extern int des_debug;
6230 if { (eval echo configure:6231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6232 ol_cv_var_des_debug=yes
6234 echo "configure: failed program was:" >&5
6235 cat conftest.$ac_ext >&5
6237 ol_cv_var_des_debug=no
6244 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
6246 if test $ol_cv_var_des_debug = yes ; then
6247 cat >> confdefs.h <<\EOF
6248 #define HAVE_DES_DEBUG 1
6258 if test $ol_link_krb5 = yes ; then
6259 ol_with_kerberos=found
6262 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
6263 -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
6265 for ac_hdr in krb.h des.h krb-archaeology.h
6267 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6268 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6269 echo "configure:6270: checking for $ac_hdr" >&5
6270 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6271 echo $ac_n "(cached) $ac_c" 1>&6
6273 cat > conftest.$ac_ext <<EOF
6274 #line 6275 "configure"
6275 #include "confdefs.h"
6278 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6279 { (eval echo configure:6280: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6280 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6281 if test -z "$ac_err"; then
6283 eval "ac_cv_header_$ac_safe=yes"
6286 echo "configure: failed program was:" >&5
6287 cat conftest.$ac_ext >&5
6289 eval "ac_cv_header_$ac_safe=no"
6293 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6294 echo "$ac_t""yes" 1>&6
6295 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6296 cat >> confdefs.h <<EOF
6297 #define $ac_tr_hdr 1
6301 echo "$ac_t""no" 1>&6
6306 if test $ac_cv_header_krb_h = yes ; then
6307 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6308 echo "configure:6309: checking for main in -lkrb" >&5
6309 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6310 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6311 echo $ac_n "(cached) $ac_c" 1>&6
6313 ac_save_LIBS="$LIBS"
6314 LIBS="-lkrb -ldes $LIBS"
6315 cat > conftest.$ac_ext <<EOF
6316 #line 6317 "configure"
6317 #include "confdefs.h"
6323 if { (eval echo configure:6324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6325 eval "ac_cv_lib_$ac_lib_var=yes"
6327 echo "configure: failed program was:" >&5
6328 cat conftest.$ac_ext >&5
6330 eval "ac_cv_lib_$ac_lib_var=no"
6333 LIBS="$ac_save_LIBS"
6336 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6337 echo "$ac_t""yes" 1>&6
6340 echo "$ac_t""no" 1>&6
6345 if test $have_k4 = yes ; then
6346 ol_with_kerberos=found
6349 cat >> confdefs.h <<\EOF
6354 KRB4_LIBS="-lkrb -ldes"
6356 if test $ac_cv_header_krb_archaeology_h = yes ; then
6357 cat >> confdefs.h <<\EOF
6358 #define HAVE_KTH_KERBEROS 1
6366 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6370 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
6373 elif test $ol_enable_kbind = yes ; then
6374 { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
6377 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6378 cat >> confdefs.h <<\EOF
6379 #define HAVE_KERBEROS 1
6383 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6384 { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
6388 if test $ol_with_tls != no ; then
6389 for ac_hdr in openssl/ssl.h ssl.h
6391 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6392 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6393 echo "configure:6394: checking for $ac_hdr" >&5
6394 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6395 echo $ac_n "(cached) $ac_c" 1>&6
6397 cat > conftest.$ac_ext <<EOF
6398 #line 6399 "configure"
6399 #include "confdefs.h"
6402 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6403 { (eval echo configure:6404: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6404 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6405 if test -z "$ac_err"; then
6407 eval "ac_cv_header_$ac_safe=yes"
6410 echo "configure: failed program was:" >&5
6411 cat conftest.$ac_ext >&5
6413 eval "ac_cv_header_$ac_safe=no"
6417 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6418 echo "$ac_t""yes" 1>&6
6419 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6420 cat >> confdefs.h <<EOF
6421 #define $ac_tr_hdr 1
6425 echo "$ac_t""no" 1>&6
6430 if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6431 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6432 echo "configure:6433: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6433 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6434 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6435 echo $ac_n "(cached) $ac_c" 1>&6
6437 ac_save_LIBS="$LIBS"
6438 LIBS="-lssl -lcrypto $LIBS"
6439 cat > conftest.$ac_ext <<EOF
6440 #line 6441 "configure"
6441 #include "confdefs.h"
6442 /* Override any gcc2 internal prototype to avoid an error. */
6443 /* We use char because int might match the return type of a gcc2
6444 builtin and then its argument prototype would still apply. */
6445 char SSLeay_add_ssl_algorithms();
6448 SSLeay_add_ssl_algorithms()
6451 if { (eval echo configure:6452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6453 eval "ac_cv_lib_$ac_lib_var=yes"
6455 echo "configure: failed program was:" >&5
6456 cat conftest.$ac_ext >&5
6458 eval "ac_cv_lib_$ac_lib_var=no"
6461 LIBS="$ac_save_LIBS"
6464 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6465 echo "$ac_t""yes" 1>&6
6469 echo "$ac_t""no" 1>&6
6474 if test $have_ssleay = no ; then
6475 echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6476 echo "configure:6477: checking for SSL_library_init in -lssl" >&5
6477 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6478 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6479 echo $ac_n "(cached) $ac_c" 1>&6
6481 ac_save_LIBS="$LIBS"
6482 LIBS="-lssl -lcrypto $LIBS"
6483 cat > conftest.$ac_ext <<EOF
6484 #line 6485 "configure"
6485 #include "confdefs.h"
6486 /* Override any gcc2 internal prototype to avoid an error. */
6487 /* We use char because int might match the return type of a gcc2
6488 builtin and then its argument prototype would still apply. */
6489 char SSL_library_init();
6495 if { (eval echo configure:6496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6497 eval "ac_cv_lib_$ac_lib_var=yes"
6499 echo "configure: failed program was:" >&5
6500 cat conftest.$ac_ext >&5
6502 eval "ac_cv_lib_$ac_lib_var=no"
6505 LIBS="$ac_save_LIBS"
6508 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6509 echo "$ac_t""yes" 1>&6
6513 echo "$ac_t""no" 1>&6
6519 if test $have_ssleay = no ; then
6520 echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6521 echo "configure:6522: checking for ssl3_accept in -lssl" >&5
6522 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6523 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6524 echo $ac_n "(cached) $ac_c" 1>&6
6526 ac_save_LIBS="$LIBS"
6527 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6528 cat > conftest.$ac_ext <<EOF
6529 #line 6530 "configure"
6530 #include "confdefs.h"
6531 /* Override any gcc2 internal prototype to avoid an error. */
6532 /* We use char because int might match the return type of a gcc2
6533 builtin and then its argument prototype would still apply. */
6540 if { (eval echo configure:6541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6542 eval "ac_cv_lib_$ac_lib_var=yes"
6544 echo "configure: failed program was:" >&5
6545 cat conftest.$ac_ext >&5
6547 eval "ac_cv_lib_$ac_lib_var=no"
6550 LIBS="$ac_save_LIBS"
6553 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6554 echo "$ac_t""yes" 1>&6
6558 echo "$ac_t""no" 1>&6
6564 if test $have_ssleay = yes ; then
6568 cat >> confdefs.h <<\EOF
6569 #define HAVE_SSLEAY 1
6573 if test $need_rsaref = yes; then
6574 cat >> confdefs.h <<\EOF
6575 #define HAVE_RSAREF 1
6579 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6581 TLS_LIBS="-lssl -lcrypto"
6587 echo "configure: warning: TLS privacy protection not supported!" 1>&2
6590 if test $ol_link_tls = yes ; then
6591 cat >> confdefs.h <<\EOF
6596 elif test $ol_with_tls = auto ; then
6597 echo "configure: warning: Could not locate TLS/SSL package" 1>&2
6598 echo "configure: warning: TLS privacy protection not supported!" 1>&2
6600 elif test $ol_with_tls != no ; then
6601 { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
6606 gethostbyname_r gethostbyaddr_r \
6609 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6610 echo "configure:6611: checking for $ac_func" >&5
6611 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6612 echo $ac_n "(cached) $ac_c" 1>&6
6614 cat > conftest.$ac_ext <<EOF
6615 #line 6616 "configure"
6616 #include "confdefs.h"
6617 /* System header to define __stub macros and hopefully few prototypes,
6618 which can conflict with char $ac_func(); below. */
6620 /* Override any gcc2 internal prototype to avoid an error. */
6621 /* We use char because int might match the return type of a gcc2
6622 builtin and then its argument prototype would still apply. */
6628 /* The GNU C library defines this for functions which it implements
6629 to always fail with ENOSYS. Some functions are actually named
6630 something starting with __ and the normal name is an alias. */
6631 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6639 if { (eval echo configure:6640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6641 eval "ac_cv_func_$ac_func=yes"
6643 echo "configure: failed program was:" >&5
6644 cat conftest.$ac_ext >&5
6646 eval "ac_cv_func_$ac_func=no"
6651 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6652 echo "$ac_t""yes" 1>&6
6653 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6654 cat >> confdefs.h <<EOF
6655 #define $ac_tr_func 1
6659 echo "$ac_t""no" 1>&6
6664 if test "$ac_cv_func_ctime_r" = no ; then
6665 ol_cv_func_ctime_r_nargs=0
6667 echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6668 echo "configure:6669: checking number of arguments of ctime_r" >&5
6669 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6670 echo $ac_n "(cached) $ac_c" 1>&6
6672 cat > conftest.$ac_ext <<EOF
6673 #line 6674 "configure"
6674 #include "confdefs.h"
6677 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6680 if { (eval echo configure:6681: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6682 ol_cv_func_ctime_r_nargs3=yes
6684 echo "configure: failed program was:" >&5
6685 cat conftest.$ac_ext >&5
6687 ol_cv_func_ctime_r_nargs3=no
6691 cat > conftest.$ac_ext <<EOF
6692 #line 6693 "configure"
6693 #include "confdefs.h"
6696 time_t ti; char *buffer; ctime_r(&ti,buffer);
6699 if { (eval echo configure:6700: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6701 ol_cv_func_ctime_r_nargs2=yes
6703 echo "configure: failed program was:" >&5
6704 cat conftest.$ac_ext >&5
6706 ol_cv_func_ctime_r_nargs2=no
6710 if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6711 $ol_cv_func_ctime_r_nargs2 = no ; then
6713 ol_cv_func_ctime_r_nargs=3
6715 elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6716 $ol_cv_func_ctime_r_nargs2 = yes ; then
6718 ol_cv_func_ctime_r_nargs=2
6721 ol_cv_func_ctime_r_nargs=0
6726 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6728 if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6729 cat >> confdefs.h <<EOF
6730 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6737 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6738 echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6739 echo "configure:6740: checking number of arguments of gethostbyname_r" >&5
6740 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6741 echo $ac_n "(cached) $ac_c" 1>&6
6743 cat > conftest.$ac_ext <<EOF
6744 #line 6745 "configure"
6745 #include "confdefs.h"
6746 #include <sys/types.h>
6747 #include <sys/socket.h>
6748 #include <netinet/in.h>
6750 #define BUFSIZE (sizeof(struct hostent)+10)
6752 struct hostent hent; char buffer[BUFSIZE];
6753 int bufsize=BUFSIZE;int h_errno;
6754 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6755 buffer, bufsize, &h_errno);
6758 if { (eval echo configure:6759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6760 ol_cv_func_gethostbyname_r_nargs5=yes
6762 echo "configure: failed program was:" >&5
6763 cat conftest.$ac_ext >&5
6765 ol_cv_func_gethostbyname_r_nargs5=no
6769 cat > conftest.$ac_ext <<EOF
6770 #line 6771 "configure"
6771 #include "confdefs.h"
6772 #include <sys/types.h>
6773 #include <sys/socket.h>
6774 #include <netinet/in.h>
6776 #define BUFSIZE (sizeof(struct hostent)+10)
6778 struct hostent hent;struct hostent *rhent;
6779 char buffer[BUFSIZE];
6780 int bufsize=BUFSIZE;int h_errno;
6781 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6785 if { (eval echo configure:6786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6787 ol_cv_func_gethostbyname_r_nargs6=yes
6789 echo "configure: failed program was:" >&5
6790 cat conftest.$ac_ext >&5
6792 ol_cv_func_gethostbyname_r_nargs6=no
6796 if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6797 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6799 ol_cv_func_gethostbyname_r_nargs=5
6801 elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
6802 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
6804 ol_cv_func_gethostbyname_r_nargs=6
6807 ol_cv_func_gethostbyname_r_nargs=0
6812 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6813 if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6814 cat >> confdefs.h <<EOF
6815 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6821 ol_cv_func_gethostbyname_r_nargs=0
6824 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6825 echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6826 echo "configure:6827: checking number of arguments of gethostbyaddr_r" >&5
6827 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6828 echo $ac_n "(cached) $ac_c" 1>&6
6830 cat > conftest.$ac_ext <<EOF
6831 #line 6832 "configure"
6832 #include "confdefs.h"
6833 #include <sys/types.h>
6834 #include <sys/socket.h>
6835 #include <netinet/in.h>
6837 #define BUFSIZE (sizeof(struct hostent)+10)
6839 struct hostent hent; char buffer[BUFSIZE];
6841 size_t alen=sizeof(struct in_addr);
6842 int bufsize=BUFSIZE;int h_errno;
6843 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6844 alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6847 if { (eval echo configure:6848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6849 ol_cv_func_gethostbyaddr_r_nargs7=yes
6851 echo "configure: failed program was:" >&5
6852 cat conftest.$ac_ext >&5
6854 ol_cv_func_gethostbyaddr_r_nargs7=no
6858 cat > conftest.$ac_ext <<EOF
6859 #line 6860 "configure"
6860 #include "confdefs.h"
6861 #include <sys/types.h>
6862 #include <sys/socket.h>
6863 #include <netinet/in.h>
6865 #define BUFSIZE (sizeof(struct hostent)+10)
6867 struct hostent hent;
6868 struct hostent *rhent; char buffer[BUFSIZE];
6870 size_t alen=sizeof(struct in_addr);
6871 int bufsize=BUFSIZE;int h_errno;
6872 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6873 alen, AF_INET, &hent, buffer, bufsize,
6877 if { (eval echo configure:6878: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6879 ol_cv_func_gethostbyaddr_r_nargs8=yes
6881 echo "configure: failed program was:" >&5
6882 cat conftest.$ac_ext >&5
6884 ol_cv_func_gethostbyaddr_r_nargs8=no
6888 if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
6889 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
6891 ol_cv_func_gethostbyaddr_r_nargs=7
6893 elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
6894 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
6896 ol_cv_func_gethostbyaddr_r_nargs=8
6899 ol_cv_func_gethostbyaddr_r_nargs=0
6904 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6905 if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6906 cat >> confdefs.h <<EOF
6907 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6913 ol_cv_func_gethostbyaddr_r_nargs=0
6916 if test "$ac_cv_func_ctime_r" = yes \
6917 -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6918 -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6919 -a "$ac_cv_func_gethostbyname_r" = yes \
6920 -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6921 -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6922 -a "$ac_cv_func_gethostbyaddr_r" = yes \
6923 -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6924 -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6927 cat >> confdefs.h <<\EOF
6928 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6935 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6936 -o $ol_with_threads = nt ; then
6939 echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
6940 echo "configure:6941: checking for _beginthread" >&5
6941 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
6942 echo $ac_n "(cached) $ac_c" 1>&6
6944 cat > conftest.$ac_ext <<EOF
6945 #line 6946 "configure"
6946 #include "confdefs.h"
6947 /* System header to define __stub macros and hopefully few prototypes,
6948 which can conflict with char _beginthread(); below. */
6950 /* Override any gcc2 internal prototype to avoid an error. */
6951 /* We use char because int might match the return type of a gcc2
6952 builtin and then its argument prototype would still apply. */
6953 char _beginthread();
6958 /* The GNU C library defines this for functions which it implements
6959 to always fail with ENOSYS. Some functions are actually named
6960 something starting with __ and the normal name is an alias. */
6961 #if defined (__stub__beginthread) || defined (__stub____beginthread)
6969 if { (eval echo configure:6970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6971 eval "ac_cv_func__beginthread=yes"
6973 echo "configure: failed program was:" >&5
6974 cat conftest.$ac_ext >&5
6976 eval "ac_cv_func__beginthread=no"
6981 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
6982 echo "$ac_t""yes" 1>&6
6985 echo "$ac_t""no" 1>&6
6989 if test $ac_cv_func__beginthread = yes ; then
6990 cat >> confdefs.h <<\EOF
6991 #define HAVE_NT_THREADS 1
6997 if test "$ol_cv_nt_threads" = yes ; then
6999 ol_with_threads=found
7000 ol_with_yielding_select=yes
7002 cat >> confdefs.h <<\EOF
7003 #define HAVE_NT_SERVICE_MANAGER 1
7006 cat >> confdefs.h <<\EOF
7007 #define HAVE_NT_EVENT_LOG 1
7012 if test $ol_with_threads = nt ; then
7013 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
7017 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7018 -o $ol_with_threads = posix ; then
7020 for ac_hdr in pthread.h
7022 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7023 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7024 echo "configure:7025: checking for $ac_hdr" >&5
7025 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7026 echo $ac_n "(cached) $ac_c" 1>&6
7028 cat > conftest.$ac_ext <<EOF
7029 #line 7030 "configure"
7030 #include "confdefs.h"
7033 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7034 { (eval echo configure:7035: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7035 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7036 if test -z "$ac_err"; then
7038 eval "ac_cv_header_$ac_safe=yes"
7041 echo "configure: failed program was:" >&5
7042 cat conftest.$ac_ext >&5
7044 eval "ac_cv_header_$ac_safe=no"
7048 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7049 echo "$ac_t""yes" 1>&6
7050 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7051 cat >> confdefs.h <<EOF
7052 #define $ac_tr_hdr 1
7056 echo "$ac_t""no" 1>&6
7061 if test $ac_cv_header_pthread_h = yes ; then
7062 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
7063 echo "configure:7064: checking POSIX thread version" >&5
7064 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
7065 echo $ac_n "(cached) $ac_c" 1>&6
7068 cat > conftest.$ac_ext <<EOF
7069 #line 7070 "configure"
7070 #include "confdefs.h"
7072 # include <pthread.h>
7073 /* this check could be improved */
7074 # ifdef PTHREAD_ONCE_INIT
7075 pthread_version_final;
7079 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7080 egrep "pthread_version_final" >/dev/null 2>&1; then
7082 ol_pthread_final=yes
7090 cat > conftest.$ac_ext <<EOF
7091 #line 7092 "configure"
7092 #include "confdefs.h"
7094 # include <pthread.h>
7095 /* this check could be improved */
7096 # ifdef pthread_once_init
7097 pthread_version_draft4;
7101 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7102 egrep "pthread_version_draft4" >/dev/null 2>&1; then
7104 ol_pthread_draft4=yes
7107 ol_pthread_draft4=no
7112 if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
7113 ol_cv_pthread_version=final
7114 elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
7115 ol_cv_pthread_version=draft4
7117 ol_cv_pthread_version=unknown
7122 echo "$ac_t""$ol_cv_pthread_version" 1>&6
7125 if test $ol_cv_pthread_version = final ; then
7126 cat >> confdefs.h <<\EOF
7127 #define HAVE_PTHREADS_FINAL 1
7130 elif test $ol_cv_pthread_version = draft4 ; then
7131 cat >> confdefs.h <<\EOF
7132 #define HAVE_PTHREADS_D4 1
7136 { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
7139 # consider threads found
7140 ol_with_threads=found
7143 echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7144 echo "configure:7145: checking for LinuxThreads pthread.h" >&5
7145 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
7146 echo $ac_n "(cached) $ac_c" 1>&6
7148 cat > conftest.$ac_ext <<EOF
7149 #line 7150 "configure"
7150 #include "confdefs.h"
7151 #include <pthread.h>
7153 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7154 egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7156 ol_cv_header_linux_threads=yes
7159 ol_cv_header_linux_threads=no
7166 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7167 if test $ol_cv_header_linux_threads = yes; then
7168 cat >> confdefs.h <<\EOF
7169 #define HAVE_LINUX_THREADS 1
7175 echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
7176 echo "configure:7177: checking for GNU Pth pthread.h" >&5
7177 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
7178 echo $ac_n "(cached) $ac_c" 1>&6
7180 cat > conftest.$ac_ext <<EOF
7181 #line 7182 "configure"
7182 #include "confdefs.h"
7183 #include <pthread.h>
7184 #ifdef _POSIX_THREAD_IS_GNU_PTH
7189 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7190 egrep "__gnu_pth__" >/dev/null 2>&1; then
7192 ol_cv_header_gnu_pth_pthread_h=yes
7195 ol_cv_header_gnu_pth_pthread_h=no
7202 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
7205 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
7206 for ac_hdr in sched.h
7208 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7209 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7210 echo "configure:7211: checking for $ac_hdr" >&5
7211 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7212 echo $ac_n "(cached) $ac_c" 1>&6
7214 cat > conftest.$ac_ext <<EOF
7215 #line 7216 "configure"
7216 #include "confdefs.h"
7219 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7220 { (eval echo configure:7221: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7221 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7222 if test -z "$ac_err"; then
7224 eval "ac_cv_header_$ac_safe=yes"
7227 echo "configure: failed program was:" >&5
7228 cat conftest.$ac_ext >&5
7230 eval "ac_cv_header_$ac_safe=no"
7234 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7235 echo "$ac_t""yes" 1>&6
7236 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7237 cat >> confdefs.h <<EOF
7238 #define $ac_tr_hdr 1
7242 echo "$ac_t""no" 1>&6
7249 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
7250 echo "configure:7251: checking for pthread_create in default libraries" >&5
7251 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
7252 echo $ac_n "(cached) $ac_c" 1>&6
7255 if test "$cross_compiling" = yes; then
7256 cat > conftest.$ac_ext <<EOF
7257 #line 7258 "configure"
7258 #include "confdefs.h"
7259 /* pthread test headers */
7260 #include <pthread.h>
7262 #define NULL (void*)0
7265 static void *task(p)
7268 return (void *) (p == NULL);
7273 /* pthread test function */
7278 #ifdef HAVE_PTHREADS_FINAL
7279 /* Final pthreads */
7280 pthread_attr_t attr;
7282 status = pthread_attr_init(&attr);
7283 if( status ) return status;
7285 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
7287 #if defined( PTHREAD_CREATE_JOINABLE )
7288 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
7290 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
7293 #ifdef PTHREAD_CREATE_DETACHED
7295 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
7298 if( status ) return status;
7301 status = pthread_create( &t, &attr, task, NULL );
7302 if( status ) return status;
7304 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
7306 /* give thread a chance to complete */
7307 /* it should remain joinable and hence detachable */
7310 status = pthread_detach( t );
7311 if( status ) return status;
7316 /* Draft 4 pthreads */
7317 status = pthread_create( &t, pthread_attr_default, task, NULL );
7318 if( status ) return status;
7321 /* give thread a chance to complete */
7322 /* it should remain joinable and hence detachable */
7325 status = pthread_detach( &t );
7326 if( status ) return status;
7330 #ifdef HAVE_LINUX_THREADS
7331 pthread_kill_other_threads_np();
7338 if { (eval echo configure:7339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7340 ol_cv_pthread_create=yes
7342 echo "configure: failed program was:" >&5
7343 cat conftest.$ac_ext >&5
7345 ol_cv_pthread_create=no
7349 cat > conftest.$ac_ext <<EOF
7350 #line 7351 "configure"
7351 #include "confdefs.h"
7352 /* pthread test headers */
7353 #include <pthread.h>
7355 #define NULL (void*)0
7358 static void *task(p)
7361 return (void *) (p == NULL);
7365 int main(argc, argv)
7370 /* pthread test function */
7375 #ifdef HAVE_PTHREADS_FINAL
7376 /* Final pthreads */
7377 pthread_attr_t attr;
7379 status = pthread_attr_init(&attr);
7380 if( status ) return status;
7382 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
7384 #if defined( PTHREAD_CREATE_JOINABLE )
7385 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
7387 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
7390 #ifdef PTHREAD_CREATE_DETACHED
7392 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
7395 if( status ) return status;
7398 status = pthread_create( &t, &attr, task, NULL );
7399 if( status ) return status;
7401 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
7403 /* give thread a chance to complete */
7404 /* it should remain joinable and hence detachable */
7407 status = pthread_detach( t );
7408 if( status ) return status;
7413 /* Draft 4 pthreads */
7414 status = pthread_create( &t, pthread_attr_default, task, NULL );
7415 if( status ) return status;
7418 /* give thread a chance to complete */
7419 /* it should remain joinable and hence detachable */
7422 status = pthread_detach( &t );
7423 if( status ) return status;
7427 #ifdef HAVE_LINUX_THREADS
7428 pthread_kill_other_threads_np();
7436 if { (eval echo configure:7437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7438 ol_cv_pthread_create=yes
7440 echo "configure: failed program was:" >&5
7441 cat conftest.$ac_ext >&5
7443 ol_cv_pthread_create=no
7450 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7452 if test $ol_cv_pthread_create != no ; then
7453 ol_link_threads=posix
7457 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7458 if test "$ol_link_threads" = no ; then
7460 echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7461 echo "configure:7462: checking for pthread link with -kthread" >&5
7462 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7463 echo $ac_n "(cached) $ac_c" 1>&6
7468 LIBS="-kthread $LIBS"
7470 if test "$cross_compiling" = yes; then
7471 cat > conftest.$ac_ext <<EOF
7472 #line 7473 "configure"
7473 #include "confdefs.h"
7474 /* pthread test headers */
7475 #include <pthread.h>
7477 #define NULL (void*)0
7480 static void *task(p)
7483 return (void *) (p == NULL);
7488 /* pthread test function */
7493 #ifdef HAVE_PTHREADS_FINAL
7494 /* Final pthreads */
7495 pthread_attr_t attr;
7497 status = pthread_attr_init(&attr);
7498 if( status ) return status;
7500 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
7502 #if defined( PTHREAD_CREATE_JOINABLE )
7503 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
7505 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
7508 #ifdef PTHREAD_CREATE_DETACHED
7510 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
7513 if( status ) return status;
7516 status = pthread_create( &t, &attr, task, NULL );
7517 if( status ) return status;
7519 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
7521 /* give thread a chance to complete */
7522 /* it should remain joinable and hence detachable */
7525 status = pthread_detach( t );
7526 if( status ) return status;
7531 /* Draft 4 pthreads */
7532 status = pthread_create( &t, pthread_attr_default, task, NULL );
7533 if( status ) return status;
7536 /* give thread a chance to complete */
7537 /* it should remain joinable and hence detachable */
7540 status = pthread_detach( &t );
7541 if( status ) return status;
7545 #ifdef HAVE_LINUX_THREADS
7546 pthread_kill_other_threads_np();
7553 if { (eval echo configure:7554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7555 ol_cv_pthread_kthread=yes
7557 echo "configure: failed program was:" >&5
7558 cat conftest.$ac_ext >&5
7560 ol_cv_pthread_kthread=no
7564 cat > conftest.$ac_ext <<EOF
7565 #line 7566 "configure"
7566 #include "confdefs.h"
7567 /* pthread test headers */
7568 #include <pthread.h>
7570 #define NULL (void*)0
7573 static void *task(p)
7576 return (void *) (p == NULL);
7580 int main(argc, argv)
7585 /* pthread test function */
7590 #ifdef HAVE_PTHREADS_FINAL
7591 /* Final pthreads */
7592 pthread_attr_t attr;
7594 status = pthread_attr_init(&attr);
7595 if( status ) return status;
7597 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
7599 #if defined( PTHREAD_CREATE_JOINABLE )
7600 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
7602 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
7605 #ifdef PTHREAD_CREATE_DETACHED
7607 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
7610 if( status ) return status;
7613 status = pthread_create( &t, &attr, task, NULL );
7614 if( status ) return status;
7616 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
7618 /* give thread a chance to complete */
7619 /* it should remain joinable and hence detachable */
7622 status = pthread_detach( t );
7623 if( status ) return status;
7628 /* Draft 4 pthreads */
7629 status = pthread_create( &t, pthread_attr_default, task, NULL );
7630 if( status ) return status;
7633 /* give thread a chance to complete */
7634 /* it should remain joinable and hence detachable */
7637 status = pthread_detach( &t );
7638 if( status ) return status;
7642 #ifdef HAVE_LINUX_THREADS
7643 pthread_kill_other_threads_np();
7651 if { (eval echo configure:7652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7653 ol_cv_pthread_kthread=yes
7655 echo "configure: failed program was:" >&5
7656 cat conftest.$ac_ext >&5
7658 ol_cv_pthread_kthread=no
7669 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7671 if test $ol_cv_pthread_kthread = yes ; then
7672 ol_link_pthreads="-kthread"
7673 ol_link_threads=posix
7677 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7678 if test "$ol_link_threads" = no ; then
7680 echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7681 echo "configure:7682: checking for pthread link with -pthread" >&5
7682 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7683 echo $ac_n "(cached) $ac_c" 1>&6
7688 LIBS="-pthread $LIBS"
7690 if test "$cross_compiling" = yes; then
7691 cat > conftest.$ac_ext <<EOF
7692 #line 7693 "configure"
7693 #include "confdefs.h"
7694 /* pthread test headers */
7695 #include <pthread.h>
7697 #define NULL (void*)0
7700 static void *task(p)
7703 return (void *) (p == NULL);
7708 /* pthread test function */
7713 #ifdef HAVE_PTHREADS_FINAL
7714 /* Final pthreads */
7715 pthread_attr_t attr;
7717 status = pthread_attr_init(&attr);
7718 if( status ) return status;
7720 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
7722 #if defined( PTHREAD_CREATE_JOINABLE )
7723 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
7725 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
7728 #ifdef PTHREAD_CREATE_DETACHED
7730 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
7733 if( status ) return status;
7736 status = pthread_create( &t, &attr, task, NULL );
7737 if( status ) return status;
7739 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
7741 /* give thread a chance to complete */
7742 /* it should remain joinable and hence detachable */
7745 status = pthread_detach( t );
7746 if( status ) return status;
7751 /* Draft 4 pthreads */
7752 status = pthread_create( &t, pthread_attr_default, task, NULL );
7753 if( status ) return status;
7756 /* give thread a chance to complete */
7757 /* it should remain joinable and hence detachable */
7760 status = pthread_detach( &t );
7761 if( status ) return status;
7765 #ifdef HAVE_LINUX_THREADS
7766 pthread_kill_other_threads_np();
7773 if { (eval echo configure:7774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7775 ol_cv_pthread_pthread=yes
7777 echo "configure: failed program was:" >&5
7778 cat conftest.$ac_ext >&5
7780 ol_cv_pthread_pthread=no
7784 cat > conftest.$ac_ext <<EOF
7785 #line 7786 "configure"
7786 #include "confdefs.h"
7787 /* pthread test headers */
7788 #include <pthread.h>
7790 #define NULL (void*)0
7793 static void *task(p)
7796 return (void *) (p == NULL);
7800 int main(argc, argv)
7805 /* pthread test function */
7810 #ifdef HAVE_PTHREADS_FINAL
7811 /* Final pthreads */
7812 pthread_attr_t attr;
7814 status = pthread_attr_init(&attr);
7815 if( status ) return status;
7817 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
7819 #if defined( PTHREAD_CREATE_JOINABLE )
7820 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
7822 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
7825 #ifdef PTHREAD_CREATE_DETACHED
7827 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
7830 if( status ) return status;
7833 status = pthread_create( &t, &attr, task, NULL );
7834 if( status ) return status;
7836 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
7838 /* give thread a chance to complete */
7839 /* it should remain joinable and hence detachable */
7842 status = pthread_detach( t );
7843 if( status ) return status;
7848 /* Draft 4 pthreads */
7849 status = pthread_create( &t, pthread_attr_default, task, NULL );
7850 if( status ) return status;
7853 /* give thread a chance to complete */
7854 /* it should remain joinable and hence detachable */
7857 status = pthread_detach( &t );
7858 if( status ) return status;
7862 #ifdef HAVE_LINUX_THREADS
7863 pthread_kill_other_threads_np();
7871 if { (eval echo configure:7872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7873 ol_cv_pthread_pthread=yes
7875 echo "configure: failed program was:" >&5
7876 cat conftest.$ac_ext >&5
7878 ol_cv_pthread_pthread=no
7889 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7891 if test $ol_cv_pthread_pthread = yes ; then
7892 ol_link_pthreads="-pthread"
7893 ol_link_threads=posix
7897 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7898 if test "$ol_link_threads" = no ; then
7900 echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7901 echo "configure:7902: checking for pthread link with -pthreads" >&5
7902 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7903 echo $ac_n "(cached) $ac_c" 1>&6
7908 LIBS="-pthreads $LIBS"
7910 if test "$cross_compiling" = yes; then
7911 cat > conftest.$ac_ext <<EOF
7912 #line 7913 "configure"
7913 #include "confdefs.h"
7914 /* pthread test headers */
7915 #include <pthread.h>
7917 #define NULL (void*)0
7920 static void *task(p)
7923 return (void *) (p == NULL);
7928 /* pthread test function */
7933 #ifdef HAVE_PTHREADS_FINAL
7934 /* Final pthreads */
7935 pthread_attr_t attr;
7937 status = pthread_attr_init(&attr);
7938 if( status ) return status;
7940 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
7942 #if defined( PTHREAD_CREATE_JOINABLE )
7943 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
7945 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
7948 #ifdef PTHREAD_CREATE_DETACHED
7950 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
7953 if( status ) return status;
7956 status = pthread_create( &t, &attr, task, NULL );
7957 if( status ) return status;
7959 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
7961 /* give thread a chance to complete */
7962 /* it should remain joinable and hence detachable */
7965 status = pthread_detach( t );
7966 if( status ) return status;
7971 /* Draft 4 pthreads */
7972 status = pthread_create( &t, pthread_attr_default, task, NULL );
7973 if( status ) return status;
7976 /* give thread a chance to complete */
7977 /* it should remain joinable and hence detachable */
7980 status = pthread_detach( &t );
7981 if( status ) return status;
7985 #ifdef HAVE_LINUX_THREADS
7986 pthread_kill_other_threads_np();
7993 if { (eval echo configure:7994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7995 ol_cv_pthread_pthreads=yes
7997 echo "configure: failed program was:" >&5
7998 cat conftest.$ac_ext >&5
8000 ol_cv_pthread_pthreads=no
8004 cat > conftest.$ac_ext <<EOF
8005 #line 8006 "configure"
8006 #include "confdefs.h"
8007 /* pthread test headers */
8008 #include <pthread.h>
8010 #define NULL (void*)0
8013 static void *task(p)
8016 return (void *) (p == NULL);
8020 int main(argc, argv)
8025 /* pthread test function */
8030 #ifdef HAVE_PTHREADS_FINAL
8031 /* Final pthreads */
8032 pthread_attr_t attr;
8034 status = pthread_attr_init(&attr);
8035 if( status ) return status;
8037 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8039 #if defined( PTHREAD_CREATE_JOINABLE )
8040 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8042 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8045 #ifdef PTHREAD_CREATE_DETACHED
8047 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8050 if( status ) return status;
8053 status = pthread_create( &t, &attr, task, NULL );
8054 if( status ) return status;
8056 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8058 /* give thread a chance to complete */
8059 /* it should remain joinable and hence detachable */
8062 status = pthread_detach( t );
8063 if( status ) return status;
8068 /* Draft 4 pthreads */
8069 status = pthread_create( &t, pthread_attr_default, task, NULL );
8070 if( status ) return status;
8073 /* give thread a chance to complete */
8074 /* it should remain joinable and hence detachable */
8077 status = pthread_detach( &t );
8078 if( status ) return status;
8082 #ifdef HAVE_LINUX_THREADS
8083 pthread_kill_other_threads_np();
8091 if { (eval echo configure:8092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8093 ol_cv_pthread_pthreads=yes
8095 echo "configure: failed program was:" >&5
8096 cat conftest.$ac_ext >&5
8098 ol_cv_pthread_pthreads=no
8109 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
8111 if test $ol_cv_pthread_pthreads = yes ; then
8112 ol_link_pthreads="-pthreads"
8113 ol_link_threads=posix
8117 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
8118 if test "$ol_link_threads" = no ; then
8120 echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
8121 echo "configure:8122: checking for pthread link with -mthreads" >&5
8122 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
8123 echo $ac_n "(cached) $ac_c" 1>&6
8128 LIBS="-mthreads $LIBS"
8130 if test "$cross_compiling" = yes; then
8131 cat > conftest.$ac_ext <<EOF
8132 #line 8133 "configure"
8133 #include "confdefs.h"
8134 /* pthread test headers */
8135 #include <pthread.h>
8137 #define NULL (void*)0
8140 static void *task(p)
8143 return (void *) (p == NULL);
8148 /* pthread test function */
8153 #ifdef HAVE_PTHREADS_FINAL
8154 /* Final pthreads */
8155 pthread_attr_t attr;
8157 status = pthread_attr_init(&attr);
8158 if( status ) return status;
8160 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8162 #if defined( PTHREAD_CREATE_JOINABLE )
8163 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8165 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8168 #ifdef PTHREAD_CREATE_DETACHED
8170 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8173 if( status ) return status;
8176 status = pthread_create( &t, &attr, task, NULL );
8177 if( status ) return status;
8179 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8181 /* give thread a chance to complete */
8182 /* it should remain joinable and hence detachable */
8185 status = pthread_detach( t );
8186 if( status ) return status;
8191 /* Draft 4 pthreads */
8192 status = pthread_create( &t, pthread_attr_default, task, NULL );
8193 if( status ) return status;
8196 /* give thread a chance to complete */
8197 /* it should remain joinable and hence detachable */
8200 status = pthread_detach( &t );
8201 if( status ) return status;
8205 #ifdef HAVE_LINUX_THREADS
8206 pthread_kill_other_threads_np();
8213 if { (eval echo configure:8214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8215 ol_cv_pthread_mthreads=yes
8217 echo "configure: failed program was:" >&5
8218 cat conftest.$ac_ext >&5
8220 ol_cv_pthread_mthreads=no
8224 cat > conftest.$ac_ext <<EOF
8225 #line 8226 "configure"
8226 #include "confdefs.h"
8227 /* pthread test headers */
8228 #include <pthread.h>
8230 #define NULL (void*)0
8233 static void *task(p)
8236 return (void *) (p == NULL);
8240 int main(argc, argv)
8245 /* pthread test function */
8250 #ifdef HAVE_PTHREADS_FINAL
8251 /* Final pthreads */
8252 pthread_attr_t attr;
8254 status = pthread_attr_init(&attr);
8255 if( status ) return status;
8257 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8259 #if defined( PTHREAD_CREATE_JOINABLE )
8260 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8262 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8265 #ifdef PTHREAD_CREATE_DETACHED
8267 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8270 if( status ) return status;
8273 status = pthread_create( &t, &attr, task, NULL );
8274 if( status ) return status;
8276 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8278 /* give thread a chance to complete */
8279 /* it should remain joinable and hence detachable */
8282 status = pthread_detach( t );
8283 if( status ) return status;
8288 /* Draft 4 pthreads */
8289 status = pthread_create( &t, pthread_attr_default, task, NULL );
8290 if( status ) return status;
8293 /* give thread a chance to complete */
8294 /* it should remain joinable and hence detachable */
8297 status = pthread_detach( &t );
8298 if( status ) return status;
8302 #ifdef HAVE_LINUX_THREADS
8303 pthread_kill_other_threads_np();
8311 if { (eval echo configure:8312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8313 ol_cv_pthread_mthreads=yes
8315 echo "configure: failed program was:" >&5
8316 cat conftest.$ac_ext >&5
8318 ol_cv_pthread_mthreads=no
8329 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
8331 if test $ol_cv_pthread_mthreads = yes ; then
8332 ol_link_pthreads="-mthreads"
8333 ol_link_threads=posix
8337 # Pthread try link: -thread (ol_cv_pthread_thread)
8338 if test "$ol_link_threads" = no ; then
8340 echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
8341 echo "configure:8342: checking for pthread link with -thread" >&5
8342 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
8343 echo $ac_n "(cached) $ac_c" 1>&6
8348 LIBS="-thread $LIBS"
8350 if test "$cross_compiling" = yes; then
8351 cat > conftest.$ac_ext <<EOF
8352 #line 8353 "configure"
8353 #include "confdefs.h"
8354 /* pthread test headers */
8355 #include <pthread.h>
8357 #define NULL (void*)0
8360 static void *task(p)
8363 return (void *) (p == NULL);
8368 /* pthread test function */
8373 #ifdef HAVE_PTHREADS_FINAL
8374 /* Final pthreads */
8375 pthread_attr_t attr;
8377 status = pthread_attr_init(&attr);
8378 if( status ) return status;
8380 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8382 #if defined( PTHREAD_CREATE_JOINABLE )
8383 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8385 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8388 #ifdef PTHREAD_CREATE_DETACHED
8390 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8393 if( status ) return status;
8396 status = pthread_create( &t, &attr, task, NULL );
8397 if( status ) return status;
8399 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8401 /* give thread a chance to complete */
8402 /* it should remain joinable and hence detachable */
8405 status = pthread_detach( t );
8406 if( status ) return status;
8411 /* Draft 4 pthreads */
8412 status = pthread_create( &t, pthread_attr_default, task, NULL );
8413 if( status ) return status;
8416 /* give thread a chance to complete */
8417 /* it should remain joinable and hence detachable */
8420 status = pthread_detach( &t );
8421 if( status ) return status;
8425 #ifdef HAVE_LINUX_THREADS
8426 pthread_kill_other_threads_np();
8433 if { (eval echo configure:8434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8435 ol_cv_pthread_thread=yes
8437 echo "configure: failed program was:" >&5
8438 cat conftest.$ac_ext >&5
8440 ol_cv_pthread_thread=no
8444 cat > conftest.$ac_ext <<EOF
8445 #line 8446 "configure"
8446 #include "confdefs.h"
8447 /* pthread test headers */
8448 #include <pthread.h>
8450 #define NULL (void*)0
8453 static void *task(p)
8456 return (void *) (p == NULL);
8460 int main(argc, argv)
8465 /* pthread test function */
8470 #ifdef HAVE_PTHREADS_FINAL
8471 /* Final pthreads */
8472 pthread_attr_t attr;
8474 status = pthread_attr_init(&attr);
8475 if( status ) return status;
8477 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8479 #if defined( PTHREAD_CREATE_JOINABLE )
8480 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8482 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8485 #ifdef PTHREAD_CREATE_DETACHED
8487 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8490 if( status ) return status;
8493 status = pthread_create( &t, &attr, task, NULL );
8494 if( status ) return status;
8496 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8498 /* give thread a chance to complete */
8499 /* it should remain joinable and hence detachable */
8502 status = pthread_detach( t );
8503 if( status ) return status;
8508 /* Draft 4 pthreads */
8509 status = pthread_create( &t, pthread_attr_default, task, NULL );
8510 if( status ) return status;
8513 /* give thread a chance to complete */
8514 /* it should remain joinable and hence detachable */
8517 status = pthread_detach( &t );
8518 if( status ) return status;
8522 #ifdef HAVE_LINUX_THREADS
8523 pthread_kill_other_threads_np();
8531 if { (eval echo configure:8532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8533 ol_cv_pthread_thread=yes
8535 echo "configure: failed program was:" >&5
8536 cat conftest.$ac_ext >&5
8538 ol_cv_pthread_thread=no
8549 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
8551 if test $ol_cv_pthread_thread = yes ; then
8552 ol_link_pthreads="-thread"
8553 ol_link_threads=posix
8558 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
8559 if test "$ol_link_threads" = no ; then
8560 # try -lpthread -lmach -lexc -lc_r
8561 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
8562 echo "configure:8563: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
8563 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
8564 echo $ac_n "(cached) $ac_c" 1>&6
8569 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
8571 if test "$cross_compiling" = yes; then
8572 cat > conftest.$ac_ext <<EOF
8573 #line 8574 "configure"
8574 #include "confdefs.h"
8575 /* pthread test headers */
8576 #include <pthread.h>
8578 #define NULL (void*)0
8581 static void *task(p)
8584 return (void *) (p == NULL);
8589 /* pthread test function */
8594 #ifdef HAVE_PTHREADS_FINAL
8595 /* Final pthreads */
8596 pthread_attr_t attr;
8598 status = pthread_attr_init(&attr);
8599 if( status ) return status;
8601 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8603 #if defined( PTHREAD_CREATE_JOINABLE )
8604 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8606 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8609 #ifdef PTHREAD_CREATE_DETACHED
8611 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8614 if( status ) return status;
8617 status = pthread_create( &t, &attr, task, NULL );
8618 if( status ) return status;
8620 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8622 /* give thread a chance to complete */
8623 /* it should remain joinable and hence detachable */
8626 status = pthread_detach( t );
8627 if( status ) return status;
8632 /* Draft 4 pthreads */
8633 status = pthread_create( &t, pthread_attr_default, task, NULL );
8634 if( status ) return status;
8637 /* give thread a chance to complete */
8638 /* it should remain joinable and hence detachable */
8641 status = pthread_detach( &t );
8642 if( status ) return status;
8646 #ifdef HAVE_LINUX_THREADS
8647 pthread_kill_other_threads_np();
8654 if { (eval echo configure:8655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8656 ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8658 echo "configure: failed program was:" >&5
8659 cat conftest.$ac_ext >&5
8661 ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8665 cat > conftest.$ac_ext <<EOF
8666 #line 8667 "configure"
8667 #include "confdefs.h"
8668 /* pthread test headers */
8669 #include <pthread.h>
8671 #define NULL (void*)0
8674 static void *task(p)
8677 return (void *) (p == NULL);
8681 int main(argc, argv)
8686 /* pthread test function */
8691 #ifdef HAVE_PTHREADS_FINAL
8692 /* Final pthreads */
8693 pthread_attr_t attr;
8695 status = pthread_attr_init(&attr);
8696 if( status ) return status;
8698 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8700 #if defined( PTHREAD_CREATE_JOINABLE )
8701 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8703 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8706 #ifdef PTHREAD_CREATE_DETACHED
8708 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8711 if( status ) return status;
8714 status = pthread_create( &t, &attr, task, NULL );
8715 if( status ) return status;
8717 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8719 /* give thread a chance to complete */
8720 /* it should remain joinable and hence detachable */
8723 status = pthread_detach( t );
8724 if( status ) return status;
8729 /* Draft 4 pthreads */
8730 status = pthread_create( &t, pthread_attr_default, task, NULL );
8731 if( status ) return status;
8734 /* give thread a chance to complete */
8735 /* it should remain joinable and hence detachable */
8738 status = pthread_detach( &t );
8739 if( status ) return status;
8743 #ifdef HAVE_LINUX_THREADS
8744 pthread_kill_other_threads_np();
8752 if { (eval echo configure:8753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8754 ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8756 echo "configure: failed program was:" >&5
8757 cat conftest.$ac_ext >&5
8759 ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8770 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
8772 if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
8773 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
8774 ol_link_threads=posix
8778 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
8779 if test "$ol_link_threads" = no ; then
8780 # try -lpthread -lmach -lexc
8781 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
8782 echo "configure:8783: checking for pthread link with -lpthread -lmach -lexc" >&5
8783 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
8784 echo $ac_n "(cached) $ac_c" 1>&6
8789 LIBS="-lpthread -lmach -lexc $LIBS"
8791 if test "$cross_compiling" = yes; then
8792 cat > conftest.$ac_ext <<EOF
8793 #line 8794 "configure"
8794 #include "confdefs.h"
8795 /* pthread test headers */
8796 #include <pthread.h>
8798 #define NULL (void*)0
8801 static void *task(p)
8804 return (void *) (p == NULL);
8809 /* pthread test function */
8814 #ifdef HAVE_PTHREADS_FINAL
8815 /* Final pthreads */
8816 pthread_attr_t attr;
8818 status = pthread_attr_init(&attr);
8819 if( status ) return status;
8821 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8823 #if defined( PTHREAD_CREATE_JOINABLE )
8824 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8826 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8829 #ifdef PTHREAD_CREATE_DETACHED
8831 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8834 if( status ) return status;
8837 status = pthread_create( &t, &attr, task, NULL );
8838 if( status ) return status;
8840 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8842 /* give thread a chance to complete */
8843 /* it should remain joinable and hence detachable */
8846 status = pthread_detach( t );
8847 if( status ) return status;
8852 /* Draft 4 pthreads */
8853 status = pthread_create( &t, pthread_attr_default, task, NULL );
8854 if( status ) return status;
8857 /* give thread a chance to complete */
8858 /* it should remain joinable and hence detachable */
8861 status = pthread_detach( &t );
8862 if( status ) return status;
8866 #ifdef HAVE_LINUX_THREADS
8867 pthread_kill_other_threads_np();
8874 if { (eval echo configure:8875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8876 ol_cv_pthread_lpthread_lmach_lexc=yes
8878 echo "configure: failed program was:" >&5
8879 cat conftest.$ac_ext >&5
8881 ol_cv_pthread_lpthread_lmach_lexc=no
8885 cat > conftest.$ac_ext <<EOF
8886 #line 8887 "configure"
8887 #include "confdefs.h"
8888 /* pthread test headers */
8889 #include <pthread.h>
8891 #define NULL (void*)0
8894 static void *task(p)
8897 return (void *) (p == NULL);
8901 int main(argc, argv)
8906 /* pthread test function */
8911 #ifdef HAVE_PTHREADS_FINAL
8912 /* Final pthreads */
8913 pthread_attr_t attr;
8915 status = pthread_attr_init(&attr);
8916 if( status ) return status;
8918 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8920 #if defined( PTHREAD_CREATE_JOINABLE )
8921 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8923 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8926 #ifdef PTHREAD_CREATE_DETACHED
8928 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8931 if( status ) return status;
8934 status = pthread_create( &t, &attr, task, NULL );
8935 if( status ) return status;
8937 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8939 /* give thread a chance to complete */
8940 /* it should remain joinable and hence detachable */
8943 status = pthread_detach( t );
8944 if( status ) return status;
8949 /* Draft 4 pthreads */
8950 status = pthread_create( &t, pthread_attr_default, task, NULL );
8951 if( status ) return status;
8954 /* give thread a chance to complete */
8955 /* it should remain joinable and hence detachable */
8958 status = pthread_detach( &t );
8959 if( status ) return status;
8963 #ifdef HAVE_LINUX_THREADS
8964 pthread_kill_other_threads_np();
8972 if { (eval echo configure:8973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8974 ol_cv_pthread_lpthread_lmach_lexc=yes
8976 echo "configure: failed program was:" >&5
8977 cat conftest.$ac_ext >&5
8979 ol_cv_pthread_lpthread_lmach_lexc=no
8990 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8992 if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8993 ol_link_pthreads="-lpthread -lmach -lexc"
8994 ol_link_threads=posix
8999 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
9000 if test "$ol_link_threads" = no ; then
9001 # try -lpthread -Wl,-woff,85
9002 echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
9003 echo "configure:9004: checking for pthread link with -lpthread -Wl,-woff,85" >&5
9004 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
9005 echo $ac_n "(cached) $ac_c" 1>&6
9010 LIBS="-lpthread -Wl,-woff,85 $LIBS"
9012 if test "$cross_compiling" = yes; then
9013 cat > conftest.$ac_ext <<EOF
9014 #line 9015 "configure"
9015 #include "confdefs.h"
9016 /* pthread test headers */
9017 #include <pthread.h>
9019 #define NULL (void*)0
9022 static void *task(p)
9025 return (void *) (p == NULL);
9030 /* pthread test function */
9035 #ifdef HAVE_PTHREADS_FINAL
9036 /* Final pthreads */
9037 pthread_attr_t attr;
9039 status = pthread_attr_init(&attr);
9040 if( status ) return status;
9042 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9044 #if defined( PTHREAD_CREATE_JOINABLE )
9045 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9047 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9050 #ifdef PTHREAD_CREATE_DETACHED
9052 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9055 if( status ) return status;
9058 status = pthread_create( &t, &attr, task, NULL );
9059 if( status ) return status;
9061 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9063 /* give thread a chance to complete */
9064 /* it should remain joinable and hence detachable */
9067 status = pthread_detach( t );
9068 if( status ) return status;
9073 /* Draft 4 pthreads */
9074 status = pthread_create( &t, pthread_attr_default, task, NULL );
9075 if( status ) return status;
9078 /* give thread a chance to complete */
9079 /* it should remain joinable and hence detachable */
9082 status = pthread_detach( &t );
9083 if( status ) return status;
9087 #ifdef HAVE_LINUX_THREADS
9088 pthread_kill_other_threads_np();
9095 if { (eval echo configure:9096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9097 ol_cv_pthread_lib_lpthread_woff=yes
9099 echo "configure: failed program was:" >&5
9100 cat conftest.$ac_ext >&5
9102 ol_cv_pthread_lib_lpthread_woff=no
9106 cat > conftest.$ac_ext <<EOF
9107 #line 9108 "configure"
9108 #include "confdefs.h"
9109 /* pthread test headers */
9110 #include <pthread.h>
9112 #define NULL (void*)0
9115 static void *task(p)
9118 return (void *) (p == NULL);
9122 int main(argc, argv)
9127 /* pthread test function */
9132 #ifdef HAVE_PTHREADS_FINAL
9133 /* Final pthreads */
9134 pthread_attr_t attr;
9136 status = pthread_attr_init(&attr);
9137 if( status ) return status;
9139 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9141 #if defined( PTHREAD_CREATE_JOINABLE )
9142 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9144 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9147 #ifdef PTHREAD_CREATE_DETACHED
9149 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9152 if( status ) return status;
9155 status = pthread_create( &t, &attr, task, NULL );
9156 if( status ) return status;
9158 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9160 /* give thread a chance to complete */
9161 /* it should remain joinable and hence detachable */
9164 status = pthread_detach( t );
9165 if( status ) return status;
9170 /* Draft 4 pthreads */
9171 status = pthread_create( &t, pthread_attr_default, task, NULL );
9172 if( status ) return status;
9175 /* give thread a chance to complete */
9176 /* it should remain joinable and hence detachable */
9179 status = pthread_detach( &t );
9180 if( status ) return status;
9184 #ifdef HAVE_LINUX_THREADS
9185 pthread_kill_other_threads_np();
9193 if { (eval echo configure:9194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9195 ol_cv_pthread_lib_lpthread_woff=yes
9197 echo "configure: failed program was:" >&5
9198 cat conftest.$ac_ext >&5
9200 ol_cv_pthread_lib_lpthread_woff=no
9211 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
9213 if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
9214 ol_link_pthreads="-lpthread -Wl,-woff,85"
9215 ol_link_threads=posix
9220 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
9221 if test "$ol_link_threads" = no ; then
9223 echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
9224 echo "configure:9225: checking for pthread link with -lpthread" >&5
9225 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
9226 echo $ac_n "(cached) $ac_c" 1>&6
9231 LIBS="-lpthread $LIBS"
9233 if test "$cross_compiling" = yes; then
9234 cat > conftest.$ac_ext <<EOF
9235 #line 9236 "configure"
9236 #include "confdefs.h"
9237 /* pthread test headers */
9238 #include <pthread.h>
9240 #define NULL (void*)0
9243 static void *task(p)
9246 return (void *) (p == NULL);
9251 /* pthread test function */
9256 #ifdef HAVE_PTHREADS_FINAL
9257 /* Final pthreads */
9258 pthread_attr_t attr;
9260 status = pthread_attr_init(&attr);
9261 if( status ) return status;
9263 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9265 #if defined( PTHREAD_CREATE_JOINABLE )
9266 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9268 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9271 #ifdef PTHREAD_CREATE_DETACHED
9273 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9276 if( status ) return status;
9279 status = pthread_create( &t, &attr, task, NULL );
9280 if( status ) return status;
9282 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9284 /* give thread a chance to complete */
9285 /* it should remain joinable and hence detachable */
9288 status = pthread_detach( t );
9289 if( status ) return status;
9294 /* Draft 4 pthreads */
9295 status = pthread_create( &t, pthread_attr_default, task, NULL );
9296 if( status ) return status;
9299 /* give thread a chance to complete */
9300 /* it should remain joinable and hence detachable */
9303 status = pthread_detach( &t );
9304 if( status ) return status;
9308 #ifdef HAVE_LINUX_THREADS
9309 pthread_kill_other_threads_np();
9316 if { (eval echo configure:9317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9318 ol_cv_pthread_lpthread=yes
9320 echo "configure: failed program was:" >&5
9321 cat conftest.$ac_ext >&5
9323 ol_cv_pthread_lpthread=no
9327 cat > conftest.$ac_ext <<EOF
9328 #line 9329 "configure"
9329 #include "confdefs.h"
9330 /* pthread test headers */
9331 #include <pthread.h>
9333 #define NULL (void*)0
9336 static void *task(p)
9339 return (void *) (p == NULL);
9343 int main(argc, argv)
9348 /* pthread test function */
9353 #ifdef HAVE_PTHREADS_FINAL
9354 /* Final pthreads */
9355 pthread_attr_t attr;
9357 status = pthread_attr_init(&attr);
9358 if( status ) return status;
9360 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9362 #if defined( PTHREAD_CREATE_JOINABLE )
9363 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9365 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9368 #ifdef PTHREAD_CREATE_DETACHED
9370 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9373 if( status ) return status;
9376 status = pthread_create( &t, &attr, task, NULL );
9377 if( status ) return status;
9379 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9381 /* give thread a chance to complete */
9382 /* it should remain joinable and hence detachable */
9385 status = pthread_detach( t );
9386 if( status ) return status;
9391 /* Draft 4 pthreads */
9392 status = pthread_create( &t, pthread_attr_default, task, NULL );
9393 if( status ) return status;
9396 /* give thread a chance to complete */
9397 /* it should remain joinable and hence detachable */
9400 status = pthread_detach( &t );
9401 if( status ) return status;
9405 #ifdef HAVE_LINUX_THREADS
9406 pthread_kill_other_threads_np();
9414 if { (eval echo configure:9415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9416 ol_cv_pthread_lpthread=yes
9418 echo "configure: failed program was:" >&5
9419 cat conftest.$ac_ext >&5
9421 ol_cv_pthread_lpthread=no
9432 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
9434 if test $ol_cv_pthread_lpthread = yes ; then
9435 ol_link_pthreads="-lpthread"
9436 ol_link_threads=posix
9440 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
9441 if test "$ol_link_threads" = no ; then
9443 echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
9444 echo "configure:9445: checking for pthread link with -lc_r" >&5
9445 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
9446 echo $ac_n "(cached) $ac_c" 1>&6
9453 if test "$cross_compiling" = yes; then
9454 cat > conftest.$ac_ext <<EOF
9455 #line 9456 "configure"
9456 #include "confdefs.h"
9457 /* pthread test headers */
9458 #include <pthread.h>
9460 #define NULL (void*)0
9463 static void *task(p)
9466 return (void *) (p == NULL);
9471 /* pthread test function */
9476 #ifdef HAVE_PTHREADS_FINAL
9477 /* Final pthreads */
9478 pthread_attr_t attr;
9480 status = pthread_attr_init(&attr);
9481 if( status ) return status;
9483 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9485 #if defined( PTHREAD_CREATE_JOINABLE )
9486 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9488 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9491 #ifdef PTHREAD_CREATE_DETACHED
9493 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9496 if( status ) return status;
9499 status = pthread_create( &t, &attr, task, NULL );
9500 if( status ) return status;
9502 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9504 /* give thread a chance to complete */
9505 /* it should remain joinable and hence detachable */
9508 status = pthread_detach( t );
9509 if( status ) return status;
9514 /* Draft 4 pthreads */
9515 status = pthread_create( &t, pthread_attr_default, task, NULL );
9516 if( status ) return status;
9519 /* give thread a chance to complete */
9520 /* it should remain joinable and hence detachable */
9523 status = pthread_detach( &t );
9524 if( status ) return status;
9528 #ifdef HAVE_LINUX_THREADS
9529 pthread_kill_other_threads_np();
9536 if { (eval echo configure:9537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9538 ol_cv_pthread_lc_r=yes
9540 echo "configure: failed program was:" >&5
9541 cat conftest.$ac_ext >&5
9543 ol_cv_pthread_lc_r=no
9547 cat > conftest.$ac_ext <<EOF
9548 #line 9549 "configure"
9549 #include "confdefs.h"
9550 /* pthread test headers */
9551 #include <pthread.h>
9553 #define NULL (void*)0
9556 static void *task(p)
9559 return (void *) (p == NULL);
9563 int main(argc, argv)
9568 /* pthread test function */
9573 #ifdef HAVE_PTHREADS_FINAL
9574 /* Final pthreads */
9575 pthread_attr_t attr;
9577 status = pthread_attr_init(&attr);
9578 if( status ) return status;
9580 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9582 #if defined( PTHREAD_CREATE_JOINABLE )
9583 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9585 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9588 #ifdef PTHREAD_CREATE_DETACHED
9590 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9593 if( status ) return status;
9596 status = pthread_create( &t, &attr, task, NULL );
9597 if( status ) return status;
9599 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9601 /* give thread a chance to complete */
9602 /* it should remain joinable and hence detachable */
9605 status = pthread_detach( t );
9606 if( status ) return status;
9611 /* Draft 4 pthreads */
9612 status = pthread_create( &t, pthread_attr_default, task, NULL );
9613 if( status ) return status;
9616 /* give thread a chance to complete */
9617 /* it should remain joinable and hence detachable */
9620 status = pthread_detach( &t );
9621 if( status ) return status;
9625 #ifdef HAVE_LINUX_THREADS
9626 pthread_kill_other_threads_np();
9634 if { (eval echo configure:9635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9636 ol_cv_pthread_lc_r=yes
9638 echo "configure: failed program was:" >&5
9639 cat conftest.$ac_ext >&5
9641 ol_cv_pthread_lc_r=no
9652 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
9654 if test $ol_cv_pthread_lc_r = yes ; then
9655 ol_link_pthreads="-lc_r"
9656 ol_link_threads=posix
9661 # Pthread try link: -threads (ol_cv_pthread_threads)
9662 if test "$ol_link_threads" = no ; then
9664 echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
9665 echo "configure:9666: checking for pthread link with -threads" >&5
9666 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
9667 echo $ac_n "(cached) $ac_c" 1>&6
9672 LIBS="-threads $LIBS"
9674 if test "$cross_compiling" = yes; then
9675 cat > conftest.$ac_ext <<EOF
9676 #line 9677 "configure"
9677 #include "confdefs.h"
9678 /* pthread test headers */
9679 #include <pthread.h>
9681 #define NULL (void*)0
9684 static void *task(p)
9687 return (void *) (p == NULL);
9692 /* pthread test function */
9697 #ifdef HAVE_PTHREADS_FINAL
9698 /* Final pthreads */
9699 pthread_attr_t attr;
9701 status = pthread_attr_init(&attr);
9702 if( status ) return status;
9704 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9706 #if defined( PTHREAD_CREATE_JOINABLE )
9707 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9709 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9712 #ifdef PTHREAD_CREATE_DETACHED
9714 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9717 if( status ) return status;
9720 status = pthread_create( &t, &attr, task, NULL );
9721 if( status ) return status;
9723 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9725 /* give thread a chance to complete */
9726 /* it should remain joinable and hence detachable */
9729 status = pthread_detach( t );
9730 if( status ) return status;
9735 /* Draft 4 pthreads */
9736 status = pthread_create( &t, pthread_attr_default, task, NULL );
9737 if( status ) return status;
9740 /* give thread a chance to complete */
9741 /* it should remain joinable and hence detachable */
9744 status = pthread_detach( &t );
9745 if( status ) return status;
9749 #ifdef HAVE_LINUX_THREADS
9750 pthread_kill_other_threads_np();
9757 if { (eval echo configure:9758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9759 ol_cv_pthread_threads=yes
9761 echo "configure: failed program was:" >&5
9762 cat conftest.$ac_ext >&5
9764 ol_cv_pthread_threads=no
9768 cat > conftest.$ac_ext <<EOF
9769 #line 9770 "configure"
9770 #include "confdefs.h"
9771 /* pthread test headers */
9772 #include <pthread.h>
9774 #define NULL (void*)0
9777 static void *task(p)
9780 return (void *) (p == NULL);
9784 int main(argc, argv)
9789 /* pthread test function */
9794 #ifdef HAVE_PTHREADS_FINAL
9795 /* Final pthreads */
9796 pthread_attr_t attr;
9798 status = pthread_attr_init(&attr);
9799 if( status ) return status;
9801 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9803 #if defined( PTHREAD_CREATE_JOINABLE )
9804 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9806 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9809 #ifdef PTHREAD_CREATE_DETACHED
9811 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9814 if( status ) return status;
9817 status = pthread_create( &t, &attr, task, NULL );
9818 if( status ) return status;
9820 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9822 /* give thread a chance to complete */
9823 /* it should remain joinable and hence detachable */
9826 status = pthread_detach( t );
9827 if( status ) return status;
9832 /* Draft 4 pthreads */
9833 status = pthread_create( &t, pthread_attr_default, task, NULL );
9834 if( status ) return status;
9837 /* give thread a chance to complete */
9838 /* it should remain joinable and hence detachable */
9841 status = pthread_detach( &t );
9842 if( status ) return status;
9846 #ifdef HAVE_LINUX_THREADS
9847 pthread_kill_other_threads_np();
9855 if { (eval echo configure:9856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9857 ol_cv_pthread_threads=yes
9859 echo "configure: failed program was:" >&5
9860 cat conftest.$ac_ext >&5
9862 ol_cv_pthread_threads=no
9873 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
9875 if test $ol_cv_pthread_threads = yes ; then
9876 ol_link_pthreads="-threads"
9877 ol_link_threads=posix
9882 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
9883 if test "$ol_link_threads" = no ; then
9884 # try -lpthreads -lmach -lexc -lc_r
9885 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
9886 echo "configure:9887: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
9887 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
9888 echo $ac_n "(cached) $ac_c" 1>&6
9893 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
9895 if test "$cross_compiling" = yes; then
9896 cat > conftest.$ac_ext <<EOF
9897 #line 9898 "configure"
9898 #include "confdefs.h"
9899 /* pthread test headers */
9900 #include <pthread.h>
9902 #define NULL (void*)0
9905 static void *task(p)
9908 return (void *) (p == NULL);
9913 /* pthread test function */
9918 #ifdef HAVE_PTHREADS_FINAL
9919 /* Final pthreads */
9920 pthread_attr_t attr;
9922 status = pthread_attr_init(&attr);
9923 if( status ) return status;
9925 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9927 #if defined( PTHREAD_CREATE_JOINABLE )
9928 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9930 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9933 #ifdef PTHREAD_CREATE_DETACHED
9935 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9938 if( status ) return status;
9941 status = pthread_create( &t, &attr, task, NULL );
9942 if( status ) return status;
9944 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9946 /* give thread a chance to complete */
9947 /* it should remain joinable and hence detachable */
9950 status = pthread_detach( t );
9951 if( status ) return status;
9956 /* Draft 4 pthreads */
9957 status = pthread_create( &t, pthread_attr_default, task, NULL );
9958 if( status ) return status;
9961 /* give thread a chance to complete */
9962 /* it should remain joinable and hence detachable */
9965 status = pthread_detach( &t );
9966 if( status ) return status;
9970 #ifdef HAVE_LINUX_THREADS
9971 pthread_kill_other_threads_np();
9978 if { (eval echo configure:9979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9980 ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9982 echo "configure: failed program was:" >&5
9983 cat conftest.$ac_ext >&5
9985 ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9989 cat > conftest.$ac_ext <<EOF
9990 #line 9991 "configure"
9991 #include "confdefs.h"
9992 /* pthread test headers */
9993 #include <pthread.h>
9995 #define NULL (void*)0
9998 static void *task(p)
10001 return (void *) (p == NULL);
10005 int main(argc, argv)
10010 /* pthread test function */
10015 #ifdef HAVE_PTHREADS_FINAL
10016 /* Final pthreads */
10017 pthread_attr_t attr;
10019 status = pthread_attr_init(&attr);
10020 if( status ) return status;
10022 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10024 #if defined( PTHREAD_CREATE_JOINABLE )
10025 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10027 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10030 #ifdef PTHREAD_CREATE_DETACHED
10032 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10035 if( status ) return status;
10038 status = pthread_create( &t, &attr, task, NULL );
10039 if( status ) return status;
10041 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10043 /* give thread a chance to complete */
10044 /* it should remain joinable and hence detachable */
10047 status = pthread_detach( t );
10048 if( status ) return status;
10053 /* Draft 4 pthreads */
10054 status = pthread_create( &t, pthread_attr_default, task, NULL );
10055 if( status ) return status;
10058 /* give thread a chance to complete */
10059 /* it should remain joinable and hence detachable */
10062 status = pthread_detach( &t );
10063 if( status ) return status;
10067 #ifdef HAVE_LINUX_THREADS
10068 pthread_kill_other_threads_np();
10076 if { (eval echo configure:10077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10078 ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
10080 echo "configure: failed program was:" >&5
10081 cat conftest.$ac_ext >&5
10083 ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
10094 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
10096 if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
10097 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
10098 ol_link_threads=posix
10102 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
10103 if test "$ol_link_threads" = no ; then
10104 # try -lpthreads -lmach -lexc
10105 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
10106 echo "configure:10107: checking for pthread link with -lpthreads -lmach -lexc" >&5
10107 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
10108 echo $ac_n "(cached) $ac_c" 1>&6
10113 LIBS="-lpthreads -lmach -lexc $LIBS"
10115 if test "$cross_compiling" = yes; then
10116 cat > conftest.$ac_ext <<EOF
10117 #line 10118 "configure"
10118 #include "confdefs.h"
10119 /* pthread test headers */
10120 #include <pthread.h>
10122 #define NULL (void*)0
10125 static void *task(p)
10128 return (void *) (p == NULL);
10133 /* pthread test function */
10138 #ifdef HAVE_PTHREADS_FINAL
10139 /* Final pthreads */
10140 pthread_attr_t attr;
10142 status = pthread_attr_init(&attr);
10143 if( status ) return status;
10145 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10147 #if defined( PTHREAD_CREATE_JOINABLE )
10148 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10150 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10153 #ifdef PTHREAD_CREATE_DETACHED
10155 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10158 if( status ) return status;
10161 status = pthread_create( &t, &attr, task, NULL );
10162 if( status ) return status;
10164 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10166 /* give thread a chance to complete */
10167 /* it should remain joinable and hence detachable */
10170 status = pthread_detach( t );
10171 if( status ) return status;
10176 /* Draft 4 pthreads */
10177 status = pthread_create( &t, pthread_attr_default, task, NULL );
10178 if( status ) return status;
10181 /* give thread a chance to complete */
10182 /* it should remain joinable and hence detachable */
10185 status = pthread_detach( &t );
10186 if( status ) return status;
10190 #ifdef HAVE_LINUX_THREADS
10191 pthread_kill_other_threads_np();
10198 if { (eval echo configure:10199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10200 ol_cv_pthread_lpthreads_lmach_lexc=yes
10202 echo "configure: failed program was:" >&5
10203 cat conftest.$ac_ext >&5
10205 ol_cv_pthread_lpthreads_lmach_lexc=no
10209 cat > conftest.$ac_ext <<EOF
10210 #line 10211 "configure"
10211 #include "confdefs.h"
10212 /* pthread test headers */
10213 #include <pthread.h>
10215 #define NULL (void*)0
10218 static void *task(p)
10221 return (void *) (p == NULL);
10225 int main(argc, argv)
10230 /* pthread test function */
10235 #ifdef HAVE_PTHREADS_FINAL
10236 /* Final pthreads */
10237 pthread_attr_t attr;
10239 status = pthread_attr_init(&attr);
10240 if( status ) return status;
10242 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10244 #if defined( PTHREAD_CREATE_JOINABLE )
10245 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10247 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10250 #ifdef PTHREAD_CREATE_DETACHED
10252 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10255 if( status ) return status;
10258 status = pthread_create( &t, &attr, task, NULL );
10259 if( status ) return status;
10261 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10263 /* give thread a chance to complete */
10264 /* it should remain joinable and hence detachable */
10267 status = pthread_detach( t );
10268 if( status ) return status;
10273 /* Draft 4 pthreads */
10274 status = pthread_create( &t, pthread_attr_default, task, NULL );
10275 if( status ) return status;
10278 /* give thread a chance to complete */
10279 /* it should remain joinable and hence detachable */
10282 status = pthread_detach( &t );
10283 if( status ) return status;
10287 #ifdef HAVE_LINUX_THREADS
10288 pthread_kill_other_threads_np();
10296 if { (eval echo configure:10297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10298 ol_cv_pthread_lpthreads_lmach_lexc=yes
10300 echo "configure: failed program was:" >&5
10301 cat conftest.$ac_ext >&5
10303 ol_cv_pthread_lpthreads_lmach_lexc=no
10314 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
10316 if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
10317 ol_link_pthreads="-lpthreads -lmach -lexc"
10318 ol_link_threads=posix
10322 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
10323 if test "$ol_link_threads" = no ; then
10324 # try -lpthreads -lexc
10325 echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
10326 echo "configure:10327: checking for pthread link with -lpthreads -lexc" >&5
10327 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
10328 echo $ac_n "(cached) $ac_c" 1>&6
10333 LIBS="-lpthreads -lexc $LIBS"
10335 if test "$cross_compiling" = yes; then
10336 cat > conftest.$ac_ext <<EOF
10337 #line 10338 "configure"
10338 #include "confdefs.h"
10339 /* pthread test headers */
10340 #include <pthread.h>
10342 #define NULL (void*)0
10345 static void *task(p)
10348 return (void *) (p == NULL);
10353 /* pthread test function */
10358 #ifdef HAVE_PTHREADS_FINAL
10359 /* Final pthreads */
10360 pthread_attr_t attr;
10362 status = pthread_attr_init(&attr);
10363 if( status ) return status;
10365 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10367 #if defined( PTHREAD_CREATE_JOINABLE )
10368 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10370 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10373 #ifdef PTHREAD_CREATE_DETACHED
10375 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10378 if( status ) return status;
10381 status = pthread_create( &t, &attr, task, NULL );
10382 if( status ) return status;
10384 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10386 /* give thread a chance to complete */
10387 /* it should remain joinable and hence detachable */
10390 status = pthread_detach( t );
10391 if( status ) return status;
10396 /* Draft 4 pthreads */
10397 status = pthread_create( &t, pthread_attr_default, task, NULL );
10398 if( status ) return status;
10401 /* give thread a chance to complete */
10402 /* it should remain joinable and hence detachable */
10405 status = pthread_detach( &t );
10406 if( status ) return status;
10410 #ifdef HAVE_LINUX_THREADS
10411 pthread_kill_other_threads_np();
10418 if { (eval echo configure:10419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10420 ol_cv_pthread_lpthreads_lexc=yes
10422 echo "configure: failed program was:" >&5
10423 cat conftest.$ac_ext >&5
10425 ol_cv_pthread_lpthreads_lexc=no
10429 cat > conftest.$ac_ext <<EOF
10430 #line 10431 "configure"
10431 #include "confdefs.h"
10432 /* pthread test headers */
10433 #include <pthread.h>
10435 #define NULL (void*)0
10438 static void *task(p)
10441 return (void *) (p == NULL);
10445 int main(argc, argv)
10450 /* pthread test function */
10455 #ifdef HAVE_PTHREADS_FINAL
10456 /* Final pthreads */
10457 pthread_attr_t attr;
10459 status = pthread_attr_init(&attr);
10460 if( status ) return status;
10462 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10464 #if defined( PTHREAD_CREATE_JOINABLE )
10465 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10467 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10470 #ifdef PTHREAD_CREATE_DETACHED
10472 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10475 if( status ) return status;
10478 status = pthread_create( &t, &attr, task, NULL );
10479 if( status ) return status;
10481 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10483 /* give thread a chance to complete */
10484 /* it should remain joinable and hence detachable */
10487 status = pthread_detach( t );
10488 if( status ) return status;
10493 /* Draft 4 pthreads */
10494 status = pthread_create( &t, pthread_attr_default, task, NULL );
10495 if( status ) return status;
10498 /* give thread a chance to complete */
10499 /* it should remain joinable and hence detachable */
10502 status = pthread_detach( &t );
10503 if( status ) return status;
10507 #ifdef HAVE_LINUX_THREADS
10508 pthread_kill_other_threads_np();
10516 if { (eval echo configure:10517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10518 ol_cv_pthread_lpthreads_lexc=yes
10520 echo "configure: failed program was:" >&5
10521 cat conftest.$ac_ext >&5
10523 ol_cv_pthread_lpthreads_lexc=no
10534 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
10536 if test $ol_cv_pthread_lpthreads_lexc = yes ; then
10537 ol_link_pthreads="-lpthreads -lexc"
10538 ol_link_threads=posix
10543 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
10544 if test "$ol_link_threads" = no ; then
10546 echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
10547 echo "configure:10548: checking for pthread link with -lpthreads" >&5
10548 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
10549 echo $ac_n "(cached) $ac_c" 1>&6
10554 LIBS="-lpthreads $LIBS"
10556 if test "$cross_compiling" = yes; then
10557 cat > conftest.$ac_ext <<EOF
10558 #line 10559 "configure"
10559 #include "confdefs.h"
10560 /* pthread test headers */
10561 #include <pthread.h>
10563 #define NULL (void*)0
10566 static void *task(p)
10569 return (void *) (p == NULL);
10574 /* pthread test function */
10579 #ifdef HAVE_PTHREADS_FINAL
10580 /* Final pthreads */
10581 pthread_attr_t attr;
10583 status = pthread_attr_init(&attr);
10584 if( status ) return status;
10586 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10588 #if defined( PTHREAD_CREATE_JOINABLE )
10589 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10591 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10594 #ifdef PTHREAD_CREATE_DETACHED
10596 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10599 if( status ) return status;
10602 status = pthread_create( &t, &attr, task, NULL );
10603 if( status ) return status;
10605 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10607 /* give thread a chance to complete */
10608 /* it should remain joinable and hence detachable */
10611 status = pthread_detach( t );
10612 if( status ) return status;
10617 /* Draft 4 pthreads */
10618 status = pthread_create( &t, pthread_attr_default, task, NULL );
10619 if( status ) return status;
10622 /* give thread a chance to complete */
10623 /* it should remain joinable and hence detachable */
10626 status = pthread_detach( &t );
10627 if( status ) return status;
10631 #ifdef HAVE_LINUX_THREADS
10632 pthread_kill_other_threads_np();
10639 if { (eval echo configure:10640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10641 ol_cv_pthread_lib_lpthreads=yes
10643 echo "configure: failed program was:" >&5
10644 cat conftest.$ac_ext >&5
10646 ol_cv_pthread_lib_lpthreads=no
10650 cat > conftest.$ac_ext <<EOF
10651 #line 10652 "configure"
10652 #include "confdefs.h"
10653 /* pthread test headers */
10654 #include <pthread.h>
10656 #define NULL (void*)0
10659 static void *task(p)
10662 return (void *) (p == NULL);
10666 int main(argc, argv)
10671 /* pthread test function */
10676 #ifdef HAVE_PTHREADS_FINAL
10677 /* Final pthreads */
10678 pthread_attr_t attr;
10680 status = pthread_attr_init(&attr);
10681 if( status ) return status;
10683 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10685 #if defined( PTHREAD_CREATE_JOINABLE )
10686 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10688 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10691 #ifdef PTHREAD_CREATE_DETACHED
10693 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10696 if( status ) return status;
10699 status = pthread_create( &t, &attr, task, NULL );
10700 if( status ) return status;
10702 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10704 /* give thread a chance to complete */
10705 /* it should remain joinable and hence detachable */
10708 status = pthread_detach( t );
10709 if( status ) return status;
10714 /* Draft 4 pthreads */
10715 status = pthread_create( &t, pthread_attr_default, task, NULL );
10716 if( status ) return status;
10719 /* give thread a chance to complete */
10720 /* it should remain joinable and hence detachable */
10723 status = pthread_detach( &t );
10724 if( status ) return status;
10728 #ifdef HAVE_LINUX_THREADS
10729 pthread_kill_other_threads_np();
10737 if { (eval echo configure:10738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10739 ol_cv_pthread_lib_lpthreads=yes
10741 echo "configure: failed program was:" >&5
10742 cat conftest.$ac_ext >&5
10744 ol_cv_pthread_lib_lpthreads=no
10755 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
10757 if test $ol_cv_pthread_lib_lpthreads = yes ; then
10758 ol_link_pthreads="-lpthreads"
10759 ol_link_threads=posix
10764 if test $ol_link_threads != no ; then
10765 cat >> confdefs.h <<\EOF
10766 #define HAVE_PTHREADS 1
10770 LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
10772 save_CPPFLAGS="$CPPFLAGS"
10774 LIBS="$LTHREAD_LIBS $LIBS"
10776 for ac_func in sched_yield pthread_yield
10778 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10779 echo "configure:10780: checking for $ac_func" >&5
10780 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10781 echo $ac_n "(cached) $ac_c" 1>&6
10783 cat > conftest.$ac_ext <<EOF
10784 #line 10785 "configure"
10785 #include "confdefs.h"
10786 /* System header to define __stub macros and hopefully few prototypes,
10787 which can conflict with char $ac_func(); below. */
10788 #include <assert.h>
10789 /* Override any gcc2 internal prototype to avoid an error. */
10790 /* We use char because int might match the return type of a gcc2
10791 builtin and then its argument prototype would still apply. */
10797 /* The GNU C library defines this for functions which it implements
10798 to always fail with ENOSYS. Some functions are actually named
10799 something starting with __ and the normal name is an alias. */
10800 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10808 if { (eval echo configure:10809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10810 eval "ac_cv_func_$ac_func=yes"
10812 echo "configure: failed program was:" >&5
10813 cat conftest.$ac_ext >&5
10815 eval "ac_cv_func_$ac_func=no"
10820 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10821 echo "$ac_t""yes" 1>&6
10822 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10823 cat >> confdefs.h <<EOF
10824 #define $ac_tr_func 1
10828 echo "$ac_t""no" 1>&6
10833 if test $ac_cv_func_sched_yield = no -a \
10834 $ac_cv_func_pthread_yield = no ; then
10835 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
10836 echo "configure:10837: checking for sched_yield in -lrt" >&5
10837 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
10838 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10839 echo $ac_n "(cached) $ac_c" 1>&6
10841 ac_save_LIBS="$LIBS"
10843 cat > conftest.$ac_ext <<EOF
10844 #line 10845 "configure"
10845 #include "confdefs.h"
10846 /* Override any gcc2 internal prototype to avoid an error. */
10847 /* We use char because int might match the return type of a gcc2
10848 builtin and then its argument prototype would still apply. */
10849 char sched_yield();
10855 if { (eval echo configure:10856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10857 eval "ac_cv_lib_$ac_lib_var=yes"
10859 echo "configure: failed program was:" >&5
10860 cat conftest.$ac_ext >&5
10862 eval "ac_cv_lib_$ac_lib_var=no"
10865 LIBS="$ac_save_LIBS"
10868 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10869 echo "$ac_t""yes" 1>&6
10870 LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
10871 cat >> confdefs.h <<\EOF
10872 #define HAVE_SCHED_YIELD 1
10875 ac_cv_func_sched_yield=yes
10877 echo "$ac_t""no" 1>&6
10878 ac_cv_func_sched_yield=no
10882 if test $ac_cv_func_sched_yield = no -a \
10883 $ac_cv_func_pthread_yield = no ; then
10884 for ac_func in thr_yield
10886 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10887 echo "configure:10888: checking for $ac_func" >&5
10888 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10889 echo $ac_n "(cached) $ac_c" 1>&6
10891 cat > conftest.$ac_ext <<EOF
10892 #line 10893 "configure"
10893 #include "confdefs.h"
10894 /* System header to define __stub macros and hopefully few prototypes,
10895 which can conflict with char $ac_func(); below. */
10896 #include <assert.h>
10897 /* Override any gcc2 internal prototype to avoid an error. */
10898 /* We use char because int might match the return type of a gcc2
10899 builtin and then its argument prototype would still apply. */
10905 /* The GNU C library defines this for functions which it implements
10906 to always fail with ENOSYS. Some functions are actually named
10907 something starting with __ and the normal name is an alias. */
10908 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10916 if { (eval echo configure:10917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10918 eval "ac_cv_func_$ac_func=yes"
10920 echo "configure: failed program was:" >&5
10921 cat conftest.$ac_ext >&5
10923 eval "ac_cv_func_$ac_func=no"
10928 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10929 echo "$ac_t""yes" 1>&6
10930 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10931 cat >> confdefs.h <<EOF
10932 #define $ac_tr_func 1
10936 echo "$ac_t""no" 1>&6
10941 if test $ac_cv_func_sched_yield = no -a \
10942 $ac_cv_func_pthread_yield = no -a \
10943 "$ac_cv_func_thr_yield" = no ; then
10944 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
10947 for ac_func in pthread_kill pthread_rwlock_destroy
10949 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10950 echo "configure:10951: checking for $ac_func" >&5
10951 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10952 echo $ac_n "(cached) $ac_c" 1>&6
10954 cat > conftest.$ac_ext <<EOF
10955 #line 10956 "configure"
10956 #include "confdefs.h"
10957 /* System header to define __stub macros and hopefully few prototypes,
10958 which can conflict with char $ac_func(); below. */
10959 #include <assert.h>
10960 /* Override any gcc2 internal prototype to avoid an error. */
10961 /* We use char because int might match the return type of a gcc2
10962 builtin and then its argument prototype would still apply. */
10968 /* The GNU C library defines this for functions which it implements
10969 to always fail with ENOSYS. Some functions are actually named
10970 something starting with __ and the normal name is an alias. */
10971 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10979 if { (eval echo configure:10980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10981 eval "ac_cv_func_$ac_func=yes"
10983 echo "configure: failed program was:" >&5
10984 cat conftest.$ac_ext >&5
10986 eval "ac_cv_func_$ac_func=no"
10991 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10992 echo "$ac_t""yes" 1>&6
10993 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10994 cat >> confdefs.h <<EOF
10995 #define $ac_tr_func 1
10999 echo "$ac_t""no" 1>&6
11004 echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
11005 echo "configure:11006: checking for pthread_detach with <pthread.h>" >&5
11006 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
11007 echo $ac_n "(cached) $ac_c" 1>&6
11010 cat > conftest.$ac_ext <<EOF
11011 #line 11012 "configure"
11012 #include "confdefs.h"
11014 #include <pthread.h>
11016 #define NULL (void*)0
11020 pthread_detach(NULL);
11023 if { (eval echo configure:11024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11025 ol_cv_func_pthread_detach=yes
11027 echo "configure: failed program was:" >&5
11028 cat conftest.$ac_ext >&5
11030 ol_cv_func_pthread_detach=no
11036 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
11038 if test $ol_cv_func_pthread_detach = no ; then
11039 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
11042 cat >> confdefs.h <<\EOF
11043 #define HAVE_PTHREAD_DETACH 1
11048 pthread_setconcurrency \
11049 pthread_getconcurrency \
11050 thr_setconcurrency \
11051 thr_getconcurrency \
11054 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11055 echo "configure:11056: checking for $ac_func" >&5
11056 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11057 echo $ac_n "(cached) $ac_c" 1>&6
11059 cat > conftest.$ac_ext <<EOF
11060 #line 11061 "configure"
11061 #include "confdefs.h"
11062 /* System header to define __stub macros and hopefully few prototypes,
11063 which can conflict with char $ac_func(); below. */
11064 #include <assert.h>
11065 /* Override any gcc2 internal prototype to avoid an error. */
11066 /* We use char because int might match the return type of a gcc2
11067 builtin and then its argument prototype would still apply. */
11073 /* The GNU C library defines this for functions which it implements
11074 to always fail with ENOSYS. Some functions are actually named
11075 something starting with __ and the normal name is an alias. */
11076 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11084 if { (eval echo configure:11085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11086 eval "ac_cv_func_$ac_func=yes"
11088 echo "configure: failed program was:" >&5
11089 cat conftest.$ac_ext >&5
11091 eval "ac_cv_func_$ac_func=no"
11096 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11097 echo "$ac_t""yes" 1>&6
11098 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11099 cat >> confdefs.h <<EOF
11100 #define $ac_tr_func 1
11104 echo "$ac_t""no" 1>&6
11110 for ac_func in pthread_kill_other_threads_np
11112 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11113 echo "configure:11114: checking for $ac_func" >&5
11114 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11115 echo $ac_n "(cached) $ac_c" 1>&6
11117 cat > conftest.$ac_ext <<EOF
11118 #line 11119 "configure"
11119 #include "confdefs.h"
11120 /* System header to define __stub macros and hopefully few prototypes,
11121 which can conflict with char $ac_func(); below. */
11122 #include <assert.h>
11123 /* Override any gcc2 internal prototype to avoid an error. */
11124 /* We use char because int might match the return type of a gcc2
11125 builtin and then its argument prototype would still apply. */
11131 /* The GNU C library defines this for functions which it implements
11132 to always fail with ENOSYS. Some functions are actually named
11133 something starting with __ and the normal name is an alias. */
11134 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11142 if { (eval echo configure:11143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11144 eval "ac_cv_func_$ac_func=yes"
11146 echo "configure: failed program was:" >&5
11147 cat conftest.$ac_ext >&5
11149 eval "ac_cv_func_$ac_func=no"
11154 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11155 echo "$ac_t""yes" 1>&6
11156 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11157 cat >> confdefs.h <<EOF
11158 #define $ac_tr_func 1
11162 echo "$ac_t""no" 1>&6
11166 echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
11167 echo "configure:11168: checking for LinuxThreads implementation" >&5
11168 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
11169 echo $ac_n "(cached) $ac_c" 1>&6
11171 ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
11174 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
11179 echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
11180 echo "configure:11181: checking for LinuxThreads consistency" >&5
11181 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
11182 echo $ac_n "(cached) $ac_c" 1>&6
11185 if test $ol_cv_header_linux_threads = yes -a \
11186 $ol_cv_sys_linux_threads = yes; then
11187 ol_cv_linux_threads=yes
11188 elif test $ol_cv_header_linux_threads = no -a \
11189 $ol_cv_sys_linux_threads = no; then
11190 ol_cv_linux_threads=no
11192 ol_cv_linux_threads=error
11197 echo "$ac_t""$ol_cv_linux_threads" 1>&6
11200 if test $ol_cv_linux_threads = error; then
11201 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
11204 echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
11205 echo "configure:11206: checking if pthread_create() works" >&5
11206 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
11207 echo $ac_n "(cached) $ac_c" 1>&6
11210 if test "$cross_compiling" = yes; then
11211 ol_cv_pthread_create_works=yes
11213 cat > conftest.$ac_ext <<EOF
11214 #line 11215 "configure"
11215 #include "confdefs.h"
11216 /* pthread test headers */
11217 #include <pthread.h>
11219 #define NULL (void*)0
11222 static void *task(p)
11225 return (void *) (p == NULL);
11229 int main(argc, argv)
11234 /* pthread test function */
11239 #ifdef HAVE_PTHREADS_FINAL
11240 /* Final pthreads */
11241 pthread_attr_t attr;
11243 status = pthread_attr_init(&attr);
11244 if( status ) return status;
11246 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11248 #if defined( PTHREAD_CREATE_JOINABLE )
11249 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11251 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11254 #ifdef PTHREAD_CREATE_DETACHED
11256 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11259 if( status ) return status;
11262 status = pthread_create( &t, &attr, task, NULL );
11263 if( status ) return status;
11265 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11267 /* give thread a chance to complete */
11268 /* it should remain joinable and hence detachable */
11271 status = pthread_detach( t );
11272 if( status ) return status;
11277 /* Draft 4 pthreads */
11278 status = pthread_create( &t, pthread_attr_default, task, NULL );
11279 if( status ) return status;
11282 /* give thread a chance to complete */
11283 /* it should remain joinable and hence detachable */
11286 status = pthread_detach( &t );
11287 if( status ) return status;
11291 #ifdef HAVE_LINUX_THREADS
11292 pthread_kill_other_threads_np();
11300 if { (eval echo configure:11301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11302 ol_cv_pthread_create_works=yes
11304 echo "configure: failed program was:" >&5
11305 cat conftest.$ac_ext >&5
11307 ol_cv_pthread_create_works=no
11314 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
11316 if test $ol_cv_pthread_create_works = no ; then
11317 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
11320 if test $ol_with_yielding_select = auto ; then
11321 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
11322 echo "configure:11323: checking if select yields when using pthreads" >&5
11323 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
11324 echo $ac_n "(cached) $ac_c" 1>&6
11327 if test "$cross_compiling" = yes; then
11328 ol_cv_pthread_select_yields=cross
11330 cat > conftest.$ac_ext <<EOF
11331 #line 11332 "configure"
11332 #include "confdefs.h"
11334 #include <sys/types.h>
11335 #include <sys/time.h>
11336 #include <unistd.h>
11337 #include <pthread.h>
11339 #define NULL (void*) 0
11342 static int fildes[2];
11344 static void *task(p)
11356 FD_SET(fildes[0], &rfds);
11358 /* we're not interested in any fds */
11359 i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
11366 exit(0); /* if we exit here, the select blocked the whole process */
11369 int main(argc, argv)
11375 /* create a pipe to select */
11376 if(pipe(&fildes[0])) {
11381 #ifdef HAVE_PTHREAD_SETCONCURRENCY
11382 (void) pthread_setconcurrency(2);
11384 #ifdef HAVE_THR_SETCONCURRENCY
11385 /* Set Solaris LWP concurrency to 2 */
11386 thr_setconcurrency(2);
11390 #if HAVE_PTHREADS_D4
11391 pthread_create(&t, pthread_attr_default, task, NULL);
11393 pthread_create(&t, NULL, task, NULL);
11396 #if HAVE_SCHED_YIELD
11397 sched_yield(); /* make sure task runs first */
11399 #ifdef HAVE_PTHREAD_YIELD
11400 pthread_yield(); /* make sure task runs first */
11407 if { (eval echo configure:11408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11409 ol_cv_pthread_select_yields=no
11411 echo "configure: failed program was:" >&5
11412 cat conftest.$ac_ext >&5
11414 ol_cv_pthread_select_yields=yes
11421 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
11423 if test $ol_cv_pthread_select_yields = cross ; then
11424 { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
11427 if test $ol_cv_pthread_select_yields = yes ; then
11428 ol_with_yielding_select=yes
11432 CPPFLAGS="$save_CPPFLAGS"
11435 { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
11439 if test $ol_with_threads = posix ; then
11440 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
11444 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11445 -o $ol_with_threads = mach ; then
11447 for ac_hdr in mach/cthreads.h cthread.h
11449 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11450 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11451 echo "configure:11452: checking for $ac_hdr" >&5
11452 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11453 echo $ac_n "(cached) $ac_c" 1>&6
11455 cat > conftest.$ac_ext <<EOF
11456 #line 11457 "configure"
11457 #include "confdefs.h"
11460 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11461 { (eval echo configure:11462: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11462 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11463 if test -z "$ac_err"; then
11465 eval "ac_cv_header_$ac_safe=yes"
11468 echo "configure: failed program was:" >&5
11469 cat conftest.$ac_ext >&5
11471 eval "ac_cv_header_$ac_safe=no"
11475 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11476 echo "$ac_t""yes" 1>&6
11477 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11478 cat >> confdefs.h <<EOF
11479 #define $ac_tr_hdr 1
11483 echo "$ac_t""no" 1>&6
11487 if test $ac_cv_header_mach_cthreads_h = yes ; then
11488 ol_with_threads=found
11490 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
11491 echo "configure:11492: checking for cthread_fork" >&5
11492 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
11493 echo $ac_n "(cached) $ac_c" 1>&6
11495 cat > conftest.$ac_ext <<EOF
11496 #line 11497 "configure"
11497 #include "confdefs.h"
11498 /* System header to define __stub macros and hopefully few prototypes,
11499 which can conflict with char cthread_fork(); below. */
11500 #include <assert.h>
11501 /* Override any gcc2 internal prototype to avoid an error. */
11502 /* We use char because int might match the return type of a gcc2
11503 builtin and then its argument prototype would still apply. */
11504 char cthread_fork();
11509 /* The GNU C library defines this for functions which it implements
11510 to always fail with ENOSYS. Some functions are actually named
11511 something starting with __ and the normal name is an alias. */
11512 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
11520 if { (eval echo configure:11521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11522 eval "ac_cv_func_cthread_fork=yes"
11524 echo "configure: failed program was:" >&5
11525 cat conftest.$ac_ext >&5
11527 eval "ac_cv_func_cthread_fork=no"
11532 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
11533 echo "$ac_t""yes" 1>&6
11534 ol_link_threads=yes
11536 echo "$ac_t""no" 1>&6
11540 if test $ol_link_threads = no ; then
11541 echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
11542 echo "configure:11543: checking for cthread_fork with -all_load" >&5
11543 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
11544 echo $ac_n "(cached) $ac_c" 1>&6
11548 LIBS="-all_load $LIBS"
11549 cat > conftest.$ac_ext <<EOF
11550 #line 11551 "configure"
11551 #include "confdefs.h"
11552 #include <mach/cthreads.h>
11555 cthread_fork((void *)0, (void *)0);
11559 if { (eval echo configure:11560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11561 ol_cv_cthread_all_load=yes
11563 echo "configure: failed program was:" >&5
11564 cat conftest.$ac_ext >&5
11566 ol_cv_cthread_all_load=no
11573 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
11575 if test $ol_cv_cthread_all_load = yes ; then
11576 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
11577 ol_link_threads=mach
11581 elif test $ac_cv_header_cthreads_h = yes ; then
11583 ol_with_threads=found
11586 LIBS="$LIBS -lthreads"
11587 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
11588 echo "configure:11589: checking for cthread_fork" >&5
11589 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
11590 echo $ac_n "(cached) $ac_c" 1>&6
11592 cat > conftest.$ac_ext <<EOF
11593 #line 11594 "configure"
11594 #include "confdefs.h"
11595 /* System header to define __stub macros and hopefully few prototypes,
11596 which can conflict with char cthread_fork(); below. */
11597 #include <assert.h>
11598 /* Override any gcc2 internal prototype to avoid an error. */
11599 /* We use char because int might match the return type of a gcc2
11600 builtin and then its argument prototype would still apply. */
11601 char cthread_fork();
11606 /* The GNU C library defines this for functions which it implements
11607 to always fail with ENOSYS. Some functions are actually named
11608 something starting with __ and the normal name is an alias. */
11609 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
11617 if { (eval echo configure:11618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11619 eval "ac_cv_func_cthread_fork=yes"
11621 echo "configure: failed program was:" >&5
11622 cat conftest.$ac_ext >&5
11624 eval "ac_cv_func_cthread_fork=no"
11629 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
11630 echo "$ac_t""yes" 1>&6
11631 ol_link_threads=yes
11633 echo "$ac_t""no" 1>&6
11638 if test $ol_link_threads = yes ; then
11639 LTHREAD_LIBS="-lthreads"
11640 ol_link_threads=mach
11642 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
11645 elif test $ol_with_threads = mach ; then
11646 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
11649 if test $ol_link_threads = mach ; then
11650 cat >> confdefs.h <<\EOF
11651 #define HAVE_MACH_CTHREADS 1
11654 elif test $ol_with_threads = found ; then
11655 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
11659 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11660 -o $ol_with_threads = pth ; then
11662 for ac_hdr in pth.h
11664 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11665 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11666 echo "configure:11667: checking for $ac_hdr" >&5
11667 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11668 echo $ac_n "(cached) $ac_c" 1>&6
11670 cat > conftest.$ac_ext <<EOF
11671 #line 11672 "configure"
11672 #include "confdefs.h"
11675 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11676 { (eval echo configure:11677: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11677 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11678 if test -z "$ac_err"; then
11680 eval "ac_cv_header_$ac_safe=yes"
11683 echo "configure: failed program was:" >&5
11684 cat conftest.$ac_ext >&5
11686 eval "ac_cv_header_$ac_safe=no"
11690 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11691 echo "$ac_t""yes" 1>&6
11692 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11693 cat >> confdefs.h <<EOF
11694 #define $ac_tr_hdr 1
11698 echo "$ac_t""no" 1>&6
11703 if test $ac_cv_header_pth_h = yes ; then
11704 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
11705 echo "configure:11706: checking for pth_version in -lpth" >&5
11706 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
11707 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11708 echo $ac_n "(cached) $ac_c" 1>&6
11710 ac_save_LIBS="$LIBS"
11712 cat > conftest.$ac_ext <<EOF
11713 #line 11714 "configure"
11714 #include "confdefs.h"
11715 /* Override any gcc2 internal prototype to avoid an error. */
11716 /* We use char because int might match the return type of a gcc2
11717 builtin and then its argument prototype would still apply. */
11718 char pth_version();
11724 if { (eval echo configure:11725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11726 eval "ac_cv_lib_$ac_lib_var=yes"
11728 echo "configure: failed program was:" >&5
11729 cat conftest.$ac_ext >&5
11731 eval "ac_cv_lib_$ac_lib_var=no"
11734 LIBS="$ac_save_LIBS"
11737 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11738 echo "$ac_t""yes" 1>&6
11741 echo "$ac_t""no" 1>&6
11746 if test $have_pth = yes ; then
11747 cat >> confdefs.h <<\EOF
11748 #define HAVE_GNU_PTH 1
11751 LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
11752 ol_link_threads=pth
11754 if test $ol_with_yielding_select = auto ; then
11755 ol_with_yielding_select=yes
11761 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11762 -o $ol_with_threads = lwp ; then
11764 for ac_hdr in thread.h synch.h
11766 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11767 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11768 echo "configure:11769: checking for $ac_hdr" >&5
11769 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11770 echo $ac_n "(cached) $ac_c" 1>&6
11772 cat > conftest.$ac_ext <<EOF
11773 #line 11774 "configure"
11774 #include "confdefs.h"
11777 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11778 { (eval echo configure:11779: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11779 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11780 if test -z "$ac_err"; then
11782 eval "ac_cv_header_$ac_safe=yes"
11785 echo "configure: failed program was:" >&5
11786 cat conftest.$ac_ext >&5
11788 eval "ac_cv_header_$ac_safe=no"
11792 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11793 echo "$ac_t""yes" 1>&6
11794 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11795 cat >> confdefs.h <<EOF
11796 #define $ac_tr_hdr 1
11800 echo "$ac_t""no" 1>&6
11804 if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
11805 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
11806 echo "configure:11807: checking for thr_create in -lthread" >&5
11807 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
11808 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11809 echo $ac_n "(cached) $ac_c" 1>&6
11811 ac_save_LIBS="$LIBS"
11812 LIBS="-lthread $LIBS"
11813 cat > conftest.$ac_ext <<EOF
11814 #line 11815 "configure"
11815 #include "confdefs.h"
11816 /* Override any gcc2 internal prototype to avoid an error. */
11817 /* We use char because int might match the return type of a gcc2
11818 builtin and then its argument prototype would still apply. */
11825 if { (eval echo configure:11826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11827 eval "ac_cv_lib_$ac_lib_var=yes"
11829 echo "configure: failed program was:" >&5
11830 cat conftest.$ac_ext >&5
11832 eval "ac_cv_lib_$ac_lib_var=no"
11835 LIBS="$ac_save_LIBS"
11838 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11839 echo "$ac_t""yes" 1>&6
11842 echo "$ac_t""no" 1>&6
11847 if test $have_thr = yes ; then
11848 cat >> confdefs.h <<\EOF
11852 LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
11853 ol_link_threads=thr
11855 if test $ol_with_yielding_select = auto ; then
11856 ol_with_yielding_select=yes
11860 thr_setconcurrency \
11861 thr_getconcurrency \
11864 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11865 echo "configure:11866: checking for $ac_func" >&5
11866 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11867 echo $ac_n "(cached) $ac_c" 1>&6
11869 cat > conftest.$ac_ext <<EOF
11870 #line 11871 "configure"
11871 #include "confdefs.h"
11872 /* System header to define __stub macros and hopefully few prototypes,
11873 which can conflict with char $ac_func(); below. */
11874 #include <assert.h>
11875 /* Override any gcc2 internal prototype to avoid an error. */
11876 /* We use char because int might match the return type of a gcc2
11877 builtin and then its argument prototype would still apply. */
11883 /* The GNU C library defines this for functions which it implements
11884 to always fail with ENOSYS. Some functions are actually named
11885 something starting with __ and the normal name is an alias. */
11886 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11894 if { (eval echo configure:11895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11896 eval "ac_cv_func_$ac_func=yes"
11898 echo "configure: failed program was:" >&5
11899 cat conftest.$ac_ext >&5
11901 eval "ac_cv_func_$ac_func=no"
11906 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11907 echo "$ac_t""yes" 1>&6
11908 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11909 cat >> confdefs.h <<EOF
11910 #define $ac_tr_func 1
11914 echo "$ac_t""no" 1>&6
11921 for ac_hdr in lwp/lwp.h
11923 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11924 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11925 echo "configure:11926: checking for $ac_hdr" >&5
11926 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11927 echo $ac_n "(cached) $ac_c" 1>&6
11929 cat > conftest.$ac_ext <<EOF
11930 #line 11931 "configure"
11931 #include "confdefs.h"
11934 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11935 { (eval echo configure:11936: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11936 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11937 if test -z "$ac_err"; then
11939 eval "ac_cv_header_$ac_safe=yes"
11942 echo "configure: failed program was:" >&5
11943 cat conftest.$ac_ext >&5
11945 eval "ac_cv_header_$ac_safe=no"
11949 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11950 echo "$ac_t""yes" 1>&6
11951 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11952 cat >> confdefs.h <<EOF
11953 #define $ac_tr_hdr 1
11957 echo "$ac_t""no" 1>&6
11961 if test $ac_cv_header_lwp_lwp_h = yes ; then
11962 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
11963 echo "configure:11964: checking for lwp_create in -llwp" >&5
11964 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
11965 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11966 echo $ac_n "(cached) $ac_c" 1>&6
11968 ac_save_LIBS="$LIBS"
11970 cat > conftest.$ac_ext <<EOF
11971 #line 11972 "configure"
11972 #include "confdefs.h"
11973 /* Override any gcc2 internal prototype to avoid an error. */
11974 /* We use char because int might match the return type of a gcc2
11975 builtin and then its argument prototype would still apply. */
11982 if { (eval echo configure:11983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11984 eval "ac_cv_lib_$ac_lib_var=yes"
11986 echo "configure: failed program was:" >&5
11987 cat conftest.$ac_ext >&5
11989 eval "ac_cv_lib_$ac_lib_var=no"
11992 LIBS="$ac_save_LIBS"
11995 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11996 echo "$ac_t""yes" 1>&6
11999 echo "$ac_t""no" 1>&6
12004 if test $have_lwp = yes ; then
12005 cat >> confdefs.h <<\EOF
12009 LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
12010 ol_link_threads=lwp
12012 if test $ol_with_yielding_select = auto ; then
12013 ol_with_yielding_select=no
12019 if test $ol_with_yielding_select = yes ; then
12020 cat >> confdefs.h <<\EOF
12021 #define HAVE_YIELDING_SELECT 1
12026 if test $ol_with_threads = manual ; then
12027 ol_link_threads=yes
12029 echo "configure: warning: thread defines and link options must be set manually" 1>&2
12031 for ac_hdr in pthread.h sched.h
12033 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12034 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12035 echo "configure:12036: checking for $ac_hdr" >&5
12036 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12037 echo $ac_n "(cached) $ac_c" 1>&6
12039 cat > conftest.$ac_ext <<EOF
12040 #line 12041 "configure"
12041 #include "confdefs.h"
12044 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12045 { (eval echo configure:12046: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12046 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12047 if test -z "$ac_err"; then
12049 eval "ac_cv_header_$ac_safe=yes"
12052 echo "configure: failed program was:" >&5
12053 cat conftest.$ac_ext >&5
12055 eval "ac_cv_header_$ac_safe=no"
12059 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12060 echo "$ac_t""yes" 1>&6
12061 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12062 cat >> confdefs.h <<EOF
12063 #define $ac_tr_hdr 1
12067 echo "$ac_t""no" 1>&6
12071 for ac_func in sched_yield pthread_yield
12073 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12074 echo "configure:12075: checking for $ac_func" >&5
12075 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
12076 echo $ac_n "(cached) $ac_c" 1>&6
12078 cat > conftest.$ac_ext <<EOF
12079 #line 12080 "configure"
12080 #include "confdefs.h"
12081 /* System header to define __stub macros and hopefully few prototypes,
12082 which can conflict with char $ac_func(); below. */
12083 #include <assert.h>
12084 /* Override any gcc2 internal prototype to avoid an error. */
12085 /* We use char because int might match the return type of a gcc2
12086 builtin and then its argument prototype would still apply. */
12092 /* The GNU C library defines this for functions which it implements
12093 to always fail with ENOSYS. Some functions are actually named
12094 something starting with __ and the normal name is an alias. */
12095 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12103 if { (eval echo configure:12104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12105 eval "ac_cv_func_$ac_func=yes"
12107 echo "configure: failed program was:" >&5
12108 cat conftest.$ac_ext >&5
12110 eval "ac_cv_func_$ac_func=no"
12115 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12116 echo "$ac_t""yes" 1>&6
12117 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12118 cat >> confdefs.h <<EOF
12119 #define $ac_tr_func 1
12123 echo "$ac_t""no" 1>&6
12128 echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
12129 echo "configure:12130: checking for LinuxThreads pthread.h" >&5
12130 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
12131 echo $ac_n "(cached) $ac_c" 1>&6
12133 cat > conftest.$ac_ext <<EOF
12134 #line 12135 "configure"
12135 #include "confdefs.h"
12136 #include <pthread.h>
12138 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12139 egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
12141 ol_cv_header_linux_threads=yes
12144 ol_cv_header_linux_threads=no
12151 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
12152 if test $ol_cv_header_linux_threads = yes; then
12153 cat >> confdefs.h <<\EOF
12154 #define HAVE_LINUX_THREADS 1
12160 for ac_hdr in mach/cthreads.h
12162 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12163 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12164 echo "configure:12165: checking for $ac_hdr" >&5
12165 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12166 echo $ac_n "(cached) $ac_c" 1>&6
12168 cat > conftest.$ac_ext <<EOF
12169 #line 12170 "configure"
12170 #include "confdefs.h"
12173 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12174 { (eval echo configure:12175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12175 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12176 if test -z "$ac_err"; then
12178 eval "ac_cv_header_$ac_safe=yes"
12181 echo "configure: failed program was:" >&5
12182 cat conftest.$ac_ext >&5
12184 eval "ac_cv_header_$ac_safe=no"
12188 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12189 echo "$ac_t""yes" 1>&6
12190 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12191 cat >> confdefs.h <<EOF
12192 #define $ac_tr_hdr 1
12196 echo "$ac_t""no" 1>&6
12200 for ac_hdr in lwp/lwp.h
12202 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12203 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12204 echo "configure:12205: checking for $ac_hdr" >&5
12205 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12206 echo $ac_n "(cached) $ac_c" 1>&6
12208 cat > conftest.$ac_ext <<EOF
12209 #line 12210 "configure"
12210 #include "confdefs.h"
12213 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12214 { (eval echo configure:12215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12215 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12216 if test -z "$ac_err"; then
12218 eval "ac_cv_header_$ac_safe=yes"
12221 echo "configure: failed program was:" >&5
12222 cat conftest.$ac_ext >&5
12224 eval "ac_cv_header_$ac_safe=no"
12228 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12229 echo "$ac_t""yes" 1>&6
12230 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12231 cat >> confdefs.h <<EOF
12232 #define $ac_tr_hdr 1
12236 echo "$ac_t""no" 1>&6
12240 for ac_hdr in thread.h synch.h
12242 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12243 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12244 echo "configure:12245: checking for $ac_hdr" >&5
12245 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12246 echo $ac_n "(cached) $ac_c" 1>&6
12248 cat > conftest.$ac_ext <<EOF
12249 #line 12250 "configure"
12250 #include "confdefs.h"
12253 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12254 { (eval echo configure:12255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12255 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12256 if test -z "$ac_err"; then
12258 eval "ac_cv_header_$ac_safe=yes"
12261 echo "configure: failed program was:" >&5
12262 cat conftest.$ac_ext >&5
12264 eval "ac_cv_header_$ac_safe=no"
12268 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12269 echo "$ac_t""yes" 1>&6
12270 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12271 cat >> confdefs.h <<EOF
12272 #define $ac_tr_hdr 1
12276 echo "$ac_t""no" 1>&6
12282 if test $ol_link_threads != no -a $ol_link_threads != nt ; then
12283 cat >> confdefs.h <<\EOF
12284 #define REENTRANT 1
12287 cat >> confdefs.h <<\EOF
12288 #define _REENTRANT 1
12291 cat >> confdefs.h <<\EOF
12292 #define THREAD_SAFE 1
12295 cat >> confdefs.h <<\EOF
12296 #define _THREAD_SAFE 1
12299 cat >> confdefs.h <<\EOF
12300 #define THREADSAFE 1
12303 cat >> confdefs.h <<\EOF
12304 #define _THREADSAFE 1
12307 cat >> confdefs.h <<\EOF
12308 #define _SGI_MP_SOURCE 1
12312 echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
12313 echo "configure:12314: checking for thread specific errno" >&5
12314 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
12315 echo $ac_n "(cached) $ac_c" 1>&6
12318 cat > conftest.$ac_ext <<EOF
12319 #line 12320 "configure"
12320 #include "confdefs.h"
12326 if { (eval echo configure:12327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12328 ol_cv_errno_thread_specific=yes
12330 echo "configure: failed program was:" >&5
12331 cat conftest.$ac_ext >&5
12333 ol_cv_errno_thread_specific=no
12339 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
12341 echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
12342 echo "configure:12343: checking for thread specific h_errno" >&5
12343 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
12344 echo $ac_n "(cached) $ac_c" 1>&6
12347 cat > conftest.$ac_ext <<EOF
12348 #line 12349 "configure"
12349 #include "confdefs.h"
12355 if { (eval echo configure:12356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12357 ol_cv_h_errno_thread_specific=yes
12359 echo "configure: failed program was:" >&5
12360 cat conftest.$ac_ext >&5
12362 ol_cv_h_errno_thread_specific=no
12368 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
12370 if test $ol_cv_errno_thread_specific != yes \
12371 -o $ol_cv_h_errno_thread_specific != yes ; then
12372 LIBS="$LTHREAD_LIBS $LIBS"
12378 if test $ol_link_threads = no ; then
12379 if test $ol_with_threads = yes ; then
12380 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
12383 if test $ol_with_threads = auto ; then
12384 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
12388 cat >> confdefs.h <<\EOF
12389 #define NO_THREADS 1
12395 if test $ol_link_threads != no ; then
12396 cat >> confdefs.h <<\EOF
12397 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
12404 if test $ol_with_ldbm_api = auto \
12405 -o $ol_with_ldbm_api = berkeley \
12406 -o $ol_with_ldbm_api = bcompat ; then
12408 if test $ol_with_ldbm_api = bcompat; then \
12409 ol_cv_berkeley_db=no
12410 for ac_hdr in db_185.h db.h
12412 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12413 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12414 echo "configure:12415: checking for $ac_hdr" >&5
12415 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12416 echo $ac_n "(cached) $ac_c" 1>&6
12418 cat > conftest.$ac_ext <<EOF
12419 #line 12420 "configure"
12420 #include "confdefs.h"
12423 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12424 { (eval echo configure:12425: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12425 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12426 if test -z "$ac_err"; then
12428 eval "ac_cv_header_$ac_safe=yes"
12431 echo "configure: failed program was:" >&5
12432 cat conftest.$ac_ext >&5
12434 eval "ac_cv_header_$ac_safe=no"
12438 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12439 echo "$ac_t""yes" 1>&6
12440 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12441 cat >> confdefs.h <<EOF
12442 #define $ac_tr_hdr 1
12446 echo "$ac_t""no" 1>&6
12450 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
12451 echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
12452 echo "configure:12453: checking if Berkeley DB header compatibility" >&5
12453 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
12454 echo $ac_n "(cached) $ac_c" 1>&6
12457 cat > conftest.$ac_ext <<EOF
12458 #line 12459 "configure"
12459 #include "confdefs.h"
12462 # include <db_185.h>
12467 /* this check could be improved */
12468 #ifndef DB_VERSION_MAJOR
12469 # define DB_VERSION_MAJOR 1
12472 #if DB_VERSION_MAJOR == 1
12477 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12478 egrep "__db_version_1" >/dev/null 2>&1; then
12480 ol_cv_header_db1=yes
12483 ol_cv_header_db1=no
12489 echo "$ac_t""$ol_cv_header_db1" 1>&6
12491 if test $ol_cv_header_db1 = yes ; then
12493 if test $ol_cv_lib_db = no ; then
12494 echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
12495 echo "configure:12496: checking for Berkeley DB link (default)" >&5
12496 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
12497 echo $ac_n "(cached) $ac_c" 1>&6
12502 LIBS="$ol_DB_LIB $LIBS"
12504 cat > conftest.$ac_ext <<EOF
12505 #line 12506 "configure"
12506 #include "confdefs.h"
12508 #ifdef HAVE_DB_185_H
12509 # include <db_185.h>
12514 #ifndef DB_VERSION_MAJOR
12515 # define DB_VERSION_MAJOR 1
12519 #define NULL ((void*)0)
12524 #if DB_VERSION_MAJOR > 1
12527 int major, minor, patch;
12529 version = db_version( &major, &minor, &patch );
12531 if( major != DB_VERSION_MAJOR ||
12532 minor < DB_VERSION_MINOR )
12534 printf("Berkeley DB version mismatch\n"
12535 "\texpected: %s\n\tgot: %s\n",
12536 DB_VERSION_STRING, version);
12542 #if DB_VERSION_MAJOR > 2
12543 db_env_create( NULL, 0 );
12544 #elif DB_VERSION_MAJOR > 1
12545 db_appexit( NULL );
12547 (void) dbopen( NULL, 0, 0, 0, NULL);
12552 if { (eval echo configure:12553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12556 echo "configure: failed program was:" >&5
12557 cat conftest.$ac_ext >&5
12567 echo "$ac_t""$ol_cv_db_none" 1>&6
12569 if test $ol_cv_db_none = yes ; then
12574 if test $ol_cv_lib_db = no ; then
12575 echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
12576 echo "configure:12577: checking for Berkeley DB link (-ldb)" >&5
12577 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
12578 echo $ac_n "(cached) $ac_c" 1>&6
12583 LIBS="$ol_DB_LIB $LIBS"
12585 cat > conftest.$ac_ext <<EOF
12586 #line 12587 "configure"
12587 #include "confdefs.h"
12589 #ifdef HAVE_DB_185_H
12590 # include <db_185.h>
12595 #ifndef DB_VERSION_MAJOR
12596 # define DB_VERSION_MAJOR 1
12600 #define NULL ((void*)0)
12605 #if DB_VERSION_MAJOR > 1
12608 int major, minor, patch;
12610 version = db_version( &major, &minor, &patch );
12612 if( major != DB_VERSION_MAJOR ||
12613 minor < DB_VERSION_MINOR )
12615 printf("Berkeley DB version mismatch\n"
12616 "\texpected: %s\n\tgot: %s\n",
12617 DB_VERSION_STRING, version);
12623 #if DB_VERSION_MAJOR > 2
12624 db_env_create( NULL, 0 );
12625 #elif DB_VERSION_MAJOR > 1
12626 db_appexit( NULL );
12628 (void) dbopen( NULL, 0, 0, 0, NULL);
12633 if { (eval echo configure:12634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12637 echo "configure: failed program was:" >&5
12638 cat conftest.$ac_ext >&5
12648 echo "$ac_t""$ol_cv_db_db" 1>&6
12650 if test $ol_cv_db_db = yes ; then
12655 if test $ol_cv_lib_db = no ; then
12656 echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
12657 echo "configure:12658: checking for Berkeley DB link (-ldb3)" >&5
12658 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
12659 echo $ac_n "(cached) $ac_c" 1>&6
12664 LIBS="$ol_DB_LIB $LIBS"
12666 cat > conftest.$ac_ext <<EOF
12667 #line 12668 "configure"
12668 #include "confdefs.h"
12670 #ifdef HAVE_DB_185_H
12671 # include <db_185.h>
12676 #ifndef DB_VERSION_MAJOR
12677 # define DB_VERSION_MAJOR 1
12681 #define NULL ((void*)0)
12686 #if DB_VERSION_MAJOR > 1
12689 int major, minor, patch;
12691 version = db_version( &major, &minor, &patch );
12693 if( major != DB_VERSION_MAJOR ||
12694 minor < DB_VERSION_MINOR )
12696 printf("Berkeley DB version mismatch\n"
12697 "\texpected: %s\n\tgot: %s\n",
12698 DB_VERSION_STRING, version);
12704 #if DB_VERSION_MAJOR > 2
12705 db_env_create( NULL, 0 );
12706 #elif DB_VERSION_MAJOR > 1
12707 db_appexit( NULL );
12709 (void) dbopen( NULL, 0, 0, 0, NULL);
12714 if { (eval echo configure:12715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12718 echo "configure: failed program was:" >&5
12719 cat conftest.$ac_ext >&5
12729 echo "$ac_t""$ol_cv_db_db3" 1>&6
12731 if test $ol_cv_db_db3 = yes ; then
12736 if test $ol_cv_lib_db = no ; then
12737 echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
12738 echo "configure:12739: checking for Berkeley DB link (-ldb2)" >&5
12739 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
12740 echo $ac_n "(cached) $ac_c" 1>&6
12745 LIBS="$ol_DB_LIB $LIBS"
12747 cat > conftest.$ac_ext <<EOF
12748 #line 12749 "configure"
12749 #include "confdefs.h"
12751 #ifdef HAVE_DB_185_H
12752 # include <db_185.h>
12757 #ifndef DB_VERSION_MAJOR
12758 # define DB_VERSION_MAJOR 1
12762 #define NULL ((void*)0)
12767 #if DB_VERSION_MAJOR > 1
12770 int major, minor, patch;
12772 version = db_version( &major, &minor, &patch );
12774 if( major != DB_VERSION_MAJOR ||
12775 minor < DB_VERSION_MINOR )
12777 printf("Berkeley DB version mismatch\n"
12778 "\texpected: %s\n\tgot: %s\n",
12779 DB_VERSION_STRING, version);
12785 #if DB_VERSION_MAJOR > 2
12786 db_env_create( NULL, 0 );
12787 #elif DB_VERSION_MAJOR > 1
12788 db_appexit( NULL );
12790 (void) dbopen( NULL, 0, 0, 0, NULL);
12795 if { (eval echo configure:12796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12799 echo "configure: failed program was:" >&5
12800 cat conftest.$ac_ext >&5
12810 echo "$ac_t""$ol_cv_db_db2" 1>&6
12812 if test $ol_cv_db_db2 = yes ; then
12817 if test $ol_cv_lib_db = no ; then
12818 echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
12819 echo "configure:12820: checking for Berkeley DB link (-ldb1)" >&5
12820 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
12821 echo $ac_n "(cached) $ac_c" 1>&6
12826 LIBS="$ol_DB_LIB $LIBS"
12828 cat > conftest.$ac_ext <<EOF
12829 #line 12830 "configure"
12830 #include "confdefs.h"
12832 #ifdef HAVE_DB_185_H
12833 # include <db_185.h>
12838 #ifndef DB_VERSION_MAJOR
12839 # define DB_VERSION_MAJOR 1
12843 #define NULL ((void*)0)
12848 #if DB_VERSION_MAJOR > 1
12851 int major, minor, patch;
12853 version = db_version( &major, &minor, &patch );
12855 if( major != DB_VERSION_MAJOR ||
12856 minor < DB_VERSION_MINOR )
12858 printf("Berkeley DB version mismatch\n"
12859 "\texpected: %s\n\tgot: %s\n",
12860 DB_VERSION_STRING, version);
12866 #if DB_VERSION_MAJOR > 2
12867 db_env_create( NULL, 0 );
12868 #elif DB_VERSION_MAJOR > 1
12869 db_appexit( NULL );
12871 (void) dbopen( NULL, 0, 0, 0, NULL);
12876 if { (eval echo configure:12877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12880 echo "configure: failed program was:" >&5
12881 cat conftest.$ac_ext >&5
12891 echo "$ac_t""$ol_cv_db_db1" 1>&6
12893 if test $ol_cv_db_db1 = yes ; then
12899 if test "$ol_cv_lib_db" != no ; then
12900 ol_cv_berkeley_db=yes
12906 ol_cv_berkeley_db=no
12909 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12910 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12911 echo "configure:12912: checking for $ac_hdr" >&5
12912 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12913 echo $ac_n "(cached) $ac_c" 1>&6
12915 cat > conftest.$ac_ext <<EOF
12916 #line 12917 "configure"
12917 #include "confdefs.h"
12920 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12921 { (eval echo configure:12922: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12922 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12923 if test -z "$ac_err"; then
12925 eval "ac_cv_header_$ac_safe=yes"
12928 echo "configure: failed program was:" >&5
12929 cat conftest.$ac_ext >&5
12931 eval "ac_cv_header_$ac_safe=no"
12935 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12936 echo "$ac_t""yes" 1>&6
12937 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12938 cat >> confdefs.h <<EOF
12939 #define $ac_tr_hdr 1
12943 echo "$ac_t""no" 1>&6
12947 if test $ac_cv_header_db_h = yes; then
12949 if test $ol_cv_lib_db = no ; then
12950 echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
12951 echo "configure:12952: checking for Berkeley DB link (default)" >&5
12952 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
12953 echo $ac_n "(cached) $ac_c" 1>&6
12958 LIBS="$ol_DB_LIB $LIBS"
12960 cat > conftest.$ac_ext <<EOF
12961 #line 12962 "configure"
12962 #include "confdefs.h"
12964 #ifdef HAVE_DB_185_H
12965 # include <db_185.h>
12970 #ifndef DB_VERSION_MAJOR
12971 # define DB_VERSION_MAJOR 1
12975 #define NULL ((void*)0)
12980 #if DB_VERSION_MAJOR > 1
12983 int major, minor, patch;
12985 version = db_version( &major, &minor, &patch );
12987 if( major != DB_VERSION_MAJOR ||
12988 minor < DB_VERSION_MINOR )
12990 printf("Berkeley DB version mismatch\n"
12991 "\texpected: %s\n\tgot: %s\n",
12992 DB_VERSION_STRING, version);
12998 #if DB_VERSION_MAJOR > 2
12999 db_env_create( NULL, 0 );
13000 #elif DB_VERSION_MAJOR > 1
13001 db_appexit( NULL );
13003 (void) dbopen( NULL, 0, 0, 0, NULL);
13008 if { (eval echo configure:13009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13012 echo "configure: failed program was:" >&5
13013 cat conftest.$ac_ext >&5
13023 echo "$ac_t""$ol_cv_db_none" 1>&6
13025 if test $ol_cv_db_none = yes ; then
13030 if test $ol_cv_lib_db = no ; then
13031 echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
13032 echo "configure:13033: checking for Berkeley DB link (-ldb)" >&5
13033 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
13034 echo $ac_n "(cached) $ac_c" 1>&6
13039 LIBS="$ol_DB_LIB $LIBS"
13041 cat > conftest.$ac_ext <<EOF
13042 #line 13043 "configure"
13043 #include "confdefs.h"
13045 #ifdef HAVE_DB_185_H
13046 # include <db_185.h>
13051 #ifndef DB_VERSION_MAJOR
13052 # define DB_VERSION_MAJOR 1
13056 #define NULL ((void*)0)
13061 #if DB_VERSION_MAJOR > 1
13064 int major, minor, patch;
13066 version = db_version( &major, &minor, &patch );
13068 if( major != DB_VERSION_MAJOR ||
13069 minor < DB_VERSION_MINOR )
13071 printf("Berkeley DB version mismatch\n"
13072 "\texpected: %s\n\tgot: %s\n",
13073 DB_VERSION_STRING, version);
13079 #if DB_VERSION_MAJOR > 2
13080 db_env_create( NULL, 0 );
13081 #elif DB_VERSION_MAJOR > 1
13082 db_appexit( NULL );
13084 (void) dbopen( NULL, 0, 0, 0, NULL);
13089 if { (eval echo configure:13090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13093 echo "configure: failed program was:" >&5
13094 cat conftest.$ac_ext >&5
13104 echo "$ac_t""$ol_cv_db_db" 1>&6
13106 if test $ol_cv_db_db = yes ; then
13111 if test $ol_cv_lib_db = no ; then
13112 echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
13113 echo "configure:13114: checking for Berkeley DB link (-ldb3)" >&5
13114 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
13115 echo $ac_n "(cached) $ac_c" 1>&6
13120 LIBS="$ol_DB_LIB $LIBS"
13122 cat > conftest.$ac_ext <<EOF
13123 #line 13124 "configure"
13124 #include "confdefs.h"
13126 #ifdef HAVE_DB_185_H
13127 # include <db_185.h>
13132 #ifndef DB_VERSION_MAJOR
13133 # define DB_VERSION_MAJOR 1
13137 #define NULL ((void*)0)
13142 #if DB_VERSION_MAJOR > 1
13145 int major, minor, patch;
13147 version = db_version( &major, &minor, &patch );
13149 if( major != DB_VERSION_MAJOR ||
13150 minor < DB_VERSION_MINOR )
13152 printf("Berkeley DB version mismatch\n"
13153 "\texpected: %s\n\tgot: %s\n",
13154 DB_VERSION_STRING, version);
13160 #if DB_VERSION_MAJOR > 2
13161 db_env_create( NULL, 0 );
13162 #elif DB_VERSION_MAJOR > 1
13163 db_appexit( NULL );
13165 (void) dbopen( NULL, 0, 0, 0, NULL);
13170 if { (eval echo configure:13171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13174 echo "configure: failed program was:" >&5
13175 cat conftest.$ac_ext >&5
13185 echo "$ac_t""$ol_cv_db_db3" 1>&6
13187 if test $ol_cv_db_db3 = yes ; then
13192 if test $ol_cv_lib_db = no ; then
13193 echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
13194 echo "configure:13195: checking for Berkeley DB link (-ldb2)" >&5
13195 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
13196 echo $ac_n "(cached) $ac_c" 1>&6
13201 LIBS="$ol_DB_LIB $LIBS"
13203 cat > conftest.$ac_ext <<EOF
13204 #line 13205 "configure"
13205 #include "confdefs.h"
13207 #ifdef HAVE_DB_185_H
13208 # include <db_185.h>
13213 #ifndef DB_VERSION_MAJOR
13214 # define DB_VERSION_MAJOR 1
13218 #define NULL ((void*)0)
13223 #if DB_VERSION_MAJOR > 1
13226 int major, minor, patch;
13228 version = db_version( &major, &minor, &patch );
13230 if( major != DB_VERSION_MAJOR ||
13231 minor < DB_VERSION_MINOR )
13233 printf("Berkeley DB version mismatch\n"
13234 "\texpected: %s\n\tgot: %s\n",
13235 DB_VERSION_STRING, version);
13241 #if DB_VERSION_MAJOR > 2
13242 db_env_create( NULL, 0 );
13243 #elif DB_VERSION_MAJOR > 1
13244 db_appexit( NULL );
13246 (void) dbopen( NULL, 0, 0, 0, NULL);
13251 if { (eval echo configure:13252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13255 echo "configure: failed program was:" >&5
13256 cat conftest.$ac_ext >&5
13266 echo "$ac_t""$ol_cv_db_db2" 1>&6
13268 if test $ol_cv_db_db2 = yes ; then
13273 if test $ol_cv_lib_db = no ; then
13274 echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
13275 echo "configure:13276: checking for Berkeley DB link (-ldb1)" >&5
13276 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
13277 echo $ac_n "(cached) $ac_c" 1>&6
13282 LIBS="$ol_DB_LIB $LIBS"
13284 cat > conftest.$ac_ext <<EOF
13285 #line 13286 "configure"
13286 #include "confdefs.h"
13288 #ifdef HAVE_DB_185_H
13289 # include <db_185.h>
13294 #ifndef DB_VERSION_MAJOR
13295 # define DB_VERSION_MAJOR 1
13299 #define NULL ((void*)0)
13304 #if DB_VERSION_MAJOR > 1
13307 int major, minor, patch;
13309 version = db_version( &major, &minor, &patch );
13311 if( major != DB_VERSION_MAJOR ||
13312 minor < DB_VERSION_MINOR )
13314 printf("Berkeley DB version mismatch\n"
13315 "\texpected: %s\n\tgot: %s\n",
13316 DB_VERSION_STRING, version);
13322 #if DB_VERSION_MAJOR > 2
13323 db_env_create( NULL, 0 );
13324 #elif DB_VERSION_MAJOR > 1
13325 db_appexit( NULL );
13327 (void) dbopen( NULL, 0, 0, 0, NULL);
13332 if { (eval echo configure:13333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13336 echo "configure: failed program was:" >&5
13337 cat conftest.$ac_ext >&5
13347 echo "$ac_t""$ol_cv_db_db1" 1>&6
13349 if test $ol_cv_db_db1 = yes ; then
13355 if test "$ol_cv_lib_db" != no ; then
13356 ol_cv_berkeley_db=yes
13357 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
13358 echo "configure:13359: checking for Berkeley DB thread support" >&5
13359 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
13360 echo $ac_n "(cached) $ac_c" 1>&6
13364 if test $ol_cv_lib_db != yes ; then
13365 LIBS="$ol_cv_lib_db"
13368 if test "$cross_compiling" = yes; then
13369 ol_cv_berkeley_db_thread=cross
13371 cat > conftest.$ac_ext <<EOF
13372 #line 13373 "configure"
13373 #include "confdefs.h"
13375 #ifdef HAVE_DB_185_H
13381 #define NULL ((void *)0)
13386 u_int32_t flags = DB_CREATE |
13392 #if DB_VERSION_MAJOR > 2
13393 DB_ENV *env = NULL;
13395 rc = db_env_create( &env, 0 );
13397 flags |= DB_INIT_MPOOL;
13398 #ifdef DB_MPOOL_PRIVATE
13399 flags |= DB_MPOOL_PRIVATE;
13403 printf("BerkeleyDB: %s\n", db_strerror(rc) );
13407 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
13408 rc = env->open( env, NULL, flags, 0 );
13410 rc = env->open( env, NULL, NULL, flags, 0 );
13414 rc = env->close( env, 0 );
13418 printf("BerkeleyDB: %s\n", db_strerror(rc) );
13424 memset( &env, '\0', sizeof(env) );
13426 rc = db_appinit( NULL, NULL, &env, flags );
13429 db_appexit( &env );
13432 unlink("__db_mpool.share");
13433 unlink("__db_lock.share");
13439 if { (eval echo configure:13440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13441 ol_cv_berkeley_db_thread=yes
13443 echo "configure: failed program was:" >&5
13444 cat conftest.$ac_ext >&5
13446 ol_cv_berkeley_db_thread=no
13454 if test $ol_cv_berkeley_db_thread != no ; then
13455 cat >> confdefs.h <<\EOF
13456 #define HAVE_BERKELEY_DB_THREAD 1
13463 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
13469 if test $ol_cv_berkeley_db != no ; then
13470 cat >> confdefs.h <<\EOF
13471 #define HAVE_BERKELEY_DB 1
13475 ol_link_ldbm=berkeley
13476 ol_with_ldbm_api=db
13478 if test $ol_with_ldbm_type = hash ; then
13479 cat >> confdefs.h <<\EOF
13480 #define LDBM_USE_DBHASH 1
13484 cat >> confdefs.h <<\EOF
13485 #define LDBM_USE_DBBTREE 1
13490 if test $ol_cv_lib_db != yes ; then
13491 LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
13496 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
13497 echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
13498 ol_with_ldbm_api=none
13501 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
13502 echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
13503 echo "configure:13504: checking for MDBM library" >&5
13504 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
13505 echo $ac_n "(cached) $ac_c" 1>&6
13508 echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
13509 echo "configure:13510: checking for mdbm_set_chain" >&5
13510 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
13511 echo $ac_n "(cached) $ac_c" 1>&6
13513 cat > conftest.$ac_ext <<EOF
13514 #line 13515 "configure"
13515 #include "confdefs.h"
13516 /* System header to define __stub macros and hopefully few prototypes,
13517 which can conflict with char mdbm_set_chain(); below. */
13518 #include <assert.h>
13519 /* Override any gcc2 internal prototype to avoid an error. */
13520 /* We use char because int might match the return type of a gcc2
13521 builtin and then its argument prototype would still apply. */
13522 char mdbm_set_chain();
13527 /* The GNU C library defines this for functions which it implements
13528 to always fail with ENOSYS. Some functions are actually named
13529 something starting with __ and the normal name is an alias. */
13530 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
13533 f = mdbm_set_chain;
13538 if { (eval echo configure:13539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13540 eval "ac_cv_func_mdbm_set_chain=yes"
13542 echo "configure: failed program was:" >&5
13543 cat conftest.$ac_ext >&5
13545 eval "ac_cv_func_mdbm_set_chain=no"
13550 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
13551 echo "$ac_t""yes" 1>&6
13554 echo "$ac_t""no" 1>&6
13556 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
13557 echo "configure:13558: checking for mdbm_set_chain in -lmdbm" >&5
13558 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
13559 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13560 echo $ac_n "(cached) $ac_c" 1>&6
13562 ac_save_LIBS="$LIBS"
13563 LIBS="-lmdbm $LIBS"
13564 cat > conftest.$ac_ext <<EOF
13565 #line 13566 "configure"
13566 #include "confdefs.h"
13567 /* Override any gcc2 internal prototype to avoid an error. */
13568 /* We use char because int might match the return type of a gcc2
13569 builtin and then its argument prototype would still apply. */
13570 char mdbm_set_chain();
13576 if { (eval echo configure:13577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13578 eval "ac_cv_lib_$ac_lib_var=yes"
13580 echo "configure: failed program was:" >&5
13581 cat conftest.$ac_ext >&5
13583 eval "ac_cv_lib_$ac_lib_var=no"
13586 LIBS="$ac_save_LIBS"
13589 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13590 echo "$ac_t""yes" 1>&6
13591 ol_cv_lib_mdbm=-lmdbm
13593 echo "$ac_t""no" 1>&6
13604 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
13607 for ac_hdr in mdbm.h
13609 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13610 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13611 echo "configure:13612: checking for $ac_hdr" >&5
13612 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13613 echo $ac_n "(cached) $ac_c" 1>&6
13615 cat > conftest.$ac_ext <<EOF
13616 #line 13617 "configure"
13617 #include "confdefs.h"
13620 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13621 { (eval echo configure:13622: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13622 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13623 if test -z "$ac_err"; then
13625 eval "ac_cv_header_$ac_safe=yes"
13628 echo "configure: failed program was:" >&5
13629 cat conftest.$ac_ext >&5
13631 eval "ac_cv_header_$ac_safe=no"
13635 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13636 echo "$ac_t""yes" 1>&6
13637 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13638 cat >> confdefs.h <<EOF
13639 #define $ac_tr_hdr 1
13643 echo "$ac_t""no" 1>&6
13647 echo $ac_n "checking for db""... $ac_c" 1>&6
13648 echo "configure:13649: checking for db" >&5
13649 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
13650 echo $ac_n "(cached) $ac_c" 1>&6
13653 if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
13661 echo "$ac_t""$ol_cv_mdbm" 1>&6
13662 if test $ol_cv_mdbm = yes ; then
13663 cat >> confdefs.h <<\EOF
13664 #define HAVE_MDBM 1
13670 if test $ol_cv_mdbm = yes ; then
13672 ol_with_ldbm_api=mdbm
13673 if test $ol_cv_lib_mdbm != yes ; then
13674 LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
13679 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
13680 echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
13681 echo "configure:13682: checking for GDBM library" >&5
13682 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
13683 echo $ac_n "(cached) $ac_c" 1>&6
13686 echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
13687 echo "configure:13688: checking for gdbm_open" >&5
13688 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
13689 echo $ac_n "(cached) $ac_c" 1>&6
13691 cat > conftest.$ac_ext <<EOF
13692 #line 13693 "configure"
13693 #include "confdefs.h"
13694 /* System header to define __stub macros and hopefully few prototypes,
13695 which can conflict with char gdbm_open(); below. */
13696 #include <assert.h>
13697 /* Override any gcc2 internal prototype to avoid an error. */
13698 /* We use char because int might match the return type of a gcc2
13699 builtin and then its argument prototype would still apply. */
13705 /* The GNU C library defines this for functions which it implements
13706 to always fail with ENOSYS. Some functions are actually named
13707 something starting with __ and the normal name is an alias. */
13708 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
13716 if { (eval echo configure:13717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13718 eval "ac_cv_func_gdbm_open=yes"
13720 echo "configure: failed program was:" >&5
13721 cat conftest.$ac_ext >&5
13723 eval "ac_cv_func_gdbm_open=no"
13728 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
13729 echo "$ac_t""yes" 1>&6
13732 echo "$ac_t""no" 1>&6
13734 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
13735 echo "configure:13736: checking for gdbm_open in -lgdbm" >&5
13736 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
13737 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13738 echo $ac_n "(cached) $ac_c" 1>&6
13740 ac_save_LIBS="$LIBS"
13741 LIBS="-lgdbm $LIBS"
13742 cat > conftest.$ac_ext <<EOF
13743 #line 13744 "configure"
13744 #include "confdefs.h"
13745 /* Override any gcc2 internal prototype to avoid an error. */
13746 /* We use char because int might match the return type of a gcc2
13747 builtin and then its argument prototype would still apply. */
13754 if { (eval echo configure:13755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13756 eval "ac_cv_lib_$ac_lib_var=yes"
13758 echo "configure: failed program was:" >&5
13759 cat conftest.$ac_ext >&5
13761 eval "ac_cv_lib_$ac_lib_var=no"
13764 LIBS="$ac_save_LIBS"
13767 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13768 echo "$ac_t""yes" 1>&6
13769 ol_cv_lib_gdbm=-lgdbm
13771 echo "$ac_t""no" 1>&6
13782 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
13785 for ac_hdr in gdbm.h
13787 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13788 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13789 echo "configure:13790: checking for $ac_hdr" >&5
13790 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13791 echo $ac_n "(cached) $ac_c" 1>&6
13793 cat > conftest.$ac_ext <<EOF
13794 #line 13795 "configure"
13795 #include "confdefs.h"
13798 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13799 { (eval echo configure:13800: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13800 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13801 if test -z "$ac_err"; then
13803 eval "ac_cv_header_$ac_safe=yes"
13806 echo "configure: failed program was:" >&5
13807 cat conftest.$ac_ext >&5
13809 eval "ac_cv_header_$ac_safe=no"
13813 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13814 echo "$ac_t""yes" 1>&6
13815 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13816 cat >> confdefs.h <<EOF
13817 #define $ac_tr_hdr 1
13821 echo "$ac_t""no" 1>&6
13825 echo $ac_n "checking for db""... $ac_c" 1>&6
13826 echo "configure:13827: checking for db" >&5
13827 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
13828 echo $ac_n "(cached) $ac_c" 1>&6
13831 if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
13839 echo "$ac_t""$ol_cv_gdbm" 1>&6
13840 if test $ol_cv_gdbm = yes ; then
13841 cat >> confdefs.h <<\EOF
13842 #define HAVE_GDBM 1
13848 if test $ol_cv_gdbm = yes ; then
13850 ol_with_ldbm_api=gdbm
13852 if test $ol_cv_lib_gdbm != yes ; then
13853 LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
13858 if test $ol_with_ldbm_api = ndbm ; then
13859 echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
13860 echo "configure:13861: checking for NDBM library" >&5
13861 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
13862 echo $ac_n "(cached) $ac_c" 1>&6
13865 echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
13866 echo "configure:13867: checking for dbm_open" >&5
13867 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
13868 echo $ac_n "(cached) $ac_c" 1>&6
13870 cat > conftest.$ac_ext <<EOF
13871 #line 13872 "configure"
13872 #include "confdefs.h"
13873 /* System header to define __stub macros and hopefully few prototypes,
13874 which can conflict with char dbm_open(); below. */
13875 #include <assert.h>
13876 /* Override any gcc2 internal prototype to avoid an error. */
13877 /* We use char because int might match the return type of a gcc2
13878 builtin and then its argument prototype would still apply. */
13884 /* The GNU C library defines this for functions which it implements
13885 to always fail with ENOSYS. Some functions are actually named
13886 something starting with __ and the normal name is an alias. */
13887 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
13895 if { (eval echo configure:13896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13897 eval "ac_cv_func_dbm_open=yes"
13899 echo "configure: failed program was:" >&5
13900 cat conftest.$ac_ext >&5
13902 eval "ac_cv_func_dbm_open=no"
13907 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
13908 echo "$ac_t""yes" 1>&6
13911 echo "$ac_t""no" 1>&6
13913 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
13914 echo "configure:13915: checking for dbm_open in -lndbm" >&5
13915 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
13916 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13917 echo $ac_n "(cached) $ac_c" 1>&6
13919 ac_save_LIBS="$LIBS"
13920 LIBS="-lndbm $LIBS"
13921 cat > conftest.$ac_ext <<EOF
13922 #line 13923 "configure"
13923 #include "confdefs.h"
13924 /* Override any gcc2 internal prototype to avoid an error. */
13925 /* We use char because int might match the return type of a gcc2
13926 builtin and then its argument prototype would still apply. */
13933 if { (eval echo configure:13934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13935 eval "ac_cv_lib_$ac_lib_var=yes"
13937 echo "configure: failed program was:" >&5
13938 cat conftest.$ac_ext >&5
13940 eval "ac_cv_lib_$ac_lib_var=no"
13943 LIBS="$ac_save_LIBS"
13946 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13947 echo "$ac_t""yes" 1>&6
13948 ol_cv_lib_ndbm=-lndbm
13950 echo "$ac_t""no" 1>&6
13952 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
13953 echo "configure:13954: checking for dbm_open in -ldbm" >&5
13954 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
13955 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13956 echo $ac_n "(cached) $ac_c" 1>&6
13958 ac_save_LIBS="$LIBS"
13960 cat > conftest.$ac_ext <<EOF
13961 #line 13962 "configure"
13962 #include "confdefs.h"
13963 /* Override any gcc2 internal prototype to avoid an error. */
13964 /* We use char because int might match the return type of a gcc2
13965 builtin and then its argument prototype would still apply. */
13972 if { (eval echo configure:13973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13974 eval "ac_cv_lib_$ac_lib_var=yes"
13976 echo "configure: failed program was:" >&5
13977 cat conftest.$ac_ext >&5
13979 eval "ac_cv_lib_$ac_lib_var=no"
13982 LIBS="$ac_save_LIBS"
13985 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13986 echo "$ac_t""yes" 1>&6
13987 ol_cv_lib_ndbm=-ldbm
13989 echo "$ac_t""no" 1>&6
14002 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
14005 for ac_hdr in ndbm.h
14007 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14008 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14009 echo "configure:14010: checking for $ac_hdr" >&5
14010 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14011 echo $ac_n "(cached) $ac_c" 1>&6
14013 cat > conftest.$ac_ext <<EOF
14014 #line 14015 "configure"
14015 #include "confdefs.h"
14018 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14019 { (eval echo configure:14020: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14020 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14021 if test -z "$ac_err"; then
14023 eval "ac_cv_header_$ac_safe=yes"
14026 echo "configure: failed program was:" >&5
14027 cat conftest.$ac_ext >&5
14029 eval "ac_cv_header_$ac_safe=no"
14033 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14034 echo "$ac_t""yes" 1>&6
14035 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14036 cat >> confdefs.h <<EOF
14037 #define $ac_tr_hdr 1
14041 echo "$ac_t""no" 1>&6
14045 echo $ac_n "checking for db""... $ac_c" 1>&6
14046 echo "configure:14047: checking for db" >&5
14047 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
14048 echo $ac_n "(cached) $ac_c" 1>&6
14051 if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
14059 echo "$ac_t""$ol_cv_ndbm" 1>&6
14060 if test $ol_cv_ndbm = yes ; then
14061 cat >> confdefs.h <<\EOF
14062 #define HAVE_NDBM 1
14068 if test $ol_cv_ndbm = yes ; then
14070 ol_with_ldbm_api=ndbm
14072 if test $ol_cv_lib_ndbm != yes ; then
14073 LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
14078 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
14079 echo "configure: warning: could not find suitable LDBM backend" 1>&2
14080 if test $ol_enable_ldbm = yes ; then
14081 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
14084 echo "configure: warning: disabling LDBM" 1>&2
14088 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
14089 LINK_BINS_DYNAMIC="yes"
14091 LINK_BINS_DYNAMIC="no"
14094 if test $ol_enable_wrappers != no ; then
14095 for ac_hdr in tcpd.h
14097 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14098 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14099 echo "configure:14100: checking for $ac_hdr" >&5
14100 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14101 echo $ac_n "(cached) $ac_c" 1>&6
14103 cat > conftest.$ac_ext <<EOF
14104 #line 14105 "configure"
14105 #include "confdefs.h"
14108 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14109 { (eval echo configure:14110: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14110 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14111 if test -z "$ac_err"; then
14113 eval "ac_cv_header_$ac_safe=yes"
14116 echo "configure: failed program was:" >&5
14117 cat conftest.$ac_ext >&5
14119 eval "ac_cv_header_$ac_safe=no"
14123 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14124 echo "$ac_t""yes" 1>&6
14125 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14126 cat >> confdefs.h <<EOF
14127 #define $ac_tr_hdr 1
14131 echo "$ac_t""no" 1>&6
14136 if test $ac_cv_header_tcpd_h != yes ; then
14139 cat > conftest.$ac_ext <<EOF
14140 #line 14141 "configure"
14141 #include "confdefs.h"
14143 int allow_severity = 0;
14144 int deny_severity = 0;
14150 if { (eval echo configure:14151: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14154 echo "configure: failed program was:" >&5
14155 cat conftest.$ac_ext >&5
14162 if test $have_wrappers = yes ; then
14163 cat >> confdefs.h <<\EOF
14164 #define HAVE_TCPD 1
14169 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
14170 echo "configure:14171: checking for main in -lnsl" >&5
14171 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
14172 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14173 echo $ac_n "(cached) $ac_c" 1>&6
14175 ac_save_LIBS="$LIBS"
14177 cat > conftest.$ac_ext <<EOF
14178 #line 14179 "configure"
14179 #include "confdefs.h"
14185 if { (eval echo configure:14186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14187 eval "ac_cv_lib_$ac_lib_var=yes"
14189 echo "configure: failed program was:" >&5
14190 cat conftest.$ac_ext >&5
14192 eval "ac_cv_lib_$ac_lib_var=no"
14195 LIBS="$ac_save_LIBS"
14198 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14199 echo "$ac_t""yes" 1>&6
14200 ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
14201 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
14202 cat >> confdefs.h <<EOF
14203 #define $ac_tr_lib 1
14209 echo "$ac_t""no" 1>&6
14213 echo "configure: warning: could not find -lwrap" 1>&2
14214 if test $ol_enable_wrappers = yes ; then
14215 { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
14218 echo "configure: warning: disabling wrappers support" 1>&2
14219 ol_enable_wrappers=no
14224 if test $ol_enable_syslog != no ; then
14225 echo $ac_n "checking for openlog""... $ac_c" 1>&6
14226 echo "configure:14227: checking for openlog" >&5
14227 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
14228 echo $ac_n "(cached) $ac_c" 1>&6
14230 cat > conftest.$ac_ext <<EOF
14231 #line 14232 "configure"
14232 #include "confdefs.h"
14233 /* System header to define __stub macros and hopefully few prototypes,
14234 which can conflict with char openlog(); below. */
14235 #include <assert.h>
14236 /* Override any gcc2 internal prototype to avoid an error. */
14237 /* We use char because int might match the return type of a gcc2
14238 builtin and then its argument prototype would still apply. */
14244 /* The GNU C library defines this for functions which it implements
14245 to always fail with ENOSYS. Some functions are actually named
14246 something starting with __ and the normal name is an alias. */
14247 #if defined (__stub_openlog) || defined (__stub___openlog)
14255 if { (eval echo configure:14256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14257 eval "ac_cv_func_openlog=yes"
14259 echo "configure: failed program was:" >&5
14260 cat conftest.$ac_ext >&5
14262 eval "ac_cv_func_openlog=no"
14267 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
14268 echo "$ac_t""yes" 1>&6
14271 echo "$ac_t""no" 1>&6
14274 if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
14275 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
14277 ol_enable_syslog=$ac_cv_func_openlog
14281 if test $ol_enable_sql != no ; then
14282 echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
14283 echo "configure:14284: checking for SQLDriverConnect in -liodbc" >&5
14284 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
14285 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14286 echo $ac_n "(cached) $ac_c" 1>&6
14288 ac_save_LIBS="$LIBS"
14289 LIBS="-liodbc $LIBS"
14290 cat > conftest.$ac_ext <<EOF
14291 #line 14292 "configure"
14292 #include "confdefs.h"
14293 /* Override any gcc2 internal prototype to avoid an error. */
14294 /* We use char because int might match the return type of a gcc2
14295 builtin and then its argument prototype would still apply. */
14296 char SQLDriverConnect();
14302 if { (eval echo configure:14303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14304 eval "ac_cv_lib_$ac_lib_var=yes"
14306 echo "configure: failed program was:" >&5
14307 cat conftest.$ac_ext >&5
14309 eval "ac_cv_lib_$ac_lib_var=no"
14312 LIBS="$ac_save_LIBS"
14315 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14316 echo "$ac_t""yes" 1>&6
14319 echo "$ac_t""no" 1>&6
14323 if test $have_iodbc = yes ; then
14324 ol_link_sql="-liodbc"
14326 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
14327 echo "configure:14328: checking for SQLDriverConnect in -lodbc" >&5
14328 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
14329 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14330 echo $ac_n "(cached) $ac_c" 1>&6
14332 ac_save_LIBS="$LIBS"
14333 LIBS="-lodbc $LIBS"
14334 cat > conftest.$ac_ext <<EOF
14335 #line 14336 "configure"
14336 #include "confdefs.h"
14337 /* Override any gcc2 internal prototype to avoid an error. */
14338 /* We use char because int might match the return type of a gcc2
14339 builtin and then its argument prototype would still apply. */
14340 char SQLDriverConnect();
14346 if { (eval echo configure:14347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14348 eval "ac_cv_lib_$ac_lib_var=yes"
14350 echo "configure: failed program was:" >&5
14351 cat conftest.$ac_ext >&5
14353 eval "ac_cv_lib_$ac_lib_var=no"
14356 LIBS="$ac_save_LIBS"
14359 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14360 echo "$ac_t""yes" 1>&6
14363 echo "$ac_t""no" 1>&6
14367 if test $have_odbc = yes ; then
14368 ol_link_sql="-lodbc"
14372 if test $ol_link_sql != no ; then
14373 SLAPD_SQL_LIBS="$ol_link_sql"
14375 elif test $ol_enable_sql != auto ; then
14376 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
14381 for ac_hdr in termcap.h ncurses.h
14383 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14384 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14385 echo "configure:14386: checking for $ac_hdr" >&5
14386 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14387 echo $ac_n "(cached) $ac_c" 1>&6
14389 cat > conftest.$ac_ext <<EOF
14390 #line 14391 "configure"
14391 #include "confdefs.h"
14394 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14395 { (eval echo configure:14396: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14396 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14397 if test -z "$ac_err"; then
14399 eval "ac_cv_header_$ac_safe=yes"
14402 echo "configure: failed program was:" >&5
14403 cat conftest.$ac_ext >&5
14405 eval "ac_cv_header_$ac_safe=no"
14409 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14410 echo "$ac_t""yes" 1>&6
14411 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14412 cat >> confdefs.h <<EOF
14413 #define $ac_tr_hdr 1
14417 echo "$ac_t""no" 1>&6
14422 if test $ol_link_termcap = no ; then
14423 echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
14424 echo "configure:14425: checking for tputs in -ltermcap" >&5
14425 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
14426 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14427 echo $ac_n "(cached) $ac_c" 1>&6
14429 ac_save_LIBS="$LIBS"
14430 LIBS="-ltermcap $LIBS"
14431 cat > conftest.$ac_ext <<EOF
14432 #line 14433 "configure"
14433 #include "confdefs.h"
14434 /* Override any gcc2 internal prototype to avoid an error. */
14435 /* We use char because int might match the return type of a gcc2
14436 builtin and then its argument prototype would still apply. */
14443 if { (eval echo configure:14444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14445 eval "ac_cv_lib_$ac_lib_var=yes"
14447 echo "configure: failed program was:" >&5
14448 cat conftest.$ac_ext >&5
14450 eval "ac_cv_lib_$ac_lib_var=no"
14453 LIBS="$ac_save_LIBS"
14456 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14457 echo "$ac_t""yes" 1>&6
14460 echo "$ac_t""no" 1>&6
14464 if test $have_termcap = yes ; then
14465 cat >> confdefs.h <<\EOF
14466 #define HAVE_TERMCAP 1
14469 ol_link_termcap=yes
14470 TERMCAP_LIBS=-ltermcap
14474 if test $ol_link_termcap = no ; then
14475 echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
14476 echo "configure:14477: checking for initscr in -lncurses" >&5
14477 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
14478 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14479 echo $ac_n "(cached) $ac_c" 1>&6
14481 ac_save_LIBS="$LIBS"
14482 LIBS="-lncurses $LIBS"
14483 cat > conftest.$ac_ext <<EOF
14484 #line 14485 "configure"
14485 #include "confdefs.h"
14486 /* Override any gcc2 internal prototype to avoid an error. */
14487 /* We use char because int might match the return type of a gcc2
14488 builtin and then its argument prototype would still apply. */
14495 if { (eval echo configure:14496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14497 eval "ac_cv_lib_$ac_lib_var=yes"
14499 echo "configure: failed program was:" >&5
14500 cat conftest.$ac_ext >&5
14502 eval "ac_cv_lib_$ac_lib_var=no"
14505 LIBS="$ac_save_LIBS"
14508 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14509 echo "$ac_t""yes" 1>&6
14512 echo "$ac_t""no" 1>&6
14516 if test $have_ncurses = yes ; then
14517 cat >> confdefs.h <<\EOF
14518 #define HAVE_NCURSES 1
14521 ol_link_termcap=yes
14522 TERMCAP_LIBS=-lncurses
14526 if test $ol_link_termcap = no ; then
14527 cat >> confdefs.h <<\EOF
14528 #define NO_TERMCAP 1
14536 if test $ol_with_cyrus_sasl != no ; then
14537 for ac_hdr in sasl.h
14539 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14540 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14541 echo "configure:14542: checking for $ac_hdr" >&5
14542 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14543 echo $ac_n "(cached) $ac_c" 1>&6
14545 cat > conftest.$ac_ext <<EOF
14546 #line 14547 "configure"
14547 #include "confdefs.h"
14550 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14551 { (eval echo configure:14552: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14552 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14553 if test -z "$ac_err"; then
14555 eval "ac_cv_header_$ac_safe=yes"
14558 echo "configure: failed program was:" >&5
14559 cat conftest.$ac_ext >&5
14561 eval "ac_cv_header_$ac_safe=no"
14565 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14566 echo "$ac_t""yes" 1>&6
14567 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14568 cat >> confdefs.h <<EOF
14569 #define $ac_tr_hdr 1
14573 echo "$ac_t""no" 1>&6
14578 if test $ac_cv_header_sasl_h = yes ; then
14579 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
14580 echo "configure:14581: checking for sasl_client_init in -lsasl" >&5
14581 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
14582 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14583 echo $ac_n "(cached) $ac_c" 1>&6
14585 ac_save_LIBS="$LIBS"
14586 LIBS="-lsasl $LIBS"
14587 cat > conftest.$ac_ext <<EOF
14588 #line 14589 "configure"
14589 #include "confdefs.h"
14590 /* Override any gcc2 internal prototype to avoid an error. */
14591 /* We use char because int might match the return type of a gcc2
14592 builtin and then its argument prototype would still apply. */
14593 char sasl_client_init();
14599 if { (eval echo configure:14600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14601 eval "ac_cv_lib_$ac_lib_var=yes"
14603 echo "configure: failed program was:" >&5
14604 cat conftest.$ac_ext >&5
14606 eval "ac_cv_lib_$ac_lib_var=no"
14609 LIBS="$ac_save_LIBS"
14612 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14613 echo "$ac_t""yes" 1>&6
14614 have_cyrus_sasl=yes
14616 echo "$ac_t""no" 1>&6
14621 if test $have_cyrus_sasl != no ; then
14623 cat >> confdefs.h <<\EOF
14624 #define HAVE_CYRUS_SASL 1
14631 if test $ol_link_sasl = no ; then
14632 if test $ol_with_cyrus_sasl != auto ; then
14633 { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
14635 echo "configure: warning: Could not locate Cyrus SASL" 1>&2
14636 echo "configure: warning: SASL authentication not supported!" 1>&2
14637 if test $ol_link_tls = no ; then
14638 echo "configure: warning: Strong authentication not supported!" 1>&2
14642 elif test $ol_enable_spasswd != no ; then
14643 ol_link_spasswd=yes
14647 echo "configure: warning: SASL authentication not supported!" 1>&2
14648 if test $ol_link_tls = no ; then
14649 echo "configure: warning: Strong authentication not supported!" 1>&2
14653 if test $cross_compiling != yes ; then
14655 if test -r /dev/urandom ; then
14656 dev="/dev/urandom";
14657 elif test -r /idev/urandom ; then
14658 dev="/idev/urandom";
14659 elif test -r /dev/srandom ; then
14660 dev="/dev/srandom";
14661 elif test -r /dev/random ; then
14663 elif test -r /idev/random ; then
14664 dev="/idev/random";
14667 if test $dev != no ; then
14668 cat >> confdefs.h <<EOF
14669 #define URANDOM_DEVICE "$dev"
14676 if test $ol_with_fetch != no ; then
14678 LIBS="-lfetch -lcom_err $LIBS"
14679 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
14680 echo "configure:14681: checking fetch(3) library" >&5
14681 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
14682 echo $ac_n "(cached) $ac_c" 1>&6
14685 cat > conftest.$ac_ext <<EOF
14686 #line 14687 "configure"
14687 #include "confdefs.h"
14689 #include <sys/param.h>
14693 struct url *u = fetchParseURL("file:///");
14696 if { (eval echo configure:14697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14698 ol_cv_lib_fetch=yes
14700 echo "configure: failed program was:" >&5
14701 cat conftest.$ac_ext >&5
14708 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
14710 if test $ol_cv_lib_fetch != no ; then
14711 ol_link_fetch="-lfetch -lcom_err"
14712 cat >> confdefs.h <<\EOF
14713 #define HAVE_FETCH 1
14719 if test $ol_cv_lib_fetch != no ; then
14720 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
14721 ol_link_fetch=freebsd
14723 elif test $ol_with_fetch != auto ; then
14724 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
14728 ol_link_readline=no
14729 if test $ol_with_readline != no ; then
14730 for ac_hdr in readline/readline.h readline/history.h
14732 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14733 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14734 echo "configure:14735: checking for $ac_hdr" >&5
14735 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14736 echo $ac_n "(cached) $ac_c" 1>&6
14738 cat > conftest.$ac_ext <<EOF
14739 #line 14740 "configure"
14740 #include "confdefs.h"
14743 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14744 { (eval echo configure:14745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14745 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14746 if test -z "$ac_err"; then
14748 eval "ac_cv_header_$ac_safe=yes"
14751 echo "configure: failed program was:" >&5
14752 cat conftest.$ac_ext >&5
14754 eval "ac_cv_header_$ac_safe=no"
14758 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14759 echo "$ac_t""yes" 1>&6
14760 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14761 cat >> confdefs.h <<EOF
14762 #define $ac_tr_hdr 1
14766 echo "$ac_t""no" 1>&6
14771 if test $ac_cv_header_readline_readline_h = yes ; then
14773 LIBS="$TERMCAP_LIBS $LIBS"
14774 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
14775 echo "configure:14776: checking for readline in -lreadline" >&5
14776 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
14777 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14778 echo $ac_n "(cached) $ac_c" 1>&6
14780 ac_save_LIBS="$LIBS"
14781 LIBS="-lreadline $LIBS"
14782 cat > conftest.$ac_ext <<EOF
14783 #line 14784 "configure"
14784 #include "confdefs.h"
14785 /* Override any gcc2 internal prototype to avoid an error. */
14786 /* We use char because int might match the return type of a gcc2
14787 builtin and then its argument prototype would still apply. */
14794 if { (eval echo configure:14795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14796 eval "ac_cv_lib_$ac_lib_var=yes"
14798 echo "configure: failed program was:" >&5
14799 cat conftest.$ac_ext >&5
14801 eval "ac_cv_lib_$ac_lib_var=no"
14804 LIBS="$ac_save_LIBS"
14807 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14808 echo "$ac_t""yes" 1>&6
14811 echo "$ac_t""no" 1>&6
14817 if test $have_readline = yes ; then
14818 ol_with_readline=found
14819 ol_link_readline=yes
14821 READLINE_LIBS="-lreadline"
14826 if test $ol_link_readline = yes ; then
14827 cat >> confdefs.h <<\EOF
14828 #define HAVE_READLINE 1
14834 if test $ol_enable_crypt != no ; then
14835 echo $ac_n "checking for crypt""... $ac_c" 1>&6
14836 echo "configure:14837: checking for crypt" >&5
14837 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
14838 echo $ac_n "(cached) $ac_c" 1>&6
14840 cat > conftest.$ac_ext <<EOF
14841 #line 14842 "configure"
14842 #include "confdefs.h"
14843 /* System header to define __stub macros and hopefully few prototypes,
14844 which can conflict with char crypt(); below. */
14845 #include <assert.h>
14846 /* Override any gcc2 internal prototype to avoid an error. */
14847 /* We use char because int might match the return type of a gcc2
14848 builtin and then its argument prototype would still apply. */
14854 /* The GNU C library defines this for functions which it implements
14855 to always fail with ENOSYS. Some functions are actually named
14856 something starting with __ and the normal name is an alias. */
14857 #if defined (__stub_crypt) || defined (__stub___crypt)
14865 if { (eval echo configure:14866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14867 eval "ac_cv_func_crypt=yes"
14869 echo "configure: failed program was:" >&5
14870 cat conftest.$ac_ext >&5
14872 eval "ac_cv_func_crypt=no"
14877 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
14878 echo "$ac_t""yes" 1>&6
14881 echo "$ac_t""no" 1>&6
14883 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
14884 echo "configure:14885: checking for crypt in -lcrypt" >&5
14885 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
14886 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14887 echo $ac_n "(cached) $ac_c" 1>&6
14889 ac_save_LIBS="$LIBS"
14890 LIBS="-lcrypt $LIBS"
14891 cat > conftest.$ac_ext <<EOF
14892 #line 14893 "configure"
14893 #include "confdefs.h"
14894 /* Override any gcc2 internal prototype to avoid an error. */
14895 /* We use char because int might match the return type of a gcc2
14896 builtin and then its argument prototype would still apply. */
14903 if { (eval echo configure:14904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14905 eval "ac_cv_lib_$ac_lib_var=yes"
14907 echo "configure: failed program was:" >&5
14908 cat conftest.$ac_ext >&5
14910 eval "ac_cv_lib_$ac_lib_var=no"
14913 LIBS="$ac_save_LIBS"
14916 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14917 echo "$ac_t""yes" 1>&6
14918 LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
14921 echo "$ac_t""no" 1>&6
14928 if test $have_crypt = yes ; then
14929 cat >> confdefs.h <<\EOF
14930 #define HAVE_CRYPT 1
14934 echo "configure: warning: could not find crypt" 1>&2
14935 if test $ol_enable_crypt = yes ; then
14936 { echo "configure: error: could not find crypt" 1>&2; exit 1; }
14939 echo "configure: warning: disabling crypt support" 1>&2
14944 if test $ol_enable_proctitle != no ; then
14945 echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
14946 echo "configure:14947: checking for setproctitle" >&5
14947 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
14948 echo $ac_n "(cached) $ac_c" 1>&6
14950 cat > conftest.$ac_ext <<EOF
14951 #line 14952 "configure"
14952 #include "confdefs.h"
14953 /* System header to define __stub macros and hopefully few prototypes,
14954 which can conflict with char setproctitle(); below. */
14955 #include <assert.h>
14956 /* Override any gcc2 internal prototype to avoid an error. */
14957 /* We use char because int might match the return type of a gcc2
14958 builtin and then its argument prototype would still apply. */
14959 char setproctitle();
14964 /* The GNU C library defines this for functions which it implements
14965 to always fail with ENOSYS. Some functions are actually named
14966 something starting with __ and the normal name is an alias. */
14967 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
14975 if { (eval echo configure:14976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14977 eval "ac_cv_func_setproctitle=yes"
14979 echo "configure: failed program was:" >&5
14980 cat conftest.$ac_ext >&5
14982 eval "ac_cv_func_setproctitle=no"
14987 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
14988 echo "$ac_t""yes" 1>&6
14989 have_setproctitle=yes
14991 echo "$ac_t""no" 1>&6
14993 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
14994 echo "configure:14995: checking for setproctitle in -lutil" >&5
14995 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
14996 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14997 echo $ac_n "(cached) $ac_c" 1>&6
14999 ac_save_LIBS="$LIBS"
15000 LIBS="-lutil $LIBS"
15001 cat > conftest.$ac_ext <<EOF
15002 #line 15003 "configure"
15003 #include "confdefs.h"
15004 /* Override any gcc2 internal prototype to avoid an error. */
15005 /* We use char because int might match the return type of a gcc2
15006 builtin and then its argument prototype would still apply. */
15007 char setproctitle();
15013 if { (eval echo configure:15014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15015 eval "ac_cv_lib_$ac_lib_var=yes"
15017 echo "configure: failed program was:" >&5
15018 cat conftest.$ac_ext >&5
15020 eval "ac_cv_lib_$ac_lib_var=no"
15023 LIBS="$ac_save_LIBS"
15026 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15027 echo "$ac_t""yes" 1>&6
15028 have_setproctitle=yes
15029 LUTIL_LIBS="$LUTIL_LIBS -lutil"
15031 echo "$ac_t""no" 1>&6
15032 have_setproctitle=no
15033 LIBOBJS="$LIBOBJS setproctitle.o"
15034 LIBSRCS="$LIBSRCS setproctitle.c"
15040 if test $have_setproctitle = yes ; then
15041 cat >> confdefs.h <<\EOF
15042 #define HAVE_SETPROCTITLE 1
15048 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
15049 echo "configure:15050: checking for ANSI C header files" >&5
15050 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
15051 echo $ac_n "(cached) $ac_c" 1>&6
15053 cat > conftest.$ac_ext <<EOF
15054 #line 15055 "configure"
15055 #include "confdefs.h"
15056 #include <stdlib.h>
15057 #include <stdarg.h>
15058 #include <string.h>
15061 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15062 { (eval echo configure:15063: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15063 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15064 if test -z "$ac_err"; then
15066 ac_cv_header_stdc=yes
15069 echo "configure: failed program was:" >&5
15070 cat conftest.$ac_ext >&5
15072 ac_cv_header_stdc=no
15076 if test $ac_cv_header_stdc = yes; then
15077 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
15078 cat > conftest.$ac_ext <<EOF
15079 #line 15080 "configure"
15080 #include "confdefs.h"
15081 #include <string.h>
15083 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15084 egrep "memchr" >/dev/null 2>&1; then
15088 ac_cv_header_stdc=no
15094 if test $ac_cv_header_stdc = yes; then
15095 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
15096 cat > conftest.$ac_ext <<EOF
15097 #line 15098 "configure"
15098 #include "confdefs.h"
15099 #include <stdlib.h>
15101 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15102 egrep "free" >/dev/null 2>&1; then
15106 ac_cv_header_stdc=no
15112 if test $ac_cv_header_stdc = yes; then
15113 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
15114 if test "$cross_compiling" = yes; then
15117 cat > conftest.$ac_ext <<EOF
15118 #line 15119 "configure"
15119 #include "confdefs.h"
15121 #if ((' ' & 0x0FF) == 0x020)
15122 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
15123 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
15125 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
15126 || ('j' <= (c) && (c) <= 'r') \
15127 || ('s' <= (c) && (c) <= 'z'))
15128 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
15130 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
15131 int main () { int i; for (i = 0; i < 256; i++)
15132 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
15136 if { (eval echo configure:15137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15140 echo "configure: failed program was:" >&5
15141 cat conftest.$ac_ext >&5
15143 ac_cv_header_stdc=no
15151 echo "$ac_t""$ac_cv_header_stdc" 1>&6
15152 if test $ac_cv_header_stdc = yes; then
15153 cat >> confdefs.h <<\EOF
15154 #define STDC_HEADERS 1
15159 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
15160 echo "configure:15161: checking for mode_t" >&5
15161 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
15162 echo $ac_n "(cached) $ac_c" 1>&6
15164 cat > conftest.$ac_ext <<EOF
15165 #line 15166 "configure"
15166 #include "confdefs.h"
15167 #include <sys/types.h>
15169 #include <stdlib.h>
15170 #include <stddef.h>
15174 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15175 egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
15177 eval "ac_cv_type_mode_t=yes"
15180 eval "ac_cv_type_mode_t=no"
15185 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
15186 echo "$ac_t""yes" 1>&6
15188 echo "$ac_t""no" 1>&6
15189 cat >> confdefs.h <<EOF
15195 echo $ac_n "checking for off_t""... $ac_c" 1>&6
15196 echo "configure:15197: checking for off_t" >&5
15197 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
15198 echo $ac_n "(cached) $ac_c" 1>&6
15200 cat > conftest.$ac_ext <<EOF
15201 #line 15202 "configure"
15202 #include "confdefs.h"
15203 #include <sys/types.h>
15205 #include <stdlib.h>
15206 #include <stddef.h>
15210 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15211 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
15213 eval "ac_cv_type_off_t=yes"
15216 eval "ac_cv_type_off_t=no"
15221 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
15222 echo "$ac_t""yes" 1>&6
15224 echo "$ac_t""no" 1>&6
15225 cat >> confdefs.h <<EOF
15231 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
15232 echo "configure:15233: checking for pid_t" >&5
15233 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
15234 echo $ac_n "(cached) $ac_c" 1>&6
15236 cat > conftest.$ac_ext <<EOF
15237 #line 15238 "configure"
15238 #include "confdefs.h"
15239 #include <sys/types.h>
15241 #include <stdlib.h>
15242 #include <stddef.h>
15246 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15247 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
15249 eval "ac_cv_type_pid_t=yes"
15252 eval "ac_cv_type_pid_t=no"
15257 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
15258 echo "$ac_t""yes" 1>&6
15260 echo "$ac_t""no" 1>&6
15261 cat >> confdefs.h <<EOF
15267 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
15268 echo "configure:15269: checking for ptrdiff_t" >&5
15269 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
15270 echo $ac_n "(cached) $ac_c" 1>&6
15272 cat > conftest.$ac_ext <<EOF
15273 #line 15274 "configure"
15274 #include "confdefs.h"
15275 #include <stddef.h>
15280 if { (eval echo configure:15281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15282 am_cv_type_ptrdiff_t=yes
15284 echo "configure: failed program was:" >&5
15285 cat conftest.$ac_ext >&5
15287 am_cv_type_ptrdiff_t=no
15292 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
15293 if test $am_cv_type_ptrdiff_t = yes; then
15294 cat >> confdefs.h <<\EOF
15295 #define HAVE_PTRDIFF_T 1
15300 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
15301 echo "configure:15302: checking return type of signal handlers" >&5
15302 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
15303 echo $ac_n "(cached) $ac_c" 1>&6
15305 cat > conftest.$ac_ext <<EOF
15306 #line 15307 "configure"
15307 #include "confdefs.h"
15308 #include <sys/types.h>
15309 #include <signal.h>
15314 extern "C" void (*signal (int, void (*)(int)))(int);
15316 void (*signal ()) ();
15323 if { (eval echo configure:15324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15325 ac_cv_type_signal=void
15327 echo "configure: failed program was:" >&5
15328 cat conftest.$ac_ext >&5
15330 ac_cv_type_signal=int
15335 echo "$ac_t""$ac_cv_type_signal" 1>&6
15336 cat >> confdefs.h <<EOF
15337 #define RETSIGTYPE $ac_cv_type_signal
15341 echo $ac_n "checking for size_t""... $ac_c" 1>&6
15342 echo "configure:15343: checking for size_t" >&5
15343 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
15344 echo $ac_n "(cached) $ac_c" 1>&6
15346 cat > conftest.$ac_ext <<EOF
15347 #line 15348 "configure"
15348 #include "confdefs.h"
15349 #include <sys/types.h>
15351 #include <stdlib.h>
15352 #include <stddef.h>
15356 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15357 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
15359 eval "ac_cv_type_size_t=yes"
15362 eval "ac_cv_type_size_t=no"
15367 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
15368 echo "$ac_t""yes" 1>&6
15370 echo "$ac_t""no" 1>&6
15371 cat >> confdefs.h <<EOF
15372 #define size_t unsigned
15378 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
15379 echo "configure:15380: checking for ssize_t" >&5
15380 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
15381 echo $ac_n "(cached) $ac_c" 1>&6
15383 cat > conftest.$ac_ext <<EOF
15384 #line 15385 "configure"
15385 #include "confdefs.h"
15386 #include <sys/types.h>
15388 #include <stdlib.h>
15389 #include <stddef.h>
15393 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15394 egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
15396 eval "ac_cv_type_ssize_t=yes"
15399 eval "ac_cv_type_ssize_t=no"
15404 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
15405 echo "$ac_t""yes" 1>&6
15407 echo "$ac_t""no" 1>&6
15408 cat >> confdefs.h <<EOF
15409 #define ssize_t signed int
15414 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
15415 echo "configure:15416: checking for caddr_t" >&5
15416 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
15417 echo $ac_n "(cached) $ac_c" 1>&6
15419 cat > conftest.$ac_ext <<EOF
15420 #line 15421 "configure"
15421 #include "confdefs.h"
15422 #include <sys/types.h>
15424 #include <stdlib.h>
15425 #include <stddef.h>
15429 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15430 egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
15432 eval "ac_cv_type_caddr_t=yes"
15435 eval "ac_cv_type_caddr_t=no"
15440 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
15441 echo "$ac_t""yes" 1>&6
15443 echo "$ac_t""no" 1>&6
15444 cat >> confdefs.h <<EOF
15445 #define caddr_t char *
15451 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
15452 echo "configure:15453: checking for socklen_t" >&5
15453 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
15454 echo $ac_n "(cached) $ac_c" 1>&6
15456 cat > conftest.$ac_ext <<EOF
15457 #line 15458 "configure"
15458 #include "confdefs.h"
15460 #ifdef HAVE_SYS_TYPES_H
15461 #include <sys/types.h>
15463 #ifdef HAVE_SYS_SOCKET_H
15464 #include <sys/socket.h>
15471 if { (eval echo configure:15472: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15473 ol_cv_type_socklen_t=yes
15475 echo "configure: failed program was:" >&5
15476 cat conftest.$ac_ext >&5
15478 ol_cv_type_socklen_t=no
15483 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
15484 if test $ol_cv_type_socklen_t = no; then
15485 cat >> confdefs.h <<\EOF
15486 #define socklen_t int
15491 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
15492 echo "configure:15493: checking for member st_blksize in aggregate type struct stat" >&5
15493 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
15494 echo $ac_n "(cached) $ac_c" 1>&6
15496 cat > conftest.$ac_ext <<EOF
15497 #line 15498 "configure"
15498 #include "confdefs.h"
15499 #include <sys/types.h>
15500 #include <sys/stat.h>
15502 struct stat foo; foo.st_blksize;
15505 if { (eval echo configure:15506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15507 ac_cv_c_struct_member_st_blksize=yes
15509 echo "configure: failed program was:" >&5
15510 cat conftest.$ac_ext >&5
15512 ac_cv_c_struct_member_st_blksize=no
15517 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
15518 st_blksize="$ac_cv_c_struct_member_st_blksize"
15519 if test $ac_cv_c_struct_member_st_blksize = yes; then
15520 cat >> confdefs.h <<\EOF
15521 #define HAVE_ST_BLKSIZE 1
15526 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
15527 echo "configure:15528: checking whether time.h and sys/time.h may both be included" >&5
15528 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
15529 echo $ac_n "(cached) $ac_c" 1>&6
15531 cat > conftest.$ac_ext <<EOF
15532 #line 15533 "configure"
15533 #include "confdefs.h"
15534 #include <sys/types.h>
15535 #include <sys/time.h>
15541 if { (eval echo configure:15542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15543 ac_cv_header_time=yes
15545 echo "configure: failed program was:" >&5
15546 cat conftest.$ac_ext >&5
15548 ac_cv_header_time=no
15553 echo "$ac_t""$ac_cv_header_time" 1>&6
15554 if test $ac_cv_header_time = yes; then
15555 cat >> confdefs.h <<\EOF
15556 #define TIME_WITH_SYS_TIME 1
15561 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
15562 echo "configure:15563: checking whether struct tm is in sys/time.h or time.h" >&5
15563 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
15564 echo $ac_n "(cached) $ac_c" 1>&6
15566 cat > conftest.$ac_ext <<EOF
15567 #line 15568 "configure"
15568 #include "confdefs.h"
15569 #include <sys/types.h>
15572 struct tm *tp; tp->tm_sec;
15575 if { (eval echo configure:15576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15577 ac_cv_struct_tm=time.h
15579 echo "configure: failed program was:" >&5
15580 cat conftest.$ac_ext >&5
15582 ac_cv_struct_tm=sys/time.h
15587 echo "$ac_t""$ac_cv_struct_tm" 1>&6
15588 if test $ac_cv_struct_tm = sys/time.h; then
15589 cat >> confdefs.h <<\EOF
15590 #define TM_IN_SYS_TIME 1
15595 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
15596 echo "configure:15597: checking for uid_t in sys/types.h" >&5
15597 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
15598 echo $ac_n "(cached) $ac_c" 1>&6
15600 cat > conftest.$ac_ext <<EOF
15601 #line 15602 "configure"
15602 #include "confdefs.h"
15603 #include <sys/types.h>
15605 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15606 egrep "uid_t" >/dev/null 2>&1; then
15608 ac_cv_type_uid_t=yes
15611 ac_cv_type_uid_t=no
15617 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
15618 if test $ac_cv_type_uid_t = no; then
15619 cat >> confdefs.h <<\EOF
15623 cat >> confdefs.h <<\EOF
15629 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
15630 echo "configure:15631: checking for sig_atomic_t" >&5
15631 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
15632 echo $ac_n "(cached) $ac_c" 1>&6
15634 cat > conftest.$ac_ext <<EOF
15635 #line 15636 "configure"
15636 #include "confdefs.h"
15637 #include <signal.h>
15639 sig_atomic_t atomic;
15642 if { (eval echo configure:15643: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15644 ol_cv_type_sig_atomic_t=yes
15646 echo "configure: failed program was:" >&5
15647 cat conftest.$ac_ext >&5
15649 ol_cv_type_sig_atomic_t=no
15654 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
15655 if test $ol_cv_type_sig_atomic_t = no; then
15656 cat >> confdefs.h <<\EOF
15657 #define sig_atomic_t int
15664 # test for pw_gecos in struct passwd
15665 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
15666 echo "configure:15667: checking struct passwd for pw_gecos" >&5
15667 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
15668 echo $ac_n "(cached) $ac_c" 1>&6
15671 cat > conftest.$ac_ext <<EOF
15672 #line 15673 "configure"
15673 #include "confdefs.h"
15678 pwd.pw_gecos = pwd.pw_name;
15682 if { (eval echo configure:15683: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15684 ol_cv_struct_passwd_pw_gecos=yes
15686 echo "configure: failed program was:" >&5
15687 cat conftest.$ac_ext >&5
15689 ol_cv_struct_passwd_pw_gecos=no
15694 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
15695 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
15696 cat >> confdefs.h <<\EOF
15697 #define HAVE_PW_GECOS 1
15702 # test for pw_passwd in struct passwd
15703 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
15704 echo "configure:15705: checking struct passwd for pw_passwd" >&5
15705 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
15706 echo $ac_n "(cached) $ac_c" 1>&6
15709 cat > conftest.$ac_ext <<EOF
15710 #line 15711 "configure"
15711 #include "confdefs.h"
15716 pwd.pw_passwd = pwd.pw_name;
15720 if { (eval echo configure:15721: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15722 ol_cv_struct_passwd_pw_passwd=yes
15724 echo "configure: failed program was:" >&5
15725 cat conftest.$ac_ext >&5
15727 ol_cv_struct_passwd_pw_passwd=no
15732 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
15733 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
15734 cat >> confdefs.h <<\EOF
15735 #define HAVE_PW_PASSWD 1
15741 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
15742 echo "configure:15743: checking if toupper() requires islower()" >&5
15743 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
15744 echo $ac_n "(cached) $ac_c" 1>&6
15747 if test "$cross_compiling" = yes; then
15748 ol_cv_c_upper_lower=safe
15750 cat > conftest.$ac_ext <<EOF
15751 #line 15752 "configure"
15752 #include "confdefs.h"
15757 if ('C' == toupper('C'))
15763 if { (eval echo configure:15764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15765 ol_cv_c_upper_lower=no
15767 echo "configure: failed program was:" >&5
15768 cat conftest.$ac_ext >&5
15770 ol_cv_c_upper_lower=yes
15777 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
15778 if test $ol_cv_c_upper_lower != no ; then
15779 cat >> confdefs.h <<\EOF
15780 #define C_UPPER_LOWER 1
15785 echo $ac_n "checking for working const""... $ac_c" 1>&6
15786 echo "configure:15787: checking for working const" >&5
15787 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
15788 echo $ac_n "(cached) $ac_c" 1>&6
15790 cat > conftest.$ac_ext <<EOF
15791 #line 15792 "configure"
15792 #include "confdefs.h"
15796 /* Ultrix mips cc rejects this. */
15797 typedef int charset[2]; const charset x;
15798 /* SunOS 4.1.1 cc rejects this. */
15799 char const *const *ccp;
15801 /* NEC SVR4.0.2 mips cc rejects this. */
15802 struct point {int x, y;};
15803 static struct point const zero = {0,0};
15804 /* AIX XL C 1.02.0.0 rejects this.
15805 It does not let you subtract one const X* pointer from another in an arm
15806 of an if-expression whose if-part is not a constant expression */
15807 const char *g = "string";
15808 ccp = &g + (g ? g-g : 0);
15809 /* HPUX 7.0 cc rejects these. */
15812 ccp = (char const *const *) p;
15813 { /* SCO 3.2v4 cc rejects this. */
15815 char const *s = 0 ? (char *) 0 : (char const *) 0;
15819 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
15820 int x[] = {25, 17};
15821 const int *foo = &x[0];
15824 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15825 typedef const int *iptr;
15829 { /* AIX XL C 1.02.0.0 rejects this saying
15830 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15831 struct s { int j; const int *ap[3]; };
15832 struct s *b; b->j = 5;
15834 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15835 const int foo = 10;
15840 if { (eval echo configure:15841: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15844 echo "configure: failed program was:" >&5
15845 cat conftest.$ac_ext >&5
15852 echo "$ac_t""$ac_cv_c_const" 1>&6
15853 if test $ac_cv_c_const = no; then
15854 cat >> confdefs.h <<\EOF
15860 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
15861 echo "configure:15862: checking if compiler understands volatile" >&5
15862 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
15863 echo $ac_n "(cached) $ac_c" 1>&6
15865 cat > conftest.$ac_ext <<EOF
15866 #line 15867 "configure"
15867 #include "confdefs.h"
15870 volatile int a; int * volatile b = x ? &y : &z;
15871 /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
15875 if { (eval echo configure:15876: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15877 ol_cv_c_volatile=yes
15879 echo "configure: failed program was:" >&5
15880 cat conftest.$ac_ext >&5
15882 ol_cv_c_volatile=no
15887 echo "$ac_t""$ol_cv_c_volatile" 1>&6
15888 if test $ol_cv_c_volatile = yes; then
15891 cat >> confdefs.h <<\EOF
15898 if test $cross_compiling = yes ; then
15899 cat >> confdefs.h <<\EOF
15900 #define CROSS_COMPILING 1
15904 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
15905 echo "configure:15906: checking whether byte ordering is bigendian" >&5
15906 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
15907 echo $ac_n "(cached) $ac_c" 1>&6
15909 ac_cv_c_bigendian=unknown
15910 # See if sys/param.h defines the BYTE_ORDER macro.
15911 cat > conftest.$ac_ext <<EOF
15912 #line 15913 "configure"
15913 #include "confdefs.h"
15914 #include <sys/types.h>
15915 #include <sys/param.h>
15918 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15919 bogus endian macros
15923 if { (eval echo configure:15924: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15925 # It does; now see whether it defined to BIG_ENDIAN or not.
15926 cat > conftest.$ac_ext <<EOF
15927 #line 15928 "configure"
15928 #include "confdefs.h"
15929 #include <sys/types.h>
15930 #include <sys/param.h>
15933 #if BYTE_ORDER != BIG_ENDIAN
15938 if { (eval echo configure:15939: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15940 ac_cv_c_bigendian=yes
15942 echo "configure: failed program was:" >&5
15943 cat conftest.$ac_ext >&5
15945 ac_cv_c_bigendian=no
15949 echo "configure: failed program was:" >&5
15950 cat conftest.$ac_ext >&5
15953 if test $ac_cv_c_bigendian = unknown; then
15954 if test "$cross_compiling" = yes; then
15955 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
15957 cat > conftest.$ac_ext <<EOF
15958 #line 15959 "configure"
15959 #include "confdefs.h"
15961 /* Are we little or big endian? From Harbison&Steele. */
15965 char c[sizeof (long)];
15968 exit (u.c[sizeof (long) - 1] == 1);
15971 if { (eval echo configure:15972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15973 ac_cv_c_bigendian=no
15975 echo "configure: failed program was:" >&5
15976 cat conftest.$ac_ext >&5
15978 ac_cv_c_bigendian=yes
15986 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
15987 if test $ac_cv_c_bigendian = yes; then
15988 cat >> confdefs.h <<\EOF
15989 #define WORDS_BIGENDIAN 1
15996 echo $ac_n "checking size of short""... $ac_c" 1>&6
15997 echo "configure:15998: checking size of short" >&5
15998 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
15999 echo $ac_n "(cached) $ac_c" 1>&6
16001 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
16002 cat > conftest.$ac_ext <<EOF
16003 #line 16004 "configure"
16004 #include "confdefs.h"
16005 #include "confdefs.h"
16006 #include <sys/types.h>
16010 switch (0) case 0: case (sizeof (short) == $ac_size):;
16013 if { (eval echo configure:16014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16015 ac_cv_sizeof_short=$ac_size
16017 echo "configure: failed program was:" >&5
16018 cat conftest.$ac_ext >&5
16021 if test x$ac_cv_sizeof_short != x ; then break; fi
16026 if test x$ac_cv_sizeof_short = x ; then
16027 { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; }
16029 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
16030 cat >> confdefs.h <<EOF
16031 #define SIZEOF_SHORT $ac_cv_sizeof_short
16035 echo $ac_n "checking size of int""... $ac_c" 1>&6
16036 echo "configure:16037: checking size of int" >&5
16037 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
16038 echo $ac_n "(cached) $ac_c" 1>&6
16040 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
16041 cat > conftest.$ac_ext <<EOF
16042 #line 16043 "configure"
16043 #include "confdefs.h"
16044 #include "confdefs.h"
16045 #include <sys/types.h>
16049 switch (0) case 0: case (sizeof (int) == $ac_size):;
16052 if { (eval echo configure:16053: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16054 ac_cv_sizeof_int=$ac_size
16056 echo "configure: failed program was:" >&5
16057 cat conftest.$ac_ext >&5
16060 if test x$ac_cv_sizeof_int != x ; then break; fi
16065 if test x$ac_cv_sizeof_int = x ; then
16066 { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; }
16068 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
16069 cat >> confdefs.h <<EOF
16070 #define SIZEOF_INT $ac_cv_sizeof_int
16074 echo $ac_n "checking size of long""... $ac_c" 1>&6
16075 echo "configure:16076: checking size of long" >&5
16076 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
16077 echo $ac_n "(cached) $ac_c" 1>&6
16079 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
16080 cat > conftest.$ac_ext <<EOF
16081 #line 16082 "configure"
16082 #include "confdefs.h"
16083 #include "confdefs.h"
16084 #include <sys/types.h>
16088 switch (0) case 0: case (sizeof (long) == $ac_size):;
16091 if { (eval echo configure:16092: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16093 ac_cv_sizeof_long=$ac_size
16095 echo "configure: failed program was:" >&5
16096 cat conftest.$ac_ext >&5
16099 if test x$ac_cv_sizeof_long != x ; then break; fi
16104 if test x$ac_cv_sizeof_long = x ; then
16105 { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; }
16107 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
16108 cat >> confdefs.h <<EOF
16109 #define SIZEOF_LONG $ac_cv_sizeof_long
16114 if test "$ac_cv_sizeof_int" -lt 4 ; then
16115 echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
16117 cat >> confdefs.h <<\EOF
16118 #define LBER_INT_T long
16122 cat >> confdefs.h <<\EOF
16123 #define LBER_INT_T int
16128 cat >> confdefs.h <<\EOF
16129 #define LBER_LEN_T long
16132 cat >> confdefs.h <<\EOF
16133 #define LBER_SOCKET_T int
16136 cat >> confdefs.h <<\EOF
16137 #define LBER_TAG_T long
16141 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
16142 echo "configure:16143: checking for 8-bit clean memcmp" >&5
16143 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
16144 echo $ac_n "(cached) $ac_c" 1>&6
16146 if test "$cross_compiling" = yes; then
16147 ac_cv_func_memcmp_clean=no
16149 cat > conftest.$ac_ext <<EOF
16150 #line 16151 "configure"
16151 #include "confdefs.h"
16155 char c0 = 0x40, c1 = 0x80, c2 = 0x81;
16156 exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
16160 if { (eval echo configure:16161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16162 ac_cv_func_memcmp_clean=yes
16164 echo "configure: failed program was:" >&5
16165 cat conftest.$ac_ext >&5
16167 ac_cv_func_memcmp_clean=no
16174 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
16175 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
16177 echo $ac_n "checking for strftime""... $ac_c" 1>&6
16178 echo "configure:16179: checking for strftime" >&5
16179 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
16180 echo $ac_n "(cached) $ac_c" 1>&6
16182 cat > conftest.$ac_ext <<EOF
16183 #line 16184 "configure"
16184 #include "confdefs.h"
16185 /* System header to define __stub macros and hopefully few prototypes,
16186 which can conflict with char strftime(); below. */
16187 #include <assert.h>
16188 /* Override any gcc2 internal prototype to avoid an error. */
16189 /* We use char because int might match the return type of a gcc2
16190 builtin and then its argument prototype would still apply. */
16196 /* The GNU C library defines this for functions which it implements
16197 to always fail with ENOSYS. Some functions are actually named
16198 something starting with __ and the normal name is an alias. */
16199 #if defined (__stub_strftime) || defined (__stub___strftime)
16207 if { (eval echo configure:16208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16209 eval "ac_cv_func_strftime=yes"
16211 echo "configure: failed program was:" >&5
16212 cat conftest.$ac_ext >&5
16214 eval "ac_cv_func_strftime=no"
16219 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
16220 echo "$ac_t""yes" 1>&6
16221 cat >> confdefs.h <<\EOF
16222 #define HAVE_STRFTIME 1
16226 echo "$ac_t""no" 1>&6
16227 # strftime is in -lintl on SCO UNIX.
16228 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
16229 echo "configure:16230: checking for strftime in -lintl" >&5
16230 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
16231 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16232 echo $ac_n "(cached) $ac_c" 1>&6
16234 ac_save_LIBS="$LIBS"
16235 LIBS="-lintl $LIBS"
16236 cat > conftest.$ac_ext <<EOF
16237 #line 16238 "configure"
16238 #include "confdefs.h"
16239 /* Override any gcc2 internal prototype to avoid an error. */
16240 /* We use char because int might match the return type of a gcc2
16241 builtin and then its argument prototype would still apply. */
16248 if { (eval echo configure:16249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16250 eval "ac_cv_lib_$ac_lib_var=yes"
16252 echo "configure: failed program was:" >&5
16253 cat conftest.$ac_ext >&5
16255 eval "ac_cv_lib_$ac_lib_var=no"
16258 LIBS="$ac_save_LIBS"
16261 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16262 echo "$ac_t""yes" 1>&6
16263 cat >> confdefs.h <<\EOF
16264 #define HAVE_STRFTIME 1
16267 LIBS="-lintl $LIBS"
16269 echo "$ac_t""no" 1>&6
16275 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
16276 echo "configure:16277: checking for inet_aton()" >&5
16277 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
16278 echo $ac_n "(cached) $ac_c" 1>&6
16280 cat > conftest.$ac_ext <<EOF
16281 #line 16282 "configure"
16282 #include "confdefs.h"
16284 #ifdef HAVE_SYS_TYPES_H
16285 # include <sys/types.h>
16287 #ifdef HAVE_SYS_SOCKET_H
16288 # include <sys/socket.h>
16289 # ifdef HAVE_SYS_SELECT_H
16290 # include <sys/select.h>
16292 # include <netinet/in.h>
16293 # ifdef HAVE_ARPA_INET_H
16294 # include <arpa/inet.h>
16300 int rc = inet_aton( "255.255.255.255", &in );
16303 if { (eval echo configure:16304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16305 ol_cv_func_inet_aton=yes
16307 echo "configure: failed program was:" >&5
16308 cat conftest.$ac_ext >&5
16310 ol_cv_func_inet_aton=no
16315 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
16316 if test $ol_cv_func_inet_aton != no; then
16317 cat >> confdefs.h <<\EOF
16318 #define HAVE_INET_ATON 1
16324 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
16325 echo "configure:16326: checking for _spawnlp" >&5
16326 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
16327 echo $ac_n "(cached) $ac_c" 1>&6
16329 cat > conftest.$ac_ext <<EOF
16330 #line 16331 "configure"
16331 #include "confdefs.h"
16332 /* System header to define __stub macros and hopefully few prototypes,
16333 which can conflict with char _spawnlp(); below. */
16334 #include <assert.h>
16335 /* Override any gcc2 internal prototype to avoid an error. */
16336 /* We use char because int might match the return type of a gcc2
16337 builtin and then its argument prototype would still apply. */
16343 /* The GNU C library defines this for functions which it implements
16344 to always fail with ENOSYS. Some functions are actually named
16345 something starting with __ and the normal name is an alias. */
16346 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
16354 if { (eval echo configure:16355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16356 eval "ac_cv_func__spawnlp=yes"
16358 echo "configure: failed program was:" >&5
16359 cat conftest.$ac_ext >&5
16361 eval "ac_cv_func__spawnlp=no"
16366 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
16367 echo "$ac_t""yes" 1>&6
16368 cat >> confdefs.h <<\EOF
16369 #define HAVE_SPAWNLP 1
16373 echo "$ac_t""no" 1>&6
16377 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
16378 echo "configure:16379: checking for _snprintf" >&5
16379 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
16380 echo $ac_n "(cached) $ac_c" 1>&6
16382 cat > conftest.$ac_ext <<EOF
16383 #line 16384 "configure"
16384 #include "confdefs.h"
16385 /* System header to define __stub macros and hopefully few prototypes,
16386 which can conflict with char _snprintf(); below. */
16387 #include <assert.h>
16388 /* Override any gcc2 internal prototype to avoid an error. */
16389 /* We use char because int might match the return type of a gcc2
16390 builtin and then its argument prototype would still apply. */
16396 /* The GNU C library defines this for functions which it implements
16397 to always fail with ENOSYS. Some functions are actually named
16398 something starting with __ and the normal name is an alias. */
16399 #if defined (__stub__snprintf) || defined (__stub____snprintf)
16407 if { (eval echo configure:16408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16409 eval "ac_cv_func__snprintf=yes"
16411 echo "configure: failed program was:" >&5
16412 cat conftest.$ac_ext >&5
16414 eval "ac_cv_func__snprintf=no"
16419 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
16420 echo "$ac_t""yes" 1>&6
16421 ac_cv_func_snprintf=yes
16422 cat >> confdefs.h <<\EOF
16423 #define snprintf _snprintf
16428 echo "$ac_t""no" 1>&6
16432 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
16433 echo "configure:16434: checking for _vsnprintf" >&5
16434 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
16435 echo $ac_n "(cached) $ac_c" 1>&6
16437 cat > conftest.$ac_ext <<EOF
16438 #line 16439 "configure"
16439 #include "confdefs.h"
16440 /* System header to define __stub macros and hopefully few prototypes,
16441 which can conflict with char _vsnprintf(); below. */
16442 #include <assert.h>
16443 /* Override any gcc2 internal prototype to avoid an error. */
16444 /* We use char because int might match the return type of a gcc2
16445 builtin and then its argument prototype would still apply. */
16451 /* The GNU C library defines this for functions which it implements
16452 to always fail with ENOSYS. Some functions are actually named
16453 something starting with __ and the normal name is an alias. */
16454 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
16462 if { (eval echo configure:16463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16464 eval "ac_cv_func__vsnprintf=yes"
16466 echo "configure: failed program was:" >&5
16467 cat conftest.$ac_ext >&5
16469 eval "ac_cv_func__vsnprintf=no"
16474 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
16475 echo "$ac_t""yes" 1>&6
16476 ac_cv_func_vsnprintf=yes
16477 cat >> confdefs.h <<\EOF
16478 #define vsnprintf _vsnprintf
16483 echo "$ac_t""no" 1>&6
16487 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
16488 echo "configure:16489: checking for vprintf" >&5
16489 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
16490 echo $ac_n "(cached) $ac_c" 1>&6
16492 cat > conftest.$ac_ext <<EOF
16493 #line 16494 "configure"
16494 #include "confdefs.h"
16495 /* System header to define __stub macros and hopefully few prototypes,
16496 which can conflict with char vprintf(); below. */
16497 #include <assert.h>
16498 /* Override any gcc2 internal prototype to avoid an error. */
16499 /* We use char because int might match the return type of a gcc2
16500 builtin and then its argument prototype would still apply. */
16506 /* The GNU C library defines this for functions which it implements
16507 to always fail with ENOSYS. Some functions are actually named
16508 something starting with __ and the normal name is an alias. */
16509 #if defined (__stub_vprintf) || defined (__stub___vprintf)
16517 if { (eval echo configure:16518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16519 eval "ac_cv_func_vprintf=yes"
16521 echo "configure: failed program was:" >&5
16522 cat conftest.$ac_ext >&5
16524 eval "ac_cv_func_vprintf=no"
16529 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
16530 echo "$ac_t""yes" 1>&6
16531 cat >> confdefs.h <<\EOF
16532 #define HAVE_VPRINTF 1
16536 echo "$ac_t""no" 1>&6
16539 if test "$ac_cv_func_vprintf" != yes; then
16540 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
16541 echo "configure:16542: checking for _doprnt" >&5
16542 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
16543 echo $ac_n "(cached) $ac_c" 1>&6
16545 cat > conftest.$ac_ext <<EOF
16546 #line 16547 "configure"
16547 #include "confdefs.h"
16548 /* System header to define __stub macros and hopefully few prototypes,
16549 which can conflict with char _doprnt(); below. */
16550 #include <assert.h>
16551 /* Override any gcc2 internal prototype to avoid an error. */
16552 /* We use char because int might match the return type of a gcc2
16553 builtin and then its argument prototype would still apply. */
16559 /* The GNU C library defines this for functions which it implements
16560 to always fail with ENOSYS. Some functions are actually named
16561 something starting with __ and the normal name is an alias. */
16562 #if defined (__stub__doprnt) || defined (__stub____doprnt)
16570 if { (eval echo configure:16571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16572 eval "ac_cv_func__doprnt=yes"
16574 echo "configure: failed program was:" >&5
16575 cat conftest.$ac_ext >&5
16577 eval "ac_cv_func__doprnt=no"
16582 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
16583 echo "$ac_t""yes" 1>&6
16584 cat >> confdefs.h <<\EOF
16585 #define HAVE_DOPRNT 1
16589 echo "$ac_t""no" 1>&6
16595 if test $ac_cv_func_vprintf = yes ; then
16596 for ac_func in vsnprintf vsprintf
16598 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16599 echo "configure:16600: checking for $ac_func" >&5
16600 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16601 echo $ac_n "(cached) $ac_c" 1>&6
16603 cat > conftest.$ac_ext <<EOF
16604 #line 16605 "configure"
16605 #include "confdefs.h"
16606 /* System header to define __stub macros and hopefully few prototypes,
16607 which can conflict with char $ac_func(); below. */
16608 #include <assert.h>
16609 /* Override any gcc2 internal prototype to avoid an error. */
16610 /* We use char because int might match the return type of a gcc2
16611 builtin and then its argument prototype would still apply. */
16617 /* The GNU C library defines this for functions which it implements
16618 to always fail with ENOSYS. Some functions are actually named
16619 something starting with __ and the normal name is an alias. */
16620 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16628 if { (eval echo configure:16629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16630 eval "ac_cv_func_$ac_func=yes"
16632 echo "configure: failed program was:" >&5
16633 cat conftest.$ac_ext >&5
16635 eval "ac_cv_func_$ac_func=no"
16640 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16641 echo "$ac_t""yes" 1>&6
16642 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16643 cat >> confdefs.h <<EOF
16644 #define $ac_tr_func 1
16648 echo "$ac_t""no" 1>&6
16707 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16708 echo "configure:16709: checking for $ac_func" >&5
16709 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16710 echo $ac_n "(cached) $ac_c" 1>&6
16712 cat > conftest.$ac_ext <<EOF
16713 #line 16714 "configure"
16714 #include "confdefs.h"
16715 /* System header to define __stub macros and hopefully few prototypes,
16716 which can conflict with char $ac_func(); below. */
16717 #include <assert.h>
16718 /* Override any gcc2 internal prototype to avoid an error. */
16719 /* We use char because int might match the return type of a gcc2
16720 builtin and then its argument prototype would still apply. */
16726 /* The GNU C library defines this for functions which it implements
16727 to always fail with ENOSYS. Some functions are actually named
16728 something starting with __ and the normal name is an alias. */
16729 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16737 if { (eval echo configure:16738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16739 eval "ac_cv_func_$ac_func=yes"
16741 echo "configure: failed program was:" >&5
16742 cat conftest.$ac_ext >&5
16744 eval "ac_cv_func_$ac_func=no"
16749 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16750 echo "$ac_t""yes" 1>&6
16751 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16752 cat >> confdefs.h <<EOF
16753 #define $ac_tr_func 1
16757 echo "$ac_t""no" 1>&6
16762 for ac_func in getopt tempnam
16764 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16765 echo "configure:16766: checking for $ac_func" >&5
16766 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16767 echo $ac_n "(cached) $ac_c" 1>&6
16769 cat > conftest.$ac_ext <<EOF
16770 #line 16771 "configure"
16771 #include "confdefs.h"
16772 /* System header to define __stub macros and hopefully few prototypes,
16773 which can conflict with char $ac_func(); below. */
16774 #include <assert.h>
16775 /* Override any gcc2 internal prototype to avoid an error. */
16776 /* We use char because int might match the return type of a gcc2
16777 builtin and then its argument prototype would still apply. */
16783 /* The GNU C library defines this for functions which it implements
16784 to always fail with ENOSYS. Some functions are actually named
16785 something starting with __ and the normal name is an alias. */
16786 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16794 if { (eval echo configure:16795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16796 eval "ac_cv_func_$ac_func=yes"
16798 echo "configure: failed program was:" >&5
16799 cat conftest.$ac_ext >&5
16801 eval "ac_cv_func_$ac_func=no"
16806 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16807 echo "$ac_t""yes" 1>&6
16808 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16809 cat >> confdefs.h <<EOF
16810 #define $ac_tr_func 1
16814 echo "$ac_t""no" 1>&6
16815 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
16821 if test "$ac_cv_func_getopt" != yes; then
16822 LIBSRCS="$LIBSRCS getopt.c"
16825 if test "$ac_cv_func_tempnam" != yes; then
16826 LIBSRCS="$LIBSRCS tempnam.c"
16829 # Check Configuration
16830 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
16831 echo "configure:16832: checking declaration of sys_errlist" >&5
16832 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
16833 echo $ac_n "(cached) $ac_c" 1>&6
16836 cat > conftest.$ac_ext <<EOF
16837 #line 16838 "configure"
16838 #include "confdefs.h"
16841 #include <sys/types.h>
16844 #include <stdlib.h>
16847 char *c = (char *) *sys_errlist
16850 if { (eval echo configure:16851: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16852 ol_cv_dcl_sys_errlist=yes
16853 ol_cv_have_sys_errlist=yes
16855 echo "configure: failed program was:" >&5
16856 cat conftest.$ac_ext >&5
16858 ol_cv_dcl_sys_errlist=no
16863 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
16865 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
16866 if test $ol_cv_dcl_sys_errlist = no ; then
16867 cat >> confdefs.h <<\EOF
16868 #define DECL_SYS_ERRLIST 1
16872 echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
16873 echo "configure:16874: checking existence of sys_errlist" >&5
16874 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
16875 echo $ac_n "(cached) $ac_c" 1>&6
16878 cat > conftest.$ac_ext <<EOF
16879 #line 16880 "configure"
16880 #include "confdefs.h"
16883 char *c = (char *) *sys_errlist
16886 if { (eval echo configure:16887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16888 ol_cv_have_sys_errlist=yes
16890 echo "configure: failed program was:" >&5
16891 cat conftest.$ac_ext >&5
16893 ol_cv_have_sys_errlist=no
16898 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
16900 if test $ol_cv_have_sys_errlist = yes ; then
16901 cat >> confdefs.h <<\EOF
16902 #define HAVE_SYS_ERRLIST 1
16909 if test "$ol_enable_debug" != no ; then
16910 cat >> confdefs.h <<\EOF
16911 #define LDAP_DEBUG 1
16915 if test "$ol_enable_syslog" = yes ; then
16916 cat >> confdefs.h <<\EOF
16917 #define LDAP_SYSLOG 1
16921 if test "$ol_enable_cache" = no ; then
16922 cat >> confdefs.h <<\EOF
16923 #define LDAP_NOCACHE 1
16927 if test "$ol_link_kbind" != no ; then
16928 cat >> confdefs.h <<\EOF
16929 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
16933 if test "$ol_enable_proctitle" != no ; then
16934 cat >> confdefs.h <<\EOF
16935 #define LDAP_PROCTITLE 1
16939 if test "$ol_enable_referrals" != no ; then
16940 cat >> confdefs.h <<\EOF
16941 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
16945 if test "$ol_enable_local" != no; then
16946 cat >> confdefs.h <<\EOF
16947 #define LDAP_PF_LOCAL 1
16951 if test "$ol_link_ipv6" != no; then
16952 cat >> confdefs.h <<\EOF
16953 #define LDAP_PF_INET6 1
16957 if test "$ol_enable_cleartext" != no ; then
16958 cat >> confdefs.h <<\EOF
16959 #define SLAPD_CLEARTEXT 1
16963 if test "$ol_enable_crypt" != no ; then
16964 cat >> confdefs.h <<\EOF
16965 #define SLAPD_CRYPT 1
16969 if test "$ol_link_kpasswd" != no ; then
16970 cat >> confdefs.h <<\EOF
16971 #define SLAPD_KPASSWD 1
16975 if test "$ol_link_spasswd" != no ; then
16976 cat >> confdefs.h <<\EOF
16977 #define SLAPD_SPASSWD 1
16981 if test "$ol_enable_phonetic" != no ; then
16982 cat >> confdefs.h <<\EOF
16983 #define SLAPD_PHONETIC 1
16987 if test "$ol_enable_rlookups" != no ; then
16988 cat >> confdefs.h <<\EOF
16989 #define SLAPD_RLOOKUPS 1
16993 if test "$ol_enable_aci" != no ; then
16994 cat >> confdefs.h <<\EOF
16995 #define SLAPD_ACI_ENABLED 1
17000 if test "$ol_link_modules" != no ; then
17001 cat >> confdefs.h <<\EOF
17002 #define SLAPD_MODULES 1
17006 SLAPD_MODULES_LDFLAGS="-dlopen self"
17009 if test "$ol_link_dnssrv" != no ; then
17010 cat >> confdefs.h <<\EOF
17011 #define SLAPD_DNSSRV 1
17016 if test "$ol_with_dnssrv_module" != static ; then
17017 cat >> confdefs.h <<\EOF
17018 #define SLAPD_DNSSRV_DYNAMIC 1
17022 BUILD_DNSSRV_DYNAMIC=shared
17023 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
17027 if test "$ol_enable_ldap" != no ; then
17028 cat >> confdefs.h <<\EOF
17029 #define SLAPD_LDAP 1
17034 if test "$ol_with_ldap_module" != static ; then
17035 cat >> confdefs.h <<\EOF
17036 #define SLAPD_LDAP_DYNAMIC 1
17040 BUILD_LDAP_DYNAMIC=shared
17041 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
17045 if test "$ol_link_ldbm" != no ; then
17046 cat >> confdefs.h <<\EOF
17047 #define SLAPD_LDBM 1
17052 if test "$ol_with_ldbm_module" != static ; then
17053 cat >> confdefs.h <<\EOF
17054 #define SLAPD_LDBM_DYNAMIC 1
17058 BUILD_LDBM_DYNAMIC=shared
17059 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
17063 if test "$ol_enable_passwd" != no ; then
17064 cat >> confdefs.h <<\EOF
17065 #define SLAPD_PASSWD 1
17070 if test "$ol_with_passwd_module" != static ; then
17071 cat >> confdefs.h <<\EOF
17072 #define SLAPD_PASSWD_DYNAMIC 1
17076 BUILD_PASSWD_DYNAMIC=shared
17077 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
17081 if test "$ol_enable_shell" != no ; then
17082 cat >> confdefs.h <<\EOF
17083 #define SLAPD_SHELL 1
17088 if test "$ol_with_shell_module" != static ; then
17089 cat >> confdefs.h <<\EOF
17090 #define SLAPD_SHELL_DYNAMIC 1
17094 BUILD_SHELL_DYNAMIC=shared
17095 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
17099 if test "$ol_enable_sql" != no ; then
17100 cat >> confdefs.h <<\EOF
17101 #define SLAPD_SQL 1
17106 if test "$ol_with_sql_module" != static; then
17107 cat >> confdefs.h <<\EOF
17108 #define SLAPD_SQL_DYNAMIC 1
17112 BUILD_SQL_DYNAMIC=shared
17113 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
17117 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
17118 $BUILD_SLAPD = yes ; then
17123 if test "$LINK_BINS_DYNAMIC" = yes; then
17125 LT_LIB_LINKAGE=shared
17128 LT_LIB_LINKAGE=static
17131 if test "$ac_cv_mingw32" = yes ; then
17191 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
17193 test "x$prefix" = xNONE && prefix=$ac_default_prefix
17194 # Let make expand exec_prefix.
17195 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17197 # Any assignment to VPATH causes Sun make to only execute
17198 # the first set of double-colon rules, so remove it if not needed.
17199 # If there is a colon in the path, we need to keep it.
17200 if test "x$srcdir" = x.; then
17201 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
17204 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
17206 DEFS=-DHAVE_CONFIG_H
17208 # Without the "./", some shells look in PATH for config.status.
17209 : ${CONFIG_STATUS=./config.status}
17211 echo creating $CONFIG_STATUS
17212 rm -f $CONFIG_STATUS
17213 cat > $CONFIG_STATUS <<EOF
17215 # Generated automatically by configure.
17216 # Run this file to recreate the current configuration.
17217 # This directory was configured as follows,
17218 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
17220 # $0 $ac_configure_args
17222 # Compiler output produced by configure, useful for debugging
17223 # configure, is in ./config.log if it exists.
17225 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
17228 case "\$ac_option" in
17229 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17230 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
17231 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
17232 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
17233 echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
17235 -help | --help | --hel | --he | --h)
17236 echo "\$ac_cs_usage"; exit 0 ;;
17237 *) echo "\$ac_cs_usage"; exit 1 ;;
17241 ac_given_srcdir=$srcdir
17242 ac_given_INSTALL="$INSTALL"
17244 trap 'rm -fr `echo "\
17245 Makefile:build/top.mk:Makefile.in:build/dir.mk \
17246 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
17247 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
17248 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
17249 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
17250 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
17251 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
17252 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
17253 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
17254 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
17255 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
17256 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
17257 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
17258 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
17259 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
17260 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
17261 include/Makefile:build/top.mk:include/Makefile.in \
17262 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk \
17263 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk \
17264 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk \
17265 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk \
17266 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk \
17267 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk \
17268 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk \
17269 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk \
17270 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
17271 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
17272 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
17273 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
17274 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
17275 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
17276 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
17277 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
17278 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
17279 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
17280 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
17281 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
17282 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
17283 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
17284 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
17285 include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
17287 cat >> $CONFIG_STATUS <<EOF
17289 # Protect against being on the right side of a sed subst in config.status.
17290 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
17291 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
17295 s%@CFLAGS@%$CFLAGS%g
17296 s%@CPPFLAGS@%$CPPFLAGS%g
17297 s%@CXXFLAGS@%$CXXFLAGS%g
17298 s%@FFLAGS@%$FFLAGS%g
17300 s%@LDFLAGS@%$LDFLAGS%g
17302 s%@exec_prefix@%$exec_prefix%g
17303 s%@prefix@%$prefix%g
17304 s%@program_transform_name@%$program_transform_name%g
17305 s%@bindir@%$bindir%g
17306 s%@sbindir@%$sbindir%g
17307 s%@libexecdir@%$libexecdir%g
17308 s%@datadir@%$datadir%g
17309 s%@sysconfdir@%$sysconfdir%g
17310 s%@sharedstatedir@%$sharedstatedir%g
17311 s%@localstatedir@%$localstatedir%g
17312 s%@libdir@%$libdir%g
17313 s%@includedir@%$includedir%g
17314 s%@oldincludedir@%$oldincludedir%g
17315 s%@infodir@%$infodir%g
17316 s%@mandir@%$mandir%g
17318 s%@host_alias@%$host_alias%g
17319 s%@host_cpu@%$host_cpu%g
17320 s%@host_vendor@%$host_vendor%g
17321 s%@host_os@%$host_os%g
17322 s%@target@%$target%g
17323 s%@target_alias@%$target_alias%g
17324 s%@target_cpu@%$target_cpu%g
17325 s%@target_vendor@%$target_vendor%g
17326 s%@target_os@%$target_os%g
17328 s%@build_alias@%$build_alias%g
17329 s%@build_cpu@%$build_cpu%g
17330 s%@build_vendor@%$build_vendor%g
17331 s%@build_os@%$build_os%g
17332 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
17333 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
17334 s%@INSTALL_DATA@%$INSTALL_DATA%g
17335 s%@PACKAGE@%$PACKAGE%g
17336 s%@VERSION@%$VERSION%g
17337 s%@ACLOCAL@%$ACLOCAL%g
17338 s%@AUTOCONF@%$AUTOCONF%g
17339 s%@AUTOMAKE@%$AUTOMAKE%g
17340 s%@AUTOHEADER@%$AUTOHEADER%g
17341 s%@MAKEINFO@%$MAKEINFO%g
17342 s%@install_sh@%$install_sh%g
17345 s%@AMTARFLAGS@%$AMTARFLAGS%g
17346 s%@SET_MAKE@%$SET_MAKE%g
17347 s%@top_builddir@%$top_builddir%g
17348 s%@ldap_subdir@%$ldap_subdir%g
17351 s%@RANLIB@%$RANLIB%g
17353 s%@DLLTOOL@%$DLLTOOL%g
17355 s%@OBJDUMP@%$OBJDUMP%g
17356 s%@LIBTOOL@%$LIBTOOL%g
17358 s%@SENDMAIL@%$SENDMAIL%g
17359 s%@EDITOR@%$EDITOR%g
17360 s%@FINGER@%$FINGER%g
17362 s%@EXEEXT@%$EXEEXT%g
17363 s%@OBJEXT@%$OBJEXT%g
17364 s%@OL_MKDEP@%$OL_MKDEP%g
17365 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
17366 s%@LIBOBJS@%$LIBOBJS%g
17367 s%@LIBSRCS@%$LIBSRCS%g
17369 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
17370 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
17371 s%@DYN_EXT@%$DYN_EXT%g
17372 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
17373 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
17374 s%@BUILD_LDAP@%$BUILD_LDAP%g
17375 s%@BUILD_LDBM@%$BUILD_LDBM%g
17376 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
17377 s%@BUILD_SHELL@%$BUILD_SHELL%g
17378 s%@BUILD_SQL@%$BUILD_SQL%g
17379 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
17380 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
17381 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
17382 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
17383 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
17384 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
17385 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
17386 s%@LDAP_LIBS@%$LDAP_LIBS%g
17387 s%@LDIF_LIBS@%$LDIF_LIBS%g
17388 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
17389 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
17390 s%@LDBM_LIBS@%$LDBM_LIBS%g
17391 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
17392 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
17393 s%@WRAP_LIBS@%$WRAP_LIBS%g
17394 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
17395 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
17396 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
17397 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
17398 s%@KRB4_LIBS@%$KRB4_LIBS%g
17399 s%@KRB5_LIBS@%$KRB5_LIBS%g
17400 s%@READLINE_LIBS@%$READLINE_LIBS%g
17401 s%@SASL_LIBS@%$SASL_LIBS%g
17402 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
17403 s%@TLS_LIBS@%$TLS_LIBS%g
17404 s%@MODULES_LIBS@%$MODULES_LIBS%g
17405 s%@AUTH_LIBS@%$AUTH_LIBS%g
17406 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
17407 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
17408 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
17413 cat >> $CONFIG_STATUS <<\EOF
17415 # Split the substitutions into bite-sized pieces for seds with
17416 # small command number limits, like on Digital OSF/1 and HP-UX.
17417 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
17418 ac_file=1 # Number of current file.
17419 ac_beg=1 # First line for current file.
17420 ac_end=$ac_max_sed_cmds # Line after last line for current file.
17423 while $ac_more_lines; do
17424 if test $ac_beg -gt 1; then
17425 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
17427 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
17429 if test ! -s conftest.s$ac_file; then
17430 ac_more_lines=false
17431 rm -f conftest.s$ac_file
17433 if test -z "$ac_sed_cmds"; then
17434 ac_sed_cmds="sed -f conftest.s$ac_file"
17436 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
17438 ac_file=`expr $ac_file + 1`
17440 ac_end=`expr $ac_end + $ac_max_sed_cmds`
17443 if test -z "$ac_sed_cmds"; then
17448 cat >> $CONFIG_STATUS <<EOF
17450 CONFIG_FILES=\${CONFIG_FILES-"\
17451 Makefile:build/top.mk:Makefile.in:build/dir.mk \
17452 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
17453 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
17454 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
17455 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
17456 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
17457 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
17458 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
17459 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
17460 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
17461 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
17462 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
17463 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
17464 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
17465 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
17466 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
17467 include/Makefile:build/top.mk:include/Makefile.in \
17468 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk \
17469 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk \
17470 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk \
17471 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk \
17472 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk \
17473 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk \
17474 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk \
17475 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk \
17476 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
17477 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
17478 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
17479 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
17480 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
17481 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
17482 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
17483 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
17484 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
17485 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
17486 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
17487 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
17488 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
17489 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
17490 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
17493 cat >> $CONFIG_STATUS <<\EOF
17494 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
17495 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17497 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
17498 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
17499 *) ac_file_in="${ac_file}.in" ;;
17502 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
17504 # Remove last slash and all that follows it. Not all systems have dirname.
17505 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
17506 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17507 # The file is in a subdirectory.
17508 test ! -d "$ac_dir" && mkdir "$ac_dir"
17509 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
17510 # A "../" for each directory in $ac_dir_suffix.
17511 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
17513 ac_dir_suffix= ac_dots=
17516 case "$ac_given_srcdir" in
17518 if test -z "$ac_dots"; then top_srcdir=.
17519 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
17520 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
17521 *) # Relative path.
17522 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
17523 top_srcdir="$ac_dots$ac_given_srcdir" ;;
17526 case "$ac_given_INSTALL" in
17527 [/$]*) INSTALL="$ac_given_INSTALL" ;;
17528 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
17531 echo creating "$ac_file"
17533 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
17535 *[Mm]akefile*) ac_comsub="1i\\
17536 # $configure_input" ;;
17540 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
17542 s%@configure_input@%$configure_input%g
17543 s%@srcdir@%$srcdir%g
17544 s%@top_srcdir@%$top_srcdir%g
17545 s%@INSTALL@%$INSTALL%g
17546 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
17550 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17551 # NAME is the cpp macro being defined and VALUE is the value it is being given.
17553 # ac_d sets the value in "#define NAME VALUE" lines.
17554 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
17555 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
17558 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
17559 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
17560 ac_uB='\([ ]\)%\1#\2define\3'
17563 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
17564 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
17565 ac_eB='$%\1#\2define\3'
17569 if test "${CONFIG_HEADERS+set}" != set; then
17571 cat >> $CONFIG_STATUS <<EOF
17572 CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
17574 cat >> $CONFIG_STATUS <<\EOF
17576 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
17577 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17579 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
17580 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
17581 *) ac_file_in="${ac_file}.in" ;;
17584 echo creating $ac_file
17586 rm -f conftest.frag conftest.in conftest.out
17587 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
17588 cat $ac_file_inputs > conftest.in
17592 # Transform confdefs.h into a sed script conftest.vals that substitutes
17593 # the proper values into config.h.in to produce config.h. And first:
17594 # Protect against being on the right side of a sed subst in config.status.
17595 # Protect against being in an unquoted here document in config.status.
17596 rm -f conftest.vals
17597 cat > conftest.hdr <<\EOF
17600 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
17604 sed -n -f conftest.hdr confdefs.h > conftest.vals
17607 # This sed command replaces #undef with comments. This is necessary, for
17608 # example, in the case of _POSIX_SOURCE, which is predefined and required
17609 # on some systems where configure will not decide to define it.
17610 cat >> conftest.vals <<\EOF
17611 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
17614 # Break up conftest.vals because some shells have a limit on
17615 # the size of here documents, and old seds have small limits too.
17617 rm -f conftest.tail
17620 ac_lines=`grep -c . conftest.vals`
17621 # grep -c gives empty output for an empty file on some AIX systems.
17622 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
17623 # Write a limited-size here document to conftest.frag.
17624 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
17625 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
17627 sed -f conftest.frag conftest.in > conftest.out
17629 mv conftest.out conftest.in
17630 ' >> $CONFIG_STATUS
17631 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
17632 rm -f conftest.vals
17633 mv conftest.tail conftest.vals
17635 rm -f conftest.vals
17637 cat >> $CONFIG_STATUS <<\EOF
17638 rm -f conftest.frag conftest.h
17639 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
17640 cat conftest.in >> conftest.h
17642 if cmp -s $ac_file conftest.h 2>/dev/null; then
17643 echo "$ac_file is unchanged"
17646 # Remove last slash and all that follows it. Not all systems have dirname.
17647 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
17648 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17649 # The file is in a subdirectory.
17650 test ! -d "$ac_dir" && mkdir "$ac_dir"
17653 mv conftest.h $ac_file
17658 cat >> $CONFIG_STATUS <<EOF
17661 cat >> $CONFIG_STATUS <<\EOF
17664 echo Please \"make depend\" to build dependencies
17668 chmod +x $CONFIG_STATUS
17669 rm -fr confdefs* $ac_clean_files
17670 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1