]> git.sur5r.net Git - openldap/blob - configure
Add check for sockaddr_storage before enabling IPv6
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.428 2002/08/28 05:12:22 hyc Exp  
4
5 # Copyright 1998-2002 The OpenLDAP Foundation.  All Rights Reserved.
6
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.
12
13 echo "Copyright 1998-2002 The OpenLDAP Foundation,  All Rights Reserved."
14 echo "  Restrictions apply, see COPYRIGHT and LICENSE files."
15
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.
19 #
20 # This configure script is free software; the Free Software Foundation
21 # gives unlimited permission to copy, distribute and modify it.
22
23 # Defaults:
24 ac_help=
25 ac_default_prefix=/usr/local
26 # Any additions from configure.in:
27 ac_default_prefix=/usr/local
28 ac_help="$ac_help
29   --with-subdir=DIR       change default subdirectory used for installs"
30 ac_help="$ac_help
31   --enable-debug          enable debugging [yes]"
32 ac_help="$ac_help
33   --enable-syslog         enable syslog support [auto]"
34 ac_help="$ac_help
35   --enable-proctitle      enable proctitle support [yes]"
36 ac_help="$ac_help
37   --enable-cache          enable caching (experimental) [no]"
38 ac_help="$ac_help
39   --enable-referrals      enable LDAPv2+ Referrals (experimental) [no]"
40 ac_help="$ac_help
41   --enable-ipv6           enable IPv6 support [auto]"
42 ac_help="$ac_help
43   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
44 ac_help="$ac_help
45   --enable-x-compile      enable cross compiling [no]"
46 ac_help="$ac_help
47   --with-cyrus-sasl       with Cyrus SASL support [auto]"
48 ac_help="$ac_help
49   --with-fetch            with freeBSD fetch URL support [auto]"
50 ac_help="$ac_help
51   --with-kerberos         with Kerberos support [auto]"
52 ac_help="$ac_help
53   --with-readline         with readline support [auto]"
54 ac_help="$ac_help
55   --with-threads          with threads [auto]"
56 ac_help="$ac_help
57   --with-tls              with TLS/SSL support [auto]"
58 ac_help="$ac_help
59   --with-yielding-select  with implicitly yielding select [auto]"
60 ac_help="$ac_help
61
62 SLAPD (Standalone LDAP Daemon) Options:"
63 ac_help="$ac_help
64   --enable-slapd          enable building slapd [yes]"
65 ac_help="$ac_help
66     --enable-aci          enable per-object ACIs (experimental) [no]"
67 ac_help="$ac_help
68     --enable-cleartext    enable cleartext passwords [yes]"
69 ac_help="$ac_help
70     --enable-crypt        enable crypt(3) passwords [no]"
71 ac_help="$ac_help
72     --enable-dynamic      enable linking built binaries with dynamic libs [no]"
73 ac_help="$ac_help
74     --enable-kpasswd      enable Kerberos password verification [no]"
75 ac_help="$ac_help
76     --enable-lmpasswd     enable LAN Manager passwords [no]"
77 ac_help="$ac_help
78     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
79 ac_help="$ac_help
80     --enable-modules      enable dynamic module support [no]"
81 ac_help="$ac_help
82     --enable-phonetic     enable phonetic/soundex [no]"
83 ac_help="$ac_help
84     --enable-rewrite      enable DN rewriting in back-ldap and back-meta [no]"
85 ac_help="$ac_help
86     --enable-rlookups     enable reverse lookups of client hostnames [no]"
87 ac_help="$ac_help
88     --enable-slp          enable SLPv2 support [no]"
89 ac_help="$ac_help
90     --enable-wrappers     enable tcp wrapper support [no]"
91 ac_help="$ac_help
92     --enable-bdb          enable Berkeley DB backend [yes]"
93 ac_help="$ac_help
94     --with-bdb-module     module type static|dynamic [static]"
95 ac_help="$ac_help
96     --enable-dnssrv       enable dnssrv backend [no]"
97 ac_help="$ac_help
98     --with-dnssrv-module  module type static|dynamic [static]"
99 ac_help="$ac_help
100     --enable-ldap         enable ldap backend [no]"
101 ac_help="$ac_help
102     --with-ldap-module    module type static|dynamic [static]"
103 ac_help="$ac_help
104     --enable-ldbm         enable ldbm backend [no]"
105 ac_help="$ac_help
106     --with-ldbm-api       with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
107 ac_help="$ac_help
108     --with-ldbm-module    module type static|dynamic [static]"
109 ac_help="$ac_help
110     --with-ldbm-type      use LDBM type auto|btree|hash [auto]"
111 ac_help="$ac_help
112     --enable-meta         enable metadirectory backend [no]"
113 ac_help="$ac_help
114     --with-meta-module    module type static|dynamic [static]"
115 ac_help="$ac_help
116     --enable-monitor      enable monitor backend [no]"
117 ac_help="$ac_help
118     --with-monitor-module module type static|dynamic [static]"
119 ac_help="$ac_help
120     --enable-null         enable null backend [no]"
121 ac_help="$ac_help
122     --with-null-module    module type static|dynamic [static]"
123 ac_help="$ac_help
124     --enable-passwd       enable passwd backend [no]"
125 ac_help="$ac_help
126     --with-passwd-module  module type static|dynamic [static]"
127 ac_help="$ac_help
128     --enable-perl         enable perl backend [no]"
129 ac_help="$ac_help
130     --with-perl-module    module type static|dynamic [static]"
131 ac_help="$ac_help
132     --enable-shell        enable shell backend [no]"
133 ac_help="$ac_help
134     --with-shell-module   module type static|dynamic [static]"
135 ac_help="$ac_help
136     --enable-sql          enable sql backend [no]"
137 ac_help="$ac_help
138     --with-sql-module     module type static|dynamic [static]"
139 ac_help="$ac_help
140     --enable-tcl          enable tcl backend [no]"
141 ac_help="$ac_help
142     --with-tcl-module     module type static|dynamic [static]"
143 ac_help="$ac_help
144
145 SLURPD (Replication Daemon) Options:"
146 ac_help="$ac_help
147   --enable-slurpd         enable building slurpd [auto]"
148 ac_help="$ac_help
149
150 Library Generation & Linking Options"
151 ac_help="$ac_help
152   --enable-static[=PKGS]  build static libraries [default=yes]"
153 ac_help="$ac_help
154   --enable-shared[=PKGS]  build shared libraries [default=yes]"
155 ac_help="$ac_help
156   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
157 ac_help="$ac_help
158   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
159
160 # Find the correct PATH separator.  Usually this is `:', but
161 # DJGPP uses `;' like DOS.
162 if test "X${PATH_SEPARATOR+set}" != Xset; then
163   UNAME=${UNAME-`uname 2>/dev/null`}
164   case X$UNAME in
165     *-DOS) lt_cv_sys_path_separator=';' ;;
166     *)     lt_cv_sys_path_separator=':' ;;
167   esac
168   PATH_SEPARATOR=$lt_cv_sys_path_separator
169 fi
170
171
172 # Check that we are running under the correct shell.
173 SHELL=${CONFIG_SHELL-/bin/sh}
174
175 case X$ECHO in
176 X*--fallback-echo)
177   # Remove one level of quotation (which was required for Make).
178   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
179   ;;
180 esac
181
182 echo=${ECHO-echo}
183 if test "X$1" = X--no-reexec; then
184   # Discard the --no-reexec flag, and continue.
185   shift
186 elif test "X$1" = X--fallback-echo; then
187   # Avoid inline document here, it may be left over
188   :
189 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
190   # Yippee, $echo works!
191   :
192 else
193   # Restart under the correct shell.
194   exec $SHELL "$0" --no-reexec ${1+"$@"}
195 fi
196
197 if test "X$1" = X--fallback-echo; then
198   # used as fallback echo
199   shift
200   cat <<EOF
201
202 EOF
203   exit 0
204 fi
205
206 # The HP-UX ksh and POSIX shell print the target directory to stdout
207 # if CDPATH is set.
208 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
209
210 if test -z "$ECHO"; then
211 if test "X${echo_test_string+set}" != Xset; then
212 # find a string as large as possible, as long as the shell can cope with it
213   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
214     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
215     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
216        echo_test_string="`eval $cmd`" &&
217        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
218     then
219       break
220     fi
221   done
222 fi
223
224 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
225    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
226    test "X$echo_testing_string" = "X$echo_test_string"; then
227   :
228 else
229   # The Solaris, AIX, and Digital Unix default echo programs unquote
230   # backslashes.  This makes it impossible to quote backslashes using
231   #   echo "$something" | sed 's/\\/\\\\/g'
232   #
233   # So, first we look for a working echo in the user's PATH.
234
235   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
236   for dir in $PATH /usr/ucb; do
237     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
238        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
239        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
240        test "X$echo_testing_string" = "X$echo_test_string"; then
241       echo="$dir/echo"
242       break
243     fi
244   done
245   IFS="$save_ifs"
246
247   if test "X$echo" = Xecho; then
248     # We didn't find a better echo, so look for alternatives.
249     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
250        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
251        test "X$echo_testing_string" = "X$echo_test_string"; then
252       # This shell has a builtin print -r that does the trick.
253       echo='print -r'
254     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
255          test "X$CONFIG_SHELL" != X/bin/ksh; then
256       # If we have ksh, try running configure again with it.
257       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
258       export ORIGINAL_CONFIG_SHELL
259       CONFIG_SHELL=/bin/ksh
260       export CONFIG_SHELL
261       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
262     else
263       # Try using printf.
264       echo='printf %s\n'
265       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
266          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
267          test "X$echo_testing_string" = "X$echo_test_string"; then
268         # Cool, printf works
269         :
270       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
271            test "X$echo_testing_string" = 'X\t' &&
272            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
273            test "X$echo_testing_string" = "X$echo_test_string"; then
274         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
275         export CONFIG_SHELL
276         SHELL="$CONFIG_SHELL"
277         export SHELL
278         echo="$CONFIG_SHELL $0 --fallback-echo"
279       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
280            test "X$echo_testing_string" = 'X\t' &&
281            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
282            test "X$echo_testing_string" = "X$echo_test_string"; then
283         echo="$CONFIG_SHELL $0 --fallback-echo"
284       else
285         # maybe with a smaller string...
286         prev=:
287
288         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
289           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
290           then
291             break
292           fi
293           prev="$cmd"
294         done
295
296         if test "$prev" != 'sed 50q "$0"'; then
297           echo_test_string=`eval $prev`
298           export echo_test_string
299           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
300         else
301           # Oops.  We lost completely, so just stick with echo.
302           echo=echo
303         fi
304       fi
305     fi
306   fi
307 fi
308 fi
309
310 # Copy echo and quote the copy suitably for passing to libtool from
311 # the Makefile, instead of quoting the original, which is used later.
312 ECHO=$echo
313 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
314    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
315 fi
316
317
318 ac_help="$ac_help
319   --disable-libtool-lock  avoid locking (might break parallel builds)"
320 ac_help="$ac_help
321   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
322 ac_help="$ac_help
323
324 See INSTALL file for further details."
325
326 # Initialize some variables set by options.
327 # The variables have the same names as the options, with
328 # dashes changed to underlines.
329 build=NONE
330 cache_file=./config.cache
331 exec_prefix=NONE
332 host=NONE
333 no_create=
334 nonopt=NONE
335 no_recursion=
336 prefix=NONE
337 program_prefix=NONE
338 program_suffix=NONE
339 program_transform_name=s,x,x,
340 silent=
341 site=
342 srcdir=
343 target=NONE
344 verbose=
345 x_includes=NONE
346 x_libraries=NONE
347 bindir='${exec_prefix}/bin'
348 sbindir='${exec_prefix}/sbin'
349 libexecdir='${exec_prefix}/libexec'
350 datadir='${prefix}/share'
351 sysconfdir='${prefix}/etc'
352 sharedstatedir='${prefix}/com'
353 localstatedir='${prefix}/var'
354 libdir='${exec_prefix}/lib'
355 includedir='${prefix}/include'
356 oldincludedir='/usr/include'
357 infodir='${prefix}/info'
358 mandir='${prefix}/man'
359
360 # Initialize some other variables.
361 subdirs=
362 MFLAGS= MAKEFLAGS=
363 SHELL=${CONFIG_SHELL-/bin/sh}
364 # Maximum number of lines to put in a shell here document.
365 ac_max_here_lines=12
366
367 ac_prev=
368 for ac_option
369 do
370
371   # If the previous option needs an argument, assign it.
372   if test -n "$ac_prev"; then
373     eval "$ac_prev=\$ac_option"
374     ac_prev=
375     continue
376   fi
377
378   case "$ac_option" in
379   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
380   *) ac_optarg= ;;
381   esac
382
383   # Accept the important Cygnus configure options, so we can diagnose typos.
384
385   case "$ac_option" in
386
387   -bindir | --bindir | --bindi | --bind | --bin | --bi)
388     ac_prev=bindir ;;
389   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
390     bindir="$ac_optarg" ;;
391
392   -build | --build | --buil | --bui | --bu)
393     ac_prev=build ;;
394   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
395     build="$ac_optarg" ;;
396
397   -cache-file | --cache-file | --cache-fil | --cache-fi \
398   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
399     ac_prev=cache_file ;;
400   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
401   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
402     cache_file="$ac_optarg" ;;
403
404   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
405     ac_prev=datadir ;;
406   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
407   | --da=*)
408     datadir="$ac_optarg" ;;
409
410   -disable-* | --disable-*)
411     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
412     # Reject names that are not valid shell variable names.
413     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
414       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
415     fi
416     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
417     eval "enable_${ac_feature}=no" ;;
418
419   -enable-* | --enable-*)
420     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
421     # Reject names that are not valid shell variable names.
422     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
423       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
424     fi
425     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
426     case "$ac_option" in
427       *=*) ;;
428       *) ac_optarg=yes ;;
429     esac
430     eval "enable_${ac_feature}='$ac_optarg'" ;;
431
432   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
433   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
434   | --exec | --exe | --ex)
435     ac_prev=exec_prefix ;;
436   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
437   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
438   | --exec=* | --exe=* | --ex=*)
439     exec_prefix="$ac_optarg" ;;
440
441   -gas | --gas | --ga | --g)
442     # Obsolete; use --with-gas.
443     with_gas=yes ;;
444
445   -help | --help | --hel | --he)
446     # Omit some internal or obsolete options to make the list less imposing.
447     # This message is too long to be a string in the A/UX 3.1 sh.
448     cat << EOF
449 Usage: configure [options] [host]
450 Options: [defaults in brackets after descriptions]
451 Configuration:
452   --cache-file=FILE       cache test results in FILE
453   --help                  print this message
454   --no-create             do not create output files
455   --quiet, --silent       do not print \`checking...' messages
456   --version               print the version of autoconf that created configure
457 Directory and file names:
458   --prefix=PREFIX         install architecture-independent files in PREFIX
459                           [$ac_default_prefix]
460   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
461                           [same as prefix]
462   --bindir=DIR            user executables in DIR [EPREFIX/bin]
463   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
464   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
465   --datadir=DIR           read-only architecture-independent data in DIR
466                           [PREFIX/share]
467   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
468   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
469                           [PREFIX/com]
470   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
471   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
472   --includedir=DIR        C header files in DIR [PREFIX/include]
473   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
474   --infodir=DIR           info documentation in DIR [PREFIX/info]
475   --mandir=DIR            man documentation in DIR [PREFIX/man]
476   --srcdir=DIR            find the sources in DIR [configure dir or ..]
477   --program-prefix=PREFIX prepend PREFIX to installed program names
478   --program-suffix=SUFFIX append SUFFIX to installed program names
479   --program-transform-name=PROGRAM
480                           run sed PROGRAM on installed program names
481 EOF
482     cat << EOF
483 Host type:
484   --build=BUILD           configure for building on BUILD [BUILD=HOST]
485   --host=HOST             configure for HOST [guessed]
486   --target=TARGET         configure for TARGET [TARGET=HOST]
487 Features and packages:
488   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
489   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
490   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
491   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
492   --x-includes=DIR        X include files are in DIR
493   --x-libraries=DIR       X library files are in DIR
494 EOF
495     if test -n "$ac_help"; then
496       echo "--enable and --with options recognized:$ac_help"
497     fi
498     exit 0 ;;
499
500   -host | --host | --hos | --ho)
501     ac_prev=host ;;
502   -host=* | --host=* | --hos=* | --ho=*)
503     host="$ac_optarg" ;;
504
505   -includedir | --includedir | --includedi | --included | --include \
506   | --includ | --inclu | --incl | --inc)
507     ac_prev=includedir ;;
508   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
509   | --includ=* | --inclu=* | --incl=* | --inc=*)
510     includedir="$ac_optarg" ;;
511
512   -infodir | --infodir | --infodi | --infod | --info | --inf)
513     ac_prev=infodir ;;
514   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
515     infodir="$ac_optarg" ;;
516
517   -libdir | --libdir | --libdi | --libd)
518     ac_prev=libdir ;;
519   -libdir=* | --libdir=* | --libdi=* | --libd=*)
520     libdir="$ac_optarg" ;;
521
522   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
523   | --libexe | --libex | --libe)
524     ac_prev=libexecdir ;;
525   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
526   | --libexe=* | --libex=* | --libe=*)
527     libexecdir="$ac_optarg" ;;
528
529   -localstatedir | --localstatedir | --localstatedi | --localstated \
530   | --localstate | --localstat | --localsta | --localst \
531   | --locals | --local | --loca | --loc | --lo)
532     ac_prev=localstatedir ;;
533   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
534   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
535   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
536     localstatedir="$ac_optarg" ;;
537
538   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
539     ac_prev=mandir ;;
540   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
541     mandir="$ac_optarg" ;;
542
543   -nfp | --nfp | --nf)
544     # Obsolete; use --without-fp.
545     with_fp=no ;;
546
547   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
548   | --no-cr | --no-c)
549     no_create=yes ;;
550
551   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
552   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
553     no_recursion=yes ;;
554
555   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
556   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
557   | --oldin | --oldi | --old | --ol | --o)
558     ac_prev=oldincludedir ;;
559   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
560   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
561   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
562     oldincludedir="$ac_optarg" ;;
563
564   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
565     ac_prev=prefix ;;
566   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
567     prefix="$ac_optarg" ;;
568
569   -program-prefix | --program-prefix | --program-prefi | --program-pref \
570   | --program-pre | --program-pr | --program-p)
571     ac_prev=program_prefix ;;
572   -program-prefix=* | --program-prefix=* | --program-prefi=* \
573   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
574     program_prefix="$ac_optarg" ;;
575
576   -program-suffix | --program-suffix | --program-suffi | --program-suff \
577   | --program-suf | --program-su | --program-s)
578     ac_prev=program_suffix ;;
579   -program-suffix=* | --program-suffix=* | --program-suffi=* \
580   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
581     program_suffix="$ac_optarg" ;;
582
583   -program-transform-name | --program-transform-name \
584   | --program-transform-nam | --program-transform-na \
585   | --program-transform-n | --program-transform- \
586   | --program-transform | --program-transfor \
587   | --program-transfo | --program-transf \
588   | --program-trans | --program-tran \
589   | --progr-tra | --program-tr | --program-t)
590     ac_prev=program_transform_name ;;
591   -program-transform-name=* | --program-transform-name=* \
592   | --program-transform-nam=* | --program-transform-na=* \
593   | --program-transform-n=* | --program-transform-=* \
594   | --program-transform=* | --program-transfor=* \
595   | --program-transfo=* | --program-transf=* \
596   | --program-trans=* | --program-tran=* \
597   | --progr-tra=* | --program-tr=* | --program-t=*)
598     program_transform_name="$ac_optarg" ;;
599
600   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
601   | -silent | --silent | --silen | --sile | --sil)
602     silent=yes ;;
603
604   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
605     ac_prev=sbindir ;;
606   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
607   | --sbi=* | --sb=*)
608     sbindir="$ac_optarg" ;;
609
610   -sharedstatedir | --sharedstatedir | --sharedstatedi \
611   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
612   | --sharedst | --shareds | --shared | --share | --shar \
613   | --sha | --sh)
614     ac_prev=sharedstatedir ;;
615   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
616   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
617   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
618   | --sha=* | --sh=*)
619     sharedstatedir="$ac_optarg" ;;
620
621   -site | --site | --sit)
622     ac_prev=site ;;
623   -site=* | --site=* | --sit=*)
624     site="$ac_optarg" ;;
625
626   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
627     ac_prev=srcdir ;;
628   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
629     srcdir="$ac_optarg" ;;
630
631   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
632   | --syscon | --sysco | --sysc | --sys | --sy)
633     ac_prev=sysconfdir ;;
634   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
635   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
636     sysconfdir="$ac_optarg" ;;
637
638   -target | --target | --targe | --targ | --tar | --ta | --t)
639     ac_prev=target ;;
640   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
641     target="$ac_optarg" ;;
642
643   -v | -verbose | --verbose | --verbos | --verbo | --verb)
644     verbose=yes ;;
645
646   -version | --version | --versio | --versi | --vers)
647     echo "configure generated by autoconf version 2.13.1"
648     exit 0 ;;
649
650   -with-* | --with-*)
651     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
652     # Reject names that are not valid shell variable names.
653     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
654       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
655     fi
656     ac_package=`echo $ac_package| sed 's/-/_/g'`
657     case "$ac_option" in
658       *=*) ;;
659       *) ac_optarg=yes ;;
660     esac
661     eval "with_${ac_package}='$ac_optarg'" ;;
662
663   -without-* | --without-*)
664     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
665     # Reject names that are not valid shell variable names.
666     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
667       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
668     fi
669     ac_package=`echo $ac_package| sed 's/-/_/g'`
670     eval "with_${ac_package}=no" ;;
671
672   --x)
673     # Obsolete; use --with-x.
674     with_x=yes ;;
675
676   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
677   | --x-incl | --x-inc | --x-in | --x-i)
678     ac_prev=x_includes ;;
679   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
680   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
681     x_includes="$ac_optarg" ;;
682
683   -x-libraries | --x-libraries | --x-librarie | --x-librari \
684   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
685     ac_prev=x_libraries ;;
686   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
687   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
688     x_libraries="$ac_optarg" ;;
689
690   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
691     ;;
692
693   *)
694     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
695       echo "configure: warning: $ac_option: invalid host type" 1>&2
696     fi
697     if test "x$nonopt" != xNONE; then
698       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
699     fi
700     nonopt="$ac_option"
701     ;;
702
703   esac
704 done
705
706 if test -n "$ac_prev"; then
707   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
708 fi
709
710 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
711
712 # File descriptor usage:
713 # 0 standard input
714 # 1 file creation
715 # 2 errors and warnings
716 # 3 some systems may open it to /dev/tty
717 # 4 used on the Kubota Titan
718 # 6 checking for... messages and results
719 # 5 compiler messages saved in config.log
720 if test "$silent" = yes; then
721   exec 6>/dev/null
722 else
723   exec 6>&1
724 fi
725 exec 5>./config.log
726
727 echo "\
728 This file contains any messages produced by compilers while
729 running configure, to aid debugging if configure makes a mistake.
730 " 1>&5
731
732 # Strip out --no-create and --no-recursion so they do not pile up.
733 # Also quote any args containing shell metacharacters.
734 ac_configure_args=
735 for ac_arg
736 do
737   case "$ac_arg" in
738   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
739   | --no-cr | --no-c) ;;
740   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
741   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
742   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
743   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
744   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
745   esac
746 done
747
748 # NLS nuisances.
749 # Only set these to C if already set.  These must not be set unconditionally
750 # because not all systems understand e.g. LANG=C (notably SCO).
751 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
752 # Non-C LC_CTYPE values break the ctype check.
753 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
754 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
755 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
756 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
757
758 # confdefs.h avoids OS command line length limits that DEFS can exceed.
759 rm -rf conftest* confdefs.h
760 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
761 echo > confdefs.h
762
763 # A filename unique to this package, relative to the directory that
764 # configure is in, which we can look for to find out if srcdir is correct.
765 ac_unique_file=build/version.sh
766
767 # Find the source files, if location was not specified.
768 if test -z "$srcdir"; then
769   ac_srcdir_defaulted=yes
770   # Try the directory containing this script, then its parent.
771   ac_prog=$0
772   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
773   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
774   srcdir=$ac_confdir
775   if test ! -r $srcdir/$ac_unique_file; then
776     srcdir=..
777   fi
778 else
779   ac_srcdir_defaulted=no
780 fi
781 if test ! -r $srcdir/$ac_unique_file; then
782   if test "$ac_srcdir_defaulted" = yes; then
783     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
784   else
785     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
786   fi
787 fi
788 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
789
790 # Prefer explicitly selected file to automatically selected ones.
791 if test -z "$CONFIG_SITE"; then
792   if test "x$prefix" != xNONE; then
793     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
794   else
795     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
796   fi
797 fi
798 for ac_site_file in $CONFIG_SITE; do
799   if test -r "$ac_site_file"; then
800     echo "loading site script $ac_site_file"
801     . "$ac_site_file"
802   fi
803 done
804
805
806 ac_ext=c
807 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
808 ac_cpp='$CPP $CPPFLAGS'
809 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
810 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
811 cross_compiling=$ac_cv_prog_cc_cross
812
813 ac_exeext=
814 ac_objext=o
815 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
816   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
817   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
818     ac_n= ac_c='
819 ' ac_t='        '
820   else
821     ac_n=-n ac_c= ac_t=
822   fi
823 else
824   ac_n= ac_c='\c' ac_t=
825 fi
826
827
828 # set unset (borrowed from autoconf 2.49c)
829 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
830   ol_unset=unset
831 else
832   ol_unset=false
833 fi
834 # unset CDPATH
835 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
836
837 ac_aux_dir=
838 for ac_dir in build $srcdir/build; do
839   if test -f $ac_dir/install-sh; then
840     ac_aux_dir=$ac_dir
841     ac_install_sh="$ac_aux_dir/install-sh -c"
842     break
843   elif test -f $ac_dir/install.sh; then
844     ac_aux_dir=$ac_dir
845     ac_install_sh="$ac_aux_dir/install.sh -c"
846     break
847   elif test -f $ac_dir/shtool; then
848     ac_aux_dir=$ac_dir
849     ac_install_sh="$ac_aux_dir/shtool install -c"
850     break
851   fi
852 done
853 if test -z "$ac_aux_dir"; then
854   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
855 fi
856 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
857 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
858 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
859
860 eval `$ac_aux_dir/version.sh`
861 if test -z "$OL_STRING"; then
862         { echo "configure: error: could not determine version" 1>&2; exit 1; }
863 fi
864
865 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
866         ac_cv_shtool="$ac_aux_dir/shtool"
867 else
868         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
869 fi
870
871 SHTOOL="$ac_cv_shtool"
872
873 TB=`$SHTOOL echo -e %B`
874 TN=`$SHTOOL echo -e %b`
875
876 echo "Configuring $TB$OL_STRING$TN ..."
877
878
879 echo $ac_n "checking host system type""... $ac_c" 1>&6
880 echo "configure:881: checking host system type" >&5
881 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
882
883 # Make sure we can run config.sub.
884   if $ac_config_sub sun4 >/dev/null 2>&1; then :
885     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
886   fi
887
888   ac_cv_host_alias=$host
889   case "$ac_cv_host_alias" in
890   NONE)
891     case $nonopt in
892     NONE)
893       if ac_cv_host_alias=`$ac_config_guess`; then :
894       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
895       fi ;;
896     *) ac_cv_host_alias=$nonopt ;;
897     esac ;;
898   esac
899
900   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
901   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
902   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
903   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
904 else
905   echo $ac_n "(cached) $ac_c" 1>&6
906 fi
907
908 echo "$ac_t""$ac_cv_host" 1>&6
909
910 host=$ac_cv_host
911 host_alias=$ac_cv_host_alias
912 host_cpu=$ac_cv_host_cpu
913 host_vendor=$ac_cv_host_vendor
914 host_os=$ac_cv_host_os
915
916
917
918
919
920 echo $ac_n "checking target system type""... $ac_c" 1>&6
921 echo "configure:922: checking target system type" >&5
922 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
923
924 # Make sure we can run config.sub.
925   if $ac_config_sub sun4 >/dev/null 2>&1; then :
926     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
927   fi
928
929   ac_cv_target_alias=$target
930   case "$ac_cv_target_alias" in
931   NONE)
932     case $nonopt in
933     NONE)
934       ac_cv_target_alias=$host_alias ;;
935
936     *) ac_cv_target_alias=$nonopt ;;
937     esac ;;
938   esac
939
940   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
941   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
942   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
943   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
944 else
945   echo $ac_n "(cached) $ac_c" 1>&6
946 fi
947
948 echo "$ac_t""$ac_cv_target" 1>&6
949
950 target=$ac_cv_target
951 target_alias=$ac_cv_target_alias
952 target_cpu=$ac_cv_target_cpu
953 target_vendor=$ac_cv_target_vendor
954 target_os=$ac_cv_target_os
955
956
957
958
959
960 echo $ac_n "checking build system type""... $ac_c" 1>&6
961 echo "configure:962: checking build system type" >&5
962 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
963
964 # Make sure we can run config.sub.
965   if $ac_config_sub sun4 >/dev/null 2>&1; then :
966     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
967   fi
968
969   ac_cv_build_alias=$build
970   case "$ac_cv_build_alias" in
971   NONE)
972     case $nonopt in
973     NONE)
974       ac_cv_build_alias=$host_alias ;;
975
976     *) ac_cv_build_alias=$nonopt ;;
977     esac ;;
978   esac
979
980   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
981   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
982   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
983   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
984 else
985   echo $ac_n "(cached) $ac_c" 1>&6
986 fi
987
988 echo "$ac_t""$ac_cv_build" 1>&6
989
990 build=$ac_cv_build
991 build_alias=$ac_cv_build_alias
992 build_cpu=$ac_cv_build_cpu
993 build_vendor=$ac_cv_build_vendor
994 build_os=$ac_cv_build_os
995
996
997
998
999
1000 # Do some error checking and defaulting for the host and target type.
1001 # The inputs are:
1002 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1003 #
1004 # The rules are:
1005 # 1. You are not allowed to specify --host, --target, and nonopt at the
1006 #    same time.
1007 # 2. Host defaults to nonopt.
1008 # 3. If nonopt is not specified, then host defaults to the current host,
1009 #    as determined by config.guess.
1010 # 4. Target and build default to nonopt.
1011 # 5. If nonopt is not specified, then target and build default to host.
1012
1013 # The aliases save the names the user supplied, while $host etc.
1014 # will get canonicalized.
1015 case $host---$target---$nonopt in
1016 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1017 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1018 esac
1019
1020 test "$host_alias" != "$target_alias" &&
1021   test "$program_prefix$program_suffix$program_transform_name" = \
1022     NONENONEs,x,x, &&
1023   program_prefix=${target_alias}-
1024
1025
1026 # Find a good install program.  We prefer a C program (faster),
1027 # so one script is as good as another.  But avoid the broken or
1028 # incompatible versions:
1029 # SysV /etc/install, /usr/sbin/install
1030 # SunOS /usr/etc/install
1031 # IRIX /sbin/install
1032 # AIX /bin/install
1033 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1034 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1035 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1036 # ./install, which can be erroneously created by make from ./install.sh.
1037 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1038 echo "configure:1039: checking for a BSD compatible install" >&5
1039 if test -z "$INSTALL"; then
1040 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1041   echo $ac_n "(cached) $ac_c" 1>&6
1042 else
1043     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1044   for ac_dir in $PATH; do
1045     # Account for people who put trailing slashes in PATH elements.
1046     case "$ac_dir/" in
1047     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1048     *)
1049       # OSF1 and SCO ODT 3.0 have their own names for install.
1050       # Don't use installbsd from OSF since it installs stuff as root
1051       # by default.
1052       for ac_prog in ginstall scoinst install; do
1053         if test -f $ac_dir/$ac_prog; then
1054           if test $ac_prog = install &&
1055             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1056             # AIX install.  It has an incompatible calling convention.
1057             :
1058           elif test $ac_prog = install &&
1059             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1060             # program-specific install script used by HP pwplus--don't use.
1061             :
1062           else
1063             ac_cv_path_install="$ac_dir/$ac_prog -c"
1064             break 2
1065           fi
1066         fi
1067       done
1068       ;;
1069     esac
1070   done
1071   IFS="$ac_save_IFS"
1072
1073 fi
1074   if test "${ac_cv_path_install+set}" = set; then
1075     INSTALL="$ac_cv_path_install"
1076   else
1077     # As a last resort, use the slow shell script.  We don't cache a
1078     # path for INSTALL within a source directory, because that will
1079     # break other packages using the cache if that directory is
1080     # removed, or if the path is relative.
1081     INSTALL="$ac_install_sh"
1082   fi
1083 fi
1084 echo "$ac_t""$INSTALL" 1>&6
1085
1086 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1087 # It thinks the first close brace ends the variable substitution.
1088 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1089
1090 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1091
1092 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1093
1094 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1095 echo "configure:1096: checking whether build environment is sane" >&5
1096 # Just in case
1097 sleep 1
1098 echo timestamp > conftestfile
1099 # Do `set' in a subshell so we don't clobber the current shell's
1100 # arguments.  Must try -L first in case configure is actually a
1101 # symlink; some systems play weird games with the mod time of symlinks
1102 # (eg FreeBSD returns the mod time of the symlink's containing
1103 # directory).
1104 if (
1105    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1106    if test "$*" = "X"; then
1107       # -L didn't work.
1108       set X `ls -t $srcdir/configure conftestfile`
1109    fi
1110    if test "$*" != "X $srcdir/configure conftestfile" \
1111       && test "$*" != "X conftestfile $srcdir/configure"; then
1112
1113       # If neither matched, then we have a broken ls.  This can happen
1114       # if, for instance, CONFIG_SHELL is bash and it inherits a
1115       # broken ls alias from the environment.  This has actually
1116       # happened.  Such a system could not be considered "sane".
1117       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1118 alias in your environment" 1>&2; exit 1; }
1119    fi
1120
1121    test "$2" = conftestfile
1122    )
1123 then
1124    # Ok.
1125    :
1126 else
1127    { echo "configure: error: newly created file is older than distributed files!
1128 Check your system clock" 1>&2; exit 1; }
1129 fi
1130 rm -f conftest*
1131 echo "$ac_t""yes" 1>&6
1132 if test "$program_transform_name" = s,x,x,; then
1133   program_transform_name=
1134 else
1135   # Double any \ or $.  echo might interpret backslashes.
1136   cat <<\EOF_SED > conftestsed
1137 s,\\,\\\\,g; s,\$,$$,g
1138 EOF_SED
1139   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1140   rm -f conftestsed
1141 fi
1142 test "$program_prefix" != NONE &&
1143   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1144 # Use a double $ so make ignores it.
1145 test "$program_suffix" != NONE &&
1146   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1147
1148 # sed with no file args requires a program.
1149 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1150
1151 for ac_prog in mawk gawk nawk awk
1152 do
1153 # Extract the first word of "$ac_prog", so it can be a program name with args.
1154 set dummy $ac_prog; ac_word=$2
1155 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1156 echo "configure:1157: checking for $ac_word" >&5
1157 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1158   echo $ac_n "(cached) $ac_c" 1>&6
1159 else
1160   if test -n "$AWK"; then
1161   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1162 else
1163   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1164   ac_dummy="$PATH"
1165   for ac_dir in $ac_dummy; do
1166     test -z "$ac_dir" && ac_dir=.
1167     if test -f $ac_dir/$ac_word; then
1168       ac_cv_prog_AWK="$ac_prog"
1169       break
1170     fi
1171   done
1172   IFS="$ac_save_ifs"
1173 fi
1174 fi
1175 AWK="$ac_cv_prog_AWK"
1176 if test -n "$AWK"; then
1177   echo "$ac_t""$AWK" 1>&6
1178 else
1179   echo "$ac_t""no" 1>&6
1180 fi
1181
1182 test -n "$AWK" && break
1183 done
1184
1185 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1186 echo "configure:1187: checking whether ${MAKE-make} sets \${MAKE}" >&5
1187 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1188 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1189   echo $ac_n "(cached) $ac_c" 1>&6
1190 else
1191   cat > conftestmake <<\EOF
1192 all:
1193         @echo 'ac_maketemp="${MAKE}"'
1194 EOF
1195 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1196 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1197 if test -n "$ac_maketemp"; then
1198   eval ac_cv_prog_make_${ac_make}_set=yes
1199 else
1200   eval ac_cv_prog_make_${ac_make}_set=no
1201 fi
1202 rm -f conftestmake
1203 fi
1204 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1205   echo "$ac_t""yes" 1>&6
1206   SET_MAKE=
1207 else
1208   echo "$ac_t""no" 1>&6
1209   SET_MAKE="MAKE=${MAKE-make}"
1210 fi
1211
1212
1213
1214 PACKAGE=$OL_PACKAGE
1215
1216 VERSION=$OL_VERSION
1217
1218 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1219   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1220 fi
1221
1222
1223
1224 missing_dir=`cd $ac_aux_dir && pwd`
1225 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1226 echo "configure:1227: checking for working aclocal" >&5
1227 # Run test in a subshell; some versions of sh will print an error if
1228 # an executable is not found, even if stderr is redirected.
1229 # Redirect stdin to placate older versions of autoconf.  Sigh.
1230 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1231    ACLOCAL=aclocal
1232    echo "$ac_t""found" 1>&6
1233 else
1234    ACLOCAL="$missing_dir/missing aclocal"
1235    echo "$ac_t""missing" 1>&6
1236 fi
1237
1238 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1239 echo "configure:1240: checking for working autoconf" >&5
1240 # Run test in a subshell; some versions of sh will print an error if
1241 # an executable is not found, even if stderr is redirected.
1242 # Redirect stdin to placate older versions of autoconf.  Sigh.
1243 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1244    AUTOCONF=autoconf
1245    echo "$ac_t""found" 1>&6
1246 else
1247    AUTOCONF="$missing_dir/missing autoconf"
1248    echo "$ac_t""missing" 1>&6
1249 fi
1250
1251 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1252 echo "configure:1253: checking for working automake" >&5
1253 # Run test in a subshell; some versions of sh will print an error if
1254 # an executable is not found, even if stderr is redirected.
1255 # Redirect stdin to placate older versions of autoconf.  Sigh.
1256 if (automake --version) < /dev/null > /dev/null 2>&1; then
1257    AUTOMAKE=automake
1258    echo "$ac_t""found" 1>&6
1259 else
1260    AUTOMAKE="$missing_dir/missing automake"
1261    echo "$ac_t""missing" 1>&6
1262 fi
1263
1264 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1265 echo "configure:1266: checking for working autoheader" >&5
1266 # Run test in a subshell; some versions of sh will print an error if
1267 # an executable is not found, even if stderr is redirected.
1268 # Redirect stdin to placate older versions of autoconf.  Sigh.
1269 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1270    AUTOHEADER=autoheader
1271    echo "$ac_t""found" 1>&6
1272 else
1273    AUTOHEADER="$missing_dir/missing autoheader"
1274    echo "$ac_t""missing" 1>&6
1275 fi
1276
1277 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1278 echo "configure:1279: checking for working makeinfo" >&5
1279 # Run test in a subshell; some versions of sh will print an error if
1280 # an executable is not found, even if stderr is redirected.
1281 # Redirect stdin to placate older versions of autoconf.  Sigh.
1282 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1283    MAKEINFO=makeinfo
1284    echo "$ac_t""found" 1>&6
1285 else
1286    MAKEINFO="$missing_dir/missing makeinfo"
1287    echo "$ac_t""missing" 1>&6
1288 fi
1289
1290 install_sh="$missing_dir/install-sh"
1291 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1292
1293 for ac_prog in gnutar gtar tar
1294 do
1295 # Extract the first word of "$ac_prog", so it can be a program name with args.
1296 set dummy $ac_prog; ac_word=$2
1297 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1298 echo "configure:1299: checking for $ac_word" >&5
1299 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1300   echo $ac_n "(cached) $ac_c" 1>&6
1301 else
1302   if test -n "$AMTAR"; then
1303   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1304 else
1305   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1306   ac_dummy="$PATH"
1307   for ac_dir in $ac_dummy; do
1308     test -z "$ac_dir" && ac_dir=.
1309     if test -f $ac_dir/$ac_word; then
1310       ac_cv_prog_AMTAR="$ac_prog"
1311       break
1312     fi
1313   done
1314   IFS="$ac_save_ifs"
1315 fi
1316 fi
1317 AMTAR="$ac_cv_prog_AMTAR"
1318 if test -n "$AMTAR"; then
1319   echo "$ac_t""$AMTAR" 1>&6
1320 else
1321   echo "$ac_t""no" 1>&6
1322 fi
1323
1324 test -n "$AMTAR" && break
1325 done
1326
1327
1328 AMTARFLAGS=
1329 if test -n "$AMTAR"; then
1330   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1331         AMTARFLAGS=o
1332   fi
1333 fi
1334
1335 cat >> confdefs.h <<EOF
1336 #define OPENLDAP_PACKAGE "$PACKAGE"
1337 EOF
1338
1339 cat >> confdefs.h <<EOF
1340 #define OPENLDAP_VERSION "$VERSION"
1341 EOF
1342
1343
1344 cat >> confdefs.h <<EOF
1345 #define LDAP_VENDOR_VERSION $OL_API_INC
1346 EOF
1347
1348 cat >> confdefs.h <<EOF
1349 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1350 EOF
1351
1352 cat >> confdefs.h <<EOF
1353 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1354 EOF
1355
1356 cat >> confdefs.h <<EOF
1357 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1358 EOF
1359
1360
1361 OPENLDAP_LIBVERSION=$OL_API_LIB
1362
1363 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1364
1365
1366
1367 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1368 echo "configure:1369: checking configure arguments" >&5
1369
1370
1371 top_builddir=`pwd`
1372
1373 ldap_subdir="/openldap"
1374
1375 # Check whether --with-subdir or --without-subdir was given.
1376 if test "${with_subdir+set}" = set; then
1377   withval="$with_subdir"
1378   case "$withval" in
1379         no) ldap_subdir=""
1380                 ;;
1381         yes)
1382                 ;;
1383         /*|\\*)
1384                 ldap_subdir="$withval"
1385                 ;;
1386         *)
1387                 ldap_subdir="/$withval"
1388                 ;;
1389 esac
1390
1391 fi
1392
1393
1394 # OpenLDAP --enable-debug
1395         # Check whether --enable-debug or --disable-debug was given.
1396 if test "${enable_debug+set}" = set; then
1397   enableval="$enable_debug"
1398   
1399         ol_arg=invalid
1400         for ol_val in auto yes no ; do
1401                 if test "$enableval" = "$ol_val" ; then
1402                         ol_arg="$ol_val"
1403                 fi
1404         done
1405         if test "$ol_arg" = "invalid" ; then
1406                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1407         fi
1408         ol_enable_debug="$ol_arg"
1409
1410 else
1411         ol_enable_debug="yes"
1412 fi
1413 # end --enable-debug
1414 # OpenLDAP --enable-syslog
1415         # Check whether --enable-syslog or --disable-syslog was given.
1416 if test "${enable_syslog+set}" = set; then
1417   enableval="$enable_syslog"
1418   
1419         ol_arg=invalid
1420         for ol_val in auto yes no ; do
1421                 if test "$enableval" = "$ol_val" ; then
1422                         ol_arg="$ol_val"
1423                 fi
1424         done
1425         if test "$ol_arg" = "invalid" ; then
1426                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1427         fi
1428         ol_enable_syslog="$ol_arg"
1429
1430 else
1431         ol_enable_syslog="auto"
1432 fi
1433 # end --enable-syslog
1434 # OpenLDAP --enable-proctitle
1435         # Check whether --enable-proctitle or --disable-proctitle was given.
1436 if test "${enable_proctitle+set}" = set; then
1437   enableval="$enable_proctitle"
1438   
1439         ol_arg=invalid
1440         for ol_val in auto yes no ; do
1441                 if test "$enableval" = "$ol_val" ; then
1442                         ol_arg="$ol_val"
1443                 fi
1444         done
1445         if test "$ol_arg" = "invalid" ; then
1446                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1447         fi
1448         ol_enable_proctitle="$ol_arg"
1449
1450 else
1451         ol_enable_proctitle="yes"
1452 fi
1453 # end --enable-proctitle
1454 # OpenLDAP --enable-cache
1455         # Check whether --enable-cache or --disable-cache was given.
1456 if test "${enable_cache+set}" = set; then
1457   enableval="$enable_cache"
1458   
1459         ol_arg=invalid
1460         for ol_val in auto yes no ; do
1461                 if test "$enableval" = "$ol_val" ; then
1462                         ol_arg="$ol_val"
1463                 fi
1464         done
1465         if test "$ol_arg" = "invalid" ; then
1466                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1467         fi
1468         ol_enable_cache="$ol_arg"
1469
1470 else
1471         ol_enable_cache="no"
1472 fi
1473 # end --enable-cache
1474 # OpenLDAP --enable-referrals
1475         # Check whether --enable-referrals or --disable-referrals was given.
1476 if test "${enable_referrals+set}" = set; then
1477   enableval="$enable_referrals"
1478   
1479         ol_arg=invalid
1480         for ol_val in auto yes no ; do
1481                 if test "$enableval" = "$ol_val" ; then
1482                         ol_arg="$ol_val"
1483                 fi
1484         done
1485         if test "$ol_arg" = "invalid" ; then
1486                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1487         fi
1488         ol_enable_referrals="$ol_arg"
1489
1490 else
1491         ol_enable_referrals="no"
1492 fi
1493 # end --enable-referrals
1494 ol_enable_kbind=${ol_enable_kbind-no}
1495 # OpenLDAP --enable-ipv6
1496         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1497 if test "${enable_ipv6+set}" = set; then
1498   enableval="$enable_ipv6"
1499   
1500         ol_arg=invalid
1501         for ol_val in auto yes no ; do
1502                 if test "$enableval" = "$ol_val" ; then
1503                         ol_arg="$ol_val"
1504                 fi
1505         done
1506         if test "$ol_arg" = "invalid" ; then
1507                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1508         fi
1509         ol_enable_ipv6="$ol_arg"
1510
1511 else
1512         ol_enable_ipv6="auto"
1513 fi
1514 # end --enable-ipv6
1515 # OpenLDAP --enable-local
1516         # Check whether --enable-local or --disable-local was given.
1517 if test "${enable_local+set}" = set; then
1518   enableval="$enable_local"
1519   
1520         ol_arg=invalid
1521         for ol_val in auto yes no ; do
1522                 if test "$enableval" = "$ol_val" ; then
1523                         ol_arg="$ol_val"
1524                 fi
1525         done
1526         if test "$ol_arg" = "invalid" ; then
1527                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1528         fi
1529         ol_enable_local="$ol_arg"
1530
1531 else
1532         ol_enable_local="auto"
1533 fi
1534 # end --enable-local
1535 # OpenLDAP --enable-x_compile
1536         # Check whether --enable-x_compile or --disable-x_compile was given.
1537 if test "${enable_x_compile+set}" = set; then
1538   enableval="$enable_x_compile"
1539   
1540         ol_arg=invalid
1541         for ol_val in yes no ; do
1542                 if test "$enableval" = "$ol_val" ; then
1543                         ol_arg="$ol_val"
1544                 fi
1545         done
1546         if test "$ol_arg" = "invalid" ; then
1547                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1548         fi
1549         ol_enable_x_compile="$ol_arg"
1550
1551 else
1552         ol_enable_x_compile="no"
1553 fi
1554 # end --enable-x_compile
1555
1556
1557 # OpenLDAP --with-cyrus_sasl
1558         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1559 if test "${with_cyrus_sasl+set}" = set; then
1560   withval="$with_cyrus_sasl"
1561   
1562         ol_arg=invalid
1563         for ol_val in auto yes no  ; do
1564                 if test "$withval" = "$ol_val" ; then
1565                         ol_arg="$ol_val"
1566                 fi
1567         done
1568         if test "$ol_arg" = "invalid" ; then
1569                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1570         fi
1571         ol_with_cyrus_sasl="$ol_arg"
1572
1573 else
1574         ol_with_cyrus_sasl="auto"
1575 fi
1576 # end --with-cyrus_sasl
1577
1578 # OpenLDAP --with-fetch
1579         # Check whether --with-fetch or --without-fetch was given.
1580 if test "${with_fetch+set}" = set; then
1581   withval="$with_fetch"
1582   
1583         ol_arg=invalid
1584         for ol_val in auto yes no  ; do
1585                 if test "$withval" = "$ol_val" ; then
1586                         ol_arg="$ol_val"
1587                 fi
1588         done
1589         if test "$ol_arg" = "invalid" ; then
1590                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1591         fi
1592         ol_with_fetch="$ol_arg"
1593
1594 else
1595         ol_with_fetch="auto"
1596 fi
1597 # end --with-fetch
1598
1599 # OpenLDAP --with-kerberos
1600         # Check whether --with-kerberos or --without-kerberos was given.
1601 if test "${with_kerberos+set}" = set; then
1602   withval="$with_kerberos"
1603   
1604         ol_arg=invalid
1605         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1606                 if test "$withval" = "$ol_val" ; then
1607                         ol_arg="$ol_val"
1608                 fi
1609         done
1610         if test "$ol_arg" = "invalid" ; then
1611                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1612         fi
1613         ol_with_kerberos="$ol_arg"
1614
1615 else
1616         ol_with_kerberos="auto"
1617 fi
1618 # end --with-kerberos
1619
1620 # OpenLDAP --with-readline
1621         # Check whether --with-readline or --without-readline was given.
1622 if test "${with_readline+set}" = set; then
1623   withval="$with_readline"
1624   
1625         ol_arg=invalid
1626         for ol_val in auto yes no  ; do
1627                 if test "$withval" = "$ol_val" ; then
1628                         ol_arg="$ol_val"
1629                 fi
1630         done
1631         if test "$ol_arg" = "invalid" ; then
1632                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1633         fi
1634         ol_with_readline="$ol_arg"
1635
1636 else
1637         ol_with_readline="auto"
1638 fi
1639 # end --with-readline
1640
1641 # OpenLDAP --with-threads
1642         # Check whether --with-threads or --without-threads was given.
1643 if test "${with_threads+set}" = set; then
1644   withval="$with_threads"
1645   
1646         ol_arg=invalid
1647         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1648                 if test "$withval" = "$ol_val" ; then
1649                         ol_arg="$ol_val"
1650                 fi
1651         done
1652         if test "$ol_arg" = "invalid" ; then
1653                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1654         fi
1655         ol_with_threads="$ol_arg"
1656
1657 else
1658         ol_with_threads="auto"
1659 fi
1660 # end --with-threads
1661
1662 # OpenLDAP --with-tls
1663         # Check whether --with-tls or --without-tls was given.
1664 if test "${with_tls+set}" = set; then
1665   withval="$with_tls"
1666   
1667         ol_arg=invalid
1668         for ol_val in auto ssleay openssl yes no  ; do
1669                 if test "$withval" = "$ol_val" ; then
1670                         ol_arg="$ol_val"
1671                 fi
1672         done
1673         if test "$ol_arg" = "invalid" ; then
1674                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1675         fi
1676         ol_with_tls="$ol_arg"
1677
1678 else
1679         ol_with_tls="auto"
1680 fi
1681 # end --with-tls
1682
1683 # OpenLDAP --with-yielding_select
1684         # Check whether --with-yielding_select or --without-yielding_select was given.
1685 if test "${with_yielding_select+set}" = set; then
1686   withval="$with_yielding_select"
1687   
1688         ol_arg=invalid
1689         for ol_val in auto yes no manual  ; do
1690                 if test "$withval" = "$ol_val" ; then
1691                         ol_arg="$ol_val"
1692                 fi
1693         done
1694         if test "$ol_arg" = "invalid" ; then
1695                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1696         fi
1697         ol_with_yielding_select="$ol_arg"
1698
1699 else
1700         ol_with_yielding_select="auto"
1701 fi
1702 # end --with-yielding_select
1703
1704
1705
1706 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1707 if test "${with_xxslapdoptions+set}" = set; then
1708   withval="$with_xxslapdoptions"
1709   :
1710 fi
1711
1712 # OpenLDAP --enable-slapd
1713         # Check whether --enable-slapd or --disable-slapd was given.
1714 if test "${enable_slapd+set}" = set; then
1715   enableval="$enable_slapd"
1716   
1717         ol_arg=invalid
1718         for ol_val in auto yes no ; do
1719                 if test "$enableval" = "$ol_val" ; then
1720                         ol_arg="$ol_val"
1721                 fi
1722         done
1723         if test "$ol_arg" = "invalid" ; then
1724                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1725         fi
1726         ol_enable_slapd="$ol_arg"
1727
1728 else
1729         ol_enable_slapd="yes"
1730 fi
1731 # end --enable-slapd
1732 # OpenLDAP --enable-aci
1733         # Check whether --enable-aci or --disable-aci was given.
1734 if test "${enable_aci+set}" = set; then
1735   enableval="$enable_aci"
1736   
1737         ol_arg=invalid
1738         for ol_val in auto yes no ; do
1739                 if test "$enableval" = "$ol_val" ; then
1740                         ol_arg="$ol_val"
1741                 fi
1742         done
1743         if test "$ol_arg" = "invalid" ; then
1744                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1745         fi
1746         ol_enable_aci="$ol_arg"
1747
1748 else
1749         ol_enable_aci="no"
1750 fi
1751 # end --enable-aci
1752 # OpenLDAP --enable-cleartext
1753         # Check whether --enable-cleartext or --disable-cleartext was given.
1754 if test "${enable_cleartext+set}" = set; then
1755   enableval="$enable_cleartext"
1756   
1757         ol_arg=invalid
1758         for ol_val in auto yes no ; do
1759                 if test "$enableval" = "$ol_val" ; then
1760                         ol_arg="$ol_val"
1761                 fi
1762         done
1763         if test "$ol_arg" = "invalid" ; then
1764                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1765         fi
1766         ol_enable_cleartext="$ol_arg"
1767
1768 else
1769         ol_enable_cleartext="yes"
1770 fi
1771 # end --enable-cleartext
1772 # OpenLDAP --enable-crypt
1773         # Check whether --enable-crypt or --disable-crypt was given.
1774 if test "${enable_crypt+set}" = set; then
1775   enableval="$enable_crypt"
1776   
1777         ol_arg=invalid
1778         for ol_val in auto yes no ; do
1779                 if test "$enableval" = "$ol_val" ; then
1780                         ol_arg="$ol_val"
1781                 fi
1782         done
1783         if test "$ol_arg" = "invalid" ; then
1784                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1785         fi
1786         ol_enable_crypt="$ol_arg"
1787
1788 else
1789         ol_enable_crypt="no"
1790 fi
1791 # end --enable-crypt
1792 # OpenLDAP --enable-dynamic
1793         # Check whether --enable-dynamic or --disable-dynamic was given.
1794 if test "${enable_dynamic+set}" = set; then
1795   enableval="$enable_dynamic"
1796   
1797         ol_arg=invalid
1798         for ol_val in auto yes no ; do
1799                 if test "$enableval" = "$ol_val" ; then
1800                         ol_arg="$ol_val"
1801                 fi
1802         done
1803         if test "$ol_arg" = "invalid" ; then
1804                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1805         fi
1806         ol_enable_dynamic="$ol_arg"
1807
1808 else
1809         ol_enable_dynamic="no"
1810 fi
1811 # end --enable-dynamic
1812 # OpenLDAP --enable-kpasswd
1813         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1814 if test "${enable_kpasswd+set}" = set; then
1815   enableval="$enable_kpasswd"
1816   
1817         ol_arg=invalid
1818         for ol_val in auto yes no ; do
1819                 if test "$enableval" = "$ol_val" ; then
1820                         ol_arg="$ol_val"
1821                 fi
1822         done
1823         if test "$ol_arg" = "invalid" ; then
1824                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1825         fi
1826         ol_enable_kpasswd="$ol_arg"
1827
1828 else
1829         ol_enable_kpasswd="no"
1830 fi
1831 # end --enable-kpasswd
1832 # OpenLDAP --enable-lmpasswd
1833         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1834 if test "${enable_lmpasswd+set}" = set; then
1835   enableval="$enable_lmpasswd"
1836   
1837         ol_arg=invalid
1838         for ol_val in auto yes no ; do
1839                 if test "$enableval" = "$ol_val" ; then
1840                         ol_arg="$ol_val"
1841                 fi
1842         done
1843         if test "$ol_arg" = "invalid" ; then
1844                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1845         fi
1846         ol_enable_lmpasswd="$ol_arg"
1847
1848 else
1849         ol_enable_lmpasswd="no"
1850 fi
1851 # end --enable-lmpasswd
1852 # OpenLDAP --enable-spasswd
1853         # Check whether --enable-spasswd or --disable-spasswd was given.
1854 if test "${enable_spasswd+set}" = set; then
1855   enableval="$enable_spasswd"
1856   
1857         ol_arg=invalid
1858         for ol_val in auto yes no ; do
1859                 if test "$enableval" = "$ol_val" ; then
1860                         ol_arg="$ol_val"
1861                 fi
1862         done
1863         if test "$ol_arg" = "invalid" ; then
1864                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1865         fi
1866         ol_enable_spasswd="$ol_arg"
1867
1868 else
1869         ol_enable_spasswd="no"
1870 fi
1871 # end --enable-spasswd
1872 # OpenLDAP --enable-modules
1873         # Check whether --enable-modules or --disable-modules was given.
1874 if test "${enable_modules+set}" = set; then
1875   enableval="$enable_modules"
1876   
1877         ol_arg=invalid
1878         for ol_val in auto yes no ; do
1879                 if test "$enableval" = "$ol_val" ; then
1880                         ol_arg="$ol_val"
1881                 fi
1882         done
1883         if test "$ol_arg" = "invalid" ; then
1884                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1885         fi
1886         ol_enable_modules="$ol_arg"
1887
1888 else
1889         ol_enable_modules="no"
1890 fi
1891 # end --enable-modules
1892 ol_enable_multimaster=${ol_enable_multimaster-no}
1893 # OpenLDAP --enable-phonetic
1894         # Check whether --enable-phonetic or --disable-phonetic was given.
1895 if test "${enable_phonetic+set}" = set; then
1896   enableval="$enable_phonetic"
1897   
1898         ol_arg=invalid
1899         for ol_val in auto yes no ; do
1900                 if test "$enableval" = "$ol_val" ; then
1901                         ol_arg="$ol_val"
1902                 fi
1903         done
1904         if test "$ol_arg" = "invalid" ; then
1905                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1906         fi
1907         ol_enable_phonetic="$ol_arg"
1908
1909 else
1910         ol_enable_phonetic="no"
1911 fi
1912 # end --enable-phonetic
1913 # OpenLDAP --enable-rewrite
1914         # Check whether --enable-rewrite or --disable-rewrite was given.
1915 if test "${enable_rewrite+set}" = set; then
1916   enableval="$enable_rewrite"
1917   
1918         ol_arg=invalid
1919         for ol_val in auto yes no ; do
1920                 if test "$enableval" = "$ol_val" ; then
1921                         ol_arg="$ol_val"
1922                 fi
1923         done
1924         if test "$ol_arg" = "invalid" ; then
1925                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1926         fi
1927         ol_enable_rewrite="$ol_arg"
1928
1929 else
1930         ol_enable_rewrite="no"
1931 fi
1932 # end --enable-rewrite
1933 # OpenLDAP --enable-rlookups
1934         # Check whether --enable-rlookups or --disable-rlookups was given.
1935 if test "${enable_rlookups+set}" = set; then
1936   enableval="$enable_rlookups"
1937   
1938         ol_arg=invalid
1939         for ol_val in auto yes no ; do
1940                 if test "$enableval" = "$ol_val" ; then
1941                         ol_arg="$ol_val"
1942                 fi
1943         done
1944         if test "$ol_arg" = "invalid" ; then
1945                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1946         fi
1947         ol_enable_rlookups="$ol_arg"
1948
1949 else
1950         ol_enable_rlookups="no"
1951 fi
1952 # end --enable-rlookups
1953 # OpenLDAP --enable-slp
1954         # Check whether --enable-slp or --disable-slp was given.
1955 if test "${enable_slp+set}" = set; then
1956   enableval="$enable_slp"
1957   
1958         ol_arg=invalid
1959         for ol_val in auto yes no ; do
1960                 if test "$enableval" = "$ol_val" ; then
1961                         ol_arg="$ol_val"
1962                 fi
1963         done
1964         if test "$ol_arg" = "invalid" ; then
1965                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1966         fi
1967         ol_enable_slp="$ol_arg"
1968
1969 else
1970         ol_enable_slp="no"
1971 fi
1972 # end --enable-slp
1973 # OpenLDAP --enable-wrappers
1974         # Check whether --enable-wrappers or --disable-wrappers was given.
1975 if test "${enable_wrappers+set}" = set; then
1976   enableval="$enable_wrappers"
1977   
1978         ol_arg=invalid
1979         for ol_val in auto yes no ; do
1980                 if test "$enableval" = "$ol_val" ; then
1981                         ol_arg="$ol_val"
1982                 fi
1983         done
1984         if test "$ol_arg" = "invalid" ; then
1985                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1986         fi
1987         ol_enable_wrappers="$ol_arg"
1988
1989 else
1990         ol_enable_wrappers="no"
1991 fi
1992 # end --enable-wrappers
1993
1994 # OpenLDAP --enable-bdb
1995         # Check whether --enable-bdb or --disable-bdb was given.
1996 if test "${enable_bdb+set}" = set; then
1997   enableval="$enable_bdb"
1998   
1999         ol_arg=invalid
2000         for ol_val in auto yes no ; do
2001                 if test "$enableval" = "$ol_val" ; then
2002                         ol_arg="$ol_val"
2003                 fi
2004         done
2005         if test "$ol_arg" = "invalid" ; then
2006                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
2007         fi
2008         ol_enable_bdb="$ol_arg"
2009
2010 else
2011         ol_enable_bdb="yes"
2012 fi
2013 # end --enable-bdb
2014 # OpenLDAP --with-bdb_module
2015         # Check whether --with-bdb_module or --without-bdb_module was given.
2016 if test "${with_bdb_module+set}" = set; then
2017   withval="$with_bdb_module"
2018   
2019         ol_arg=invalid
2020         for ol_val in static dynamic ; do
2021                 if test "$withval" = "$ol_val" ; then
2022                         ol_arg="$ol_val"
2023                 fi
2024         done
2025         if test "$ol_arg" = "invalid" ; then
2026                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
2027         fi
2028         ol_with_bdb_module="$ol_arg"
2029
2030 else
2031         ol_with_bdb_module="static"
2032 fi
2033 # end --with-bdb_module
2034
2035 # OpenLDAP --enable-dnssrv
2036         # Check whether --enable-dnssrv or --disable-dnssrv was given.
2037 if test "${enable_dnssrv+set}" = set; then
2038   enableval="$enable_dnssrv"
2039   
2040         ol_arg=invalid
2041         for ol_val in auto yes no ; do
2042                 if test "$enableval" = "$ol_val" ; then
2043                         ol_arg="$ol_val"
2044                 fi
2045         done
2046         if test "$ol_arg" = "invalid" ; then
2047                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
2048         fi
2049         ol_enable_dnssrv="$ol_arg"
2050
2051 else
2052         ol_enable_dnssrv="no"
2053 fi
2054 # end --enable-dnssrv
2055 # OpenLDAP --with-dnssrv_module
2056         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
2057 if test "${with_dnssrv_module+set}" = set; then
2058   withval="$with_dnssrv_module"
2059   
2060         ol_arg=invalid
2061         for ol_val in static dynamic ; do
2062                 if test "$withval" = "$ol_val" ; then
2063                         ol_arg="$ol_val"
2064                 fi
2065         done
2066         if test "$ol_arg" = "invalid" ; then
2067                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
2068         fi
2069         ol_with_dnssrv_module="$ol_arg"
2070
2071 else
2072         ol_with_dnssrv_module="static"
2073 fi
2074 # end --with-dnssrv_module
2075
2076 # OpenLDAP --enable-ldap
2077         # Check whether --enable-ldap or --disable-ldap was given.
2078 if test "${enable_ldap+set}" = set; then
2079   enableval="$enable_ldap"
2080   
2081         ol_arg=invalid
2082         for ol_val in auto yes no ; do
2083                 if test "$enableval" = "$ol_val" ; then
2084                         ol_arg="$ol_val"
2085                 fi
2086         done
2087         if test "$ol_arg" = "invalid" ; then
2088                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2089         fi
2090         ol_enable_ldap="$ol_arg"
2091
2092 else
2093         ol_enable_ldap="no"
2094 fi
2095 # end --enable-ldap
2096 # OpenLDAP --with-ldap_module
2097         # Check whether --with-ldap_module or --without-ldap_module was given.
2098 if test "${with_ldap_module+set}" = set; then
2099   withval="$with_ldap_module"
2100   
2101         ol_arg=invalid
2102         for ol_val in static dynamic ; do
2103                 if test "$withval" = "$ol_val" ; then
2104                         ol_arg="$ol_val"
2105                 fi
2106         done
2107         if test "$ol_arg" = "invalid" ; then
2108                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
2109         fi
2110         ol_with_ldap_module="$ol_arg"
2111
2112 else
2113         ol_with_ldap_module="static"
2114 fi
2115 # end --with-ldap_module
2116
2117 # OpenLDAP --enable-ldbm
2118         # Check whether --enable-ldbm or --disable-ldbm was given.
2119 if test "${enable_ldbm+set}" = set; then
2120   enableval="$enable_ldbm"
2121   
2122         ol_arg=invalid
2123         for ol_val in auto yes no ; do
2124                 if test "$enableval" = "$ol_val" ; then
2125                         ol_arg="$ol_val"
2126                 fi
2127         done
2128         if test "$ol_arg" = "invalid" ; then
2129                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2130         fi
2131         ol_enable_ldbm="$ol_arg"
2132
2133 else
2134         ol_enable_ldbm="no"
2135 fi
2136 # end --enable-ldbm
2137 # OpenLDAP --with-ldbm_api
2138         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2139 if test "${with_ldbm_api+set}" = set; then
2140   withval="$with_ldbm_api"
2141   
2142         ol_arg=invalid
2143         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2144                 if test "$withval" = "$ol_val" ; then
2145                         ol_arg="$ol_val"
2146                 fi
2147         done
2148         if test "$ol_arg" = "invalid" ; then
2149                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2150         fi
2151         ol_with_ldbm_api="$ol_arg"
2152
2153 else
2154         ol_with_ldbm_api="auto"
2155 fi
2156 # end --with-ldbm_api
2157
2158 # OpenLDAP --with-ldbm_module
2159         # Check whether --with-ldbm_module or --without-ldbm_module was given.
2160 if test "${with_ldbm_module+set}" = set; then
2161   withval="$with_ldbm_module"
2162   
2163         ol_arg=invalid
2164         for ol_val in static dynamic ; do
2165                 if test "$withval" = "$ol_val" ; then
2166                         ol_arg="$ol_val"
2167                 fi
2168         done
2169         if test "$ol_arg" = "invalid" ; then
2170                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2171         fi
2172         ol_with_ldbm_module="$ol_arg"
2173
2174 else
2175         ol_with_ldbm_module="static"
2176 fi
2177 # end --with-ldbm_module
2178
2179 # OpenLDAP --with-ldbm_type
2180         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2181 if test "${with_ldbm_type+set}" = set; then
2182   withval="$with_ldbm_type"
2183   
2184         ol_arg=invalid
2185         for ol_val in auto btree hash ; do
2186                 if test "$withval" = "$ol_val" ; then
2187                         ol_arg="$ol_val"
2188                 fi
2189         done
2190         if test "$ol_arg" = "invalid" ; then
2191                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2192         fi
2193         ol_with_ldbm_type="$ol_arg"
2194
2195 else
2196         ol_with_ldbm_type="auto"
2197 fi
2198 # end --with-ldbm_type
2199
2200 # OpenLDAP --enable-meta
2201         # Check whether --enable-meta or --disable-meta was given.
2202 if test "${enable_meta+set}" = set; then
2203   enableval="$enable_meta"
2204   
2205         ol_arg=invalid
2206         for ol_val in auto yes no ; do
2207                 if test "$enableval" = "$ol_val" ; then
2208                         ol_arg="$ol_val"
2209                 fi
2210         done
2211         if test "$ol_arg" = "invalid" ; then
2212                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2213         fi
2214         ol_enable_meta="$ol_arg"
2215
2216 else
2217         ol_enable_meta="no"
2218 fi
2219 # end --enable-meta
2220 # OpenLDAP --with-meta_module
2221         # Check whether --with-meta_module or --without-meta_module was given.
2222 if test "${with_meta_module+set}" = set; then
2223   withval="$with_meta_module"
2224   
2225         ol_arg=invalid
2226         for ol_val in static dynamic ; do
2227                 if test "$withval" = "$ol_val" ; then
2228                         ol_arg="$ol_val"
2229                 fi
2230         done
2231         if test "$ol_arg" = "invalid" ; then
2232                 { echo "configure: error: bad value $withval for --with-meta_module" 1>&2; exit 1; }
2233         fi
2234         ol_with_meta_module="$ol_arg"
2235
2236 else
2237         ol_with_meta_module="static"
2238 fi
2239 # end --with-meta_module
2240
2241 # OpenLDAP --enable-monitor
2242         # Check whether --enable-monitor or --disable-monitor was given.
2243 if test "${enable_monitor+set}" = set; then
2244   enableval="$enable_monitor"
2245   
2246         ol_arg=invalid
2247         for ol_val in auto yes no ; do
2248                 if test "$enableval" = "$ol_val" ; then
2249                         ol_arg="$ol_val"
2250                 fi
2251         done
2252         if test "$ol_arg" = "invalid" ; then
2253                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2254         fi
2255         ol_enable_monitor="$ol_arg"
2256
2257 else
2258         ol_enable_monitor="no"
2259 fi
2260 # end --enable-monitor
2261 # OpenLDAP --with-monitor_module
2262         # Check whether --with-monitor_module or --without-monitor_module was given.
2263 if test "${with_monitor_module+set}" = set; then
2264   withval="$with_monitor_module"
2265   
2266         ol_arg=invalid
2267         for ol_val in static dynamic ; do
2268                 if test "$withval" = "$ol_val" ; then
2269                         ol_arg="$ol_val"
2270                 fi
2271         done
2272         if test "$ol_arg" = "invalid" ; then
2273                 { echo "configure: error: bad value $withval for --with-monitor_module" 1>&2; exit 1; }
2274         fi
2275         ol_with_monitor_module="$ol_arg"
2276
2277 else
2278         ol_with_monitor_module="static"
2279 fi
2280 # end --with-monitor_module
2281
2282 # OpenLDAP --enable-null
2283         # Check whether --enable-null or --disable-null was given.
2284 if test "${enable_null+set}" = set; then
2285   enableval="$enable_null"
2286   
2287         ol_arg=invalid
2288         for ol_val in auto yes no ; do
2289                 if test "$enableval" = "$ol_val" ; then
2290                         ol_arg="$ol_val"
2291                 fi
2292         done
2293         if test "$ol_arg" = "invalid" ; then
2294                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2295         fi
2296         ol_enable_null="$ol_arg"
2297
2298 else
2299         ol_enable_null="no"
2300 fi
2301 # end --enable-null
2302 # OpenLDAP --with-null_module
2303         # Check whether --with-null_module or --without-null_module was given.
2304 if test "${with_null_module+set}" = set; then
2305   withval="$with_null_module"
2306   
2307         ol_arg=invalid
2308         for ol_val in static dynamic ; do
2309                 if test "$withval" = "$ol_val" ; then
2310                         ol_arg="$ol_val"
2311                 fi
2312         done
2313         if test "$ol_arg" = "invalid" ; then
2314                 { echo "configure: error: bad value $withval for --with-null_module" 1>&2; exit 1; }
2315         fi
2316         ol_with_null_module="$ol_arg"
2317
2318 else
2319         ol_with_null_module="static"
2320 fi
2321 # end --with-null_module
2322
2323 # OpenLDAP --enable-passwd
2324         # Check whether --enable-passwd or --disable-passwd was given.
2325 if test "${enable_passwd+set}" = set; then
2326   enableval="$enable_passwd"
2327   
2328         ol_arg=invalid
2329         for ol_val in auto yes no ; do
2330                 if test "$enableval" = "$ol_val" ; then
2331                         ol_arg="$ol_val"
2332                 fi
2333         done
2334         if test "$ol_arg" = "invalid" ; then
2335                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2336         fi
2337         ol_enable_passwd="$ol_arg"
2338
2339 else
2340         ol_enable_passwd="no"
2341 fi
2342 # end --enable-passwd
2343 # OpenLDAP --with-passwd_module
2344         # Check whether --with-passwd_module or --without-passwd_module was given.
2345 if test "${with_passwd_module+set}" = set; then
2346   withval="$with_passwd_module"
2347   
2348         ol_arg=invalid
2349         for ol_val in static dynamic ; do
2350                 if test "$withval" = "$ol_val" ; then
2351                         ol_arg="$ol_val"
2352                 fi
2353         done
2354         if test "$ol_arg" = "invalid" ; then
2355                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2356         fi
2357         ol_with_passwd_module="$ol_arg"
2358
2359 else
2360         ol_with_passwd_module="static"
2361 fi
2362 # end --with-passwd_module
2363
2364 # OpenLDAP --enable-perl
2365         # Check whether --enable-perl or --disable-perl was given.
2366 if test "${enable_perl+set}" = set; then
2367   enableval="$enable_perl"
2368   
2369         ol_arg=invalid
2370         for ol_val in auto yes no ; do
2371                 if test "$enableval" = "$ol_val" ; then
2372                         ol_arg="$ol_val"
2373                 fi
2374         done
2375         if test "$ol_arg" = "invalid" ; then
2376                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2377         fi
2378         ol_enable_perl="$ol_arg"
2379
2380 else
2381         ol_enable_perl="no"
2382 fi
2383 # end --enable-perl
2384 # OpenLDAP --with-perl_module
2385         # Check whether --with-perl_module or --without-perl_module was given.
2386 if test "${with_perl_module+set}" = set; then
2387   withval="$with_perl_module"
2388   
2389         ol_arg=invalid
2390         for ol_val in static dynamic ; do
2391                 if test "$withval" = "$ol_val" ; then
2392                         ol_arg="$ol_val"
2393                 fi
2394         done
2395         if test "$ol_arg" = "invalid" ; then
2396                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2397         fi
2398         ol_with_perl_module="$ol_arg"
2399
2400 else
2401         ol_with_perl_module="static"
2402 fi
2403 # end --with-perl_module
2404
2405 # OpenLDAP --enable-shell
2406         # Check whether --enable-shell or --disable-shell was given.
2407 if test "${enable_shell+set}" = set; then
2408   enableval="$enable_shell"
2409   
2410         ol_arg=invalid
2411         for ol_val in auto yes no ; do
2412                 if test "$enableval" = "$ol_val" ; then
2413                         ol_arg="$ol_val"
2414                 fi
2415         done
2416         if test "$ol_arg" = "invalid" ; then
2417                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2418         fi
2419         ol_enable_shell="$ol_arg"
2420
2421 else
2422         ol_enable_shell="no"
2423 fi
2424 # end --enable-shell
2425 # OpenLDAP --with-shell_module
2426         # Check whether --with-shell_module or --without-shell_module was given.
2427 if test "${with_shell_module+set}" = set; then
2428   withval="$with_shell_module"
2429   
2430         ol_arg=invalid
2431         for ol_val in static dynamic ; do
2432                 if test "$withval" = "$ol_val" ; then
2433                         ol_arg="$ol_val"
2434                 fi
2435         done
2436         if test "$ol_arg" = "invalid" ; then
2437                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2438         fi
2439         ol_with_shell_module="$ol_arg"
2440
2441 else
2442         ol_with_shell_module="static"
2443 fi
2444 # end --with-shell_module
2445
2446 # OpenLDAP --enable-sql
2447         # Check whether --enable-sql or --disable-sql was given.
2448 if test "${enable_sql+set}" = set; then
2449   enableval="$enable_sql"
2450   
2451         ol_arg=invalid
2452         for ol_val in auto yes no ; do
2453                 if test "$enableval" = "$ol_val" ; then
2454                         ol_arg="$ol_val"
2455                 fi
2456         done
2457         if test "$ol_arg" = "invalid" ; then
2458                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2459         fi
2460         ol_enable_sql="$ol_arg"
2461
2462 else
2463         ol_enable_sql="no"
2464 fi
2465 # end --enable-sql
2466 # OpenLDAP --with-sql_module
2467         # Check whether --with-sql_module or --without-sql_module was given.
2468 if test "${with_sql_module+set}" = set; then
2469   withval="$with_sql_module"
2470   
2471         ol_arg=invalid
2472         for ol_val in static dynamic ; do
2473                 if test "$withval" = "$ol_val" ; then
2474                         ol_arg="$ol_val"
2475                 fi
2476         done
2477         if test "$ol_arg" = "invalid" ; then
2478                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2479         fi
2480         ol_with_sql_module="$ol_arg"
2481
2482 else
2483         ol_with_sql_module="static"
2484 fi
2485 # end --with-sql_module
2486
2487 # OpenLDAP --enable-tcl
2488         # Check whether --enable-tcl or --disable-tcl was given.
2489 if test "${enable_tcl+set}" = set; then
2490   enableval="$enable_tcl"
2491   
2492         ol_arg=invalid
2493         for ol_val in auto yes no ; do
2494                 if test "$enableval" = "$ol_val" ; then
2495                         ol_arg="$ol_val"
2496                 fi
2497         done
2498         if test "$ol_arg" = "invalid" ; then
2499                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2500         fi
2501         ol_enable_tcl="$ol_arg"
2502
2503 else
2504         ol_enable_tcl="no"
2505 fi
2506 # end --enable-tcl
2507 # OpenLDAP --with-tcl_module
2508         # Check whether --with-tcl_module or --without-tcl_module was given.
2509 if test "${with_tcl_module+set}" = set; then
2510   withval="$with_tcl_module"
2511   
2512         ol_arg=invalid
2513         for ol_val in static dynamic ; do
2514                 if test "$withval" = "$ol_val" ; then
2515                         ol_arg="$ol_val"
2516                 fi
2517         done
2518         if test "$ol_arg" = "invalid" ; then
2519                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2520         fi
2521         ol_with_tcl_module="$ol_arg"
2522
2523 else
2524         ol_with_tcl_module="static"
2525 fi
2526 # end --with-tcl_module
2527
2528
2529 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2530 if test "${with_xxslurpdoptions+set}" = set; then
2531   withval="$with_xxslurpdoptions"
2532   :
2533 fi
2534
2535 # OpenLDAP --enable-slurpd
2536         # Check whether --enable-slurpd or --disable-slurpd was given.
2537 if test "${enable_slurpd+set}" = set; then
2538   enableval="$enable_slurpd"
2539   
2540         ol_arg=invalid
2541         for ol_val in auto yes no ; do
2542                 if test "$enableval" = "$ol_val" ; then
2543                         ol_arg="$ol_val"
2544                 fi
2545         done
2546         if test "$ol_arg" = "invalid" ; then
2547                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2548         fi
2549         ol_enable_slurpd="$ol_arg"
2550
2551 else
2552         ol_enable_slurpd="auto"
2553 fi
2554 # end --enable-slurpd
2555
2556 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2557 if test "${with_xxliboptions+set}" = set; then
2558   withval="$with_xxliboptions"
2559   :
2560 fi
2561
2562 # Check whether --enable-static or --disable-static was given.
2563 if test "${enable_static+set}" = set; then
2564   enableval="$enable_static"
2565   p=${PACKAGE-default}
2566 case $enableval in
2567 yes) enable_static=yes ;;
2568 no) enable_static=no ;;
2569 *)
2570   enable_static=no
2571   # Look at the argument we got.  We use all the common list separators.
2572   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2573   for pkg in $enableval; do
2574     if test "X$pkg" = "X$p"; then
2575       enable_static=yes
2576     fi
2577   done
2578   IFS="$ac_save_ifs"
2579   ;;
2580 esac
2581 else
2582   enable_static=yes
2583 fi
2584
2585 # Check whether --enable-shared or --disable-shared was given.
2586 if test "${enable_shared+set}" = set; then
2587   enableval="$enable_shared"
2588   p=${PACKAGE-default}
2589 case $enableval in
2590 yes) enable_shared=yes ;;
2591 no) enable_shared=no ;;
2592 *)
2593   enable_shared=no
2594   # Look at the argument we got.  We use all the common list separators.
2595   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2596   for pkg in $enableval; do
2597     if test "X$pkg" = "X$p"; then
2598       enable_shared=yes
2599     fi
2600   done
2601   IFS="$ac_save_ifs"
2602   ;;
2603 esac
2604 else
2605   enable_shared=yes
2606 fi
2607
2608
2609
2610 # validate options
2611 if test $ol_enable_slapd = no ; then
2612                 if test $ol_enable_bdb = yes ; then
2613                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2614         fi
2615         if test $ol_enable_dnssrv = yes ; then
2616                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2617         fi
2618         if test $ol_enable_ldap = yes ; then
2619                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2620         fi
2621         if test $ol_enable_ldbm = yes ; then
2622                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2623         fi
2624         if test $ol_enable_meta = yes ; then
2625                 echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2
2626         fi
2627         if test $ol_enable_monitor = yes ; then
2628                 echo "configure: warning: slapd disabled, ignoring --enable-monitor argument" 1>&2
2629         fi
2630         if test $ol_enable_null = yes ; then
2631                 echo "configure: warning: slapd disabled, ignoring --enable-null argument" 1>&2
2632         fi
2633         if test $ol_enable_passwd = yes ; then
2634                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2635         fi
2636         if test $ol_enable_perl = yes ; then
2637                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2638         fi
2639         if test $ol_enable_shell = yes ; then
2640                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2641         fi
2642         if test $ol_enable_tcl = yes ; then
2643                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2644         fi
2645         if test $ol_enable_sql = yes ; then
2646                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2647         fi
2648         if test $ol_enable_modules = yes ; then
2649                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2650         fi
2651         if test $ol_enable_multimaster = yes ; then
2652                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2653         fi
2654         if test $ol_enable_wrappers = yes ; then
2655                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2656         fi
2657         if test $ol_enable_phonetic = yes ; then
2658                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2659         fi
2660         if test $ol_enable_rlookups = yes ; then
2661                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2662         fi
2663         if test $ol_enable_aci = yes ; then
2664                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2665         fi
2666         if test $ol_with_ldbm_api != auto ; then
2667                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2668         fi
2669         if test $ol_with_ldbm_type != auto ; then
2670                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2671         fi
2672         if test $ol_with_bdb_module != static ; then
2673                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2674         fi
2675         if test $ol_with_dnssrv_module != static ; then
2676                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2677         fi
2678         if test $ol_with_ldap_module != static ; then
2679                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2680         fi
2681         if test $ol_with_ldbm_module != static ; then
2682                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2683         fi
2684         if test $ol_with_meta_module != static ; then
2685                 echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2
2686         fi
2687         if test $ol_with_monitor_module != static ; then
2688                 echo "configure: warning: slapd disabled, ignoring --with-monitor-module argument" 1>&2
2689         fi
2690         if test $ol_with_null_module != static ; then
2691                 echo "configure: warning: slapd disabled, ignoring --with-null-module argument" 1>&2
2692         fi
2693         if test $ol_with_passwd_module != static ; then
2694                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2695         fi
2696         if test $ol_with_perl_module != static ; then
2697                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2698         fi
2699         if test $ol_with_shell_module != static ; then
2700                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2701         fi
2702         if test $ol_with_tcl_module != static ; then
2703                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2704         fi
2705         if test $ol_with_sql_module != static ; then
2706                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2707         fi
2708         if test $ol_enable_slurpd = yes ; then
2709                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2710         fi
2711         if test $ol_enable_rewrite = yes ; then
2712                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2713         fi
2714
2715         # force settings to no
2716         ol_enable_bdb=no
2717         ol_enable_dnssrv=no
2718         ol_enable_ldap=no
2719         ol_enable_ldbm=no
2720         ol_enable_meta=no
2721         ol_enable_monitor=no
2722         ol_enable_null=no
2723         ol_enable_passwd=no
2724         ol_enable_perl=no
2725         ol_enable_shell=no
2726         ol_enable_tcl=no
2727         ol_enable_sql=no
2728
2729         ol_enable_modules=no
2730         ol_enable_multimaster=no
2731         ol_enable_phonetic=no
2732         ol_enable_rlookups=no
2733         ol_enable_aci=no
2734         ol_enable_wrappers=no
2735         ol_enable_dynamic=no
2736
2737         ol_with_ldbm_api=no
2738         ol_with_ldbm_type=no
2739
2740         ol_with_bdb_module=static
2741         ol_with_dnssrv_module=static
2742         ol_with_ldap_module=static
2743         ol_with_ldbm_module=static
2744         ol_with_meta_module=static
2745         ol_with_monitor_module=static
2746         ol_with_null_module=static
2747         ol_with_passwd_module=static
2748         ol_with_perl_module=static
2749         ol_with_shell_module=static
2750         ol_with_tcl_module=static
2751         ol_with_sql_module=static
2752
2753         ol_enable_slurpd=no
2754
2755         ol_enable_rewrite=no
2756
2757 elif test $ol_enable_ldbm = no ; then
2758         
2759         if test $ol_with_ldbm_api != auto ; then
2760                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2761         fi
2762
2763         if test $ol_with_ldbm_type != auto ; then
2764                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2765         fi
2766
2767         if test $ol_with_ldbm_module != static ; then
2768                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2769         fi
2770
2771         if test $ol_enable_modules != yes -a \
2772                 $ol_enable_bdb = no -a \
2773                 $ol_enable_dnssrv = no -a \
2774                 $ol_enable_ldap = no -a \
2775                 $ol_enable_meta = no -a \
2776                 $ol_enable_monitor = no -a \
2777                 $ol_enable_null = no -a \
2778                 $ol_enable_passwd = no -a \
2779                 $ol_enable_perl = no -a \
2780                 $ol_enable_shell = no -a \
2781                 $ol_enable_sql = no -a \
2782                 $ol_enable_tcl = no ; then
2783
2784                 if test $ol_enable_slapd = yes ; then
2785                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2786                 else
2787                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2788                         ol_enable_slapd=no
2789                 fi
2790         fi
2791
2792         ol_with_ldbm_api=no
2793         ol_with_ldbm_type=no
2794         ol_with_ldbm_module=static
2795
2796         if test $ol_enable_bdb != no ; then
2797                 ol_with_ldbm_api=berkeley
2798         fi
2799
2800 else
2801                 if test $ol_with_ldbm_api = gdbm -a \
2802                 $ol_with_ldbm_type = btree ; then
2803                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2804         fi
2805         if test $ol_with_ldbm_api = mdbm -a \
2806                 $ol_with_ldbm_type = btree ; then
2807                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2808         fi
2809         if test $ol_with_ldbm_api = ndbm -a \
2810                 $ol_with_ldbm_type = btree ; then
2811                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2812         fi
2813
2814         if test $ol_enable_bdb = yes ; then
2815                 if test $ol_with_ldbm_api = auto ; then
2816                         ol_with_ldbm_api=berkeley
2817                 elif test $ol_with_ldbm_api != berkeley ; then
2818                         { echo "configure: error: LDBM API not compatible with BDB" 1>&2; exit 1; }
2819                 fi
2820
2821         elif test $ol_enable_bdb = auto ; then
2822                 if test $ol_with_ldbm_api != berkeley \
2823                         -o $ol_with_ldbm_api != auto ; then
2824                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2825                         ol_enable_bdb=no
2826                 fi
2827         fi
2828 fi
2829
2830 if test $ol_enable_slurpd = yes ; then
2831                 if test $ol_with_threads = no ; then
2832                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2833         fi
2834 fi
2835
2836 if test $ol_enable_lmpasswd = yes ; then
2837         if test $ol_with_tls = no ; then
2838                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2839         fi
2840 fi
2841
2842 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2843         if test $ol_with_kerberos = no ; then
2844                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2845         elif test $ol_with_kerberos = auto ; then
2846                 ol_with_kerberos=yes
2847         fi
2848
2849 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2850         if test $ol_with_kerberos = auto ; then
2851                 ol_with_kerberos=no
2852         elif test $ol_with_kerberos != no ; then
2853                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2854                 ol_with_kerberos=no
2855         fi
2856 fi
2857
2858 if test $ol_enable_spasswd = yes ; then
2859         if test $ol_with_cyrus_sasl = no ; then
2860                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2861         fi
2862         ol_with_cyrus_sasl=yes
2863 fi
2864
2865 echo "$ac_t""done" 1>&6
2866
2867 LDAP_LIBS=
2868 LDIF_LIBS=
2869 LDBM_LIBS=
2870 LTHREAD_LIBS=
2871 LUTIL_LIBS=
2872
2873 SLAPD_LIBS=
2874 SLURPD_LIBS=
2875
2876 BUILD_SLAPD=no
2877 BUILD_SLURPD=no
2878
2879 BUILD_THREAD=no
2880
2881 BUILD_BDB=no
2882 BUILD_DNSSRV=no
2883 BUILD_LDAP=no
2884 BUILD_LDBM=no
2885 BUILD_META=no
2886 BUILD_MONITOR=no
2887 BUILD_NULL=no
2888 BUILD_PASSWD=no
2889 BUILD_PERL=no
2890 BUILD_SHELL=no
2891 BUILD_SQL=no
2892 BUILD_TCL=no
2893
2894 BUILD_BDB_DYNAMIC=static
2895 BUILD_DNSSRV_DYNAMIC=static
2896 BUILD_LDAP_DYNAMIC=static
2897 BUILD_LDBM_DYNAMIC=static
2898 BUILD_META_DYNAMIC=static
2899 BUILD_MONITOR_DYNAMIC=static
2900 BUILD_NULL_DYNAMIC=static
2901 BUILD_PASSWD_DYNAMIC=static
2902 BUILD_PERL_DYNAMIC=static
2903 BUILD_SHELL_DYNAMIC=static
2904 BUILD_TCL_DYNAMIC=static
2905 BUILD_SQL_DYNAMIC=static
2906
2907 SLAPD_MODULES_LDFLAGS=
2908 SLAPD_MODULES_CPPFLAGS=
2909
2910 SLAPD_STATIC_BACKENDS=
2911 SLAPD_DYNAMIC_BACKENDS=
2912
2913 SLAPD_PERL_LDFLAGS=
2914 MOD_PERL_LDFLAGS=
2915 PERL_CPPFLAGS=
2916
2917 SLAPD_SQL_LDFLAGS=
2918 SLAPD_SQL_LIBS=
2919 SLAPD_SQL_INCLUDES=
2920
2921 MOD_TCL_LIB=
2922 KRB4_LIBS=
2923 KRB5_LIBS=
2924 READLINE_LIBS=
2925 SASL_LIBS=
2926 TERMCAP_LIBS=
2927 TLS_LIBS=
2928 MODULES_LIBS=
2929 AUTH_LIBS=
2930
2931 SLAPD_SLP_LIBS=
2932
2933
2934 # Find a good install program.  We prefer a C program (faster),
2935 # so one script is as good as another.  But avoid the broken or
2936 # incompatible versions:
2937 # SysV /etc/install, /usr/sbin/install
2938 # SunOS /usr/etc/install
2939 # IRIX /sbin/install
2940 # AIX /bin/install
2941 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2942 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2943 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2944 # ./install, which can be erroneously created by make from ./install.sh.
2945 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2946 echo "configure:2947: checking for a BSD compatible install" >&5
2947 if test -z "$INSTALL"; then
2948 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2949   echo $ac_n "(cached) $ac_c" 1>&6
2950 else
2951     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2952   for ac_dir in $PATH; do
2953     # Account for people who put trailing slashes in PATH elements.
2954     case "$ac_dir/" in
2955     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2956     *)
2957       # OSF1 and SCO ODT 3.0 have their own names for install.
2958       # Don't use installbsd from OSF since it installs stuff as root
2959       # by default.
2960       for ac_prog in ginstall scoinst install; do
2961         if test -f $ac_dir/$ac_prog; then
2962           if test $ac_prog = install &&
2963             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2964             # AIX install.  It has an incompatible calling convention.
2965             :
2966           elif test $ac_prog = install &&
2967             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2968             # program-specific install script used by HP pwplus--don't use.
2969             :
2970           else
2971             ac_cv_path_install="$ac_dir/$ac_prog -c"
2972             break 2
2973           fi
2974         fi
2975       done
2976       ;;
2977     esac
2978   done
2979   IFS="$ac_save_IFS"
2980
2981 fi
2982   if test "${ac_cv_path_install+set}" = set; then
2983     INSTALL="$ac_cv_path_install"
2984   else
2985     # As a last resort, use the slow shell script.  We don't cache a
2986     # path for INSTALL within a source directory, because that will
2987     # break other packages using the cache if that directory is
2988     # removed, or if the path is relative.
2989     INSTALL="$ac_install_sh"
2990   fi
2991 fi
2992 echo "$ac_t""$INSTALL" 1>&6
2993
2994 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2995 # It thinks the first close brace ends the variable substitution.
2996 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2997
2998 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2999
3000 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3001
3002
3003 cat >> confdefs.h <<\EOF
3004 #define HAVE_MKVERSION 1
3005 EOF
3006
3007
3008
3009
3010 ol_aix_threads=no
3011 case "$target" in
3012 *-*-aix*)       if test -z "$CC" ; then
3013                 case "$ol_with_threads" in
3014                 auto | yes |  posix) ol_aix_threads=yes ;;
3015                 esac
3016         fi
3017 ;;
3018 esac
3019
3020 if test $ol_aix_threads = yes ; then
3021         if test -z "${CC}" ; then
3022                 for ac_prog in cc_r xlc_r cc
3023 do
3024 # Extract the first word of "$ac_prog", so it can be a program name with args.
3025 set dummy $ac_prog; ac_word=$2
3026 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3027 echo "configure:3028: checking for $ac_word" >&5
3028 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3029   echo $ac_n "(cached) $ac_c" 1>&6
3030 else
3031   if test -n "$CC"; then
3032   ac_cv_prog_CC="$CC" # Let the user override the test.
3033 else
3034   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3035   ac_dummy="$PATH"
3036   for ac_dir in $ac_dummy; do
3037     test -z "$ac_dir" && ac_dir=.
3038     if test -f $ac_dir/$ac_word; then
3039       ac_cv_prog_CC="$ac_prog"
3040       break
3041     fi
3042   done
3043   IFS="$ac_save_ifs"
3044 fi
3045 fi
3046 CC="$ac_cv_prog_CC"
3047 if test -n "$CC"; then
3048   echo "$ac_t""$CC" 1>&6
3049 else
3050   echo "$ac_t""no" 1>&6
3051 fi
3052
3053 test -n "$CC" && break
3054 done
3055
3056
3057                 if test "$CC" = cc ; then
3058                                                 if test $ol_with_threads != auto ; then
3059                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
3060                         else
3061                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
3062                         fi
3063                         ol_with_threads=no
3064                 fi
3065         fi
3066
3067         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3068                 ol_with_threads=posix
3069                 ol_cv_pthread_create=yes
3070         fi
3071 fi
3072
3073 if test -z "${CC}"; then
3074         for ac_prog in cc gcc
3075 do
3076 # Extract the first word of "$ac_prog", so it can be a program name with args.
3077 set dummy $ac_prog; ac_word=$2
3078 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3079 echo "configure:3080: checking for $ac_word" >&5
3080 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3081   echo $ac_n "(cached) $ac_c" 1>&6
3082 else
3083   if test -n "$CC"; then
3084   ac_cv_prog_CC="$CC" # Let the user override the test.
3085 else
3086   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3087   ac_dummy="$PATH"
3088   for ac_dir in $ac_dummy; do
3089     test -z "$ac_dir" && ac_dir=.
3090     if test -f $ac_dir/$ac_word; then
3091       ac_cv_prog_CC="$ac_prog"
3092       break
3093     fi
3094   done
3095   IFS="$ac_save_ifs"
3096 fi
3097 fi
3098 CC="$ac_cv_prog_CC"
3099 if test -n "$CC"; then
3100   echo "$ac_t""$CC" 1>&6
3101 else
3102   echo "$ac_t""no" 1>&6
3103 fi
3104
3105 test -n "$CC" && break
3106 done
3107 test -n "$CC" || CC="missing"
3108
3109
3110         if test "${CC}" = "missing" ; then
3111                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
3112         fi
3113 fi
3114
3115 if test -z "${AR}"; then
3116         for ac_prog in ar gar
3117 do
3118 # Extract the first word of "$ac_prog", so it can be a program name with args.
3119 set dummy $ac_prog; ac_word=$2
3120 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3121 echo "configure:3122: checking for $ac_word" >&5
3122 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3123   echo $ac_n "(cached) $ac_c" 1>&6
3124 else
3125   if test -n "$AR"; then
3126   ac_cv_prog_AR="$AR" # Let the user override the test.
3127 else
3128   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3129   ac_dummy="$PATH"
3130   for ac_dir in $ac_dummy; do
3131     test -z "$ac_dir" && ac_dir=.
3132     if test -f $ac_dir/$ac_word; then
3133       ac_cv_prog_AR="$ac_prog"
3134       break
3135     fi
3136   done
3137   IFS="$ac_save_ifs"
3138 fi
3139 fi
3140 AR="$ac_cv_prog_AR"
3141 if test -n "$AR"; then
3142   echo "$ac_t""$AR" 1>&6
3143 else
3144   echo "$ac_t""no" 1>&6
3145 fi
3146
3147 test -n "$AR" && break
3148 done
3149 test -n "$AR" || AR="missing"
3150
3151
3152         if test "${AR}" = "missing" ; then
3153                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3154         fi
3155 fi
3156
3157
3158
3159 # Find the correct PATH separator.  Usually this is `:', but
3160 # DJGPP uses `;' like DOS.
3161 if test "X${PATH_SEPARATOR+set}" != Xset; then
3162   UNAME=${UNAME-`uname 2>/dev/null`}
3163   case X$UNAME in
3164     *-DOS) lt_cv_sys_path_separator=';' ;;
3165     *)     lt_cv_sys_path_separator=':' ;;
3166   esac
3167   PATH_SEPARATOR=$lt_cv_sys_path_separator
3168 fi
3169
3170 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3171 echo "configure:3172: checking for Cygwin environment" >&5
3172 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3173   echo $ac_n "(cached) $ac_c" 1>&6
3174 else
3175   cat > conftest.$ac_ext <<EOF
3176 #line 3177 "configure"
3177 #include "confdefs.h"
3178
3179 int main() {
3180
3181 #ifndef __CYGWIN__
3182 #define __CYGWIN__ __CYGWIN32__
3183 #endif
3184 return __CYGWIN__;
3185 ; return 0; }
3186 EOF
3187 if { (eval echo configure:3188: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3188   rm -rf conftest*
3189   ac_cv_cygwin=yes
3190 else
3191   echo "configure: failed program was:" >&5
3192   cat conftest.$ac_ext >&5
3193   rm -rf conftest*
3194   ac_cv_cygwin=no
3195 fi
3196 rm -f conftest*
3197 fi
3198
3199 echo "$ac_t""$ac_cv_cygwin" 1>&6
3200 CYGWIN=
3201 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3202 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3203 echo "configure:3204: checking for mingw32 environment" >&5
3204 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3205   echo $ac_n "(cached) $ac_c" 1>&6
3206 else
3207   cat > conftest.$ac_ext <<EOF
3208 #line 3209 "configure"
3209 #include "confdefs.h"
3210
3211 int main() {
3212 return __MINGW32__;
3213 ; return 0; }
3214 EOF
3215 if { (eval echo configure:3216: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3216   rm -rf conftest*
3217   ac_cv_mingw32=yes
3218 else
3219   echo "configure: failed program was:" >&5
3220   cat conftest.$ac_ext >&5
3221   rm -rf conftest*
3222   ac_cv_mingw32=no
3223 fi
3224 rm -f conftest*
3225 fi
3226
3227 echo "$ac_t""$ac_cv_mingw32" 1>&6
3228 MINGW32=
3229 test "$ac_cv_mingw32" = yes && MINGW32=yes
3230 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3231 echo "configure:3232: checking for EMX OS/2 environment" >&5
3232 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3233   echo $ac_n "(cached) $ac_c" 1>&6
3234 else
3235   cat > conftest.$ac_ext <<EOF
3236 #line 3237 "configure"
3237 #include "confdefs.h"
3238
3239 int main() {
3240 return __EMX__;
3241 ; return 0; }
3242 EOF
3243 if { (eval echo configure:3244: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3244   rm -rf conftest*
3245   ac_cv_emxos2=yes
3246 else
3247   echo "configure: failed program was:" >&5
3248   cat conftest.$ac_ext >&5
3249   rm -rf conftest*
3250   ac_cv_emxos2=no
3251 fi
3252 rm -f conftest*
3253 fi
3254
3255 echo "$ac_t""$ac_cv_emxos2" 1>&6
3256 EMXOS2=
3257 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3258 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3259 echo "configure:3260: checking how to run the C preprocessor" >&5
3260 # On Suns, sometimes $CPP names a directory.
3261 if test -n "$CPP" && test -d "$CPP"; then
3262   CPP=
3263 fi
3264 if test -z "$CPP"; then
3265 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3266   echo $ac_n "(cached) $ac_c" 1>&6
3267 else
3268     # This must be in double quotes, not single quotes, because CPP may get
3269   # substituted into the Makefile and "${CC-cc}" will confuse make.
3270   CPP="${CC-cc} -E"
3271   # On the NeXT, cc -E runs the code through the compiler's parser,
3272   # not just through cpp.
3273   cat > conftest.$ac_ext <<EOF
3274 #line 3275 "configure"
3275 #include "confdefs.h"
3276 #include <assert.h>
3277 Syntax Error
3278 EOF
3279 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3280 { (eval echo configure:3281: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3281 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3282 if test -z "$ac_err"; then
3283   :
3284 else
3285   echo "$ac_err" >&5
3286   echo "configure: failed program was:" >&5
3287   cat conftest.$ac_ext >&5
3288   rm -rf conftest*
3289   CPP="${CC-cc} -E -traditional-cpp"
3290   cat > conftest.$ac_ext <<EOF
3291 #line 3292 "configure"
3292 #include "confdefs.h"
3293 #include <assert.h>
3294 Syntax Error
3295 EOF
3296 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3297 { (eval echo configure:3298: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3298 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3299 if test -z "$ac_err"; then
3300   :
3301 else
3302   echo "$ac_err" >&5
3303   echo "configure: failed program was:" >&5
3304   cat conftest.$ac_ext >&5
3305   rm -rf conftest*
3306   CPP="${CC-cc} -nologo -E"
3307   cat > conftest.$ac_ext <<EOF
3308 #line 3309 "configure"
3309 #include "confdefs.h"
3310 #include <assert.h>
3311 Syntax Error
3312 EOF
3313 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3314 { (eval echo configure:3315: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3315 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3316 if test -z "$ac_err"; then
3317   :
3318 else
3319   echo "$ac_err" >&5
3320   echo "configure: failed program was:" >&5
3321   cat conftest.$ac_ext >&5
3322   rm -rf conftest*
3323   CPP=/lib/cpp
3324 fi
3325 rm -f conftest*
3326 fi
3327 rm -f conftest*
3328 fi
3329 rm -f conftest*
3330   ac_cv_prog_CPP="$CPP"
3331 fi
3332   CPP="$ac_cv_prog_CPP"
3333 else
3334   ac_cv_prog_CPP="$CPP"
3335 fi
3336 echo "$ac_t""$CPP" 1>&6
3337
3338 # Check whether --enable-fast-install or --disable-fast-install was given.
3339 if test "${enable_fast_install+set}" = set; then
3340   enableval="$enable_fast_install"
3341   p=${PACKAGE-default}
3342 case $enableval in
3343 yes) enable_fast_install=yes ;;
3344 no) enable_fast_install=no ;;
3345 *)
3346   enable_fast_install=no
3347   # Look at the argument we got.  We use all the common list separators.
3348   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3349   for pkg in $enableval; do
3350     if test "X$pkg" = "X$p"; then
3351       enable_fast_install=yes
3352     fi
3353   done
3354   IFS="$ac_save_ifs"
3355   ;;
3356 esac
3357 else
3358   enable_fast_install=yes
3359 fi
3360
3361 # Extract the first word of "gcc", so it can be a program name with args.
3362 set dummy gcc; ac_word=$2
3363 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3364 echo "configure:3365: checking for $ac_word" >&5
3365 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3366   echo $ac_n "(cached) $ac_c" 1>&6
3367 else
3368   if test -n "$CC"; then
3369   ac_cv_prog_CC="$CC" # Let the user override the test.
3370 else
3371   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3372   ac_dummy="$PATH"
3373   for ac_dir in $ac_dummy; do
3374     test -z "$ac_dir" && ac_dir=.
3375     if test -f $ac_dir/$ac_word; then
3376       ac_cv_prog_CC="gcc"
3377       break
3378     fi
3379   done
3380   IFS="$ac_save_ifs"
3381 fi
3382 fi
3383 CC="$ac_cv_prog_CC"
3384 if test -n "$CC"; then
3385   echo "$ac_t""$CC" 1>&6
3386 else
3387   echo "$ac_t""no" 1>&6
3388 fi
3389
3390 if test -z "$CC"; then
3391   # Extract the first word of "cc", so it can be a program name with args.
3392 set dummy cc; ac_word=$2
3393 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3394 echo "configure:3395: checking for $ac_word" >&5
3395 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3396   echo $ac_n "(cached) $ac_c" 1>&6
3397 else
3398   if test -n "$CC"; then
3399   ac_cv_prog_CC="$CC" # Let the user override the test.
3400 else
3401   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3402   ac_prog_rejected=no
3403   ac_dummy="$PATH"
3404   for ac_dir in $ac_dummy; do
3405     test -z "$ac_dir" && ac_dir=.
3406     if test -f $ac_dir/$ac_word; then
3407       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3408         ac_prog_rejected=yes
3409         continue
3410       fi
3411       ac_cv_prog_CC="cc"
3412       break
3413     fi
3414   done
3415   IFS="$ac_save_ifs"
3416 if test $ac_prog_rejected = yes; then
3417   # We found a bogon in the path, so make sure we never use it.
3418   set dummy $ac_cv_prog_CC
3419   shift
3420   if test $# -gt 0; then
3421     # We chose a different compiler from the bogus one.
3422     # However, it has the same basename, so the bogon will be chosen
3423     # first if we set CC to just the basename; use the full file name.
3424     shift
3425     set dummy "$ac_dir/$ac_word" "$@"
3426     shift
3427     ac_cv_prog_CC="$@"
3428   fi
3429 fi
3430 fi
3431 fi
3432 CC="$ac_cv_prog_CC"
3433 if test -n "$CC"; then
3434   echo "$ac_t""$CC" 1>&6
3435 else
3436   echo "$ac_t""no" 1>&6
3437 fi
3438
3439   if test -z "$CC"; then
3440     case "`uname -s`" in
3441     *win32* | *WIN32* | *CYGWIN*)
3442       # Extract the first word of "cl", so it can be a program name with args.
3443 set dummy cl; ac_word=$2
3444 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3445 echo "configure:3446: checking for $ac_word" >&5
3446 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3447   echo $ac_n "(cached) $ac_c" 1>&6
3448 else
3449   if test -n "$CC"; then
3450   ac_cv_prog_CC="$CC" # Let the user override the test.
3451 else
3452   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3453   ac_dummy="$PATH"
3454   for ac_dir in $ac_dummy; do
3455     test -z "$ac_dir" && ac_dir=.
3456     if test -f $ac_dir/$ac_word; then
3457       ac_cv_prog_CC="cl"
3458       break
3459     fi
3460   done
3461   IFS="$ac_save_ifs"
3462 fi
3463 fi
3464 CC="$ac_cv_prog_CC"
3465 if test -n "$CC"; then
3466   echo "$ac_t""$CC" 1>&6
3467 else
3468   echo "$ac_t""no" 1>&6
3469 fi
3470  ;;
3471     esac
3472   fi
3473   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3474 fi
3475
3476 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3477 echo "configure:3478: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3478
3479 ac_ext=c
3480 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3481 ac_cpp='$CPP $CPPFLAGS'
3482 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3483 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3484 cross_compiling=$ac_cv_prog_cc_cross
3485
3486 cat > conftest.$ac_ext << EOF
3487
3488 #line 3489 "configure"
3489 #include "confdefs.h"
3490
3491 main(){return(0);}
3492 EOF
3493 if { (eval echo configure:3494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3494   ac_cv_prog_cc_works=yes
3495   # If we can't run a trivial program, we are probably using a cross compiler.
3496   if (./conftest; exit) 2>/dev/null; then
3497     ac_cv_prog_cc_cross=no
3498   else
3499     ac_cv_prog_cc_cross=yes
3500   fi
3501 else
3502   echo "configure: failed program was:" >&5
3503   cat conftest.$ac_ext >&5
3504   ac_cv_prog_cc_works=no
3505 fi
3506 rm -fr conftest*
3507 ac_ext=c
3508 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3509 ac_cpp='$CPP $CPPFLAGS'
3510 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3511 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3512 cross_compiling=$ac_cv_prog_cc_cross
3513
3514 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3515 if test $ac_cv_prog_cc_works = no; then
3516   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3517 fi
3518 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3519 echo "configure:3520: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3520 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3521 cross_compiling=$ac_cv_prog_cc_cross
3522
3523 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3524 echo "configure:3525: checking whether we are using GNU C" >&5
3525 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3526   echo $ac_n "(cached) $ac_c" 1>&6
3527 else
3528   cat > conftest.c <<EOF
3529 #ifdef __GNUC__
3530   yes;
3531 #endif
3532 EOF
3533 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3534: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3534   ac_cv_prog_gcc=yes
3535 else
3536   ac_cv_prog_gcc=no
3537 fi
3538 fi
3539
3540 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3541
3542 if test $ac_cv_prog_gcc = yes; then
3543   GCC=yes
3544 else
3545   GCC=
3546 fi
3547
3548 ac_test_CFLAGS="${CFLAGS+set}"
3549 ac_save_CFLAGS="$CFLAGS"
3550 CFLAGS=
3551 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3552 echo "configure:3553: checking whether ${CC-cc} accepts -g" >&5
3553 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3554   echo $ac_n "(cached) $ac_c" 1>&6
3555 else
3556   echo 'void f(){}' > conftest.c
3557 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3558   ac_cv_prog_cc_g=yes
3559 else
3560   ac_cv_prog_cc_g=no
3561 fi
3562 rm -f conftest*
3563
3564 fi
3565
3566 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3567 if test "$ac_test_CFLAGS" = set; then
3568   CFLAGS="$ac_save_CFLAGS"
3569 elif test $ac_cv_prog_cc_g = yes; then
3570   if test "$GCC" = yes; then
3571     CFLAGS="-g -O2"
3572   else
3573     CFLAGS="-g"
3574   fi
3575 else
3576   if test "$GCC" = yes; then
3577     CFLAGS="-O2"
3578   else
3579     CFLAGS=
3580   fi
3581 fi
3582
3583 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3584 if test "${with_gnu_ld+set}" = set; then
3585   withval="$with_gnu_ld"
3586   test "$withval" = no || with_gnu_ld=yes
3587 else
3588   with_gnu_ld=no
3589 fi
3590
3591 ac_prog=ld
3592 if test "$GCC" = yes; then
3593   # Check if gcc -print-prog-name=ld gives a path.
3594   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3595 echo "configure:3596: checking for ld used by GCC" >&5
3596   case $host in
3597   *-*-mingw*)
3598     # gcc leaves a trailing carriage return which upsets mingw
3599     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3600   *)
3601     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3602   esac
3603   case $ac_prog in
3604     # Accept absolute paths.
3605     [\\/]* | [A-Za-z]:[\\/]*)
3606       re_direlt='/[^/][^/]*/\.\./'
3607       # Canonicalize the path of ld
3608       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3609       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3610         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3611       done
3612       test -z "$LD" && LD="$ac_prog"
3613       ;;
3614   "")
3615     # If it fails, then pretend we aren't using GCC.
3616     ac_prog=ld
3617     ;;
3618   *)
3619     # If it is relative, then search for the first ld in PATH.
3620     with_gnu_ld=unknown
3621     ;;
3622   esac
3623 elif test "$with_gnu_ld" = yes; then
3624   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3625 echo "configure:3626: checking for GNU ld" >&5
3626 else
3627   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3628 echo "configure:3629: checking for non-GNU ld" >&5
3629 fi
3630 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3631   echo $ac_n "(cached) $ac_c" 1>&6
3632 else
3633   if test -z "$LD"; then
3634   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3635   for ac_dir in $PATH; do
3636     test -z "$ac_dir" && ac_dir=.
3637     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3638       lt_cv_path_LD="$ac_dir/$ac_prog"
3639       # Check to see if the program is GNU ld.  I'd rather use --version,
3640       # but apparently some GNU ld's only accept -v.
3641       # Break only if it was the GNU/non-GNU ld that we prefer.
3642       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3643         test "$with_gnu_ld" != no && break
3644       else
3645         test "$with_gnu_ld" != yes && break
3646       fi
3647     fi
3648   done
3649   IFS="$ac_save_ifs"
3650 else
3651   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3652 fi
3653 fi
3654
3655 LD="$lt_cv_path_LD"
3656 if test -n "$LD"; then
3657   echo "$ac_t""$LD" 1>&6
3658 else
3659   echo "$ac_t""no" 1>&6
3660 fi
3661 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3662 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3663 echo "configure:3664: checking if the linker ($LD) is GNU ld" >&5
3664 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3665   echo $ac_n "(cached) $ac_c" 1>&6
3666 else
3667   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3668 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3669   lt_cv_prog_gnu_ld=yes
3670 else
3671   lt_cv_prog_gnu_ld=no
3672 fi
3673 fi
3674
3675 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3676 with_gnu_ld=$lt_cv_prog_gnu_ld
3677
3678
3679 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3680 echo "configure:3681: checking for $LD option to reload object files" >&5
3681 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3682   echo $ac_n "(cached) $ac_c" 1>&6
3683 else
3684   lt_cv_ld_reload_flag='-r'
3685 fi
3686
3687 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3688 reload_flag=$lt_cv_ld_reload_flag
3689 test -n "$reload_flag" && reload_flag=" $reload_flag"
3690
3691 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3692 echo "configure:3693: checking for BSD-compatible nm" >&5
3693 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3694   echo $ac_n "(cached) $ac_c" 1>&6
3695 else
3696   if test -n "$NM"; then
3697   # Let the user override the test.
3698   lt_cv_path_NM="$NM"
3699 else
3700   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3701   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3702     test -z "$ac_dir" && ac_dir=.
3703     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3704     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3705       # Check to see if the nm accepts a BSD-compat flag.
3706       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3707       #   nm: unknown option "B" ignored
3708       # Tru64's nm complains that /dev/null is an invalid object file
3709       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3710         lt_cv_path_NM="$tmp_nm -B"
3711         break
3712       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3713         lt_cv_path_NM="$tmp_nm -p"
3714         break
3715       else
3716         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3717         continue # so that we can try to find one that supports BSD flags
3718       fi
3719     fi
3720   done
3721   IFS="$ac_save_ifs"
3722   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3723 fi
3724 fi
3725
3726 NM="$lt_cv_path_NM"
3727 echo "$ac_t""$NM" 1>&6
3728
3729 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3730 echo "configure:3731: checking whether ln -s works" >&5
3731 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3732   echo $ac_n "(cached) $ac_c" 1>&6
3733 else
3734   rm -f conftestdata
3735 if ln -s X conftestdata 2>/dev/null
3736 then
3737   rm -f conftestdata
3738   ac_cv_prog_LN_S="ln -s"
3739 else
3740   ac_cv_prog_LN_S=ln
3741 fi
3742 fi
3743 LN_S="$ac_cv_prog_LN_S"
3744 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3745   echo "$ac_t""yes" 1>&6
3746 else
3747   echo "$ac_t""no" 1>&6
3748 fi
3749
3750 echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
3751 echo "configure:3752: checking how to recognise dependant libraries" >&5
3752 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3753   echo $ac_n "(cached) $ac_c" 1>&6
3754 else
3755   lt_cv_file_magic_cmd='$MAGIC_CMD'
3756 lt_cv_file_magic_test_file=
3757 lt_cv_deplibs_check_method='unknown'
3758 # Need to set the preceding variable on all platforms that support
3759 # interlibrary dependencies.
3760 # 'none' -- dependencies not supported.
3761 # `unknown' -- same as none, but documents that we really don't know.
3762 # 'pass_all' -- all dependencies passed with no checks.
3763 # 'test_compile' -- check by making test program.
3764 # 'file_magic [[regex]]' -- check by looking for files in library path
3765 # which responds to the $file_magic_cmd with a given egrep regex.
3766 # If you have `file' or equivalent on your system and you're not sure
3767 # whether `pass_all' will *always* work, you probably want this one.
3768
3769 case $host_os in
3770 aix4* | aix5*)
3771   lt_cv_deplibs_check_method=pass_all
3772   ;;
3773
3774 beos*)
3775   lt_cv_deplibs_check_method=pass_all
3776   ;;
3777
3778 bsdi4*)
3779   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3780   lt_cv_file_magic_cmd='/usr/bin/file -L'
3781   lt_cv_file_magic_test_file=/shlib/libc.so
3782   ;;
3783
3784 cygwin* | mingw* | pw32*)
3785   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3786   lt_cv_file_magic_cmd='$OBJDUMP -f'
3787   ;;
3788
3789 darwin* | rhapsody*)
3790   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3791   lt_cv_file_magic_cmd='/usr/bin/file -L'
3792   case "$host_os" in
3793   rhapsody* | darwin1.[012])
3794     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3795     ;;
3796   *) # Darwin 1.3 on
3797     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3798     ;;
3799   esac
3800   ;;
3801
3802 freebsd*)
3803   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3804     case $host_cpu in
3805     i*86 )
3806       # Not sure whether the presence of OpenBSD here was a mistake.
3807       # Let's accept both of them until this is cleared up.
3808       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3809       lt_cv_file_magic_cmd=/usr/bin/file
3810       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3811       ;;
3812     esac
3813   else
3814     lt_cv_deplibs_check_method=pass_all
3815   fi
3816   ;;
3817
3818 gnu*)
3819   lt_cv_deplibs_check_method=pass_all
3820   ;;
3821
3822 hpux10.20*|hpux11*)
3823   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3824   lt_cv_file_magic_cmd=/usr/bin/file
3825   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3826   ;;
3827
3828 irix5* | irix6*)
3829   case $host_os in
3830   irix5*)
3831     # this will be overridden with pass_all, but let us keep it just in case
3832     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3833     ;;
3834   *)
3835     case $LD in
3836     *-32|*"-32 ") libmagic=32-bit;;
3837     *-n32|*"-n32 ") libmagic=N32;;
3838     *-64|*"-64 ") libmagic=64-bit;;
3839     *) libmagic=never-match;;
3840     esac
3841     # this will be overridden with pass_all, but let us keep it just in case
3842     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3843     ;;
3844   esac
3845   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3846   lt_cv_deplibs_check_method=pass_all
3847   ;;
3848
3849 # This must be Linux ELF.
3850 linux-gnu*)
3851   case $host_cpu in
3852   alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
3853     lt_cv_deplibs_check_method=pass_all ;;
3854   *)
3855     # glibc up to 2.1.1 does not perform some relocations on ARM
3856     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3857   esac
3858   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3859   ;;
3860
3861 netbsd*)
3862   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3863     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3864   else
3865     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3866   fi
3867   ;;
3868
3869 newos6*)
3870   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3871   lt_cv_file_magic_cmd=/usr/bin/file
3872   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3873   ;;
3874
3875 openbsd*)
3876   lt_cv_file_magic_cmd=/usr/bin/file
3877   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3878   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3879     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3880   else
3881     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3882   fi
3883   ;;
3884
3885 osf3* | osf4* | osf5*)
3886   # this will be overridden with pass_all, but let us keep it just in case
3887   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3888   lt_cv_file_magic_test_file=/shlib/libc.so
3889   lt_cv_deplibs_check_method=pass_all
3890   ;;
3891
3892 sco3.2v5*)
3893   lt_cv_deplibs_check_method=pass_all
3894   ;;
3895
3896 solaris*)
3897   lt_cv_deplibs_check_method=pass_all
3898   lt_cv_file_magic_test_file=/lib/libc.so
3899   ;;
3900
3901 sysv5uw[78]* | sysv4*uw2*)
3902   lt_cv_deplibs_check_method=pass_all
3903   ;;
3904
3905 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3906   case $host_vendor in
3907   motorola)
3908     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
3909     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3910     ;;
3911   ncr)
3912     lt_cv_deplibs_check_method=pass_all
3913     ;;
3914   sequent)
3915     lt_cv_file_magic_cmd='/bin/file'
3916     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3917     ;;
3918   sni)
3919     lt_cv_file_magic_cmd='/bin/file'
3920     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3921     lt_cv_file_magic_test_file=/lib/libc.so
3922     ;;
3923   esac
3924   ;;
3925 esac
3926
3927 fi
3928
3929 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3930 file_magic_cmd=$lt_cv_file_magic_cmd
3931 deplibs_check_method=$lt_cv_deplibs_check_method
3932
3933 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3934 echo "configure:3935: checking for object suffix" >&5
3935 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3936   echo $ac_n "(cached) $ac_c" 1>&6
3937 else
3938   rm -f conftest*
3939 echo 'int i = 1;' > conftest.$ac_ext
3940 if { (eval echo configure:3941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3941   for ac_file in conftest.*; do
3942     case $ac_file in
3943     *.c) ;;
3944     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3945     esac
3946   done
3947 else
3948   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3949 fi
3950 rm -f conftest*
3951 fi
3952
3953 echo "$ac_t""$ac_cv_objext" 1>&6
3954 OBJEXT=$ac_cv_objext
3955 ac_objext=$ac_cv_objext
3956
3957
3958
3959
3960 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3961 echo "configure:3962: checking for executable suffix" >&5
3962 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3963   echo $ac_n "(cached) $ac_c" 1>&6
3964 else
3965   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3966   ac_cv_exeext=.exe
3967 else
3968   rm -f conftest*
3969   echo 'int main () { return 0; }' > conftest.$ac_ext
3970   ac_cv_exeext=
3971   if { (eval echo configure:3972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3972     for file in conftest.*; do
3973       case $file in
3974       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3975       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3976       esac
3977     done
3978   else
3979     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3980   fi
3981   rm -f conftest*
3982   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3983 fi
3984 fi
3985
3986 EXEEXT=""
3987 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3988 echo "$ac_t""${ac_cv_exeext}" 1>&6
3989 ac_exeext=$EXEEXT
3990
3991 if test $host != $build; then
3992   ac_tool_prefix=${host_alias}-
3993 else
3994   ac_tool_prefix=
3995 fi
3996
3997
3998
3999
4000 # Check for command to grab the raw symbol name followed by C symbol from nm.
4001 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
4002 echo "configure:4003: checking command to parse $NM output" >&5
4003 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
4004   echo $ac_n "(cached) $ac_c" 1>&6
4005 else
4006   
4007 # These are sane defaults that work on at least a few old systems.
4008 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4009
4010 # Character class describing NM global symbol codes.
4011 symcode='[BCDEGRST]'
4012
4013 # Regexp to match symbols that can be accessed directly from C.
4014 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
4015
4016 # Transform the above into a raw symbol and a C symbol.
4017 symxfrm='\1 \2\3 \3'
4018
4019 # Transform an extracted symbol line into a proper C declaration
4020 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4021
4022 # Transform an extracted symbol line into symbol name and symbol address
4023 lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
4024
4025 # Define system-specific variables.
4026 case $host_os in
4027 aix*)
4028   symcode='[BCDT]'
4029   ;;
4030 cygwin* | mingw* | pw32*)
4031   symcode='[ABCDGISTW]'
4032   ;;
4033 hpux*) # Its linker distinguishes data from code symbols
4034   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4035   lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
4036   ;;
4037 irix*)
4038   symcode='[BCDEGRST]'
4039   ;;
4040 solaris* | sysv5*)
4041   symcode='[BDT]'
4042   ;;
4043 sysv4)
4044   symcode='[DFNSTU]'
4045   ;;
4046 esac
4047
4048 # Handle CRLF in mingw tool chain
4049 opt_cr=
4050 case $host_os in
4051 mingw*)
4052   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4053   ;;
4054 esac
4055
4056 # If we're using GNU nm, then use its standard symbol codes.
4057 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4058   symcode='[ABCDGISTW]'
4059 fi
4060
4061 # Try without a prefix undercore, then with it.
4062 for ac_symprfx in "" "_"; do
4063
4064   # Write the raw and C identifiers.
4065 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4066
4067   # Check to see that the pipe works correctly.
4068   pipe_works=no
4069   rm -f conftest*
4070   cat > conftest.$ac_ext <<EOF
4071 #ifdef __cplusplus
4072 extern "C" {
4073 #endif
4074 char nm_test_var;
4075 void nm_test_func(){}
4076 #ifdef __cplusplus
4077 }
4078 #endif
4079 int main(){nm_test_var='a';nm_test_func();return(0);}
4080 EOF
4081
4082   if { (eval echo configure:4083: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4083     # Now try to grab the symbols.
4084     nlist=conftest.nm
4085     if { (eval echo configure:4086: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5; } && test -s "$nlist"; then
4086       # Try sorting and uniquifying the output.
4087       if sort "$nlist" | uniq > "$nlist"T; then
4088         mv -f "$nlist"T "$nlist"
4089       else
4090         rm -f "$nlist"T
4091       fi
4092
4093       # Make sure that we snagged all the symbols we need.
4094       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4095         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4096           cat <<EOF > conftest.$ac_ext
4097 #ifdef __cplusplus
4098 extern "C" {
4099 #endif
4100
4101 EOF
4102           # Now generate the symbol file.
4103           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4104
4105           cat <<EOF >> conftest.$ac_ext
4106 #if defined (__STDC__) && __STDC__
4107 # define lt_ptr void *
4108 #else
4109 # define lt_ptr char *
4110 # define const
4111 #endif
4112
4113 /* The mapping between symbol names and symbols. */
4114 const struct {
4115   const char *name;
4116   lt_ptr address;
4117 }
4118 lt_preloaded_symbols[] =
4119 {
4120 EOF
4121           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4122           cat <<\EOF >> conftest.$ac_ext
4123   {0, (lt_ptr) 0}
4124 };
4125
4126 #ifdef __cplusplus
4127 }
4128 #endif
4129 EOF
4130           # Now try linking the two files.
4131           mv conftest.$ac_objext conftstm.$ac_objext
4132           save_LIBS="$LIBS"
4133           save_CFLAGS="$CFLAGS"
4134           LIBS="conftstm.$ac_objext"
4135           CFLAGS="$CFLAGS$no_builtin_flag"
4136           if { (eval echo configure:4137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4137             pipe_works=yes
4138           fi
4139           LIBS="$save_LIBS"
4140           CFLAGS="$save_CFLAGS"
4141         else
4142           echo "cannot find nm_test_func in $nlist" >&5
4143         fi
4144       else
4145         echo "cannot find nm_test_var in $nlist" >&5
4146       fi
4147     else
4148       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4149     fi
4150   else
4151     echo "$progname: failed program was:" >&5
4152     cat conftest.$ac_ext >&5
4153   fi
4154   rm -f conftest* conftst*
4155
4156   # Do not use the global_symbol_pipe unless it works.
4157   if test "$pipe_works" = yes; then
4158     break
4159   else
4160     lt_cv_sys_global_symbol_pipe=
4161   fi
4162 done
4163
4164 fi
4165
4166 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4167 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4168   global_symbol_to_cdecl=
4169   global_symbol_to_c_name_address=
4170 else
4171   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4172   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4173 fi
4174 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4175 then
4176   echo "$ac_t""failed" 1>&6
4177 else
4178   echo "$ac_t""ok" 1>&6
4179 fi
4180
4181 for ac_hdr in dlfcn.h
4182 do
4183 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4184 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4185 echo "configure:4186: checking for $ac_hdr" >&5
4186 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4187   echo $ac_n "(cached) $ac_c" 1>&6
4188 else
4189   cat > conftest.$ac_ext <<EOF
4190 #line 4191 "configure"
4191 #include "confdefs.h"
4192 #include <$ac_hdr>
4193 EOF
4194 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4195 { (eval echo configure:4196: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4196 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4197 if test -z "$ac_err"; then
4198   rm -rf conftest*
4199   eval "ac_cv_header_$ac_safe=yes"
4200 else
4201   echo "$ac_err" >&5
4202   echo "configure: failed program was:" >&5
4203   cat conftest.$ac_ext >&5
4204   rm -rf conftest*
4205   eval "ac_cv_header_$ac_safe=no"
4206 fi
4207 rm -f conftest*
4208 fi
4209 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4210   echo "$ac_t""yes" 1>&6
4211     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4212   cat >> confdefs.h <<EOF
4213 #define $ac_tr_hdr 1
4214 EOF
4215  
4216 else
4217   echo "$ac_t""no" 1>&6
4218 fi
4219 done
4220
4221
4222
4223
4224
4225 # Only perform the check for file, if the check method requires it
4226 case $deplibs_check_method in
4227 file_magic*)
4228   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4229     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4230 echo "configure:4231: checking for ${ac_tool_prefix}file" >&5
4231 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4232   echo $ac_n "(cached) $ac_c" 1>&6
4233 else
4234   case $MAGIC_CMD in
4235   /*)
4236   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4237   ;;
4238   ?:/*)
4239   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4240   ;;
4241   *)
4242   ac_save_MAGIC_CMD="$MAGIC_CMD"
4243   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4244   ac_dummy="/usr/bin:$PATH"
4245   for ac_dir in $ac_dummy; do
4246     test -z "$ac_dir" && ac_dir=.
4247     if test -f $ac_dir/${ac_tool_prefix}file; then
4248       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4249       if test -n "$file_magic_test_file"; then
4250         case $deplibs_check_method in
4251         "file_magic "*)
4252           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4253           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4254           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4255             egrep "$file_magic_regex" > /dev/null; then
4256             :
4257           else
4258             cat <<EOF 1>&2
4259
4260 *** Warning: the command libtool uses to detect shared libraries,
4261 *** $file_magic_cmd, produces output that libtool cannot recognize.
4262 *** The result is that libtool may fail to recognize shared libraries
4263 *** as such.  This will affect the creation of libtool libraries that
4264 *** depend on shared libraries, but programs linked with such libtool
4265 *** libraries will work regardless of this problem.  Nevertheless, you
4266 *** may want to report the problem to your system manager and/or to
4267 *** bug-libtool@gnu.org
4268
4269 EOF
4270           fi ;;
4271         esac
4272       fi
4273       break
4274     fi
4275   done
4276   IFS="$ac_save_ifs"
4277   MAGIC_CMD="$ac_save_MAGIC_CMD"
4278   ;;
4279 esac
4280 fi
4281
4282 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4283 if test -n "$MAGIC_CMD"; then
4284   echo "$ac_t""$MAGIC_CMD" 1>&6
4285 else
4286   echo "$ac_t""no" 1>&6
4287 fi
4288
4289 if test -z "$lt_cv_path_MAGIC_CMD"; then
4290   if test -n "$ac_tool_prefix"; then
4291     echo $ac_n "checking for file""... $ac_c" 1>&6
4292 echo "configure:4293: checking for file" >&5
4293 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4294   echo $ac_n "(cached) $ac_c" 1>&6
4295 else
4296   case $MAGIC_CMD in
4297   /*)
4298   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4299   ;;
4300   ?:/*)
4301   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4302   ;;
4303   *)
4304   ac_save_MAGIC_CMD="$MAGIC_CMD"
4305   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4306   ac_dummy="/usr/bin:$PATH"
4307   for ac_dir in $ac_dummy; do
4308     test -z "$ac_dir" && ac_dir=.
4309     if test -f $ac_dir/file; then
4310       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4311       if test -n "$file_magic_test_file"; then
4312         case $deplibs_check_method in
4313         "file_magic "*)
4314           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4315           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4316           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4317             egrep "$file_magic_regex" > /dev/null; then
4318             :
4319           else
4320             cat <<EOF 1>&2
4321
4322 *** Warning: the command libtool uses to detect shared libraries,
4323 *** $file_magic_cmd, produces output that libtool cannot recognize.
4324 *** The result is that libtool may fail to recognize shared libraries
4325 *** as such.  This will affect the creation of libtool libraries that
4326 *** depend on shared libraries, but programs linked with such libtool
4327 *** libraries will work regardless of this problem.  Nevertheless, you
4328 *** may want to report the problem to your system manager and/or to
4329 *** bug-libtool@gnu.org
4330
4331 EOF
4332           fi ;;
4333         esac
4334       fi
4335       break
4336     fi
4337   done
4338   IFS="$ac_save_ifs"
4339   MAGIC_CMD="$ac_save_MAGIC_CMD"
4340   ;;
4341 esac
4342 fi
4343
4344 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4345 if test -n "$MAGIC_CMD"; then
4346   echo "$ac_t""$MAGIC_CMD" 1>&6
4347 else
4348   echo "$ac_t""no" 1>&6
4349 fi
4350
4351   else
4352     MAGIC_CMD=:
4353   fi
4354 fi
4355
4356   fi
4357   ;;
4358 esac
4359
4360 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4361 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4362 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4363 echo "configure:4364: checking for $ac_word" >&5
4364 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4365   echo $ac_n "(cached) $ac_c" 1>&6
4366 else
4367   if test -n "$RANLIB"; then
4368   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4369 else
4370   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4371   ac_dummy="$PATH"
4372   for ac_dir in $ac_dummy; do
4373     test -z "$ac_dir" && ac_dir=.
4374     if test -f $ac_dir/$ac_word; then
4375       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4376       break
4377     fi
4378   done
4379   IFS="$ac_save_ifs"
4380 fi
4381 fi
4382 RANLIB="$ac_cv_prog_RANLIB"
4383 if test -n "$RANLIB"; then
4384   echo "$ac_t""$RANLIB" 1>&6
4385 else
4386   echo "$ac_t""no" 1>&6
4387 fi
4388
4389
4390 if test -z "$ac_cv_prog_RANLIB"; then
4391 if test -n "$ac_tool_prefix"; then
4392   # Extract the first word of "ranlib", so it can be a program name with args.
4393 set dummy ranlib; ac_word=$2
4394 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4395 echo "configure:4396: checking for $ac_word" >&5
4396 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4397   echo $ac_n "(cached) $ac_c" 1>&6
4398 else
4399   if test -n "$RANLIB"; then
4400   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4401 else
4402   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4403   ac_dummy="$PATH"
4404   for ac_dir in $ac_dummy; do
4405     test -z "$ac_dir" && ac_dir=.
4406     if test -f $ac_dir/$ac_word; then
4407       ac_cv_prog_RANLIB="ranlib"
4408       break
4409     fi
4410   done
4411   IFS="$ac_save_ifs"
4412   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4413 fi
4414 fi
4415 RANLIB="$ac_cv_prog_RANLIB"
4416 if test -n "$RANLIB"; then
4417   echo "$ac_t""$RANLIB" 1>&6
4418 else
4419   echo "$ac_t""no" 1>&6
4420 fi
4421
4422 else
4423   RANLIB=":"
4424 fi
4425 fi
4426
4427 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4428 set dummy ${ac_tool_prefix}strip; ac_word=$2
4429 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4430 echo "configure:4431: checking for $ac_word" >&5
4431 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4432   echo $ac_n "(cached) $ac_c" 1>&6
4433 else
4434   if test -n "$STRIP"; then
4435   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4436 else
4437   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4438   ac_dummy="$PATH"
4439   for ac_dir in $ac_dummy; do
4440     test -z "$ac_dir" && ac_dir=.
4441     if test -f $ac_dir/$ac_word; then
4442       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4443       break
4444     fi
4445   done
4446   IFS="$ac_save_ifs"
4447 fi
4448 fi
4449 STRIP="$ac_cv_prog_STRIP"
4450 if test -n "$STRIP"; then
4451   echo "$ac_t""$STRIP" 1>&6
4452 else
4453   echo "$ac_t""no" 1>&6
4454 fi
4455
4456
4457 if test -z "$ac_cv_prog_STRIP"; then
4458 if test -n "$ac_tool_prefix"; then
4459   # Extract the first word of "strip", so it can be a program name with args.
4460 set dummy strip; ac_word=$2
4461 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4462 echo "configure:4463: checking for $ac_word" >&5
4463 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4464   echo $ac_n "(cached) $ac_c" 1>&6
4465 else
4466   if test -n "$STRIP"; then
4467   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4468 else
4469   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4470   ac_dummy="$PATH"
4471   for ac_dir in $ac_dummy; do
4472     test -z "$ac_dir" && ac_dir=.
4473     if test -f $ac_dir/$ac_word; then
4474       ac_cv_prog_STRIP="strip"
4475       break
4476     fi
4477   done
4478   IFS="$ac_save_ifs"
4479   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4480 fi
4481 fi
4482 STRIP="$ac_cv_prog_STRIP"
4483 if test -n "$STRIP"; then
4484   echo "$ac_t""$STRIP" 1>&6
4485 else
4486   echo "$ac_t""no" 1>&6
4487 fi
4488
4489 else
4490   STRIP=":"
4491 fi
4492 fi
4493
4494
4495 enable_dlopen=yes
4496 enable_win32_dll=yes
4497
4498 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4499 if test "${enable_libtool_lock+set}" = set; then
4500   enableval="$enable_libtool_lock"
4501   :
4502 fi
4503
4504 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4505
4506 # Some flags need to be propagated to the compiler or linker for good
4507 # libtool support.
4508 case $host in
4509 *-*-irix6*)
4510   # Find out which ABI we are using.
4511   echo '#line 4512 "configure"' > conftest.$ac_ext
4512   if { (eval echo configure:4513: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4513     case `/usr/bin/file conftest.$ac_objext` in
4514     *32-bit*)
4515       LD="${LD-ld} -32"
4516       ;;
4517     *N32*)
4518       LD="${LD-ld} -n32"
4519       ;;
4520     *64-bit*)
4521       LD="${LD-ld} -64"
4522       ;;
4523     esac
4524   fi
4525   rm -rf conftest*
4526   ;;
4527
4528 *-*-sco3.2v5*)
4529   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4530   SAVE_CFLAGS="$CFLAGS"
4531   CFLAGS="$CFLAGS -belf"
4532   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4533 echo "configure:4534: checking whether the C compiler needs -belf" >&5
4534 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4535   echo $ac_n "(cached) $ac_c" 1>&6
4536 else
4537   
4538      ac_ext=c
4539 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4540 ac_cpp='$CPP $CPPFLAGS'
4541 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4542 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4543 cross_compiling=$ac_cv_prog_cc_cross
4544
4545      cat > conftest.$ac_ext <<EOF
4546 #line 4547 "configure"
4547 #include "confdefs.h"
4548
4549 int main() {
4550
4551 ; return 0; }
4552 EOF
4553 if { (eval echo configure:4554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4554   rm -rf conftest*
4555   lt_cv_cc_needs_belf=yes
4556 else
4557   echo "configure: failed program was:" >&5
4558   cat conftest.$ac_ext >&5
4559   rm -rf conftest*
4560   lt_cv_cc_needs_belf=no
4561 fi
4562 rm -f conftest*
4563      ac_ext=c
4564 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4565 ac_cpp='$CPP $CPPFLAGS'
4566 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4567 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4568 cross_compiling=$ac_cv_prog_cc_cross
4569
4570 fi
4571
4572 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4573   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4574     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4575     CFLAGS="$SAVE_CFLAGS"
4576   fi
4577   ;;
4578
4579 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4580   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4581 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4582 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4583 echo "configure:4584: checking for $ac_word" >&5
4584 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4585   echo $ac_n "(cached) $ac_c" 1>&6
4586 else
4587   if test -n "$DLLTOOL"; then
4588   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4589 else
4590   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4591   ac_dummy="$PATH"
4592   for ac_dir in $ac_dummy; do
4593     test -z "$ac_dir" && ac_dir=.
4594     if test -f $ac_dir/$ac_word; then
4595       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4596       break
4597     fi
4598   done
4599   IFS="$ac_save_ifs"
4600 fi
4601 fi
4602 DLLTOOL="$ac_cv_prog_DLLTOOL"
4603 if test -n "$DLLTOOL"; then
4604   echo "$ac_t""$DLLTOOL" 1>&6
4605 else
4606   echo "$ac_t""no" 1>&6
4607 fi
4608
4609
4610 if test -z "$ac_cv_prog_DLLTOOL"; then
4611 if test -n "$ac_tool_prefix"; then
4612   # Extract the first word of "dlltool", so it can be a program name with args.
4613 set dummy dlltool; ac_word=$2
4614 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4615 echo "configure:4616: checking for $ac_word" >&5
4616 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4617   echo $ac_n "(cached) $ac_c" 1>&6
4618 else
4619   if test -n "$DLLTOOL"; then
4620   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4621 else
4622   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4623   ac_dummy="$PATH"
4624   for ac_dir in $ac_dummy; do
4625     test -z "$ac_dir" && ac_dir=.
4626     if test -f $ac_dir/$ac_word; then
4627       ac_cv_prog_DLLTOOL="dlltool"
4628       break
4629     fi
4630   done
4631   IFS="$ac_save_ifs"
4632   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4633 fi
4634 fi
4635 DLLTOOL="$ac_cv_prog_DLLTOOL"
4636 if test -n "$DLLTOOL"; then
4637   echo "$ac_t""$DLLTOOL" 1>&6
4638 else
4639   echo "$ac_t""no" 1>&6
4640 fi
4641
4642 else
4643   DLLTOOL="false"
4644 fi
4645 fi
4646
4647   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4648 set dummy ${ac_tool_prefix}as; ac_word=$2
4649 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4650 echo "configure:4651: checking for $ac_word" >&5
4651 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4652   echo $ac_n "(cached) $ac_c" 1>&6
4653 else
4654   if test -n "$AS"; then
4655   ac_cv_prog_AS="$AS" # Let the user override the test.
4656 else
4657   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4658   ac_dummy="$PATH"
4659   for ac_dir in $ac_dummy; do
4660     test -z "$ac_dir" && ac_dir=.
4661     if test -f $ac_dir/$ac_word; then
4662       ac_cv_prog_AS="${ac_tool_prefix}as"
4663       break
4664     fi
4665   done
4666   IFS="$ac_save_ifs"
4667 fi
4668 fi
4669 AS="$ac_cv_prog_AS"
4670 if test -n "$AS"; then
4671   echo "$ac_t""$AS" 1>&6
4672 else
4673   echo "$ac_t""no" 1>&6
4674 fi
4675
4676
4677 if test -z "$ac_cv_prog_AS"; then
4678 if test -n "$ac_tool_prefix"; then
4679   # Extract the first word of "as", so it can be a program name with args.
4680 set dummy as; ac_word=$2
4681 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4682 echo "configure:4683: checking for $ac_word" >&5
4683 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4684   echo $ac_n "(cached) $ac_c" 1>&6
4685 else
4686   if test -n "$AS"; then
4687   ac_cv_prog_AS="$AS" # Let the user override the test.
4688 else
4689   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4690   ac_dummy="$PATH"
4691   for ac_dir in $ac_dummy; do
4692     test -z "$ac_dir" && ac_dir=.
4693     if test -f $ac_dir/$ac_word; then
4694       ac_cv_prog_AS="as"
4695       break
4696     fi
4697   done
4698   IFS="$ac_save_ifs"
4699   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4700 fi
4701 fi
4702 AS="$ac_cv_prog_AS"
4703 if test -n "$AS"; then
4704   echo "$ac_t""$AS" 1>&6
4705 else
4706   echo "$ac_t""no" 1>&6
4707 fi
4708
4709 else
4710   AS="false"
4711 fi
4712 fi
4713
4714   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4715 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4716 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4717 echo "configure:4718: checking for $ac_word" >&5
4718 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4719   echo $ac_n "(cached) $ac_c" 1>&6
4720 else
4721   if test -n "$OBJDUMP"; then
4722   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4723 else
4724   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4725   ac_dummy="$PATH"
4726   for ac_dir in $ac_dummy; do
4727     test -z "$ac_dir" && ac_dir=.
4728     if test -f $ac_dir/$ac_word; then
4729       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4730       break
4731     fi
4732   done
4733   IFS="$ac_save_ifs"
4734 fi
4735 fi
4736 OBJDUMP="$ac_cv_prog_OBJDUMP"
4737 if test -n "$OBJDUMP"; then
4738   echo "$ac_t""$OBJDUMP" 1>&6
4739 else
4740   echo "$ac_t""no" 1>&6
4741 fi
4742
4743
4744 if test -z "$ac_cv_prog_OBJDUMP"; then
4745 if test -n "$ac_tool_prefix"; then
4746   # Extract the first word of "objdump", so it can be a program name with args.
4747 set dummy objdump; ac_word=$2
4748 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4749 echo "configure:4750: checking for $ac_word" >&5
4750 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4751   echo $ac_n "(cached) $ac_c" 1>&6
4752 else
4753   if test -n "$OBJDUMP"; then
4754   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4755 else
4756   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4757   ac_dummy="$PATH"
4758   for ac_dir in $ac_dummy; do
4759     test -z "$ac_dir" && ac_dir=.
4760     if test -f $ac_dir/$ac_word; then
4761       ac_cv_prog_OBJDUMP="objdump"
4762       break
4763     fi
4764   done
4765   IFS="$ac_save_ifs"
4766   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4767 fi
4768 fi
4769 OBJDUMP="$ac_cv_prog_OBJDUMP"
4770 if test -n "$OBJDUMP"; then
4771   echo "$ac_t""$OBJDUMP" 1>&6
4772 else
4773   echo "$ac_t""no" 1>&6
4774 fi
4775
4776 else
4777   OBJDUMP="false"
4778 fi
4779 fi
4780
4781
4782   # recent cygwin and mingw systems supply a stub DllMain which the user
4783   # can override, but on older systems we have to supply one
4784   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4785 echo "configure:4786: checking if libtool should supply DllMain function" >&5
4786 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4787   echo $ac_n "(cached) $ac_c" 1>&6
4788 else
4789   cat > conftest.$ac_ext <<EOF
4790 #line 4791 "configure"
4791 #include "confdefs.h"
4792
4793 int main() {
4794 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4795       DllMain (0, 0, 0);
4796 ; return 0; }
4797 EOF
4798 if { (eval echo configure:4799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4799   rm -rf conftest*
4800   lt_cv_need_dllmain=no
4801 else
4802   echo "configure: failed program was:" >&5
4803   cat conftest.$ac_ext >&5
4804   rm -rf conftest*
4805   lt_cv_need_dllmain=yes
4806 fi
4807 rm -f conftest*
4808 fi
4809
4810 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4811
4812   case $host/$CC in
4813   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4814     # old mingw systems require "-dll" to link a DLL, while more recent ones
4815     # require "-mdll"
4816     SAVE_CFLAGS="$CFLAGS"
4817     CFLAGS="$CFLAGS -mdll"
4818     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4819 echo "configure:4820: checking how to link DLLs" >&5
4820 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4821   echo $ac_n "(cached) $ac_c" 1>&6
4822 else
4823   cat > conftest.$ac_ext <<EOF
4824 #line 4825 "configure"
4825 #include "confdefs.h"
4826
4827 int main() {
4828
4829 ; return 0; }
4830 EOF
4831 if { (eval echo configure:4832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4832   rm -rf conftest*
4833   lt_cv_cc_dll_switch=-mdll
4834 else
4835   echo "configure: failed program was:" >&5
4836   cat conftest.$ac_ext >&5
4837   rm -rf conftest*
4838   lt_cv_cc_dll_switch=-dll
4839 fi
4840 rm -f conftest*
4841 fi
4842
4843 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4844     CFLAGS="$SAVE_CFLAGS" ;;
4845   *-*-cygwin* | *-*-pw32*)
4846     # cygwin systems need to pass --dll to the linker, and not link
4847     # crt.o which will require a WinMain@16 definition.
4848     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4849   esac
4850   ;;
4851   
4852 esac
4853
4854 # Sed substitution that helps us do robust quoting.  It backslashifies
4855 # metacharacters that are still active within double-quoted strings.
4856 Xsed='sed -e s/^X//'
4857 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4858
4859 # Same as above, but do not quote variable references.
4860 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4861
4862 # Sed substitution to delay expansion of an escaped shell variable in a
4863 # double_quote_subst'ed string.
4864 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4865
4866 # Constants:
4867 rm="rm -f"
4868
4869 # Global variables:
4870 default_ofile=libtool
4871 can_build_shared=yes
4872
4873 # All known linkers require a `.a' archive for static linking (except M$VC,
4874 # which needs '.lib').
4875 libext=a
4876 ltmain="$ac_aux_dir/ltmain.sh"
4877 ofile="$default_ofile"
4878 with_gnu_ld="$lt_cv_prog_gnu_ld"
4879 need_locks="$enable_libtool_lock"
4880
4881 old_CC="$CC"
4882 old_CFLAGS="$CFLAGS"
4883
4884 # Set sane defaults for various variables
4885 test -z "$AR" && AR=ar
4886 test -z "$AR_FLAGS" && AR_FLAGS=cru
4887 test -z "$AS" && AS=as
4888 test -z "$CC" && CC=cc
4889 test -z "$DLLTOOL" && DLLTOOL=dlltool
4890 test -z "$LD" && LD=ld
4891 test -z "$LN_S" && LN_S="ln -s"
4892 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4893 test -z "$NM" && NM=nm
4894 test -z "$OBJDUMP" && OBJDUMP=objdump
4895 test -z "$RANLIB" && RANLIB=:
4896 test -z "$STRIP" && STRIP=:
4897 test -z "$ac_objext" && ac_objext=o
4898
4899 if test x"$host" != x"$build"; then
4900   ac_tool_prefix=${host_alias}-
4901 else
4902   ac_tool_prefix=
4903 fi
4904
4905 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4906 case $host_os in
4907 linux-gnu*) ;;
4908 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4909 esac
4910
4911 case $host_os in
4912 aix3*)
4913   # AIX sometimes has problems with the GCC collect2 program.  For some
4914   # reason, if we set the COLLECT_NAMES environment variable, the problems
4915   # vanish in a puff of smoke.
4916   if test "X${COLLECT_NAMES+set}" != Xset; then
4917     COLLECT_NAMES=
4918     export COLLECT_NAMES
4919   fi
4920   ;;
4921 esac
4922
4923 # Determine commands to create old-style static archives.
4924 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4925 old_postinstall_cmds='chmod 644 $oldlib'
4926 old_postuninstall_cmds=
4927
4928 if test -n "$RANLIB"; then
4929   case $host_os in
4930   openbsd*)
4931     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4932     ;;
4933   *)
4934     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4935     ;;
4936   esac
4937   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4938 fi
4939
4940 # Allow CC to be a program name with arguments.
4941 set dummy $CC
4942 compiler="$2"
4943
4944 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4945 echo "configure:4946: checking for objdir" >&5
4946 rm -f .libs 2>/dev/null
4947 mkdir .libs 2>/dev/null
4948 if test -d .libs; then
4949   objdir=.libs
4950 else
4951   # MS-DOS does not allow filenames that begin with a dot.
4952   objdir=_libs
4953 fi
4954 rmdir .libs 2>/dev/null
4955 echo "$ac_t""$objdir" 1>&6
4956
4957
4958 # Check whether --with-pic or --without-pic was given.
4959 if test "${with_pic+set}" = set; then
4960   withval="$with_pic"
4961   pic_mode="$withval"
4962 else
4963   pic_mode=default
4964 fi
4965
4966 test -z "$pic_mode" && pic_mode=default
4967
4968 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4969 # in isolation, and that seeing it set (from the cache) indicates that
4970 # the associated values are set (in the cache) correctly too.
4971 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4972 echo "configure:4973: checking for $compiler option to produce PIC" >&5
4973 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4974   echo $ac_n "(cached) $ac_c" 1>&6
4975 else
4976    lt_cv_prog_cc_pic=
4977   lt_cv_prog_cc_shlib=
4978   lt_cv_prog_cc_wl=
4979   lt_cv_prog_cc_static=
4980   lt_cv_prog_cc_no_builtin=
4981   lt_cv_prog_cc_can_build_shared=$can_build_shared
4982
4983   if test "$GCC" = yes; then
4984     lt_cv_prog_cc_wl='-Wl,'
4985     lt_cv_prog_cc_static='-static'
4986
4987     case $host_os in
4988     aix*)
4989       # Below there is a dirty hack to force normal static linking with -ldl
4990       # The problem is because libdl dynamically linked with both libc and
4991       # libC (AIX C++ library), which obviously doesn't included in libraries
4992       # list by gcc. This cause undefined symbols with -static flags.
4993       # This hack allows C programs to be linked with "-static -ldl", but
4994       # not sure about C++ programs.
4995       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
4996       ;;
4997     amigaos*)
4998       # FIXME: we need at least 68020 code to build shared libraries, but
4999       # adding the `-m68020' flag to GCC prevents building anything better,
5000       # like `-m68040'.
5001       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
5002       ;;
5003     beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
5004       # PIC is the default for these OSes.
5005       ;;
5006     darwin* | rhapsody*)
5007       # PIC is the default on this platform
5008       # Common symbols not allowed in MH_DYLIB files
5009       lt_cv_prog_cc_pic='-fno-common'
5010       ;;
5011     cygwin* | mingw* | pw32* | os2*)
5012       # This hack is so that the source file can tell whether it is being
5013       # built for inclusion in a dll (and should export symbols for example).
5014       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5015       ;;
5016     sysv4*MP*)
5017       if test -d /usr/nec; then
5018          lt_cv_prog_cc_pic=-Kconform_pic
5019       fi
5020       ;;
5021     *)
5022       lt_cv_prog_cc_pic='-fPIC'
5023       ;;
5024     esac
5025   else
5026     # PORTME Check for PIC flags for the system compiler.
5027     case $host_os in
5028     aix3* | aix4* | aix5*)
5029       lt_cv_prog_cc_wl='-Wl,'
5030       # All AIX code is PIC.
5031       if test "$host_cpu" = ia64; then
5032         # AIX 5 now supports IA64 processor
5033         lt_cv_prog_cc_static='-Bstatic'
5034       else
5035         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5036       fi
5037       ;;
5038
5039     hpux9* | hpux10* | hpux11*)
5040       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5041       lt_cv_prog_cc_wl='-Wl,'
5042       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5043       lt_cv_prog_cc_pic='+Z'
5044       ;;
5045
5046     irix5* | irix6*)
5047       lt_cv_prog_cc_wl='-Wl,'
5048       lt_cv_prog_cc_static='-non_shared'
5049       # PIC (with -KPIC) is the default.
5050       ;;
5051
5052     cygwin* | mingw* | pw32* | os2*)
5053       # This hack is so that the source file can tell whether it is being
5054       # built for inclusion in a dll (and should export symbols for example).
5055       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5056       ;;
5057
5058     newsos6)
5059       lt_cv_prog_cc_pic='-KPIC'
5060       lt_cv_prog_cc_static='-Bstatic'
5061       ;;
5062
5063     osf3* | osf4* | osf5*)
5064       # All OSF/1 code is PIC.
5065       lt_cv_prog_cc_wl='-Wl,'
5066       lt_cv_prog_cc_static='-non_shared'
5067       ;;
5068
5069     sco3.2v5*)
5070       lt_cv_prog_cc_pic='-Kpic'
5071       lt_cv_prog_cc_static='-dn'
5072       lt_cv_prog_cc_shlib='-belf'
5073       ;;
5074
5075     solaris*)
5076       lt_cv_prog_cc_pic='-KPIC'
5077       lt_cv_prog_cc_static='-Bstatic'
5078       lt_cv_prog_cc_wl='-Wl,'
5079       ;;
5080
5081     sunos4*)
5082       lt_cv_prog_cc_pic='-PIC'
5083       lt_cv_prog_cc_static='-Bstatic'
5084       lt_cv_prog_cc_wl='-Qoption ld '
5085       ;;
5086
5087     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5088       lt_cv_prog_cc_pic='-KPIC'
5089       lt_cv_prog_cc_static='-Bstatic'
5090       if test "x$host_vendor" = xsni; then
5091         lt_cv_prog_cc_wl='-LD'
5092       else
5093         lt_cv_prog_cc_wl='-Wl,'
5094       fi
5095       ;;
5096
5097     uts4*)
5098       lt_cv_prog_cc_pic='-pic'
5099       lt_cv_prog_cc_static='-Bstatic'
5100       ;;
5101
5102     sysv4*MP*)
5103       if test -d /usr/nec ;then
5104         lt_cv_prog_cc_pic='-Kconform_pic'
5105         lt_cv_prog_cc_static='-Bstatic'
5106       fi
5107       ;;
5108
5109     *)
5110       lt_cv_prog_cc_can_build_shared=no
5111       ;;
5112     esac
5113   fi
5114
5115 fi
5116
5117 if test -z "$lt_cv_prog_cc_pic"; then
5118   echo "$ac_t""none" 1>&6
5119 else
5120   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5121
5122   # Check to make sure the pic_flag actually works.
5123   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5124 echo "configure:5125: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5125   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5126   echo $ac_n "(cached) $ac_c" 1>&6
5127 else
5128       save_CFLAGS="$CFLAGS"
5129     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5130     cat > conftest.$ac_ext <<EOF
5131 #line 5132 "configure"
5132 #include "confdefs.h"
5133
5134 int main() {
5135
5136 ; return 0; }
5137 EOF
5138 if { (eval echo configure:5139: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5139   rm -rf conftest*
5140         case $host_os in
5141       hpux9* | hpux10* | hpux11*)
5142         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5143         # they create non-PIC objects.  So, if there were any warnings, we
5144         # assume that PIC is not supported.
5145         if test -s conftest.err; then
5146           lt_cv_prog_cc_pic_works=no
5147         else
5148           lt_cv_prog_cc_pic_works=yes
5149         fi
5150         ;;
5151       *)
5152         lt_cv_prog_cc_pic_works=yes
5153         ;;
5154       esac
5155     
5156 else
5157   echo "configure: failed program was:" >&5
5158   cat conftest.$ac_ext >&5
5159   rm -rf conftest*
5160         lt_cv_prog_cc_pic_works=no
5161     
5162 fi
5163 rm -f conftest*
5164     CFLAGS="$save_CFLAGS"
5165   
5166 fi
5167
5168
5169   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5170     lt_cv_prog_cc_pic=
5171     lt_cv_prog_cc_can_build_shared=no
5172   else
5173     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5174   fi
5175
5176   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5177 fi
5178
5179 # Check for any special shared library compilation flags.
5180 if test -n "$lt_cv_prog_cc_shlib"; then
5181   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5182   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5183   else
5184    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5185     lt_cv_prog_cc_can_build_shared=no
5186   fi
5187 fi
5188
5189 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5190 echo "configure:5191: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5191 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5192   echo $ac_n "(cached) $ac_c" 1>&6
5193 else
5194     lt_cv_prog_cc_static_works=no
5195   save_LDFLAGS="$LDFLAGS"
5196   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5197   cat > conftest.$ac_ext <<EOF
5198 #line 5199 "configure"
5199 #include "confdefs.h"
5200
5201 int main() {
5202
5203 ; return 0; }
5204 EOF
5205 if { (eval echo configure:5206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5206   rm -rf conftest*
5207   lt_cv_prog_cc_static_works=yes
5208 else
5209   echo "configure: failed program was:" >&5
5210   cat conftest.$ac_ext >&5
5211 fi
5212 rm -f conftest*
5213   LDFLAGS="$save_LDFLAGS"
5214
5215 fi
5216
5217
5218 # Belt *and* braces to stop my trousers falling down:
5219 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5220 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5221
5222 pic_flag="$lt_cv_prog_cc_pic"
5223 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5224 wl="$lt_cv_prog_cc_wl"
5225 link_static_flag="$lt_cv_prog_cc_static"
5226 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5227 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5228
5229
5230 # Check to see if options -o and -c are simultaneously supported by compiler
5231 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5232 echo "configure:5233: checking if $compiler supports -c -o file.$ac_objext" >&5
5233 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5234   echo $ac_n "(cached) $ac_c" 1>&6
5235 else
5236   
5237 $rm -r conftest 2>/dev/null
5238 mkdir conftest
5239 cd conftest
5240 echo "int some_variable = 0;" > conftest.$ac_ext
5241 mkdir out
5242 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5243 # that will create temporary files in the current directory regardless of
5244 # the output directory.  Thus, making CWD read-only will cause this test
5245 # to fail, enabling locking or at least warning the user not to do parallel
5246 # builds.
5247 chmod -w .
5248 save_CFLAGS="$CFLAGS"
5249 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5250 compiler_c_o=no
5251 if { (eval echo configure:5252: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5252   # The compiler can only warn and ignore the option if not recognized
5253   # So say no if there are warnings
5254   if test -s out/conftest.err; then
5255     lt_cv_compiler_c_o=no
5256   else
5257     lt_cv_compiler_c_o=yes
5258   fi
5259 else
5260   # Append any errors to the config.log.
5261   cat out/conftest.err 1>&5
5262   lt_cv_compiler_c_o=no
5263 fi
5264 CFLAGS="$save_CFLAGS"
5265 chmod u+w .
5266 $rm conftest* out/*
5267 rmdir out
5268 cd ..
5269 rmdir conftest
5270 $rm -r conftest 2>/dev/null
5271
5272 fi
5273
5274 compiler_c_o=$lt_cv_compiler_c_o
5275 echo "$ac_t""$compiler_c_o" 1>&6
5276
5277 if test x"$compiler_c_o" = x"yes"; then
5278   # Check to see if we can write to a .lo
5279   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5280 echo "configure:5281: checking if $compiler supports -c -o file.lo" >&5
5281   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5282   echo $ac_n "(cached) $ac_c" 1>&6
5283 else
5284   
5285   lt_cv_compiler_o_lo=no
5286   save_CFLAGS="$CFLAGS"
5287   CFLAGS="$CFLAGS -c -o conftest.lo"
5288   save_objext="$ac_objext"
5289   ac_objext=lo
5290   cat > conftest.$ac_ext <<EOF
5291 #line 5292 "configure"
5292 #include "confdefs.h"
5293
5294 int main() {
5295 int some_variable = 0;
5296 ; return 0; }
5297 EOF
5298 if { (eval echo configure:5299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5299   rm -rf conftest*
5300       # The compiler can only warn and ignore the option if not recognized
5301     # So say no if there are warnings
5302     if test -s conftest.err; then
5303       lt_cv_compiler_o_lo=no
5304     else
5305       lt_cv_compiler_o_lo=yes
5306     fi
5307   
5308 else
5309   echo "configure: failed program was:" >&5
5310   cat conftest.$ac_ext >&5
5311 fi
5312 rm -f conftest*
5313   ac_objext="$save_objext"
5314   CFLAGS="$save_CFLAGS"
5315   
5316 fi
5317
5318   compiler_o_lo=$lt_cv_compiler_o_lo
5319   echo "$ac_t""$compiler_o_lo" 1>&6
5320 else
5321   compiler_o_lo=no
5322 fi
5323
5324 # Check to see if we can do hard links to lock some files if needed
5325 hard_links="nottested"
5326 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5327   # do not overwrite the value of need_locks provided by the user
5328   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5329 echo "configure:5330: checking if we can lock with hard links" >&5
5330   hard_links=yes
5331   $rm conftest*
5332   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5333   touch conftest.a
5334   ln conftest.a conftest.b 2>&5 || hard_links=no
5335   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5336   echo "$ac_t""$hard_links" 1>&6
5337   if test "$hard_links" = no; then
5338     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5339     need_locks=warn
5340   fi
5341 else
5342   need_locks=no
5343 fi
5344
5345 if test "$GCC" = yes; then
5346   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5347   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5348 echo "configure:5349: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5349   echo "int some_variable = 0;" > conftest.$ac_ext
5350   save_CFLAGS="$CFLAGS"
5351   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5352   compiler_rtti_exceptions=no
5353   cat > conftest.$ac_ext <<EOF
5354 #line 5355 "configure"
5355 #include "confdefs.h"
5356
5357 int main() {
5358 int some_variable = 0;
5359 ; return 0; }
5360 EOF
5361 if { (eval echo configure:5362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5362   rm -rf conftest*
5363       # The compiler can only warn and ignore the option if not recognized
5364     # So say no if there are warnings
5365     if test -s conftest.err; then
5366       compiler_rtti_exceptions=no
5367     else
5368       compiler_rtti_exceptions=yes
5369     fi
5370   
5371 else
5372   echo "configure: failed program was:" >&5
5373   cat conftest.$ac_ext >&5
5374 fi
5375 rm -f conftest*
5376   CFLAGS="$save_CFLAGS"
5377   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5378
5379   if test "$compiler_rtti_exceptions" = "yes"; then
5380     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5381   else
5382     no_builtin_flag=' -fno-builtin'
5383   fi
5384 fi
5385
5386 # See if the linker supports building shared libraries.
5387 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5388 echo "configure:5389: checking whether the linker ($LD) supports shared libraries" >&5
5389
5390 allow_undefined_flag=
5391 no_undefined_flag=
5392 need_lib_prefix=unknown
5393 need_version=unknown
5394 # when you set need_version to no, make sure it does not cause -set_version
5395 # flags to be left without arguments
5396 archive_cmds=
5397 archive_expsym_cmds=
5398 old_archive_from_new_cmds=
5399 old_archive_from_expsyms_cmds=
5400 export_dynamic_flag_spec=
5401 whole_archive_flag_spec=
5402 thread_safe_flag_spec=
5403 hardcode_into_libs=no
5404 hardcode_libdir_flag_spec=
5405 hardcode_libdir_separator=
5406 hardcode_direct=no
5407 hardcode_minus_L=no
5408 hardcode_shlibpath_var=unsupported
5409 runpath_var=
5410 link_all_deplibs=unknown
5411 always_export_symbols=no
5412 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5413 # include_expsyms should be a list of space-separated symbols to be *always*
5414 # included in the symbol list
5415 include_expsyms=
5416 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5417 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5418 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5419 # as well as any symbol that contains `d'.
5420 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5421 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5422 # platforms (ab)use it in PIC code, but their linkers get confused if
5423 # the symbol is explicitly referenced.  Since portable code cannot
5424 # rely on this symbol name, it's probably fine to never include it in
5425 # preloaded symbol tables.
5426 extract_expsyms_cmds=
5427
5428 case $host_os in
5429 cygwin* | mingw* | pw32*)
5430   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5431   # When not using gcc, we currently assume that we are using
5432   # Microsoft Visual C++.
5433   if test "$GCC" != yes; then
5434     with_gnu_ld=no
5435   fi
5436   ;;
5437 openbsd*)
5438   with_gnu_ld=no
5439   ;;
5440 esac
5441
5442 ld_shlibs=yes
5443 if test "$with_gnu_ld" = yes; then
5444   # If archive_cmds runs LD, not CC, wlarc should be empty
5445   wlarc='${wl}'
5446
5447   # See if GNU ld supports shared libraries.
5448   case $host_os in
5449   aix3* | aix4* | aix5*)
5450     # On AIX, the GNU linker is very broken
5451     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5452     ld_shlibs=no
5453     cat <<EOF 1>&2
5454
5455 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5456 *** to be unable to reliably create shared libraries on AIX.
5457 *** Therefore, libtool is disabling shared libraries support.  If you
5458 *** really care for shared libraries, you may want to modify your PATH
5459 *** so that a non-GNU linker is found, and then restart.
5460
5461 EOF
5462     ;;
5463
5464   amigaos*)
5465     archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5466     hardcode_libdir_flag_spec='-L$libdir'
5467     hardcode_minus_L=yes
5468
5469     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5470     # that the semantics of dynamic libraries on AmigaOS, at least up
5471     # to version 4, is to share data among multiple programs linked
5472     # with the same dynamic library.  Since this doesn't match the
5473     # behavior of shared libraries on other platforms, we can use
5474     # them.
5475     ld_shlibs=no
5476     ;;
5477
5478   beos*)
5479     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5480       allow_undefined_flag=unsupported
5481       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5482       # support --undefined.  This deserves some investigation.  FIXME
5483       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5484     else
5485       ld_shlibs=no
5486     fi
5487     ;;
5488
5489   cygwin* | mingw* | pw32*)
5490     # hardcode_libdir_flag_spec is actually meaningless, as there is
5491     # no search path for DLLs.
5492     hardcode_libdir_flag_spec='-L$libdir'
5493     allow_undefined_flag=unsupported
5494     always_export_symbols=yes
5495
5496     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5497       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5498       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5499       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5500       else $CC -o impgen impgen.c ; fi)~
5501       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5502
5503     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5504
5505     # cygwin and mingw dlls have different entry points and sets of symbols
5506     # to exclude.
5507     # FIXME: what about values for MSVC?
5508     dll_entry=__cygwin_dll_entry@12
5509     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5510     case $host_os in
5511     mingw*)
5512       # mingw values
5513       dll_entry=_DllMainCRTStartup@12
5514       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5515       ;;
5516     esac
5517
5518     # mingw and cygwin differ, and it's simplest to just exclude the union
5519     # of the two symbol sets.
5520     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5521
5522     # recent cygwin and mingw systems supply a stub DllMain which the user
5523     # can override, but on older systems we have to supply one (in ltdll.c)
5524     if test "x$lt_cv_need_dllmain" = "xyes"; then
5525       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5526       ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
5527         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5528     else
5529       ltdll_obj=
5530       ltdll_cmds=
5531     fi
5532
5533     # Extract the symbol export list from an `--export-all' def file,
5534     # then regenerate the def file from the symbol export list, so that
5535     # the compiled dll only exports the symbol export list.
5536     # Be careful not to strip the DATA tag left be newer dlltools.
5537     export_symbols_cmds="$ltdll_cmds"'
5538       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5539       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5540
5541     # If the export-symbols file already is a .def file (1st line
5542     # is EXPORTS), use it as is.
5543     # If DATA tags from a recent dlltool are present, honour them!
5544     archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
5545         cp $export_symbols $output_objdir/$soname-def;
5546       else
5547         echo EXPORTS > $output_objdir/$soname-def;
5548         _lt_hint=1;
5549         cat $export_symbols | while read symbol; do
5550          set dummy \$symbol;
5551          case \$# in
5552            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5553            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5554          esac;
5555          _lt_hint=`expr 1 + \$_lt_hint`;
5556         done;
5557       fi~
5558       '"$ltdll_cmds"'
5559       $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
5560       $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
5561       $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
5562       $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
5563       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5564     ;;
5565
5566   netbsd*)
5567     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5568       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5569       wlarc=
5570     else
5571       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5572       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5573     fi
5574     ;;
5575
5576   solaris* | sysv5*)
5577     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5578       ld_shlibs=no
5579       cat <<EOF 1>&2
5580
5581 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5582 *** create shared libraries on Solaris systems.  Therefore, libtool
5583 *** is disabling shared libraries support.  We urge you to upgrade GNU
5584 *** binutils to release 2.9.1 or newer.  Another option is to modify
5585 *** your PATH or compiler configuration so that the native linker is
5586 *** used, and then restart.
5587
5588 EOF
5589     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5590       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5591       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5592     else
5593       ld_shlibs=no
5594     fi
5595     ;;
5596
5597   sunos4*)
5598     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5599     wlarc=
5600     hardcode_direct=yes
5601     hardcode_shlibpath_var=no
5602     ;;
5603
5604   *)
5605     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5606       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5607       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5608     else
5609       ld_shlibs=no
5610     fi
5611     ;;
5612   esac
5613
5614   if test "$ld_shlibs" = yes; then
5615     runpath_var=LD_RUN_PATH
5616     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5617     export_dynamic_flag_spec='${wl}--export-dynamic'
5618     case $host_os in
5619     cygwin* | mingw* | pw32*)
5620       # dlltool doesn't understand --whole-archive et. al.
5621       whole_archive_flag_spec=
5622       ;;
5623     *)
5624       # ancient GNU ld didn't support --whole-archive et. al.
5625       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5626         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5627       else
5628         whole_archive_flag_spec=
5629       fi
5630       ;;
5631     esac
5632   fi
5633 else
5634   # PORTME fill in a description of your system's linker (not GNU ld)
5635   case $host_os in
5636   aix3*)
5637     allow_undefined_flag=unsupported
5638     always_export_symbols=yes
5639     archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
5640     # Note: this linker hardcodes the directories in LIBPATH if there
5641     # are no directories specified by -L.
5642     hardcode_minus_L=yes
5643     if test "$GCC" = yes && test -z "$link_static_flag"; then
5644       # Neither direct hardcoding nor static linking is supported with a
5645       # broken collect2.
5646       hardcode_direct=unsupported
5647     fi
5648     ;;
5649
5650   aix4* | aix5*)
5651     if test "$host_cpu" = ia64; then
5652       # On IA64, the linker does run time linking by default, so we don't
5653       # have to do anything special.
5654       aix_use_runtimelinking=no
5655       exp_sym_flag='-Bexport'
5656       no_entry_flag=""
5657     else
5658       aix_use_runtimelinking=no
5659
5660       # Test if we are trying to use run time linking or normal
5661       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5662       # need to do runtime linking.
5663       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5664         for ld_flag in $LDFLAGS; do
5665           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5666             aix_use_runtimelinking=yes
5667             break
5668           fi
5669         done
5670       esac
5671
5672       exp_sym_flag='-bexport'
5673       no_entry_flag='-bnoentry'
5674     fi
5675
5676     # When large executables or shared objects are built, AIX ld can
5677     # have problems creating the table of contents.  If linking a library
5678     # or program results in "error TOC overflow" add -mminimal-toc to
5679     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5680     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5681
5682     hardcode_direct=yes
5683     archive_cmds=''
5684     hardcode_libdir_separator=':'
5685     if test "$GCC" = yes; then
5686       case $host_os in aix4.[012]|aix4.[012].*)
5687         collect2name=`${CC} -print-prog-name=collect2`
5688         if test -f "$collect2name" && \
5689           strings "$collect2name" | grep resolve_lib_name >/dev/null
5690         then
5691           # We have reworked collect2
5692           hardcode_direct=yes
5693         else
5694           # We have old collect2
5695           hardcode_direct=unsupported
5696           # It fails to find uninstalled libraries when the uninstalled
5697           # path is not listed in the libpath.  Setting hardcode_minus_L
5698           # to unsupported forces relinking
5699           hardcode_minus_L=yes
5700           hardcode_libdir_flag_spec='-L$libdir'
5701           hardcode_libdir_separator=
5702         fi
5703       esac
5704
5705       shared_flag='-shared'
5706     else
5707       # not using gcc
5708       if test "$host_cpu" = ia64; then
5709         shared_flag='${wl}-G'
5710       else
5711         if test "$aix_use_runtimelinking" = yes; then
5712           shared_flag='${wl}-G'
5713         else
5714           shared_flag='${wl}-bM:SRE'
5715         fi
5716       fi
5717     fi
5718
5719     # It seems that -bexpall can do strange things, so it is better to
5720     # generate a list of symbols to export.
5721     always_export_symbols=yes
5722     if test "$aix_use_runtimelinking" = yes; then
5723       # Warning - without using the other runtime loading flags (-brtl),
5724       # -berok will link without error, but may produce a broken library.
5725       allow_undefined_flag='-berok'
5726       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5727       archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5728     else
5729       if test "$host_cpu" = ia64; then
5730         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5731         allow_undefined_flag="-z nodefs"
5732         archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
5733       else
5734         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5735         # Warning - without using the other run time loading flags,
5736         # -berok will link without error, but may produce a broken library.
5737         allow_undefined_flag='${wl}-berok'
5738         # This is a bit strange, but is similar to how AIX traditionally builds
5739         # it's shared libraries.
5740         archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname'
5741       fi
5742     fi
5743     ;;
5744
5745   amigaos*)
5746     archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5747     hardcode_libdir_flag_spec='-L$libdir'
5748     hardcode_minus_L=yes
5749     # see comment about different semantics on the GNU ld section
5750     ld_shlibs=no
5751     ;;
5752
5753   cygwin* | mingw* | pw32*)
5754     # When not using gcc, we currently assume that we are using
5755     # Microsoft Visual C++.
5756     # hardcode_libdir_flag_spec is actually meaningless, as there is
5757     # no search path for DLLs.
5758     hardcode_libdir_flag_spec=' '
5759     allow_undefined_flag=unsupported
5760     # Tell ltmain to make .lib files, not .a files.
5761     libext=lib
5762     # FIXME: Setting linknames here is a bad hack.
5763     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5764     # The linker will automatically build a .lib file if we build a DLL.
5765     old_archive_from_new_cmds='true'
5766     # FIXME: Should let the user specify the lib program.
5767     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5768     fix_srcfile_path='`cygpath -w "$srcfile"`'
5769     ;;
5770
5771   darwin* | rhapsody*)
5772     case "$host_os" in
5773     rhapsody* | darwin1.[012])
5774       allow_undefined_flag='-undefined suppress'
5775       ;;
5776     *) # Darwin 1.3 on
5777       allow_undefined_flag='-flat_namespace -undefined suppress'
5778       ;;
5779     esac
5780     # FIXME: Relying on posixy $() will cause problems for
5781     #        cross-compilation, but unfortunately the echo tests do not
5782     #        yet detect zsh echo's removal of \ escapes.
5783     archive_cmds='$nonopt $(test "x$module" = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
5784     # We need to add '_' to the symbols in $export_symbols first
5785     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5786     hardcode_direct=yes
5787     hardcode_shlibpath_var=no
5788     whole_archive_flag_spec='-all_load $convenience'
5789     ;;
5790
5791   freebsd1*)
5792     ld_shlibs=no
5793     ;;
5794
5795   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5796   # support.  Future versions do this automatically, but an explicit c++rt0.o
5797   # does not break anything, and helps significantly (at the cost of a little
5798   # extra space).
5799   freebsd2.2*)
5800     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5801     hardcode_libdir_flag_spec='-R$libdir'
5802     hardcode_direct=yes
5803     hardcode_shlibpath_var=no
5804     ;;
5805
5806   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5807   freebsd2*)
5808     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5809     hardcode_direct=yes
5810     hardcode_minus_L=yes
5811     hardcode_shlibpath_var=no
5812     ;;
5813
5814   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5815   freebsd*)
5816     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5817     hardcode_libdir_flag_spec='-R$libdir'
5818     hardcode_direct=yes
5819     hardcode_shlibpath_var=no
5820     ;;
5821
5822   hpux9* | hpux10* | hpux11*)
5823     case $host_os in
5824     hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
5825     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5826     esac
5827     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5828     hardcode_libdir_separator=:
5829     hardcode_direct=yes
5830     hardcode_minus_L=yes # Not in the search PATH, but as the default
5831                          # location of the library.
5832     export_dynamic_flag_spec='${wl}-E'
5833     ;;
5834
5835   irix5* | irix6*)
5836     if test "$GCC" = yes; then
5837       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5838     else
5839       archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
5840     fi
5841     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5842     hardcode_libdir_separator=:
5843     link_all_deplibs=yes
5844     ;;
5845
5846   netbsd*)
5847     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5848       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5849     else
5850       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5851     fi
5852     hardcode_libdir_flag_spec='-R$libdir'
5853     hardcode_direct=yes
5854     hardcode_shlibpath_var=no
5855     ;;
5856
5857   newsos6)
5858     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5859     hardcode_direct=yes
5860     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5861     hardcode_libdir_separator=:
5862     hardcode_shlibpath_var=no
5863     ;;
5864
5865   openbsd*)
5866     hardcode_direct=yes
5867     hardcode_shlibpath_var=no
5868     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5869       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
5870       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5871       export_dynamic_flag_spec='${wl}-E'
5872     else
5873       case "$host_os" in
5874       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5875         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5876         hardcode_libdir_flag_spec='-R$libdir'
5877         ;;
5878       *)
5879         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
5880         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5881         ;;
5882       esac
5883     fi
5884     ;;
5885
5886   os2*)
5887     hardcode_libdir_flag_spec='-L$libdir'
5888     hardcode_minus_L=yes
5889     allow_undefined_flag=unsupported
5890     archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
5891     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5892     ;;
5893
5894   osf3*)
5895     if test "$GCC" = yes; then
5896       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5897       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5898     else
5899       allow_undefined_flag=' -expect_unresolved \*'
5900       archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
5901     fi
5902     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5903     hardcode_libdir_separator=:
5904     ;;
5905
5906   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5907     if test "$GCC" = yes; then
5908       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5909       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5910       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5911     else
5912       allow_undefined_flag=' -expect_unresolved \*'
5913       archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
5914       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5915       $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
5916
5917       #Both c and cxx compiler support -rpath directly
5918       hardcode_libdir_flag_spec='-rpath $libdir'
5919     fi
5920     hardcode_libdir_separator=:
5921     ;;
5922
5923   sco3.2v5*)
5924     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5925     hardcode_shlibpath_var=no
5926     runpath_var=LD_RUN_PATH
5927     hardcode_runpath_var=yes
5928     export_dynamic_flag_spec='${wl}-Bexport'
5929     ;;
5930
5931   solaris*)
5932     # gcc --version < 3.0 without binutils cannot create self contained
5933     # shared libraries reliably, requiring libgcc.a to resolve some of
5934     # the object symbols generated in some cases.  Libraries that use
5935     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5936     # a copy of libgcc.a into every shared library to guarantee resolving
5937     # such symbols causes other problems:  According to Tim Van Holder
5938     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5939     # (to the application) exception stack for one thing.
5940     no_undefined_flag=' -z defs'
5941     if test "$GCC" = yes; then
5942       case `$CC --version 2>/dev/null` in
5943       [12].*)
5944         cat <<EOF 1>&2
5945
5946 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5947 *** create self contained shared libraries on Solaris systems, without
5948 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5949 *** -no-undefined support, which will at least allow you to build shared
5950 *** libraries.  However, you may find that when you link such libraries
5951 *** into an application without using GCC, you have to manually add
5952 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5953 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5954 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5955
5956 EOF
5957         no_undefined_flag=
5958         ;;
5959       esac
5960     fi
5961     # $CC -shared without GNU ld will not create a library from C++
5962     # object files and a static libstdc++, better avoid it by now
5963     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5964     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5965                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5966     hardcode_libdir_flag_spec='-R$libdir'
5967     hardcode_shlibpath_var=no
5968     case $host_os in
5969     solaris2.[0-5] | solaris2.[0-5].*) ;;
5970     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5971       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5972     esac
5973     link_all_deplibs=yes
5974     ;;
5975
5976   sunos4*)
5977     if test "x$host_vendor" = xsequent; then
5978       # Use $CC to link under sequent, because it throws in some extra .o
5979       # files that make .init and .fini sections work.
5980       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5981     else
5982       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5983     fi
5984     hardcode_libdir_flag_spec='-L$libdir'
5985     hardcode_direct=yes
5986     hardcode_minus_L=yes
5987     hardcode_shlibpath_var=no
5988     ;;
5989
5990   sysv4)
5991     if test "x$host_vendor" = xsno; then
5992       archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
5993       hardcode_direct=yes # is this really true???
5994     else
5995       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5996       hardcode_direct=no #Motorola manual says yes, but my tests say they lie
5997     fi
5998     runpath_var='LD_RUN_PATH'
5999     hardcode_shlibpath_var=no
6000     ;;
6001
6002   sysv4.3*)
6003     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6004     hardcode_shlibpath_var=no
6005     export_dynamic_flag_spec='-Bexport'
6006     ;;
6007
6008   sysv5*)
6009     no_undefined_flag=' -z text'
6010     # $CC -shared without GNU ld will not create a library from C++
6011     # object files and a static libstdc++, better avoid it by now
6012     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6013     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6014                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6015     hardcode_libdir_flag_spec=
6016     hardcode_shlibpath_var=no
6017     runpath_var='LD_RUN_PATH'
6018     ;;
6019
6020   uts4*)
6021     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6022     hardcode_libdir_flag_spec='-L$libdir'
6023     hardcode_shlibpath_var=no
6024     ;;
6025
6026   dgux*)
6027     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6028     hardcode_libdir_flag_spec='-L$libdir'
6029     hardcode_shlibpath_var=no
6030     ;;
6031
6032   sysv4*MP*)
6033     if test -d /usr/nec; then
6034       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6035       hardcode_shlibpath_var=no
6036       runpath_var=LD_RUN_PATH
6037       hardcode_runpath_var=yes
6038       ld_shlibs=yes
6039     fi
6040     ;;
6041
6042   sysv4.2uw2*)
6043     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6044     hardcode_direct=yes
6045     hardcode_minus_L=no
6046     hardcode_shlibpath_var=no
6047     hardcode_runpath_var=yes
6048     runpath_var=LD_RUN_PATH
6049     ;;
6050
6051   sysv5uw7* | unixware7*)
6052     no_undefined_flag='${wl}-z ${wl}text'
6053     if test "$GCC" = yes; then
6054       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6055     else
6056       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6057     fi
6058     runpath_var='LD_RUN_PATH'
6059     hardcode_shlibpath_var=no
6060     ;;
6061
6062   *)
6063     ld_shlibs=no
6064     ;;
6065   esac
6066 fi
6067 echo "$ac_t""$ld_shlibs" 1>&6
6068 test "$ld_shlibs" = no && can_build_shared=no
6069
6070 # Check hardcoding attributes.
6071 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6072 echo "configure:6073: checking how to hardcode library paths into programs" >&5
6073 hardcode_action=
6074 if test -n "$hardcode_libdir_flag_spec" || \
6075    test -n "$runpath_var"; then
6076
6077   # We can hardcode non-existant directories.
6078   if test "$hardcode_direct" != no &&
6079      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6080      # have to relink, otherwise we might link with an installed library
6081      # when we should be linking with a yet-to-be-installed one
6082      ## test "$hardcode_shlibpath_var" != no &&
6083      test "$hardcode_minus_L" != no; then
6084     # Linking always hardcodes the temporary library directory.
6085     hardcode_action=relink
6086   else
6087     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6088     hardcode_action=immediate
6089   fi
6090 else
6091   # We cannot hardcode anything, or else we can only hardcode existing
6092   # directories.
6093   hardcode_action=unsupported
6094 fi
6095 echo "$ac_t""$hardcode_action" 1>&6
6096
6097 striplib=
6098 old_striplib=
6099 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6100 echo "configure:6101: checking whether stripping libraries is possible" >&5
6101 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6102   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6103   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6104   echo "$ac_t""yes" 1>&6
6105 else
6106   echo "$ac_t""no" 1>&6
6107 fi
6108
6109 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6110 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6111
6112 # PORTME Fill in your ld.so characteristics
6113 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6114 echo "configure:6115: checking dynamic linker characteristics" >&5
6115 library_names_spec=
6116 libname_spec='lib$name'
6117 soname_spec=
6118 postinstall_cmds=
6119 postuninstall_cmds=
6120 finish_cmds=
6121 finish_eval=
6122 shlibpath_var=
6123 shlibpath_overrides_runpath=unknown
6124 version_type=none
6125 dynamic_linker="$host_os ld.so"
6126 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6127 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6128
6129 case $host_os in
6130 aix3*)
6131   version_type=linux
6132   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6133   shlibpath_var=LIBPATH
6134
6135   # AIX has no versioning support, so we append a major version to the name.
6136   soname_spec='${libname}${release}.so$major'
6137   ;;
6138
6139 aix4* | aix5*)
6140   version_type=linux
6141   if test "$host_cpu" = ia64; then
6142     # AIX 5 supports IA64
6143     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6144     shlibpath_var=LD_LIBRARY_PATH
6145   else
6146     # With GCC up to 2.95.x, collect2 would create an import file
6147     # for dependence libraries.  The import file would start with
6148     # the line `#! .'.  This would cause the generated library to
6149     # depend on `.', always an invalid library.  This was fixed in
6150     # development snapshots of GCC prior to 3.0.
6151     case $host_os in
6152       aix4 | aix4.[01] | aix4.[01].*)
6153         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6154              echo ' yes '
6155              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6156           :
6157         else
6158           can_build_shared=no
6159         fi
6160         ;;
6161     esac
6162     # AIX (on Power*) has no versioning support, so currently we can
6163     # not hardcode correct soname into executable. Probably we can
6164     # add versioning support to collect2, so additional links can
6165     # be useful in future.
6166     if test "$aix_use_runtimelinking" = yes; then
6167       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6168       # instead of lib<name>.a to let people know that these are not
6169       # typical AIX shared libraries.
6170       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6171     else
6172       # We preserve .a as extension for shared libraries through AIX4.2
6173       # and later when we are not doing run time linking.
6174       library_names_spec='${libname}${release}.a $libname.a'
6175       soname_spec='${libname}${release}.so$major'
6176     fi
6177     shlibpath_var=LIBPATH
6178   fi
6179   ;;
6180
6181 amigaos*)
6182   library_names_spec='$libname.ixlibrary $libname.a'
6183   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6184   finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
6185   ;;
6186
6187 beos*)
6188   library_names_spec='${libname}.so'
6189   dynamic_linker="$host_os ld.so"
6190   shlibpath_var=LIBRARY_PATH
6191   ;;
6192
6193 bsdi4*)
6194   version_type=linux
6195   need_version=no
6196   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6197   soname_spec='${libname}${release}.so$major'
6198   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6199   shlibpath_var=LD_LIBRARY_PATH
6200   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6201   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6202   export_dynamic_flag_spec=-rdynamic
6203   # the default ld.so.conf also contains /usr/contrib/lib and
6204   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6205   # libtool to hard-code these into programs
6206   ;;
6207
6208 cygwin* | mingw* | pw32*)
6209   version_type=windows
6210   need_version=no
6211   need_lib_prefix=no
6212   case $GCC,$host_os in
6213   yes,cygwin*)
6214     library_names_spec='$libname.dll.a'
6215     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6216     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6217       dldir=$destdir/`dirname \$dlpath`~
6218       test -d \$dldir || mkdir -p \$dldir~
6219       $install_prog .libs/$dlname \$dldir/$dlname'
6220     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6221       dlpath=$dir/\$dldll~
6222        $rm \$dlpath'
6223     ;;
6224   yes,mingw*)
6225     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6226     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
6227     ;;
6228   yes,pw32*)
6229     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6230     ;;
6231   *)
6232     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6233     ;;
6234   esac
6235   dynamic_linker='Win32 ld.exe'
6236   # FIXME: first we should search . and the directory the executable is in
6237   shlibpath_var=PATH
6238   ;;
6239
6240 darwin* | rhapsody*)
6241   dynamic_linker="$host_os dyld"
6242   version_type=darwin
6243   need_lib_prefix=no
6244   need_version=no
6245   # FIXME: Relying on posixy $() will cause problems for
6246   #        cross-compilation, but unfortunately the echo tests do not
6247   #        yet detect zsh echo's removal of \ escapes.
6248   library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
6249   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6250   shlibpath_overrides_runpath=yes
6251   shlibpath_var=DYLD_LIBRARY_PATH
6252   ;;
6253
6254 freebsd1*)
6255   dynamic_linker=no
6256   ;;
6257
6258 freebsd*)
6259   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6260   version_type=freebsd-$objformat
6261   case $version_type in
6262     freebsd-elf*)
6263       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6264       need_version=no
6265       need_lib_prefix=no
6266       ;;
6267     freebsd-*)
6268       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6269       need_version=yes
6270       ;;
6271   esac
6272   shlibpath_var=LD_LIBRARY_PATH
6273   case $host_os in
6274   freebsd2*)
6275     shlibpath_overrides_runpath=yes
6276     ;;
6277   *)
6278     shlibpath_overrides_runpath=no
6279     hardcode_into_libs=yes
6280     ;;
6281   esac
6282   ;;
6283
6284 gnu*)
6285   version_type=linux
6286   need_lib_prefix=no
6287   need_version=no
6288   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6289   soname_spec='${libname}${release}.so$major'
6290   shlibpath_var=LD_LIBRARY_PATH
6291   hardcode_into_libs=yes
6292   ;;
6293
6294 hpux9* | hpux10* | hpux11*)
6295   # Give a soname corresponding to the major version so that dld.sl refuses to
6296   # link against other versions.
6297   dynamic_linker="$host_os dld.sl"
6298   version_type=sunos
6299   need_lib_prefix=no
6300   need_version=no
6301   shlibpath_var=SHLIB_PATH
6302   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6303   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6304   soname_spec='${libname}${release}.sl$major'
6305   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6306   postinstall_cmds='chmod 555 $lib'
6307   ;;
6308
6309 irix5* | irix6*)
6310   version_type=irix
6311   need_lib_prefix=no
6312   need_version=no
6313   soname_spec='${libname}${release}.so$major'
6314   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6315   case $host_os in
6316   irix5*)
6317     libsuff= shlibsuff=
6318     ;;
6319   *)
6320     case $LD in # libtool.m4 will add one of these switches to LD
6321     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6322     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6323     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6324     *) libsuff= shlibsuff= libmagic=never-match;;
6325     esac
6326     ;;
6327   esac
6328   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6329   shlibpath_overrides_runpath=no
6330   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6331   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6332   ;;
6333
6334 # No shared lib support for Linux oldld, aout, or coff.
6335 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6336   dynamic_linker=no
6337   ;;
6338
6339 # This must be Linux ELF.
6340 linux-gnu*)
6341   version_type=linux
6342   need_lib_prefix=no
6343   need_version=no
6344   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6345   soname_spec='${libname}${release}.so$major'
6346   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6347   shlibpath_var=LD_LIBRARY_PATH
6348   shlibpath_overrides_runpath=no
6349   # This implies no fast_install, which is unacceptable.
6350   # Some rework will be needed to allow for fast_install
6351   # before this can be enabled.
6352   hardcode_into_libs=yes
6353
6354   # We used to test for /lib/ld.so.1 and disable shared libraries on
6355   # powerpc, because MkLinux only supported shared libraries with the
6356   # GNU dynamic linker.  Since this was broken with cross compilers,
6357   # most powerpc-linux boxes support dynamic linking these days and
6358   # people can always --disable-shared, the test was removed, and we
6359   # assume the GNU/Linux dynamic linker is in use.
6360   dynamic_linker='GNU/Linux ld.so'
6361   ;;
6362
6363 netbsd*)
6364   version_type=sunos
6365   need_lib_prefix=no
6366   need_version=no
6367   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6368     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6369     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6370     dynamic_linker='NetBSD (a.out) ld.so'
6371   else
6372     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6373     soname_spec='${libname}${release}.so$major'
6374     dynamic_linker='NetBSD ld.elf_so'
6375   fi
6376   shlibpath_var=LD_LIBRARY_PATH
6377   shlibpath_overrides_runpath=yes
6378   hardcode_into_libs=yes
6379   ;;
6380
6381 newsos6)
6382   version_type=linux
6383   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6384   shlibpath_var=LD_LIBRARY_PATH
6385   shlibpath_overrides_runpath=yes
6386   ;;
6387
6388 openbsd*)
6389   version_type=sunos
6390   need_lib_prefix=no
6391   need_version=no
6392   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6393     case "$host_os" in
6394     openbsd2.[89] | openbsd2.[89].*)
6395       shlibpath_overrides_runpath=no
6396       ;;
6397     *)
6398       shlibpath_overrides_runpath=yes
6399       ;;
6400     esac
6401   else
6402     shlibpath_overrides_runpath=yes
6403   fi
6404   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6405   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6406   shlibpath_var=LD_LIBRARY_PATH
6407   ;;
6408
6409 os2*)
6410   libname_spec='$name'
6411   need_lib_prefix=no
6412   library_names_spec='$libname.dll $libname.a'
6413   dynamic_linker='OS/2 ld.exe'
6414   shlibpath_var=LIBPATH
6415   ;;
6416
6417 osf3* | osf4* | osf5*)
6418   version_type=osf
6419   need_version=no
6420   soname_spec='${libname}${release}.so'
6421   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6422   shlibpath_var=LD_LIBRARY_PATH
6423   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6424   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6425   ;;
6426
6427 sco3.2v5*)
6428   version_type=osf
6429   soname_spec='${libname}${release}.so$major'
6430   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6431   shlibpath_var=LD_LIBRARY_PATH
6432   ;;
6433
6434 solaris*)
6435   version_type=linux
6436   need_lib_prefix=no
6437   need_version=no
6438   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6439   soname_spec='${libname}${release}.so$major'
6440   shlibpath_var=LD_LIBRARY_PATH
6441   shlibpath_overrides_runpath=yes
6442   hardcode_into_libs=yes
6443   # ldd complains unless libraries are executable
6444   postinstall_cmds='chmod +x $lib'
6445   ;;
6446
6447 sunos4*)
6448   version_type=sunos
6449   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6450   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6451   shlibpath_var=LD_LIBRARY_PATH
6452   shlibpath_overrides_runpath=yes
6453   if test "$with_gnu_ld" = yes; then
6454     need_lib_prefix=no
6455   fi
6456   need_version=yes
6457   ;;
6458
6459 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6460   version_type=linux
6461   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6462   soname_spec='${libname}${release}.so$major'
6463   shlibpath_var=LD_LIBRARY_PATH
6464   case $host_vendor in
6465     sni)
6466       shlibpath_overrides_runpath=no
6467       ;;
6468     motorola)
6469       need_lib_prefix=no
6470       need_version=no
6471       shlibpath_overrides_runpath=no
6472       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6473       ;;
6474   esac
6475   ;;
6476
6477 uts4*)
6478   version_type=linux
6479   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6480   soname_spec='${libname}${release}.so$major'
6481   shlibpath_var=LD_LIBRARY_PATH
6482   ;;
6483
6484 dgux*)
6485   version_type=linux
6486   need_lib_prefix=no
6487   need_version=no
6488   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6489   soname_spec='${libname}${release}.so$major'
6490   shlibpath_var=LD_LIBRARY_PATH
6491   ;;
6492
6493 sysv4*MP*)
6494   if test -d /usr/nec ;then
6495     version_type=linux
6496     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6497     soname_spec='$libname.so.$major'
6498     shlibpath_var=LD_LIBRARY_PATH
6499   fi
6500   ;;
6501
6502 *)
6503   dynamic_linker=no
6504   ;;
6505 esac
6506 echo "$ac_t""$dynamic_linker" 1>&6
6507 test "$dynamic_linker" = no && can_build_shared=no
6508
6509 # Report the final consequences.
6510 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6511 echo "configure:6512: checking if libtool supports shared libraries" >&5
6512 echo "$ac_t""$can_build_shared" 1>&6
6513
6514 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6515 echo "configure:6516: checking whether to build shared libraries" >&5
6516 test "$can_build_shared" = "no" && enable_shared=no
6517
6518 # On AIX, shared libraries and static libraries use the same namespace, and
6519 # are all built from PIC.
6520 case "$host_os" in
6521 aix3*)
6522   test "$enable_shared" = yes && enable_static=no
6523   if test -n "$RANLIB"; then
6524     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6525     postinstall_cmds='$RANLIB $lib'
6526   fi
6527   ;;
6528
6529 aix4*)
6530   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6531     test "$enable_shared" = yes && enable_static=no
6532   fi
6533   ;;
6534 esac
6535 echo "$ac_t""$enable_shared" 1>&6
6536
6537 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6538 echo "configure:6539: checking whether to build static libraries" >&5
6539 # Make sure either enable_shared or enable_static is yes.
6540 test "$enable_shared" = yes || enable_static=yes
6541 echo "$ac_t""$enable_static" 1>&6
6542
6543 if test "$hardcode_action" = relink; then
6544   # Fast installation is not supported
6545   enable_fast_install=no
6546 elif test "$shlibpath_overrides_runpath" = yes ||
6547      test "$enable_shared" = no; then
6548   # Fast installation is not necessary
6549   enable_fast_install=needless
6550 fi
6551
6552 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6553 if test "$GCC" = yes; then
6554   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6555 fi
6556
6557 if test "x$enable_dlopen" != xyes; then
6558   enable_dlopen=unknown
6559   enable_dlopen_self=unknown
6560   enable_dlopen_self_static=unknown
6561 else
6562   lt_cv_dlopen=no
6563   lt_cv_dlopen_libs=
6564
6565   case $host_os in
6566   beos*)
6567     lt_cv_dlopen="load_add_on"
6568     lt_cv_dlopen_libs=
6569     lt_cv_dlopen_self=yes
6570     ;;
6571
6572   cygwin* | mingw* | pw32*)
6573     lt_cv_dlopen="LoadLibrary"
6574     lt_cv_dlopen_libs=
6575    ;;
6576
6577   *)
6578     echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6579 echo "configure:6580: checking for shl_load" >&5
6580 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6581   echo $ac_n "(cached) $ac_c" 1>&6
6582 else
6583   cat > conftest.$ac_ext <<EOF
6584 #line 6585 "configure"
6585 #include "confdefs.h"
6586 /* System header to define __stub macros and hopefully few prototypes,
6587     which can conflict with char shl_load(); below.  */
6588 #include <assert.h>
6589 /* Override any gcc2 internal prototype to avoid an error.  */
6590 /* We use char because int might match the return type of a gcc2
6591     builtin and then its argument prototype would still apply.  */
6592 char shl_load();
6593 char (*f)();
6594
6595 int main() {
6596
6597 /* The GNU C library defines this for functions which it implements
6598     to always fail with ENOSYS.  Some functions are actually named
6599     something starting with __ and the normal name is an alias.  */
6600 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6601 choke me
6602 #else
6603 f = shl_load;
6604 #endif
6605
6606 ; return 0; }
6607 EOF
6608 if { (eval echo configure:6609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6609   rm -rf conftest*
6610   eval "ac_cv_func_shl_load=yes"
6611 else
6612   echo "configure: failed program was:" >&5
6613   cat conftest.$ac_ext >&5
6614   rm -rf conftest*
6615   eval "ac_cv_func_shl_load=no"
6616 fi
6617 rm -f conftest*
6618 fi
6619
6620 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6621   echo "$ac_t""yes" 1>&6
6622   lt_cv_dlopen="shl_load"
6623 else
6624   echo "$ac_t""no" 1>&6
6625 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6626 echo "configure:6627: checking for shl_load in -ldld" >&5
6627 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6628 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6629   echo $ac_n "(cached) $ac_c" 1>&6
6630 else
6631   ac_save_LIBS="$LIBS"
6632 LIBS="-ldld  $LIBS"
6633 cat > conftest.$ac_ext <<EOF
6634 #line 6635 "configure"
6635 #include "confdefs.h"
6636 /* Override any gcc2 internal prototype to avoid an error.  */
6637 /* We use char because int might match the return type of a gcc2
6638     builtin and then its argument prototype would still apply.  */
6639 char shl_load();
6640
6641 int main() {
6642 shl_load()
6643 ; return 0; }
6644 EOF
6645 if { (eval echo configure:6646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6646   rm -rf conftest*
6647   eval "ac_cv_lib_$ac_lib_var=yes"
6648 else
6649   echo "configure: failed program was:" >&5
6650   cat conftest.$ac_ext >&5
6651   rm -rf conftest*
6652   eval "ac_cv_lib_$ac_lib_var=no"
6653 fi
6654 rm -f conftest*
6655 LIBS="$ac_save_LIBS"
6656
6657 fi
6658 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6659   echo "$ac_t""yes" 1>&6
6660   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6661 else
6662   echo "$ac_t""no" 1>&6
6663 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6664 echo "configure:6665: checking for dlopen" >&5
6665 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6666   echo $ac_n "(cached) $ac_c" 1>&6
6667 else
6668   cat > conftest.$ac_ext <<EOF
6669 #line 6670 "configure"
6670 #include "confdefs.h"
6671 /* System header to define __stub macros and hopefully few prototypes,
6672     which can conflict with char dlopen(); below.  */
6673 #include <assert.h>
6674 /* Override any gcc2 internal prototype to avoid an error.  */
6675 /* We use char because int might match the return type of a gcc2
6676     builtin and then its argument prototype would still apply.  */
6677 char dlopen();
6678 char (*f)();
6679
6680 int main() {
6681
6682 /* The GNU C library defines this for functions which it implements
6683     to always fail with ENOSYS.  Some functions are actually named
6684     something starting with __ and the normal name is an alias.  */
6685 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6686 choke me
6687 #else
6688 f = dlopen;
6689 #endif
6690
6691 ; return 0; }
6692 EOF
6693 if { (eval echo configure:6694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6694   rm -rf conftest*
6695   eval "ac_cv_func_dlopen=yes"
6696 else
6697   echo "configure: failed program was:" >&5
6698   cat conftest.$ac_ext >&5
6699   rm -rf conftest*
6700   eval "ac_cv_func_dlopen=no"
6701 fi
6702 rm -f conftest*
6703 fi
6704
6705 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6706   echo "$ac_t""yes" 1>&6
6707   lt_cv_dlopen="dlopen"
6708 else
6709   echo "$ac_t""no" 1>&6
6710 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6711 echo "configure:6712: checking for dlopen in -ldl" >&5
6712 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6713 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6714   echo $ac_n "(cached) $ac_c" 1>&6
6715 else
6716   ac_save_LIBS="$LIBS"
6717 LIBS="-ldl  $LIBS"
6718 cat > conftest.$ac_ext <<EOF
6719 #line 6720 "configure"
6720 #include "confdefs.h"
6721 /* Override any gcc2 internal prototype to avoid an error.  */
6722 /* We use char because int might match the return type of a gcc2
6723     builtin and then its argument prototype would still apply.  */
6724 char dlopen();
6725
6726 int main() {
6727 dlopen()
6728 ; return 0; }
6729 EOF
6730 if { (eval echo configure:6731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6731   rm -rf conftest*
6732   eval "ac_cv_lib_$ac_lib_var=yes"
6733 else
6734   echo "configure: failed program was:" >&5
6735   cat conftest.$ac_ext >&5
6736   rm -rf conftest*
6737   eval "ac_cv_lib_$ac_lib_var=no"
6738 fi
6739 rm -f conftest*
6740 LIBS="$ac_save_LIBS"
6741
6742 fi
6743 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6744   echo "$ac_t""yes" 1>&6
6745   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6746 else
6747   echo "$ac_t""no" 1>&6
6748 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6749 echo "configure:6750: checking for dlopen in -lsvld" >&5
6750 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6751 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6752   echo $ac_n "(cached) $ac_c" 1>&6
6753 else
6754   ac_save_LIBS="$LIBS"
6755 LIBS="-lsvld  $LIBS"
6756 cat > conftest.$ac_ext <<EOF
6757 #line 6758 "configure"
6758 #include "confdefs.h"
6759 /* Override any gcc2 internal prototype to avoid an error.  */
6760 /* We use char because int might match the return type of a gcc2
6761     builtin and then its argument prototype would still apply.  */
6762 char dlopen();
6763
6764 int main() {
6765 dlopen()
6766 ; return 0; }
6767 EOF
6768 if { (eval echo configure:6769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6769   rm -rf conftest*
6770   eval "ac_cv_lib_$ac_lib_var=yes"
6771 else
6772   echo "configure: failed program was:" >&5
6773   cat conftest.$ac_ext >&5
6774   rm -rf conftest*
6775   eval "ac_cv_lib_$ac_lib_var=no"
6776 fi
6777 rm -f conftest*
6778 LIBS="$ac_save_LIBS"
6779
6780 fi
6781 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6782   echo "$ac_t""yes" 1>&6
6783   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6784 else
6785   echo "$ac_t""no" 1>&6
6786 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6787 echo "configure:6788: checking for dld_link in -ldld" >&5
6788 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6789 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6790   echo $ac_n "(cached) $ac_c" 1>&6
6791 else
6792   ac_save_LIBS="$LIBS"
6793 LIBS="-ldld  $LIBS"
6794 cat > conftest.$ac_ext <<EOF
6795 #line 6796 "configure"
6796 #include "confdefs.h"
6797 /* Override any gcc2 internal prototype to avoid an error.  */
6798 /* We use char because int might match the return type of a gcc2
6799     builtin and then its argument prototype would still apply.  */
6800 char dld_link();
6801
6802 int main() {
6803 dld_link()
6804 ; return 0; }
6805 EOF
6806 if { (eval echo configure:6807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6807   rm -rf conftest*
6808   eval "ac_cv_lib_$ac_lib_var=yes"
6809 else
6810   echo "configure: failed program was:" >&5
6811   cat conftest.$ac_ext >&5
6812   rm -rf conftest*
6813   eval "ac_cv_lib_$ac_lib_var=no"
6814 fi
6815 rm -f conftest*
6816 LIBS="$ac_save_LIBS"
6817
6818 fi
6819 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6820   echo "$ac_t""yes" 1>&6
6821   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6822 else
6823   echo "$ac_t""no" 1>&6
6824 fi
6825
6826               
6827 fi
6828
6829             
6830 fi
6831
6832           
6833 fi
6834
6835         
6836 fi
6837
6838       
6839 fi
6840
6841     ;;
6842   esac
6843
6844   if test "x$lt_cv_dlopen" != xno; then
6845     enable_dlopen=yes
6846   else
6847     enable_dlopen=no
6848   fi
6849
6850   case $lt_cv_dlopen in
6851   dlopen)
6852     save_CPPFLAGS="$CPPFLAGS"
6853         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6854
6855     save_LDFLAGS="$LDFLAGS"
6856     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6857
6858     save_LIBS="$LIBS"
6859     LIBS="$lt_cv_dlopen_libs $LIBS"
6860
6861     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6862 echo "configure:6863: checking whether a program can dlopen itself" >&5
6863 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6864   echo $ac_n "(cached) $ac_c" 1>&6
6865 else
6866           if test "$cross_compiling" = yes; then :
6867   lt_cv_dlopen_self=cross
6868 else
6869     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6870   lt_status=$lt_dlunknown
6871   cat > conftest.$ac_ext <<EOF
6872 #line 6873 "configure"
6873 #include "confdefs.h"
6874
6875 #if HAVE_DLFCN_H
6876 #include <dlfcn.h>
6877 #endif
6878
6879 #include <stdio.h>
6880
6881 #ifdef RTLD_GLOBAL
6882 #  define LT_DLGLOBAL           RTLD_GLOBAL
6883 #else
6884 #  ifdef DL_GLOBAL
6885 #    define LT_DLGLOBAL         DL_GLOBAL
6886 #  else
6887 #    define LT_DLGLOBAL         0
6888 #  endif
6889 #endif
6890
6891 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6892    find out it does not work in some platform. */
6893 #ifndef LT_DLLAZY_OR_NOW
6894 #  ifdef RTLD_LAZY
6895 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6896 #  else
6897 #    ifdef DL_LAZY
6898 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6899 #    else
6900 #      ifdef RTLD_NOW
6901 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6902 #      else
6903 #        ifdef DL_NOW
6904 #          define LT_DLLAZY_OR_NOW      DL_NOW
6905 #        else
6906 #          define LT_DLLAZY_OR_NOW      0
6907 #        endif
6908 #      endif
6909 #    endif
6910 #  endif
6911 #endif
6912
6913 #ifdef __cplusplus
6914 extern "C" void exit (int);
6915 #endif
6916
6917 void fnord() { int i=42;}
6918 int main ()
6919 {
6920   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6921   int status = $lt_dlunknown;
6922
6923   if (self)
6924     {
6925       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6926       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6927       /* dlclose (self); */
6928     }
6929
6930     exit (status);
6931 }
6932 EOF
6933   if { (eval echo configure:6934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6934     (./conftest; exit; ) 2>/dev/null
6935     lt_status=$?
6936     case x$lt_status in
6937       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6938       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
6939       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
6940     esac
6941   else :
6942     # compilation failed
6943     lt_cv_dlopen_self=no
6944   fi
6945 fi
6946 rm -fr conftest*
6947
6948     
6949 fi
6950
6951 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
6952
6953     if test "x$lt_cv_dlopen_self" = xyes; then
6954       LDFLAGS="$LDFLAGS $link_static_flag"
6955       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
6956 echo "configure:6957: checking whether a statically linked program can dlopen itself" >&5
6957 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
6958   echo $ac_n "(cached) $ac_c" 1>&6
6959 else
6960           if test "$cross_compiling" = yes; then :
6961   lt_cv_dlopen_self_static=cross
6962 else
6963     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6964   lt_status=$lt_dlunknown
6965   cat > conftest.$ac_ext <<EOF
6966 #line 6967 "configure"
6967 #include "confdefs.h"
6968
6969 #if HAVE_DLFCN_H
6970 #include <dlfcn.h>
6971 #endif
6972
6973 #include <stdio.h>
6974
6975 #ifdef RTLD_GLOBAL
6976 #  define LT_DLGLOBAL           RTLD_GLOBAL
6977 #else
6978 #  ifdef DL_GLOBAL
6979 #    define LT_DLGLOBAL         DL_GLOBAL
6980 #  else
6981 #    define LT_DLGLOBAL         0
6982 #  endif
6983 #endif
6984
6985 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6986    find out it does not work in some platform. */
6987 #ifndef LT_DLLAZY_OR_NOW
6988 #  ifdef RTLD_LAZY
6989 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6990 #  else
6991 #    ifdef DL_LAZY
6992 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6993 #    else
6994 #      ifdef RTLD_NOW
6995 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6996 #      else
6997 #        ifdef DL_NOW
6998 #          define LT_DLLAZY_OR_NOW      DL_NOW
6999 #        else
7000 #          define LT_DLLAZY_OR_NOW      0
7001 #        endif
7002 #      endif
7003 #    endif
7004 #  endif
7005 #endif
7006
7007 #ifdef __cplusplus
7008 extern "C" void exit (int);
7009 #endif
7010
7011 void fnord() { int i=42;}
7012 int main ()
7013 {
7014   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7015   int status = $lt_dlunknown;
7016
7017   if (self)
7018     {
7019       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7020       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7021       /* dlclose (self); */
7022     }
7023
7024     exit (status);
7025 }
7026 EOF
7027   if { (eval echo configure:7028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7028     (./conftest; exit; ) 2>/dev/null
7029     lt_status=$?
7030     case x$lt_status in
7031       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7032       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7033       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7034     esac
7035   else :
7036     # compilation failed
7037     lt_cv_dlopen_self_static=no
7038   fi
7039 fi
7040 rm -fr conftest*
7041
7042       
7043 fi
7044
7045 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7046     fi
7047
7048     CPPFLAGS="$save_CPPFLAGS"
7049     LDFLAGS="$save_LDFLAGS"
7050     LIBS="$save_LIBS"
7051     ;;
7052   esac
7053
7054   case $lt_cv_dlopen_self in
7055   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7056   *) enable_dlopen_self=unknown ;;
7057   esac
7058
7059   case $lt_cv_dlopen_self_static in
7060   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7061   *) enable_dlopen_self_static=unknown ;;
7062   esac
7063 fi
7064
7065
7066 if test "$enable_shared" = yes && test "$GCC" = yes; then
7067   case $archive_cmds in
7068   *'~'*)
7069     # FIXME: we may have to deal with multi-command sequences.
7070     ;;
7071   '$CC '*)
7072     # Test whether the compiler implicitly links with -lc since on some
7073     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7074     # to ld, don't add -lc before -lgcc.
7075     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7076 echo "configure:7077: checking whether -lc should be explicitly linked in" >&5
7077     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7078   echo $ac_n "(cached) $ac_c" 1>&6
7079 else
7080   $rm conftest*
7081     echo 'static int dummy;' > conftest.$ac_ext
7082
7083     if { (eval echo configure:7084: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7084       soname=conftest
7085       lib=conftest
7086       libobjs=conftest.$ac_objext
7087       deplibs=
7088       wl=$lt_cv_prog_cc_wl
7089       compiler_flags=-v
7090       linker_flags=-v
7091       verstring=
7092       output_objdir=.
7093       libname=conftest
7094       save_allow_undefined_flag=$allow_undefined_flag
7095       allow_undefined_flag=
7096       if { (eval echo configure:7097: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\") 1>&5; (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5; }
7097       then
7098         lt_cv_archive_cmds_need_lc=no
7099       else
7100         lt_cv_archive_cmds_need_lc=yes
7101       fi
7102       allow_undefined_flag=$save_allow_undefined_flag
7103     else
7104       cat conftest.err 1>&5
7105     fi
7106 fi
7107
7108     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7109     ;;
7110   esac
7111 fi
7112 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7113
7114 # The second clause should only fire when bootstrapping the
7115 # libtool distribution, otherwise you forgot to ship ltmain.sh
7116 # with your package, and you will get complaints that there are
7117 # no rules to generate ltmain.sh.
7118 if test -f "$ltmain"; then
7119   :
7120 else
7121   # If there is no Makefile yet, we rely on a make rule to execute
7122   # `config.status --recheck' to rerun these tests and create the
7123   # libtool script then.
7124   test -f Makefile && make "$ltmain"
7125 fi
7126
7127 if test -f "$ltmain"; then
7128   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7129   $rm -f "${ofile}T"
7130
7131   echo creating $ofile
7132
7133   # Now quote all the things that may contain metacharacters while being
7134   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7135   # variables and quote the copies for generation of the libtool script.
7136   for var in echo old_CC old_CFLAGS \
7137     AR AR_FLAGS CC LD LN_S NM SHELL \
7138     reload_flag reload_cmds wl \
7139     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7140     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7141     library_names_spec soname_spec \
7142     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7143     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7144     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7145     old_striplib striplib file_magic_cmd export_symbols_cmds \
7146     deplibs_check_method allow_undefined_flag no_undefined_flag \
7147     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7148     global_symbol_to_c_name_address \
7149     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7150     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7151     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7152
7153     case $var in
7154     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7155     old_postinstall_cmds | old_postuninstall_cmds | \
7156     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7157     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7158     postinstall_cmds | postuninstall_cmds | \
7159     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7160       # Double-quote double-evaled strings.
7161       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7162       ;;
7163     *)
7164       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7165       ;;
7166     esac
7167   done
7168
7169   cat <<__EOF__ > "${ofile}T"
7170 #! $SHELL
7171
7172 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7173 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7174 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7175 #
7176 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7177 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7178 #
7179 # This program is free software; you can redistribute it and/or modify
7180 # it under the terms of the GNU General Public License as published by
7181 # the Free Software Foundation; either version 2 of the License, or
7182 # (at your option) any later version.
7183 #
7184 # This program is distributed in the hope that it will be useful, but
7185 # WITHOUT ANY WARRANTY; without even the implied warranty of
7186 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7187 # General Public License for more details.
7188 #
7189 # You should have received a copy of the GNU General Public License
7190 # along with this program; if not, write to the Free Software
7191 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7192 #
7193 # As a special exception to the GNU General Public License, if you
7194 # distribute this file as part of a program that contains a
7195 # configuration script generated by Autoconf, you may include it under
7196 # the same distribution terms that you use for the rest of that program.
7197
7198 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7199 Xsed="sed -e s/^X//"
7200
7201 # The HP-UX ksh and POSIX shell print the target directory to stdout
7202 # if CDPATH is set.
7203 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7204
7205 # ### BEGIN LIBTOOL CONFIG
7206
7207 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7208
7209 # Shell to use when invoking shell scripts.
7210 SHELL=$lt_SHELL
7211
7212 # Whether or not to build shared libraries.
7213 build_libtool_libs=$enable_shared
7214
7215 # Whether or not to build static libraries.
7216 build_old_libs=$enable_static
7217
7218 # Whether or not to add -lc for building shared libraries.
7219 build_libtool_need_lc=$need_lc
7220
7221 # Whether or not to optimize for fast installation.
7222 fast_install=$enable_fast_install
7223
7224 # The host system.
7225 host_alias=$host_alias
7226 host=$host
7227
7228 # An echo program that does not interpret backslashes.
7229 echo=$lt_echo
7230
7231 # The archiver.
7232 AR=$lt_AR
7233 AR_FLAGS=$lt_AR_FLAGS
7234
7235 # The default C compiler.
7236 CC=$lt_CC
7237
7238 # Is the compiler the GNU C compiler?
7239 with_gcc=$GCC
7240
7241 # The linker used to build libraries.
7242 LD=$lt_LD
7243
7244 # Whether we need hard or soft links.
7245 LN_S=$lt_LN_S
7246
7247 # A BSD-compatible nm program.
7248 NM=$lt_NM
7249
7250 # A symbol stripping program
7251 STRIP=$STRIP
7252
7253 # Used to examine libraries when file_magic_cmd begins "file"
7254 MAGIC_CMD=$MAGIC_CMD
7255
7256 # Used on cygwin: DLL creation program.
7257 DLLTOOL="$DLLTOOL"
7258
7259 # Used on cygwin: object dumper.
7260 OBJDUMP="$OBJDUMP"
7261
7262 # Used on cygwin: assembler.
7263 AS="$AS"
7264
7265 # The name of the directory that contains temporary libtool files.
7266 objdir=$objdir
7267
7268 # How to create reloadable object files.
7269 reload_flag=$lt_reload_flag
7270 reload_cmds=$lt_reload_cmds
7271
7272 # How to pass a linker flag through the compiler.
7273 wl=$lt_wl
7274
7275 # Object file suffix (normally "o").
7276 objext="$ac_objext"
7277
7278 # Old archive suffix (normally "a").
7279 libext="$libext"
7280
7281 # Executable file suffix (normally "").
7282 exeext="$exeext"
7283
7284 # Additional compiler flags for building library objects.
7285 pic_flag=$lt_pic_flag
7286 pic_mode=$pic_mode
7287
7288 # Does compiler simultaneously support -c and -o options?
7289 compiler_c_o=$lt_compiler_c_o
7290
7291 # Can we write directly to a .lo ?
7292 compiler_o_lo=$lt_compiler_o_lo
7293
7294 # Must we lock files when doing compilation ?
7295 need_locks=$lt_need_locks
7296
7297 # Do we need the lib prefix for modules?
7298 need_lib_prefix=$need_lib_prefix
7299
7300 # Do we need a version for libraries?
7301 need_version=$need_version
7302
7303 # Whether dlopen is supported.
7304 dlopen_support=$enable_dlopen
7305
7306 # Whether dlopen of programs is supported.
7307 dlopen_self=$enable_dlopen_self
7308
7309 # Whether dlopen of statically linked programs is supported.
7310 dlopen_self_static=$enable_dlopen_self_static
7311
7312 # Compiler flag to prevent dynamic linking.
7313 link_static_flag=$lt_link_static_flag
7314
7315 # Compiler flag to turn off builtin functions.
7316 no_builtin_flag=$lt_no_builtin_flag
7317
7318 # Compiler flag to allow reflexive dlopens.
7319 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7320
7321 # Compiler flag to generate shared objects directly from archives.
7322 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7323
7324 # Compiler flag to generate thread-safe objects.
7325 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7326
7327 # Library versioning type.
7328 version_type=$version_type
7329
7330 # Format of library name prefix.
7331 libname_spec=$lt_libname_spec
7332
7333 # List of archive names.  First name is the real one, the rest are links.
7334 # The last name is the one that the linker finds with -lNAME.
7335 library_names_spec=$lt_library_names_spec
7336
7337 # The coded name of the library, if different from the real name.
7338 soname_spec=$lt_soname_spec
7339
7340 # Commands used to build and install an old-style archive.
7341 RANLIB=$lt_RANLIB
7342 old_archive_cmds=$lt_old_archive_cmds
7343 old_postinstall_cmds=$lt_old_postinstall_cmds
7344 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7345
7346 # Create an old-style archive from a shared archive.
7347 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7348
7349 # Create a temporary old-style archive to link instead of a shared archive.
7350 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7351
7352 # Commands used to build and install a shared archive.
7353 archive_cmds=$lt_archive_cmds
7354 archive_expsym_cmds=$lt_archive_expsym_cmds
7355 postinstall_cmds=$lt_postinstall_cmds
7356 postuninstall_cmds=$lt_postuninstall_cmds
7357
7358 # Commands to strip libraries.
7359 old_striplib=$lt_old_striplib
7360 striplib=$lt_striplib
7361
7362 # Method to check whether dependent libraries are shared objects.
7363 deplibs_check_method=$lt_deplibs_check_method
7364
7365 # Command to use when deplibs_check_method == file_magic.
7366 file_magic_cmd=$lt_file_magic_cmd
7367
7368 # Flag that allows shared libraries with undefined symbols to be built.
7369 allow_undefined_flag=$lt_allow_undefined_flag
7370
7371 # Flag that forces no undefined symbols.
7372 no_undefined_flag=$lt_no_undefined_flag
7373
7374 # Commands used to finish a libtool library installation in a directory.
7375 finish_cmds=$lt_finish_cmds
7376
7377 # Same as above, but a single script fragment to be evaled but not shown.
7378 finish_eval=$lt_finish_eval
7379
7380 # Take the output of nm and produce a listing of raw symbols and C names.
7381 global_symbol_pipe=$lt_global_symbol_pipe
7382
7383 # Transform the output of nm in a proper C declaration
7384 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7385
7386 # Transform the output of nm in a C name address pair
7387 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7388
7389 # This is the shared library runtime path variable.
7390 runpath_var=$runpath_var
7391
7392 # This is the shared library path variable.
7393 shlibpath_var=$shlibpath_var
7394
7395 # Is shlibpath searched before the hard-coded library search path?
7396 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7397
7398 # How to hardcode a shared library path into an executable.
7399 hardcode_action=$hardcode_action
7400
7401 # Whether we should hardcode library paths into libraries.
7402 hardcode_into_libs=$hardcode_into_libs
7403
7404 # Flag to hardcode \$libdir into a binary during linking.
7405 # This must work even if \$libdir does not exist.
7406 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7407
7408 # Whether we need a single -rpath flag with a separated argument.
7409 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7410
7411 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7412 # resulting binary.
7413 hardcode_direct=$hardcode_direct
7414
7415 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7416 # resulting binary.
7417 hardcode_minus_L=$hardcode_minus_L
7418
7419 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7420 # the resulting binary.
7421 hardcode_shlibpath_var=$hardcode_shlibpath_var
7422
7423 # Variables whose values should be saved in libtool wrapper scripts and
7424 # restored at relink time.
7425 variables_saved_for_relink="$variables_saved_for_relink"
7426
7427 # Whether libtool must link a program against all its dependency libraries.
7428 link_all_deplibs=$link_all_deplibs
7429
7430 # Compile-time system search path for libraries
7431 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7432
7433 # Run-time system search path for libraries
7434 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7435
7436 # Fix the shell variable \$srcfile for the compiler.
7437 fix_srcfile_path="$fix_srcfile_path"
7438
7439 # Set to yes if exported symbols are required.
7440 always_export_symbols=$always_export_symbols
7441
7442 # The commands to list exported symbols.
7443 export_symbols_cmds=$lt_export_symbols_cmds
7444
7445 # The commands to extract the exported symbol list from a shared archive.
7446 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7447
7448 # Symbols that should not be listed in the preloaded symbols.
7449 exclude_expsyms=$lt_exclude_expsyms
7450
7451 # Symbols that must always be exported.
7452 include_expsyms=$lt_include_expsyms
7453
7454 # ### END LIBTOOL CONFIG
7455
7456 __EOF__
7457
7458   case $host_os in
7459   aix3*)
7460     cat <<\EOF >> "${ofile}T"
7461
7462 # AIX sometimes has problems with the GCC collect2 program.  For some
7463 # reason, if we set the COLLECT_NAMES environment variable, the problems
7464 # vanish in a puff of smoke.
7465 if test "X${COLLECT_NAMES+set}" != Xset; then
7466   COLLECT_NAMES=
7467   export COLLECT_NAMES
7468 fi
7469 EOF
7470     ;;
7471   esac
7472
7473   case $host_os in
7474   cygwin* | mingw* | pw32* | os2*)
7475     cat <<'EOF' >> "${ofile}T"
7476       # This is a source program that is used to create dlls on Windows
7477       # Don't remove nor modify the starting and closing comments
7478 # /* ltdll.c starts here */
7479 # #define WIN32_LEAN_AND_MEAN
7480 # #include <windows.h>
7481 # #undef WIN32_LEAN_AND_MEAN
7482 # #include <stdio.h>
7483 #
7484 # #ifndef __CYGWIN__
7485 # #  ifdef __CYGWIN32__
7486 # #    define __CYGWIN__ __CYGWIN32__
7487 # #  endif
7488 # #endif
7489 #
7490 # #ifdef __cplusplus
7491 # extern "C" {
7492 # #endif
7493 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7494 # #ifdef __cplusplus
7495 # }
7496 # #endif
7497 #
7498 # #ifdef __CYGWIN__
7499 # #include <cygwin/cygwin_dll.h>
7500 # DECLARE_CYGWIN_DLL( DllMain );
7501 # #endif
7502 # HINSTANCE __hDllInstance_base;
7503 #
7504 # BOOL APIENTRY
7505 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7506 # {
7507 #   __hDllInstance_base = hInst;
7508 #   return TRUE;
7509 # }
7510 # /* ltdll.c ends here */
7511         # This is a source program that is used to create import libraries
7512         # on Windows for dlls which lack them. Don't remove nor modify the
7513         # starting and closing comments
7514 # /* impgen.c starts here */
7515 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7516 #
7517 #  This file is part of GNU libtool.
7518 #
7519 #  This program is free software; you can redistribute it and/or modify
7520 #  it under the terms of the GNU General Public License as published by
7521 #  the Free Software Foundation; either version 2 of the License, or
7522 #  (at your option) any later version.
7523 #
7524 #  This program is distributed in the hope that it will be useful,
7525 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7526 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7527 #  GNU General Public License for more details.
7528 #
7529 #  You should have received a copy of the GNU General Public License
7530 #  along with this program; if not, write to the Free Software
7531 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7532 #  */
7533 #
7534 # #include <stdio.h>            /* for printf() */
7535 # #include <unistd.h>           /* for open(), lseek(), read() */
7536 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7537 # #include <string.h>           /* for strdup() */
7538 #
7539 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7540 # #ifndef O_BINARY
7541 # #define O_BINARY 0
7542 # #endif
7543 #
7544 # static unsigned int
7545 # pe_get16 (fd, offset)
7546 #      int fd;
7547 #      int offset;
7548 # {
7549 #   unsigned char b[2];
7550 #   lseek (fd, offset, SEEK_SET);
7551 #   read (fd, b, 2);
7552 #   return b[0] + (b[1]<<8);
7553 # }
7554 #
7555 # static unsigned int
7556 # pe_get32 (fd, offset)
7557 #     int fd;
7558 #     int offset;
7559 # {
7560 #   unsigned char b[4];
7561 #   lseek (fd, offset, SEEK_SET);
7562 #   read (fd, b, 4);
7563 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7564 # }
7565 #
7566 # static unsigned int
7567 # pe_as32 (ptr)
7568 #      void *ptr;
7569 # {
7570 #   unsigned char *b = ptr;
7571 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7572 # }
7573 #
7574 # int
7575 # main (argc, argv)
7576 #     int argc;
7577 #     char *argv[];
7578 # {
7579 #     int dll;
7580 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7581 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7582 #     unsigned long name_rvas, nexp;
7583 #     unsigned char *expdata, *erva;
7584 #     char *filename, *dll_name;
7585 #
7586 #     filename = argv[1];
7587 #
7588 #     dll = open(filename, O_RDONLY|O_BINARY);
7589 #     if (dll < 1)
7590 #       return 1;
7591 #
7592 #     dll_name = filename;
7593 #
7594 #     for (i=0; filename[i]; i++)
7595 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7596 #           dll_name = filename + i +1;
7597 #
7598 #     pe_header_offset = pe_get32 (dll, 0x3c);
7599 #     opthdr_ofs = pe_header_offset + 4 + 20;
7600 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7601 #
7602 #     if (num_entries < 1) /* no exports */
7603 #       return 1;
7604 #
7605 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7606 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7607 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7608 #     secptr = (pe_header_offset + 4 + 20 +
7609 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7610 #
7611 #     expptr = 0;
7612 #     for (i = 0; i < nsections; i++)
7613 #     {
7614 #       char sname[8];
7615 #       unsigned long secptr1 = secptr + 40 * i;
7616 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7617 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7618 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7619 #       lseek(dll, secptr1, SEEK_SET);
7620 #       read(dll, sname, 8);
7621 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7622 #       {
7623 #           expptr = fptr + (export_rva - vaddr);
7624 #           if (export_rva + export_size > vaddr + vsize)
7625 #               export_size = vsize - (export_rva - vaddr);
7626 #           break;
7627 #       }
7628 #     }
7629 #
7630 #     expdata = (unsigned char*)malloc(export_size);
7631 #     lseek (dll, expptr, SEEK_SET);
7632 #     read (dll, expdata, export_size);
7633 #     erva = expdata - export_rva;
7634 #
7635 #     nexp = pe_as32 (expdata+24);
7636 #     name_rvas = pe_as32 (expdata+32);
7637 #
7638 #     printf ("EXPORTS\n");
7639 #     for (i = 0; i<nexp; i++)
7640 #     {
7641 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7642 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7643 #     }
7644 #
7645 #     return 0;
7646 # }
7647 # /* impgen.c ends here */
7648
7649 EOF
7650     ;;
7651   esac
7652
7653   # We use sed instead of cat because bash on DJGPP gets confused if
7654   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7655   # text mode, it properly converts lines to CR/LF.  This bash problem
7656   # is reportedly fixed, but why not run on old versions too?
7657   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7658
7659   mv -f "${ofile}T" "$ofile" || \
7660     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7661   chmod +x "$ofile"
7662 fi
7663
7664
7665
7666
7667
7668 # This can be used to rebuild libtool when needed
7669 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7670
7671 # Always use our own libtool.
7672 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7673
7674 # Prevent multiple expansion
7675
7676
7677
7678 for ac_prog in mawk gawk nawk awk
7679 do
7680 # Extract the first word of "$ac_prog", so it can be a program name with args.
7681 set dummy $ac_prog; ac_word=$2
7682 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7683 echo "configure:7684: checking for $ac_word" >&5
7684 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
7685   echo $ac_n "(cached) $ac_c" 1>&6
7686 else
7687   if test -n "$AWK"; then
7688   ac_cv_prog_AWK="$AWK" # Let the user override the test.
7689 else
7690   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7691   ac_dummy="$PATH"
7692   for ac_dir in $ac_dummy; do
7693     test -z "$ac_dir" && ac_dir=.
7694     if test -f $ac_dir/$ac_word; then
7695       ac_cv_prog_AWK="$ac_prog"
7696       break
7697     fi
7698   done
7699   IFS="$ac_save_ifs"
7700 fi
7701 fi
7702 AWK="$ac_cv_prog_AWK"
7703 if test -n "$AWK"; then
7704   echo "$ac_t""$AWK" 1>&6
7705 else
7706   echo "$ac_t""no" 1>&6
7707 fi
7708
7709 test -n "$AWK" && break
7710 done
7711
7712 # test for ln hardlink support
7713 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7714 echo "configure:7715: checking whether ln works" >&5
7715 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7716   echo $ac_n "(cached) $ac_c" 1>&6
7717 else
7718   rm -f conftest.src conftest.dst
7719 echo "conftest" > conftest.src
7720 if ln conftest.src conftest.dst 2>/dev/null
7721 then
7722   ol_cv_prog_LN_H="ln"
7723 else
7724   ol_cv_prog_LN_H="cp"
7725 fi
7726 rm -f conftest.src conftest.dst
7727
7728 fi
7729 LN_H="$ol_cv_prog_LN_H"
7730 if test "$ol_cv_prog_LN_H" = "ln"; then
7731         echo "$ac_t""yes" 1>&6
7732 else
7733         echo "$ac_t""no" 1>&6
7734 fi
7735
7736 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7737 echo "configure:7738: checking whether ln -s works" >&5
7738 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7739   echo $ac_n "(cached) $ac_c" 1>&6
7740 else
7741   rm -f conftestdata
7742 if ln -s X conftestdata 2>/dev/null
7743 then
7744   rm -f conftestdata
7745   ac_cv_prog_LN_S="ln -s"
7746 else
7747   ac_cv_prog_LN_S=ln
7748 fi
7749 fi
7750 LN_S="$ac_cv_prog_LN_S"
7751 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7752   echo "$ac_t""yes" 1>&6
7753 else
7754   echo "$ac_t""no" 1>&6
7755 fi
7756
7757
7758 # Extract the first word of "sendmail", so it can be a program name with args.
7759 set dummy sendmail; ac_word=$2
7760 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7761 echo "configure:7762: checking for $ac_word" >&5
7762 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
7763   echo $ac_n "(cached) $ac_c" 1>&6
7764 else
7765   case "$SENDMAIL" in
7766   /*)
7767   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
7768   ;;
7769   ?:/*)
7770   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
7771   ;;
7772   *)
7773   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7774   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
7775   for ac_dir in $ac_dummy; do 
7776     test -z "$ac_dir" && ac_dir=.
7777     if test -f $ac_dir/$ac_word; then
7778       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
7779       break
7780     fi
7781   done
7782   IFS="$ac_save_ifs"
7783   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
7784   ;;
7785 esac
7786 fi
7787 SENDMAIL="$ac_cv_path_SENDMAIL"
7788 if test -n "$SENDMAIL"; then
7789   echo "$ac_t""$SENDMAIL" 1>&6
7790 else
7791   echo "$ac_t""no" 1>&6
7792 fi
7793
7794 # Extract the first word of "vi", so it can be a program name with args.
7795 set dummy vi; ac_word=$2
7796 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7797 echo "configure:7798: checking for $ac_word" >&5
7798 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
7799   echo $ac_n "(cached) $ac_c" 1>&6
7800 else
7801   case "$EDITOR" in
7802   /*)
7803   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
7804   ;;
7805   ?:/*)
7806   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
7807   ;;
7808   *)
7809   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7810   ac_dummy="$PATH:/usr/ucb"
7811   for ac_dir in $ac_dummy; do 
7812     test -z "$ac_dir" && ac_dir=.
7813     if test -f $ac_dir/$ac_word; then
7814       ac_cv_path_EDITOR="$ac_dir/$ac_word"
7815       break
7816     fi
7817   done
7818   IFS="$ac_save_ifs"
7819   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
7820   ;;
7821 esac
7822 fi
7823 EDITOR="$ac_cv_path_EDITOR"
7824 if test -n "$EDITOR"; then
7825   echo "$ac_t""$EDITOR" 1>&6
7826 else
7827   echo "$ac_t""no" 1>&6
7828 fi
7829
7830
7831 ol_link_perl=no
7832 if test $ol_enable_perl != no ; then
7833         # Extract the first word of "perl", so it can be a program name with args.
7834 set dummy perl; ac_word=$2
7835 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7836 echo "configure:7837: checking for $ac_word" >&5
7837 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7838   echo $ac_n "(cached) $ac_c" 1>&6
7839 else
7840   case "$PERLBIN" in
7841   /*)
7842   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7843   ;;
7844   ?:/*)
7845   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7846   ;;
7847   *)
7848   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7849   ac_dummy="$PATH"
7850   for ac_dir in $ac_dummy; do 
7851     test -z "$ac_dir" && ac_dir=.
7852     if test -f $ac_dir/$ac_word; then
7853       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7854       break
7855     fi
7856   done
7857   IFS="$ac_save_ifs"
7858   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7859   ;;
7860 esac
7861 fi
7862 PERLBIN="$ac_cv_path_PERLBIN"
7863 if test -n "$PERLBIN"; then
7864   echo "$ac_t""$PERLBIN" 1>&6
7865 else
7866   echo "$ac_t""no" 1>&6
7867 fi
7868
7869
7870         if test "no$PERLBIN" = "no" ; then
7871                 if test $ol_enable_perl = yes ; then
7872                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7873                 fi
7874
7875         else
7876                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7877                 if test x"$ol_with_perl_module" = "xstatic" ; then
7878                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7879                 else
7880                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7881                 fi
7882                                 ol_link_perl=yes
7883         fi
7884 fi
7885
7886 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7887 echo "configure:7888: checking how to run the C preprocessor" >&5
7888 # On Suns, sometimes $CPP names a directory.
7889 if test -n "$CPP" && test -d "$CPP"; then
7890   CPP=
7891 fi
7892 if test -z "$CPP"; then
7893 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7894   echo $ac_n "(cached) $ac_c" 1>&6
7895 else
7896     # This must be in double quotes, not single quotes, because CPP may get
7897   # substituted into the Makefile and "${CC-cc}" will confuse make.
7898   CPP="${CC-cc} -E"
7899   # On the NeXT, cc -E runs the code through the compiler's parser,
7900   # not just through cpp.
7901   cat > conftest.$ac_ext <<EOF
7902 #line 7903 "configure"
7903 #include "confdefs.h"
7904 #include <assert.h>
7905 Syntax Error
7906 EOF
7907 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7908 { (eval echo configure:7909: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7909 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7910 if test -z "$ac_err"; then
7911   :
7912 else
7913   echo "$ac_err" >&5
7914   echo "configure: failed program was:" >&5
7915   cat conftest.$ac_ext >&5
7916   rm -rf conftest*
7917   CPP="${CC-cc} -E -traditional-cpp"
7918   cat > conftest.$ac_ext <<EOF
7919 #line 7920 "configure"
7920 #include "confdefs.h"
7921 #include <assert.h>
7922 Syntax Error
7923 EOF
7924 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7925 { (eval echo configure:7926: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7926 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7927 if test -z "$ac_err"; then
7928   :
7929 else
7930   echo "$ac_err" >&5
7931   echo "configure: failed program was:" >&5
7932   cat conftest.$ac_ext >&5
7933   rm -rf conftest*
7934   CPP="${CC-cc} -nologo -E"
7935   cat > conftest.$ac_ext <<EOF
7936 #line 7937 "configure"
7937 #include "confdefs.h"
7938 #include <assert.h>
7939 Syntax Error
7940 EOF
7941 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7942 { (eval echo configure:7943: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7943 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7944 if test -z "$ac_err"; then
7945   :
7946 else
7947   echo "$ac_err" >&5
7948   echo "configure: failed program was:" >&5
7949   cat conftest.$ac_ext >&5
7950   rm -rf conftest*
7951   CPP=/lib/cpp
7952 fi
7953 rm -f conftest*
7954 fi
7955 rm -f conftest*
7956 fi
7957 rm -f conftest*
7958   ac_cv_prog_CPP="$CPP"
7959 fi
7960   CPP="$ac_cv_prog_CPP"
7961 else
7962   ac_cv_prog_CPP="$CPP"
7963 fi
7964 echo "$ac_t""$CPP" 1>&6
7965
7966
7967 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
7968         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
7969
7970 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
7971         echo "configure: warning: programs compiled here do run here..." 1>&2
7972         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
7973
7974 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
7975         echo "configure: warning: programs compiled here do not run here..." 1>&2
7976         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
7977 fi
7978
7979
7980 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7981 echo "configure:7982: checking for Cygwin environment" >&5
7982 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7983   echo $ac_n "(cached) $ac_c" 1>&6
7984 else
7985   cat > conftest.$ac_ext <<EOF
7986 #line 7987 "configure"
7987 #include "confdefs.h"
7988
7989 int main() {
7990
7991 #ifndef __CYGWIN__
7992 #define __CYGWIN__ __CYGWIN32__
7993 #endif
7994 return __CYGWIN__;
7995 ; return 0; }
7996 EOF
7997 if { (eval echo configure:7998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7998   rm -rf conftest*
7999   ac_cv_cygwin=yes
8000 else
8001   echo "configure: failed program was:" >&5
8002   cat conftest.$ac_ext >&5
8003   rm -rf conftest*
8004   ac_cv_cygwin=no
8005 fi
8006 rm -f conftest*
8007 fi
8008
8009 echo "$ac_t""$ac_cv_cygwin" 1>&6
8010 CYGWIN=
8011 test "$ac_cv_cygwin" = yes && CYGWIN=yes
8012 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
8013 echo "configure:8014: checking for mingw32 environment" >&5
8014 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
8015   echo $ac_n "(cached) $ac_c" 1>&6
8016 else
8017   cat > conftest.$ac_ext <<EOF
8018 #line 8019 "configure"
8019 #include "confdefs.h"
8020
8021 int main() {
8022 return __MINGW32__;
8023 ; return 0; }
8024 EOF
8025 if { (eval echo configure:8026: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8026   rm -rf conftest*
8027   ac_cv_mingw32=yes
8028 else
8029   echo "configure: failed program was:" >&5
8030   cat conftest.$ac_ext >&5
8031   rm -rf conftest*
8032   ac_cv_mingw32=no
8033 fi
8034 rm -f conftest*
8035 fi
8036
8037 echo "$ac_t""$ac_cv_mingw32" 1>&6
8038 MINGW32=
8039 test "$ac_cv_mingw32" = yes && MINGW32=yes
8040
8041
8042
8043 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
8044 echo "configure:8045: checking for executable suffix" >&5
8045 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
8046   echo $ac_n "(cached) $ac_c" 1>&6
8047 else
8048   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
8049   ac_cv_exeext=.exe
8050 else
8051   rm -f conftest*
8052   echo 'int main () { return 0; }' > conftest.$ac_ext
8053   ac_cv_exeext=
8054   if { (eval echo configure:8055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
8055     for file in conftest.*; do
8056       case $file in
8057       *.c | *.C | *.o | *.obj | *.xcoff) ;;
8058       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8059       esac
8060     done
8061   else
8062     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8063   fi
8064   rm -f conftest*
8065   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8066 fi
8067 fi
8068
8069 EXEEXT=""
8070 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8071 echo "$ac_t""${ac_cv_exeext}" 1>&6
8072 ac_exeext=$EXEEXT
8073
8074 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8075 echo "configure:8076: checking for object suffix" >&5
8076 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8077   echo $ac_n "(cached) $ac_c" 1>&6
8078 else
8079   rm -f conftest*
8080 echo 'int i = 1;' > conftest.$ac_ext
8081 if { (eval echo configure:8082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8082   for ac_file in conftest.*; do
8083     case $ac_file in
8084     *.c) ;;
8085     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8086     esac
8087   done
8088 else
8089   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8090 fi
8091 rm -f conftest*
8092 fi
8093
8094 echo "$ac_t""$ac_cv_objext" 1>&6
8095 OBJEXT=$ac_cv_objext
8096 ac_objext=$ac_cv_objext
8097
8098
8099 cat >> confdefs.h <<EOF
8100 #define EXEEXT "${EXEEXT}"
8101 EOF
8102
8103
8104 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8105 echo "configure:8106: checking for be_app in -lbe" >&5
8106 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8107 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8108   echo $ac_n "(cached) $ac_c" 1>&6
8109 else
8110   ac_save_LIBS="$LIBS"
8111 LIBS="-lbe -lroot -lnet $LIBS"
8112 cat > conftest.$ac_ext <<EOF
8113 #line 8114 "configure"
8114 #include "confdefs.h"
8115 /* Override any gcc2 internal prototype to avoid an error.  */
8116 /* We use char because int might match the return type of a gcc2
8117     builtin and then its argument prototype would still apply.  */
8118 char be_app();
8119
8120 int main() {
8121 be_app()
8122 ; return 0; }
8123 EOF
8124 if { (eval echo configure:8125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8125   rm -rf conftest*
8126   eval "ac_cv_lib_$ac_lib_var=yes"
8127 else
8128   echo "configure: failed program was:" >&5
8129   cat conftest.$ac_ext >&5
8130   rm -rf conftest*
8131   eval "ac_cv_lib_$ac_lib_var=no"
8132 fi
8133 rm -f conftest*
8134 LIBS="$ac_save_LIBS"
8135
8136 fi
8137 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8138   echo "$ac_t""yes" 1>&6
8139   LIBS="$LIBS -lbe -lroot -lnet"
8140 else
8141   echo "$ac_t""no" 1>&6
8142 :
8143 fi
8144
8145
8146
8147
8148
8149 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8150 echo "configure:8151: checking for ${CC-cc} option to accept ANSI C" >&5
8151 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8152   echo $ac_n "(cached) $ac_c" 1>&6
8153 else
8154   am_cv_prog_cc_stdc=no
8155 ac_save_CC="$CC"
8156 # Don't try gcc -ansi; that turns off useful extensions and
8157 # breaks some systems' header files.
8158 # AIX                   -qlanglvl=ansi
8159 # Ultrix and OSF/1      -std1
8160 # HP-UX 10.20 and later -Ae
8161 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8162 # SVR4                  -Xc -D__EXTENSIONS__
8163 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8164 do
8165   CC="$ac_save_CC $ac_arg"
8166   cat > conftest.$ac_ext <<EOF
8167 #line 8168 "configure"
8168 #include "confdefs.h"
8169 #include <stdarg.h>
8170 #include <stdio.h>
8171 #include <sys/types.h>
8172 #include <sys/stat.h>
8173 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8174 struct buf { int x; };
8175 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8176 static char *e (p, i)
8177      char **p;
8178      int i;
8179 {
8180   return p[i];
8181 }
8182 static char *f (char * (*g) (char **, int), char **p, ...)
8183 {
8184   char *s;
8185   va_list v;
8186   va_start (v,p);
8187   s = g (p, va_arg (v,int));
8188   va_end (v);
8189   return s;
8190 }
8191 int test (int i, double x);
8192 struct s1 {int (*f) (int a);};
8193 struct s2 {int (*f) (double a);};
8194 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8195 int argc;
8196 char **argv;
8197
8198 int main() {
8199
8200 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8201
8202 ; return 0; }
8203 EOF
8204 if { (eval echo configure:8205: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8205   rm -rf conftest*
8206   am_cv_prog_cc_stdc="$ac_arg"; break
8207 else
8208   echo "configure: failed program was:" >&5
8209   cat conftest.$ac_ext >&5
8210 fi
8211 rm -f conftest*
8212 done
8213 CC="$ac_save_CC"
8214
8215 fi
8216
8217 if test -z "$am_cv_prog_cc_stdc"; then
8218   echo "$ac_t""none needed" 1>&6
8219 else
8220   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8221 fi
8222 case "x$am_cv_prog_cc_stdc" in
8223   x|xno) ;;
8224   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8225 esac
8226
8227 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8228         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8229 fi
8230
8231 # test for make depend flag
8232 OL_MKDEP=
8233 OL_MKDEP_FLAGS=
8234 if test -z "${MKDEP}"; then
8235         OL_MKDEP="${CC-cc}"
8236         if test -z "${MKDEP_FLAGS}"; then
8237                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8238 echo "configure:8239: checking for ${OL_MKDEP} depend flag" >&5
8239 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8240   echo $ac_n "(cached) $ac_c" 1>&6
8241 else
8242   
8243                         ol_cv_mkdep=no
8244                         for flag in "-M" "-xM"; do
8245                                 cat > conftest.c <<EOF
8246  noCode;
8247 EOF
8248                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8249: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8249                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8250                                 then
8251                                         if test ! -f conftest."${ac_object}" ; then
8252                                                 ol_cv_mkdep=$flag
8253                                                 OL_MKDEP_FLAGS="$flag"
8254                                                 break
8255                                         fi
8256                                 fi
8257                         done
8258                         rm -f conftest*
8259                 
8260 fi
8261
8262 echo "$ac_t""$ol_cv_mkdep" 1>&6
8263         else
8264                 cc_cv_mkdep=yes
8265                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8266         fi
8267 else
8268         cc_cv_mkdep=yes
8269         OL_MKDEP="${MKDEP}"
8270         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8271 fi
8272
8273
8274
8275 if test "${ol_cv_mkdep}" = no ; then
8276         # this will soon become an error
8277         echo "configure: warning: do not know how to generate dependencies" 1>&2
8278 fi
8279
8280 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8281 echo "configure:8282: checking for afopen in -ls" >&5
8282 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8283 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8284   echo $ac_n "(cached) $ac_c" 1>&6
8285 else
8286   ac_save_LIBS="$LIBS"
8287 LIBS="-ls  $LIBS"
8288 cat > conftest.$ac_ext <<EOF
8289 #line 8290 "configure"
8290 #include "confdefs.h"
8291 /* Override any gcc2 internal prototype to avoid an error.  */
8292 /* We use char because int might match the return type of a gcc2
8293     builtin and then its argument prototype would still apply.  */
8294 char afopen();
8295
8296 int main() {
8297 afopen()
8298 ; return 0; }
8299 EOF
8300 if { (eval echo configure:8301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8301   rm -rf conftest*
8302   eval "ac_cv_lib_$ac_lib_var=yes"
8303 else
8304   echo "configure: failed program was:" >&5
8305   cat conftest.$ac_ext >&5
8306   rm -rf conftest*
8307   eval "ac_cv_lib_$ac_lib_var=no"
8308 fi
8309 rm -f conftest*
8310 LIBS="$ac_save_LIBS"
8311
8312 fi
8313 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8314   echo "$ac_t""yes" 1>&6
8315   
8316         AUTH_LIBS=-ls
8317         cat >> confdefs.h <<\EOF
8318 #define HAVE_AIX_SECURITY 1
8319 EOF
8320
8321
8322 else
8323   echo "$ac_t""no" 1>&6
8324 fi
8325
8326
8327
8328 ol_link_modules=no
8329 if test $ol_enable_modules != no ; then
8330         for ac_hdr in ltdl.h
8331 do
8332 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8333 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8334 echo "configure:8335: checking for $ac_hdr" >&5
8335 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8336   echo $ac_n "(cached) $ac_c" 1>&6
8337 else
8338   cat > conftest.$ac_ext <<EOF
8339 #line 8340 "configure"
8340 #include "confdefs.h"
8341 #include <$ac_hdr>
8342 EOF
8343 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8344 { (eval echo configure:8345: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8345 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8346 if test -z "$ac_err"; then
8347   rm -rf conftest*
8348   eval "ac_cv_header_$ac_safe=yes"
8349 else
8350   echo "$ac_err" >&5
8351   echo "configure: failed program was:" >&5
8352   cat conftest.$ac_ext >&5
8353   rm -rf conftest*
8354   eval "ac_cv_header_$ac_safe=no"
8355 fi
8356 rm -f conftest*
8357 fi
8358 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8359   echo "$ac_t""yes" 1>&6
8360     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8361   cat >> confdefs.h <<EOF
8362 #define $ac_tr_hdr 1
8363 EOF
8364  
8365 else
8366   echo "$ac_t""no" 1>&6
8367 fi
8368 done
8369
8370
8371         if test $ac_cv_header_ltdl_h = no ; then
8372                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8373         fi
8374
8375         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8376 echo "configure:8377: checking for lt_dlinit in -lltdl" >&5
8377 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8378 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8379   echo $ac_n "(cached) $ac_c" 1>&6
8380 else
8381   ac_save_LIBS="$LIBS"
8382 LIBS="-lltdl  $LIBS"
8383 cat > conftest.$ac_ext <<EOF
8384 #line 8385 "configure"
8385 #include "confdefs.h"
8386 /* Override any gcc2 internal prototype to avoid an error.  */
8387 /* We use char because int might match the return type of a gcc2
8388     builtin and then its argument prototype would still apply.  */
8389 char lt_dlinit();
8390
8391 int main() {
8392 lt_dlinit()
8393 ; return 0; }
8394 EOF
8395 if { (eval echo configure:8396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8396   rm -rf conftest*
8397   eval "ac_cv_lib_$ac_lib_var=yes"
8398 else
8399   echo "configure: failed program was:" >&5
8400   cat conftest.$ac_ext >&5
8401   rm -rf conftest*
8402   eval "ac_cv_lib_$ac_lib_var=no"
8403 fi
8404 rm -f conftest*
8405 LIBS="$ac_save_LIBS"
8406
8407 fi
8408 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8409   echo "$ac_t""yes" 1>&6
8410   
8411                 MODULES_LIBS=-lltdl
8412                 cat >> confdefs.h <<\EOF
8413 #define HAVE_LIBLTDL 1
8414 EOF
8415
8416         
8417 else
8418   echo "$ac_t""no" 1>&6
8419 fi
8420
8421
8422         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8423                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8424         fi
8425         ol_link_modules=yes
8426 else
8427         ol_with_bdb_module=static
8428         ol_with_dnssrv_module=static
8429         ol_with_ldap_module=static
8430         ol_with_ldbm_module=static
8431         ol_with_meta_module=static
8432         ol_with_monitor_module=static
8433         ol_with_null_module=static
8434         ol_with_passwd_module=static
8435         ol_with_perl_module=static
8436         ol_with_shell_module=static
8437         ol_with_tcl_module=static
8438         ol_with_sql_module=static
8439 fi
8440
8441 # test for EBCDIC
8442 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8443 echo "configure:8444: checking for EBCDIC" >&5
8444 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8445   echo $ac_n "(cached) $ac_c" 1>&6
8446 else
8447   
8448         cat > conftest.$ac_ext <<EOF
8449 #line 8450 "configure"
8450 #include "confdefs.h"
8451
8452 #if !('M' == 0xd4)
8453 #include <__ASCII__/generate_error.h>
8454 #endif
8455
8456 EOF
8457 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8458 { (eval echo configure:8459: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8459 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8460 if test -z "$ac_err"; then
8461   rm -rf conftest*
8462   ol_cv_cpp_ebcdic=yes
8463 else
8464   echo "$ac_err" >&5
8465   echo "configure: failed program was:" >&5
8466   cat conftest.$ac_ext >&5
8467   rm -rf conftest*
8468   ol_cv_cpp_ebcdic=no
8469 fi
8470 rm -f conftest*
8471 fi
8472
8473 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8474 if test $ol_cv_cpp_ebcdic = yes ; then
8475         cat >> confdefs.h <<\EOF
8476 #define HAVE_EBCDIC 1
8477 EOF
8478
8479 fi
8480
8481 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8482 echo "configure:8483: checking for ANSI C header files" >&5
8483 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8484   echo $ac_n "(cached) $ac_c" 1>&6
8485 else
8486   cat > conftest.$ac_ext <<EOF
8487 #line 8488 "configure"
8488 #include "confdefs.h"
8489 #include <stdlib.h>
8490 #include <stdarg.h>
8491 #include <string.h>
8492 #include <float.h>
8493 EOF
8494 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8495 { (eval echo configure:8496: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8496 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8497 if test -z "$ac_err"; then
8498   rm -rf conftest*
8499   ol_cv_header_stdc=yes
8500 else
8501   echo "$ac_err" >&5
8502   echo "configure: failed program was:" >&5
8503   cat conftest.$ac_ext >&5
8504   rm -rf conftest*
8505   ol_cv_header_stdc=no
8506 fi
8507 rm -f conftest*
8508
8509 if test $ol_cv_header_stdc = yes; then
8510   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8511 cat > conftest.$ac_ext <<EOF
8512 #line 8513 "configure"
8513 #include "confdefs.h"
8514 #include <string.h>
8515 EOF
8516 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8517   egrep "memchr" >/dev/null 2>&1; then
8518   :
8519 else
8520   rm -rf conftest*
8521   ol_cv_header_stdc=no
8522 fi
8523 rm -f conftest*
8524
8525 fi
8526
8527 if test $ol_cv_header_stdc = yes; then
8528   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8529 cat > conftest.$ac_ext <<EOF
8530 #line 8531 "configure"
8531 #include "confdefs.h"
8532 #include <stdlib.h>
8533 EOF
8534 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8535   egrep "free" >/dev/null 2>&1; then
8536   :
8537 else
8538   rm -rf conftest*
8539   ol_cv_header_stdc=no
8540 fi
8541 rm -f conftest*
8542
8543 fi
8544
8545 if test $ol_cv_header_stdc = yes; then
8546   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8547 if test "$cross_compiling" = yes; then
8548   :
8549 else
8550   cat > conftest.$ac_ext <<EOF
8551 #line 8552 "configure"
8552 #include "confdefs.h"
8553 #include <ctype.h>
8554 #ifndef HAVE_EBCDIC
8555 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8556 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8557 #else
8558 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8559                 || ('j' <= (c) && (c) <= 'r') \
8560                 || ('s' <= (c) && (c) <= 'z'))
8561 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8562 #endif
8563 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8564 int main () { int i; for (i = 0; i < 256; i++)
8565 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8566 exit (0); }
8567
8568 EOF
8569 if { (eval echo configure:8570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8570 then
8571   :
8572 else
8573   echo "configure: failed program was:" >&5
8574   cat conftest.$ac_ext >&5
8575   rm -fr conftest*
8576   ol_cv_header_stdc=no
8577 fi
8578 rm -fr conftest*
8579 fi
8580
8581 fi
8582 fi
8583
8584 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8585 if test $ol_cv_header_stdc = yes; then
8586   cat >> confdefs.h <<\EOF
8587 #define STDC_HEADERS 1
8588 EOF
8589
8590 fi
8591 ac_cv_header_stdc=disable
8592
8593
8594 if test $ol_cv_header_stdc != yes; then
8595         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8596 fi
8597
8598 ac_header_dirent=no
8599 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8600 do
8601 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8602 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8603 echo "configure:8604: checking for $ac_hdr that defines DIR" >&5
8604 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8605   echo $ac_n "(cached) $ac_c" 1>&6
8606 else
8607   cat > conftest.$ac_ext <<EOF
8608 #line 8609 "configure"
8609 #include "confdefs.h"
8610 #include <sys/types.h>
8611 #include <$ac_hdr>
8612 int main() {
8613 DIR *dirp = 0;
8614 ; return 0; }
8615 EOF
8616 if { (eval echo configure:8617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8617   rm -rf conftest*
8618   eval "ac_cv_header_dirent_$ac_safe=yes"
8619 else
8620   echo "configure: failed program was:" >&5
8621   cat conftest.$ac_ext >&5
8622   rm -rf conftest*
8623   eval "ac_cv_header_dirent_$ac_safe=no"
8624 fi
8625 rm -f conftest*
8626 fi
8627 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8628   echo "$ac_t""yes" 1>&6
8629     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8630   cat >> confdefs.h <<EOF
8631 #define $ac_tr_hdr 1
8632 EOF
8633  ac_header_dirent=$ac_hdr; break
8634 else
8635   echo "$ac_t""no" 1>&6
8636 fi
8637 done
8638 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8639 if test $ac_header_dirent = dirent.h; then
8640 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8641 echo "configure:8642: checking for opendir in -ldir" >&5
8642 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8643 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8644   echo $ac_n "(cached) $ac_c" 1>&6
8645 else
8646   ac_save_LIBS="$LIBS"
8647 LIBS="-ldir  $LIBS"
8648 cat > conftest.$ac_ext <<EOF
8649 #line 8650 "configure"
8650 #include "confdefs.h"
8651 /* Override any gcc2 internal prototype to avoid an error.  */
8652 /* We use char because int might match the return type of a gcc2
8653     builtin and then its argument prototype would still apply.  */
8654 char opendir();
8655
8656 int main() {
8657 opendir()
8658 ; return 0; }
8659 EOF
8660 if { (eval echo configure:8661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8661   rm -rf conftest*
8662   eval "ac_cv_lib_$ac_lib_var=yes"
8663 else
8664   echo "configure: failed program was:" >&5
8665   cat conftest.$ac_ext >&5
8666   rm -rf conftest*
8667   eval "ac_cv_lib_$ac_lib_var=no"
8668 fi
8669 rm -f conftest*
8670 LIBS="$ac_save_LIBS"
8671
8672 fi
8673 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8674   echo "$ac_t""yes" 1>&6
8675   LIBS="$LIBS -ldir"
8676 else
8677   echo "$ac_t""no" 1>&6
8678 fi
8679
8680 else
8681 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8682 echo "configure:8683: checking for opendir in -lx" >&5
8683 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8684 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8685   echo $ac_n "(cached) $ac_c" 1>&6
8686 else
8687   ac_save_LIBS="$LIBS"
8688 LIBS="-lx  $LIBS"
8689 cat > conftest.$ac_ext <<EOF
8690 #line 8691 "configure"
8691 #include "confdefs.h"
8692 /* Override any gcc2 internal prototype to avoid an error.  */
8693 /* We use char because int might match the return type of a gcc2
8694     builtin and then its argument prototype would still apply.  */
8695 char opendir();
8696
8697 int main() {
8698 opendir()
8699 ; return 0; }
8700 EOF
8701 if { (eval echo configure:8702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8702   rm -rf conftest*
8703   eval "ac_cv_lib_$ac_lib_var=yes"
8704 else
8705   echo "configure: failed program was:" >&5
8706   cat conftest.$ac_ext >&5
8707   rm -rf conftest*
8708   eval "ac_cv_lib_$ac_lib_var=no"
8709 fi
8710 rm -f conftest*
8711 LIBS="$ac_save_LIBS"
8712
8713 fi
8714 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8715   echo "$ac_t""yes" 1>&6
8716   LIBS="$LIBS -lx"
8717 else
8718   echo "$ac_t""no" 1>&6
8719 fi
8720
8721 fi
8722
8723 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8724 echo "configure:8725: checking for sys/wait.h that is POSIX.1 compatible" >&5
8725 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8726   echo $ac_n "(cached) $ac_c" 1>&6
8727 else
8728   cat > conftest.$ac_ext <<EOF
8729 #line 8730 "configure"
8730 #include "confdefs.h"
8731 #include <sys/types.h>
8732 #include <sys/wait.h>
8733 #ifndef WEXITSTATUS
8734 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8735 #endif
8736 #ifndef WIFEXITED
8737 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8738 #endif
8739 int main() {
8740 int s;
8741 wait (&s);
8742 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8743 ; return 0; }
8744 EOF
8745 if { (eval echo configure:8746: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8746   rm -rf conftest*
8747   ac_cv_header_sys_wait_h=yes
8748 else
8749   echo "configure: failed program was:" >&5
8750   cat conftest.$ac_ext >&5
8751   rm -rf conftest*
8752   ac_cv_header_sys_wait_h=no
8753 fi
8754 rm -f conftest*
8755 fi
8756
8757 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8758 if test $ac_cv_header_sys_wait_h = yes; then
8759   cat >> confdefs.h <<\EOF
8760 #define HAVE_SYS_WAIT_H 1
8761 EOF
8762
8763 fi
8764
8765 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8766 echo "configure:8767: checking POSIX termios" >&5
8767 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8768   echo $ac_n "(cached) $ac_c" 1>&6
8769 else
8770   cat > conftest.$ac_ext <<EOF
8771 #line 8772 "configure"
8772 #include "confdefs.h"
8773 #include <sys/types.h>
8774 #include <unistd.h>
8775 #include <termios.h>
8776 int main() {
8777 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8778    tcgetattr(0, 0);
8779 ; return 0; }
8780 EOF
8781 if { (eval echo configure:8782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8782   rm -rf conftest*
8783   am_cv_sys_posix_termios=yes
8784 else
8785   echo "configure: failed program was:" >&5
8786   cat conftest.$ac_ext >&5
8787   rm -rf conftest*
8788   am_cv_sys_posix_termios=no
8789 fi
8790 rm -f conftest*
8791 fi
8792
8793 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8794
8795
8796  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8797 echo "configure:8798: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8798 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8799   echo $ac_n "(cached) $ac_c" 1>&6
8800 else
8801   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8802
8803   gwinsz_in_termios_h=no
8804   if test $am_cv_sys_posix_termios = yes; then
8805     cat > conftest.$ac_ext <<EOF
8806 #line 8807 "configure"
8807 #include "confdefs.h"
8808 #include <sys/types.h>
8809 #     include <termios.h>
8810 #     ifdef TIOCGWINSZ
8811         yes
8812 #     endif
8813     
8814 EOF
8815 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8816   egrep "yes" >/dev/null 2>&1; then
8817   rm -rf conftest*
8818   gwinsz_in_termios_h=yes
8819 fi
8820 rm -f conftest*
8821
8822   fi
8823
8824   if test $gwinsz_in_termios_h = no; then
8825     cat > conftest.$ac_ext <<EOF
8826 #line 8827 "configure"
8827 #include "confdefs.h"
8828 #include <sys/types.h>
8829 #     include <sys/ioctl.h>
8830 #     ifdef TIOCGWINSZ
8831         yes
8832 #     endif
8833     
8834 EOF
8835 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8836   egrep "yes" >/dev/null 2>&1; then
8837   rm -rf conftest*
8838   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8839 fi
8840 rm -f conftest*
8841
8842   fi
8843   
8844 fi
8845
8846 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8847   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8848     cat >> confdefs.h <<\EOF
8849 #define GWINSZ_IN_SYS_IOCTL 1
8850 EOF
8851
8852   fi
8853
8854 if test $am_cv_sys_posix_termios = yes ; then
8855         cat >> confdefs.h <<\EOF
8856 #define HAVE_POSIX_TERMIOS 1
8857 EOF
8858
8859 fi
8860
8861 for ac_hdr in \
8862         arpa/inet.h             \
8863         arpa/nameser.h  \
8864         assert.h                \
8865         conio.h                 \
8866         crypt.h                 \
8867         direct.h                \
8868         errno.h                 \
8869         fcntl.h                 \
8870         filio.h                 \
8871         getopt.h                \
8872         grp.h                   \
8873         io.h                    \
8874         libutil.h               \
8875         limits.h                \
8876         locale.h                \
8877         netinet/tcp.h   \
8878         malloc.h                \
8879         memory.h                \
8880         psap.h                  \
8881         pwd.h                   \
8882         process.h               \
8883         resolv.h                \
8884         sgtty.h                 \
8885         shadow.h                \
8886         stddef.h                \
8887         string.h                \
8888         strings.h               \
8889         sysexits.h              \
8890         sys/file.h              \
8891         sys/filio.h             \
8892         sys/errno.h             \
8893         sys/ioctl.h             \
8894         sys/param.h             \
8895         sys/resource.h  \
8896         sys/select.h    \
8897         sys/socket.h    \
8898         sys/syslog.h    \
8899         sys/time.h              \
8900         sys/types.h             \
8901         syslog.h                \
8902         termios.h               \
8903         unistd.h                \
8904         winsock.h               \
8905         winsock2.h              \
8906
8907 do
8908 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8909 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8910 echo "configure:8911: checking for $ac_hdr" >&5
8911 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8912   echo $ac_n "(cached) $ac_c" 1>&6
8913 else
8914   cat > conftest.$ac_ext <<EOF
8915 #line 8916 "configure"
8916 #include "confdefs.h"
8917 #include <$ac_hdr>
8918 EOF
8919 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8920 { (eval echo configure:8921: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8921 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8922 if test -z "$ac_err"; then
8923   rm -rf conftest*
8924   eval "ac_cv_header_$ac_safe=yes"
8925 else
8926   echo "$ac_err" >&5
8927   echo "configure: failed program was:" >&5
8928   cat conftest.$ac_ext >&5
8929   rm -rf conftest*
8930   eval "ac_cv_header_$ac_safe=no"
8931 fi
8932 rm -f conftest*
8933 fi
8934 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8935   echo "$ac_t""yes" 1>&6
8936     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8937   cat >> confdefs.h <<EOF
8938 #define $ac_tr_hdr 1
8939 EOF
8940  
8941 else
8942   echo "$ac_t""no" 1>&6
8943 fi
8944 done
8945
8946
8947
8948
8949 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
8950 echo "configure:8951: checking for dlopen" >&5
8951 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
8952   echo $ac_n "(cached) $ac_c" 1>&6
8953 else
8954   cat > conftest.$ac_ext <<EOF
8955 #line 8956 "configure"
8956 #include "confdefs.h"
8957 /* System header to define __stub macros and hopefully few prototypes,
8958     which can conflict with char dlopen(); below.  */
8959 #include <assert.h>
8960 /* Override any gcc2 internal prototype to avoid an error.  */
8961 /* We use char because int might match the return type of a gcc2
8962     builtin and then its argument prototype would still apply.  */
8963 char dlopen();
8964 char (*f)();
8965
8966 int main() {
8967
8968 /* The GNU C library defines this for functions which it implements
8969     to always fail with ENOSYS.  Some functions are actually named
8970     something starting with __ and the normal name is an alias.  */
8971 #if defined (__stub_dlopen) || defined (__stub___dlopen)
8972 choke me
8973 #else
8974 f = dlopen;
8975 #endif
8976
8977 ; return 0; }
8978 EOF
8979 if { (eval echo configure:8980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8980   rm -rf conftest*
8981   eval "ac_cv_func_dlopen=yes"
8982 else
8983   echo "configure: failed program was:" >&5
8984   cat conftest.$ac_ext >&5
8985   rm -rf conftest*
8986   eval "ac_cv_func_dlopen=no"
8987 fi
8988 rm -f conftest*
8989 fi
8990
8991 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
8992   echo "$ac_t""yes" 1>&6
8993   :
8994 else
8995   echo "$ac_t""no" 1>&6
8996 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
8997 echo "configure:8998: checking for dlopen in -ldl" >&5
8998 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
8999 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9000   echo $ac_n "(cached) $ac_c" 1>&6
9001 else
9002   ac_save_LIBS="$LIBS"
9003 LIBS="-ldl  $LIBS"
9004 cat > conftest.$ac_ext <<EOF
9005 #line 9006 "configure"
9006 #include "confdefs.h"
9007 /* Override any gcc2 internal prototype to avoid an error.  */
9008 /* We use char because int might match the return type of a gcc2
9009     builtin and then its argument prototype would still apply.  */
9010 char dlopen();
9011
9012 int main() {
9013 dlopen()
9014 ; return 0; }
9015 EOF
9016 if { (eval echo configure:9017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9017   rm -rf conftest*
9018   eval "ac_cv_lib_$ac_lib_var=yes"
9019 else
9020   echo "configure: failed program was:" >&5
9021   cat conftest.$ac_ext >&5
9022   rm -rf conftest*
9023   eval "ac_cv_lib_$ac_lib_var=no"
9024 fi
9025 rm -f conftest*
9026 LIBS="$ac_save_LIBS"
9027
9028 fi
9029 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9030   echo "$ac_t""yes" 1>&6
9031     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9032     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9033   cat >> confdefs.h <<EOF
9034 #define $ac_tr_lib 1
9035 EOF
9036
9037   LIBS="-ldl $LIBS"
9038
9039 else
9040   echo "$ac_t""no" 1>&6
9041 fi
9042
9043 fi
9044
9045
9046 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
9047 echo "configure:9048: checking for sigset in -lV3" >&5
9048 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
9049 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9050   echo $ac_n "(cached) $ac_c" 1>&6
9051 else
9052   ac_save_LIBS="$LIBS"
9053 LIBS="-lV3  $LIBS"
9054 cat > conftest.$ac_ext <<EOF
9055 #line 9056 "configure"
9056 #include "confdefs.h"
9057 /* Override any gcc2 internal prototype to avoid an error.  */
9058 /* We use char because int might match the return type of a gcc2
9059     builtin and then its argument prototype would still apply.  */
9060 char sigset();
9061
9062 int main() {
9063 sigset()
9064 ; return 0; }
9065 EOF
9066 if { (eval echo configure:9067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9067   rm -rf conftest*
9068   eval "ac_cv_lib_$ac_lib_var=yes"
9069 else
9070   echo "configure: failed program was:" >&5
9071   cat conftest.$ac_ext >&5
9072   rm -rf conftest*
9073   eval "ac_cv_lib_$ac_lib_var=no"
9074 fi
9075 rm -f conftest*
9076 LIBS="$ac_save_LIBS"
9077
9078 fi
9079 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9080   echo "$ac_t""yes" 1>&6
9081     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9082     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9083   cat >> confdefs.h <<EOF
9084 #define $ac_tr_lib 1
9085 EOF
9086
9087   LIBS="-lV3 $LIBS"
9088
9089 else
9090   echo "$ac_t""no" 1>&6
9091 fi
9092
9093
9094 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9095 echo "configure:9096: checking for winsock" >&5
9096 save_LIBS="$LIBS"
9097 for curlib in ws2_32 wsock32; do
9098         LIBS="$LIBS -l$curlib"
9099         cat > conftest.$ac_ext <<EOF
9100 #line 9101 "configure"
9101 #include "confdefs.h"
9102
9103                         char socket@12();
9104                         char select@20();
9105                         char closesocket@4();
9106                         char gethostname@8();
9107                         
9108 int main() {
9109
9110                         socket@12();
9111                         select@20();
9112                         closesocket@4();
9113                         gethostname@8();
9114                         
9115 ; return 0; }
9116 EOF
9117 if { (eval echo configure:9118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9118   rm -rf conftest*
9119   have_winsock=yes
9120 else
9121   echo "configure: failed program was:" >&5
9122   cat conftest.$ac_ext >&5
9123   rm -rf conftest*
9124   have_winsock=no
9125 fi
9126 rm -f conftest*
9127
9128         if test $have_winsock = yes; then
9129                 cat >> confdefs.h <<\EOF
9130 #define HAVE_WINSOCK 1
9131 EOF
9132
9133                 ac_cv_func_socket=yes
9134                 ac_cv_func_select=yes
9135                 ac_cv_func_closesocket=yes
9136                 ac_cv_func_gethostname=yes
9137                 if test $curlib = ws2_32; then
9138                         have_winsock=winsock2
9139                         cat >> confdefs.h <<\EOF
9140 #define HAVE_WINSOCK2 1
9141 EOF
9142
9143                 fi
9144                 break
9145         fi
9146         LIBS="$save_LIBS"
9147 done
9148 echo "$ac_t""$have_winsock" 1>&6
9149
9150
9151 echo $ac_n "checking for socket""... $ac_c" 1>&6
9152 echo "configure:9153: checking for socket" >&5
9153 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9154   echo $ac_n "(cached) $ac_c" 1>&6
9155 else
9156   cat > conftest.$ac_ext <<EOF
9157 #line 9158 "configure"
9158 #include "confdefs.h"
9159 /* System header to define __stub macros and hopefully few prototypes,
9160     which can conflict with char socket(); below.  */
9161 #include <assert.h>
9162 /* Override any gcc2 internal prototype to avoid an error.  */
9163 /* We use char because int might match the return type of a gcc2
9164     builtin and then its argument prototype would still apply.  */
9165 char socket();
9166 char (*f)();
9167
9168 int main() {
9169
9170 /* The GNU C library defines this for functions which it implements
9171     to always fail with ENOSYS.  Some functions are actually named
9172     something starting with __ and the normal name is an alias.  */
9173 #if defined (__stub_socket) || defined (__stub___socket)
9174 choke me
9175 #else
9176 f = socket;
9177 #endif
9178
9179 ; return 0; }
9180 EOF
9181 if { (eval echo configure:9182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9182   rm -rf conftest*
9183   eval "ac_cv_func_socket=yes"
9184 else
9185   echo "configure: failed program was:" >&5
9186   cat conftest.$ac_ext >&5
9187   rm -rf conftest*
9188   eval "ac_cv_func_socket=no"
9189 fi
9190 rm -f conftest*
9191 fi
9192
9193 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9194   echo "$ac_t""yes" 1>&6
9195   :
9196 else
9197   echo "$ac_t""no" 1>&6
9198         
9199         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9200 echo "configure:9201: checking for main in -lsocket" >&5
9201 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9202 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9203   echo $ac_n "(cached) $ac_c" 1>&6
9204 else
9205   ac_save_LIBS="$LIBS"
9206 LIBS="-lsocket  $LIBS"
9207 cat > conftest.$ac_ext <<EOF
9208 #line 9209 "configure"
9209 #include "confdefs.h"
9210
9211 int main() {
9212 main()
9213 ; return 0; }
9214 EOF
9215 if { (eval echo configure:9216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9216   rm -rf conftest*
9217   eval "ac_cv_lib_$ac_lib_var=yes"
9218 else
9219   echo "configure: failed program was:" >&5
9220   cat conftest.$ac_ext >&5
9221   rm -rf conftest*
9222   eval "ac_cv_lib_$ac_lib_var=no"
9223 fi
9224 rm -f conftest*
9225 LIBS="$ac_save_LIBS"
9226
9227 fi
9228 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9229   echo "$ac_t""yes" 1>&6
9230     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9231     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9232   cat >> confdefs.h <<EOF
9233 #define $ac_tr_lib 1
9234 EOF
9235
9236   LIBS="-lsocket $LIBS"
9237
9238 else
9239   echo "$ac_t""no" 1>&6
9240 fi
9241
9242         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9243 echo "configure:9244: checking for main in -lnet" >&5
9244 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9245 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9246   echo $ac_n "(cached) $ac_c" 1>&6
9247 else
9248   ac_save_LIBS="$LIBS"
9249 LIBS="-lnet  $LIBS"
9250 cat > conftest.$ac_ext <<EOF
9251 #line 9252 "configure"
9252 #include "confdefs.h"
9253
9254 int main() {
9255 main()
9256 ; return 0; }
9257 EOF
9258 if { (eval echo configure:9259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9259   rm -rf conftest*
9260   eval "ac_cv_lib_$ac_lib_var=yes"
9261 else
9262   echo "configure: failed program was:" >&5
9263   cat conftest.$ac_ext >&5
9264   rm -rf conftest*
9265   eval "ac_cv_lib_$ac_lib_var=no"
9266 fi
9267 rm -f conftest*
9268 LIBS="$ac_save_LIBS"
9269
9270 fi
9271 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9272   echo "$ac_t""yes" 1>&6
9273     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9274     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9275   cat >> confdefs.h <<EOF
9276 #define $ac_tr_lib 1
9277 EOF
9278
9279   LIBS="-lnet $LIBS"
9280
9281 else
9282   echo "$ac_t""no" 1>&6
9283 fi
9284
9285         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9286 echo "configure:9287: checking for main in -lnsl_s" >&5
9287 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9288 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9289   echo $ac_n "(cached) $ac_c" 1>&6
9290 else
9291   ac_save_LIBS="$LIBS"
9292 LIBS="-lnsl_s  $LIBS"
9293 cat > conftest.$ac_ext <<EOF
9294 #line 9295 "configure"
9295 #include "confdefs.h"
9296
9297 int main() {
9298 main()
9299 ; return 0; }
9300 EOF
9301 if { (eval echo configure:9302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9302   rm -rf conftest*
9303   eval "ac_cv_lib_$ac_lib_var=yes"
9304 else
9305   echo "configure: failed program was:" >&5
9306   cat conftest.$ac_ext >&5
9307   rm -rf conftest*
9308   eval "ac_cv_lib_$ac_lib_var=no"
9309 fi
9310 rm -f conftest*
9311 LIBS="$ac_save_LIBS"
9312
9313 fi
9314 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9315   echo "$ac_t""yes" 1>&6
9316     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9317     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9318   cat >> confdefs.h <<EOF
9319 #define $ac_tr_lib 1
9320 EOF
9321
9322   LIBS="-lnsl_s $LIBS"
9323
9324 else
9325   echo "$ac_t""no" 1>&6
9326 fi
9327
9328         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9329 echo "configure:9330: checking for main in -lnsl" >&5
9330 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9331 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9332   echo $ac_n "(cached) $ac_c" 1>&6
9333 else
9334   ac_save_LIBS="$LIBS"
9335 LIBS="-lnsl  $LIBS"
9336 cat > conftest.$ac_ext <<EOF
9337 #line 9338 "configure"
9338 #include "confdefs.h"
9339
9340 int main() {
9341 main()
9342 ; return 0; }
9343 EOF
9344 if { (eval echo configure:9345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9345   rm -rf conftest*
9346   eval "ac_cv_lib_$ac_lib_var=yes"
9347 else
9348   echo "configure: failed program was:" >&5
9349   cat conftest.$ac_ext >&5
9350   rm -rf conftest*
9351   eval "ac_cv_lib_$ac_lib_var=no"
9352 fi
9353 rm -f conftest*
9354 LIBS="$ac_save_LIBS"
9355
9356 fi
9357 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9358   echo "$ac_t""yes" 1>&6
9359     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9360     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9361   cat >> confdefs.h <<EOF
9362 #define $ac_tr_lib 1
9363 EOF
9364
9365   LIBS="-lnsl $LIBS"
9366
9367 else
9368   echo "$ac_t""no" 1>&6
9369 fi
9370
9371         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9372 echo "configure:9373: checking for socket in -linet" >&5
9373 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9374 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9375   echo $ac_n "(cached) $ac_c" 1>&6
9376 else
9377   ac_save_LIBS="$LIBS"
9378 LIBS="-linet  $LIBS"
9379 cat > conftest.$ac_ext <<EOF
9380 #line 9381 "configure"
9381 #include "confdefs.h"
9382 /* Override any gcc2 internal prototype to avoid an error.  */
9383 /* We use char because int might match the return type of a gcc2
9384     builtin and then its argument prototype would still apply.  */
9385 char socket();
9386
9387 int main() {
9388 socket()
9389 ; return 0; }
9390 EOF
9391 if { (eval echo configure:9392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9392   rm -rf conftest*
9393   eval "ac_cv_lib_$ac_lib_var=yes"
9394 else
9395   echo "configure: failed program was:" >&5
9396   cat conftest.$ac_ext >&5
9397   rm -rf conftest*
9398   eval "ac_cv_lib_$ac_lib_var=no"
9399 fi
9400 rm -f conftest*
9401 LIBS="$ac_save_LIBS"
9402
9403 fi
9404 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9405   echo "$ac_t""yes" 1>&6
9406     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9407     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9408   cat >> confdefs.h <<EOF
9409 #define $ac_tr_lib 1
9410 EOF
9411
9412   LIBS="-linet $LIBS"
9413
9414 else
9415   echo "$ac_t""no" 1>&6
9416 fi
9417
9418         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9419 echo "configure:9420: checking for main in -lgen" >&5
9420 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9421 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9422   echo $ac_n "(cached) $ac_c" 1>&6
9423 else
9424   ac_save_LIBS="$LIBS"
9425 LIBS="-lgen  $LIBS"
9426 cat > conftest.$ac_ext <<EOF
9427 #line 9428 "configure"
9428 #include "confdefs.h"
9429
9430 int main() {
9431 main()
9432 ; return 0; }
9433 EOF
9434 if { (eval echo configure:9435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9435   rm -rf conftest*
9436   eval "ac_cv_lib_$ac_lib_var=yes"
9437 else
9438   echo "configure: failed program was:" >&5
9439   cat conftest.$ac_ext >&5
9440   rm -rf conftest*
9441   eval "ac_cv_lib_$ac_lib_var=no"
9442 fi
9443 rm -f conftest*
9444 LIBS="$ac_save_LIBS"
9445
9446 fi
9447 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9448   echo "$ac_t""yes" 1>&6
9449     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9450     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9451   cat >> confdefs.h <<EOF
9452 #define $ac_tr_lib 1
9453 EOF
9454
9455   LIBS="-lgen $LIBS"
9456
9457 else
9458   echo "$ac_t""no" 1>&6
9459 fi
9460
9461
9462 fi
9463
9464
9465 echo $ac_n "checking for select""... $ac_c" 1>&6
9466 echo "configure:9467: checking for select" >&5
9467 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9468   echo $ac_n "(cached) $ac_c" 1>&6
9469 else
9470   cat > conftest.$ac_ext <<EOF
9471 #line 9472 "configure"
9472 #include "confdefs.h"
9473 /* System header to define __stub macros and hopefully few prototypes,
9474     which can conflict with char select(); below.  */
9475 #include <assert.h>
9476 /* Override any gcc2 internal prototype to avoid an error.  */
9477 /* We use char because int might match the return type of a gcc2
9478     builtin and then its argument prototype would still apply.  */
9479 char select();
9480 char (*f)();
9481
9482 int main() {
9483
9484 /* The GNU C library defines this for functions which it implements
9485     to always fail with ENOSYS.  Some functions are actually named
9486     something starting with __ and the normal name is an alias.  */
9487 #if defined (__stub_select) || defined (__stub___select)
9488 choke me
9489 #else
9490 f = select;
9491 #endif
9492
9493 ; return 0; }
9494 EOF
9495 if { (eval echo configure:9496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9496   rm -rf conftest*
9497   eval "ac_cv_func_select=yes"
9498 else
9499   echo "configure: failed program was:" >&5
9500   cat conftest.$ac_ext >&5
9501   rm -rf conftest*
9502   eval "ac_cv_func_select=no"
9503 fi
9504 rm -f conftest*
9505 fi
9506
9507 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9508   echo "$ac_t""yes" 1>&6
9509   :
9510 else
9511   echo "$ac_t""no" 1>&6
9512 { echo "configure: error: select() required." 1>&2; exit 1; }
9513 fi
9514
9515
9516 if test "${ac_cv_header_winsock_h}" != yes; then
9517                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9518 echo "configure:9519: checking types of arguments for select()" >&5
9519  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9520   echo $ac_n "(cached) $ac_c" 1>&6
9521 else
9522    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9523   echo $ac_n "(cached) $ac_c" 1>&6
9524 else
9525     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9526   echo $ac_n "(cached) $ac_c" 1>&6
9527 else
9528      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9529      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9530       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9531        cat > conftest.$ac_ext <<EOF
9532 #line 9533 "configure"
9533 #include "confdefs.h"
9534 #ifdef HAVE_SYS_TYPES_H
9535 #include <sys/types.h>
9536 #endif
9537 #ifdef HAVE_SYS_TIME_H
9538 #include <sys/time.h>
9539 #endif
9540 #ifdef HAVE_SYS_SELECT_H
9541 #include <sys/select.h>
9542 #endif
9543 #ifdef HAVE_SYS_SOCKET_H
9544 #include <sys/socket.h>
9545 #endif
9546 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);
9547 int main() {
9548
9549 ; return 0; }
9550 EOF
9551 if { (eval echo configure:9552: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9552   rm -rf conftest*
9553           ac_not_found=no ; break 3
9554 else
9555   echo "configure: failed program was:" >&5
9556   cat conftest.$ac_ext >&5
9557   rm -rf conftest*
9558   ac_not_found=yes
9559 fi
9560 rm -f conftest*
9561       done
9562      done
9563     done
9564    
9565 fi
9566   
9567 fi
9568  
9569 fi
9570  if test "$ac_not_found" = yes; then
9571   ac_cv_func_select_arg1=int 
9572   ac_cv_func_select_arg234='int *' 
9573   ac_cv_func_select_arg5='struct timeval *'
9574  fi
9575  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9576  cat >> confdefs.h <<EOF
9577 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9578 EOF
9579
9580  cat >> confdefs.h <<EOF
9581 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9582 EOF
9583
9584  cat >> confdefs.h <<EOF
9585 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9586 EOF
9587
9588
9589 fi
9590
9591
9592 for ac_hdr in regex.h 
9593 do
9594 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9595 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9596 echo "configure:9597: checking for $ac_hdr" >&5
9597 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9598   echo $ac_n "(cached) $ac_c" 1>&6
9599 else
9600   cat > conftest.$ac_ext <<EOF
9601 #line 9602 "configure"
9602 #include "confdefs.h"
9603 #include <$ac_hdr>
9604 EOF
9605 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9606 { (eval echo configure:9607: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9607 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9608 if test -z "$ac_err"; then
9609   rm -rf conftest*
9610   eval "ac_cv_header_$ac_safe=yes"
9611 else
9612   echo "$ac_err" >&5
9613   echo "configure: failed program was:" >&5
9614   cat conftest.$ac_ext >&5
9615   rm -rf conftest*
9616   eval "ac_cv_header_$ac_safe=no"
9617 fi
9618 rm -f conftest*
9619 fi
9620 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9621   echo "$ac_t""yes" 1>&6
9622     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9623   cat >> confdefs.h <<EOF
9624 #define $ac_tr_hdr 1
9625 EOF
9626  
9627 else
9628   echo "$ac_t""no" 1>&6
9629 fi
9630 done
9631
9632 if test "$ac_cv_header_regex_h" != yes ; then
9633         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9634 fi
9635
9636 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9637 echo "configure:9638: checking for library containing regfree" >&5
9638 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9639   echo $ac_n "(cached) $ac_c" 1>&6
9640 else
9641   ac_func_search_save_LIBS="$LIBS"
9642 ac_cv_search_regfree="no"
9643 cat > conftest.$ac_ext <<EOF
9644 #line 9645 "configure"
9645 #include "confdefs.h"
9646 /* Override any gcc2 internal prototype to avoid an error.  */
9647 /* We use char because int might match the return type of a gcc2
9648     builtin and then its argument prototype would still apply.  */
9649 char regfree();
9650
9651 int main() {
9652 regfree()
9653 ; return 0; }
9654 EOF
9655 if { (eval echo configure:9656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9656   rm -rf conftest*
9657   ac_cv_search_regfree="none required"
9658 else
9659   echo "configure: failed program was:" >&5
9660   cat conftest.$ac_ext >&5
9661 fi
9662 rm -f conftest*
9663 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9664 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9665 cat > conftest.$ac_ext <<EOF
9666 #line 9667 "configure"
9667 #include "confdefs.h"
9668 /* Override any gcc2 internal prototype to avoid an error.  */
9669 /* We use char because int might match the return type of a gcc2
9670     builtin and then its argument prototype would still apply.  */
9671 char regfree();
9672
9673 int main() {
9674 regfree()
9675 ; return 0; }
9676 EOF
9677 if { (eval echo configure:9678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9678   rm -rf conftest*
9679   ac_cv_search_regfree="-l$ac_lib"
9680 break
9681 else
9682   echo "configure: failed program was:" >&5
9683   cat conftest.$ac_ext >&5
9684 fi
9685 rm -f conftest*
9686 done
9687 LIBS="$ac_func_search_save_LIBS"
9688 fi
9689
9690 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9691 if test "$ac_cv_search_regfree" != "no"; then
9692   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9693   :
9694 else :
9695   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9696 fi
9697
9698
9699 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9700 echo "configure:9701: checking for compatible POSIX regex" >&5
9701 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9702   echo $ac_n "(cached) $ac_c" 1>&6
9703 else
9704   
9705         if test "$cross_compiling" = yes; then
9706   ol_cv_c_posix_regex=cross
9707 else
9708   cat > conftest.$ac_ext <<EOF
9709 #line 9710 "configure"
9710 #include "confdefs.h"
9711
9712 #include <sys/types.h>
9713 #include <regex.h>
9714 static char *pattern, *string;
9715 main()
9716 {
9717         int rc;
9718         regex_t re;
9719
9720         pattern = "^A";
9721
9722         if(regcomp(&re, pattern, 0)) {
9723                 return -1;
9724         }
9725         
9726         string = "ALL MATCH";
9727         
9728         rc = regexec(&re, string, 0, (void*)0, 0);
9729
9730         regfree(&re);
9731
9732         return rc;
9733 }
9734 EOF
9735 if { (eval echo configure:9736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9736 then
9737   ol_cv_c_posix_regex=yes
9738 else
9739   echo "configure: failed program was:" >&5
9740   cat conftest.$ac_ext >&5
9741   rm -fr conftest*
9742   ol_cv_c_posix_regex=no
9743 fi
9744 rm -fr conftest*
9745 fi
9746
9747 fi
9748
9749 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9750
9751 if test "$ol_cv_c_posix_regex" = no ; then
9752         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9753 fi
9754
9755
9756 have_uuid=no
9757 for ac_hdr in sys/uuid.h
9758 do
9759 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9760 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9761 echo "configure:9762: checking for $ac_hdr" >&5
9762 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9763   echo $ac_n "(cached) $ac_c" 1>&6
9764 else
9765   cat > conftest.$ac_ext <<EOF
9766 #line 9767 "configure"
9767 #include "confdefs.h"
9768 #include <$ac_hdr>
9769 EOF
9770 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9771 { (eval echo configure:9772: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9772 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9773 if test -z "$ac_err"; then
9774   rm -rf conftest*
9775   eval "ac_cv_header_$ac_safe=yes"
9776 else
9777   echo "$ac_err" >&5
9778   echo "configure: failed program was:" >&5
9779   cat conftest.$ac_ext >&5
9780   rm -rf conftest*
9781   eval "ac_cv_header_$ac_safe=no"
9782 fi
9783 rm -f conftest*
9784 fi
9785 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9786   echo "$ac_t""yes" 1>&6
9787     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9788   cat >> confdefs.h <<EOF
9789 #define $ac_tr_hdr 1
9790 EOF
9791  
9792 else
9793   echo "$ac_t""no" 1>&6
9794 fi
9795 done
9796
9797 if test $ac_cv_header_sys_uuid_h = yes ; then
9798         save_LIBS="$LIBS"
9799         
9800 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9801 echo "configure:9802: checking for library containing uuid_to_str" >&5
9802 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9803   echo $ac_n "(cached) $ac_c" 1>&6
9804 else
9805   ac_func_search_save_LIBS="$LIBS"
9806 ac_cv_search_uuid_to_str="no"
9807 cat > conftest.$ac_ext <<EOF
9808 #line 9809 "configure"
9809 #include "confdefs.h"
9810 /* Override any gcc2 internal prototype to avoid an error.  */
9811 /* We use char because int might match the return type of a gcc2
9812     builtin and then its argument prototype would still apply.  */
9813 char uuid_to_str();
9814
9815 int main() {
9816 uuid_to_str()
9817 ; return 0; }
9818 EOF
9819 if { (eval echo configure:9820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9820   rm -rf conftest*
9821   ac_cv_search_uuid_to_str="none required"
9822 else
9823   echo "configure: failed program was:" >&5
9824   cat conftest.$ac_ext >&5
9825 fi
9826 rm -f conftest*
9827 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9828 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9829 cat > conftest.$ac_ext <<EOF
9830 #line 9831 "configure"
9831 #include "confdefs.h"
9832 /* Override any gcc2 internal prototype to avoid an error.  */
9833 /* We use char because int might match the return type of a gcc2
9834     builtin and then its argument prototype would still apply.  */
9835 char uuid_to_str();
9836
9837 int main() {
9838 uuid_to_str()
9839 ; return 0; }
9840 EOF
9841 if { (eval echo configure:9842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9842   rm -rf conftest*
9843   ac_cv_search_uuid_to_str="-l$ac_lib"
9844 break
9845 else
9846   echo "configure: failed program was:" >&5
9847   cat conftest.$ac_ext >&5
9848 fi
9849 rm -f conftest*
9850 done
9851 LIBS="$ac_func_search_save_LIBS"
9852 fi
9853
9854 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9855 if test "$ac_cv_search_uuid_to_str" != "no"; then
9856   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9857   have_uuid=yes
9858 else :
9859   :
9860 fi
9861         LIBS="$save_LIBS"
9862
9863         if test have_uuid = yes ; then
9864                 cat >> confdefs.h <<\EOF
9865 #define HAVE_UUID_TO_STR 1
9866 EOF
9867
9868
9869                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9870                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9871         fi
9872 fi
9873
9874 if test $have_uuid = no ; then
9875         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9876 echo "configure:9877: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9877         save_LIBS="$LIBS"
9878         LIBS="$LIBS -lrpcrt4"
9879         cat > conftest.$ac_ext <<EOF
9880 #line 9881 "configure"
9881 #include "confdefs.h"
9882
9883                 char UuidCreate@4();
9884                 char UuidToStringA@8();
9885                 
9886 int main() {
9887
9888                 UuidCreate@4();
9889                 UuidToStringA@8();
9890                 
9891 ; return 0; }
9892 EOF
9893 if { (eval echo configure:9894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9894   rm -rf conftest*
9895   need_rpcrt=yes
9896 else
9897   echo "configure: failed program was:" >&5
9898   cat conftest.$ac_ext >&5
9899   rm -rf conftest*
9900   need_rpcrt=no
9901 fi
9902 rm -f conftest*
9903         if test $need_rpcrt = yes; then
9904                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9905         fi
9906         LIBS="$save_LIBS"
9907         echo "$ac_t""$need_rpcrt" 1>&6
9908 fi
9909
9910 ol_link_dnssrv=no
9911 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9912 echo "configure:9913: checking for res_query" >&5
9913 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9914   echo $ac_n "(cached) $ac_c" 1>&6
9915 else
9916   cat > conftest.$ac_ext <<EOF
9917 #line 9918 "configure"
9918 #include "confdefs.h"
9919 /* System header to define __stub macros and hopefully few prototypes,
9920     which can conflict with char res_query(); below.  */
9921 #include <assert.h>
9922 /* Override any gcc2 internal prototype to avoid an error.  */
9923 /* We use char because int might match the return type of a gcc2
9924     builtin and then its argument prototype would still apply.  */
9925 char res_query();
9926 char (*f)();
9927
9928 int main() {
9929
9930 /* The GNU C library defines this for functions which it implements
9931     to always fail with ENOSYS.  Some functions are actually named
9932     something starting with __ and the normal name is an alias.  */
9933 #if defined (__stub_res_query) || defined (__stub___res_query)
9934 choke me
9935 #else
9936 f = res_query;
9937 #endif
9938
9939 ; return 0; }
9940 EOF
9941 if { (eval echo configure:9942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9942   rm -rf conftest*
9943   eval "ac_cv_func_res_query=yes"
9944 else
9945   echo "configure: failed program was:" >&5
9946   cat conftest.$ac_ext >&5
9947   rm -rf conftest*
9948   eval "ac_cv_func_res_query=no"
9949 fi
9950 rm -f conftest*
9951 fi
9952
9953 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9954   echo "$ac_t""yes" 1>&6
9955   :
9956 else
9957   echo "$ac_t""no" 1>&6
9958 fi
9959
9960 if test $ac_cv_func_res_query = no ; then 
9961         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9962 echo "configure:9963: checking for __res_query" >&5
9963 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9964   echo $ac_n "(cached) $ac_c" 1>&6
9965 else
9966   cat > conftest.$ac_ext <<EOF
9967 #line 9968 "configure"
9968 #include "confdefs.h"
9969 /* System header to define __stub macros and hopefully few prototypes,
9970     which can conflict with char __res_query(); below.  */
9971 #include <assert.h>
9972 /* Override any gcc2 internal prototype to avoid an error.  */
9973 /* We use char because int might match the return type of a gcc2
9974     builtin and then its argument prototype would still apply.  */
9975 char __res_query();
9976 char (*f)();
9977
9978 int main() {
9979
9980 /* The GNU C library defines this for functions which it implements
9981     to always fail with ENOSYS.  Some functions are actually named
9982     something starting with __ and the normal name is an alias.  */
9983 #if defined (__stub___res_query) || defined (__stub_____res_query)
9984 choke me
9985 #else
9986 f = __res_query;
9987 #endif
9988
9989 ; return 0; }
9990 EOF
9991 if { (eval echo configure:9992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9992   rm -rf conftest*
9993   eval "ac_cv_func___res_query=yes"
9994 else
9995   echo "configure: failed program was:" >&5
9996   cat conftest.$ac_ext >&5
9997   rm -rf conftest*
9998   eval "ac_cv_func___res_query=no"
9999 fi
10000 rm -f conftest*
10001 fi
10002
10003 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
10004   echo "$ac_t""yes" 1>&6
10005   :
10006 else
10007   echo "$ac_t""no" 1>&6
10008 fi
10009
10010         ac_cv_func_res_query=$ac_cv_func___res_query
10011 fi
10012
10013 if test $ac_cv_func_res_query = no ; then 
10014         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10015 echo "configure:10016: checking for res_query in -lbind" >&5
10016 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10017 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10018   echo $ac_n "(cached) $ac_c" 1>&6
10019 else
10020   ac_save_LIBS="$LIBS"
10021 LIBS="-lbind  $LIBS"
10022 cat > conftest.$ac_ext <<EOF
10023 #line 10024 "configure"
10024 #include "confdefs.h"
10025 /* Override any gcc2 internal prototype to avoid an error.  */
10026 /* We use char because int might match the return type of a gcc2
10027     builtin and then its argument prototype would still apply.  */
10028 char res_query();
10029
10030 int main() {
10031 res_query()
10032 ; return 0; }
10033 EOF
10034 if { (eval echo configure:10035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10035   rm -rf conftest*
10036   eval "ac_cv_lib_$ac_lib_var=yes"
10037 else
10038   echo "configure: failed program was:" >&5
10039   cat conftest.$ac_ext >&5
10040   rm -rf conftest*
10041   eval "ac_cv_lib_$ac_lib_var=no"
10042 fi
10043 rm -f conftest*
10044 LIBS="$ac_save_LIBS"
10045
10046 fi
10047 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10048   echo "$ac_t""yes" 1>&6
10049     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10050     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10051   cat >> confdefs.h <<EOF
10052 #define $ac_tr_lib 1
10053 EOF
10054
10055   LIBS="-lbind $LIBS"
10056
10057 else
10058   echo "$ac_t""no" 1>&6
10059 fi
10060
10061         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10062 fi
10063
10064 if test $ac_cv_func_res_query = no ; then 
10065         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10066 echo "configure:10067: checking for __res_query in -lbind" >&5
10067 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10068 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10069   echo $ac_n "(cached) $ac_c" 1>&6
10070 else
10071   ac_save_LIBS="$LIBS"
10072 LIBS="-lbind  $LIBS"
10073 cat > conftest.$ac_ext <<EOF
10074 #line 10075 "configure"
10075 #include "confdefs.h"
10076 /* Override any gcc2 internal prototype to avoid an error.  */
10077 /* We use char because int might match the return type of a gcc2
10078     builtin and then its argument prototype would still apply.  */
10079 char __res_query();
10080
10081 int main() {
10082 __res_query()
10083 ; return 0; }
10084 EOF
10085 if { (eval echo configure:10086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10086   rm -rf conftest*
10087   eval "ac_cv_lib_$ac_lib_var=yes"
10088 else
10089   echo "configure: failed program was:" >&5
10090   cat conftest.$ac_ext >&5
10091   rm -rf conftest*
10092   eval "ac_cv_lib_$ac_lib_var=no"
10093 fi
10094 rm -f conftest*
10095 LIBS="$ac_save_LIBS"
10096
10097 fi
10098 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10099   echo "$ac_t""yes" 1>&6
10100     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10101     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10102   cat >> confdefs.h <<EOF
10103 #define $ac_tr_lib 1
10104 EOF
10105
10106   LIBS="-lbind $LIBS"
10107
10108 else
10109   echo "$ac_t""no" 1>&6
10110 fi
10111
10112         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10113 fi
10114
10115 if test $ac_cv_func_res_query = no ; then 
10116         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10117 echo "configure:10118: checking for res_query in -lresolv" >&5
10118 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10119 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10120   echo $ac_n "(cached) $ac_c" 1>&6
10121 else
10122   ac_save_LIBS="$LIBS"
10123 LIBS="-lresolv  $LIBS"
10124 cat > conftest.$ac_ext <<EOF
10125 #line 10126 "configure"
10126 #include "confdefs.h"
10127 /* Override any gcc2 internal prototype to avoid an error.  */
10128 /* We use char because int might match the return type of a gcc2
10129     builtin and then its argument prototype would still apply.  */
10130 char res_query();
10131
10132 int main() {
10133 res_query()
10134 ; return 0; }
10135 EOF
10136 if { (eval echo configure:10137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10137   rm -rf conftest*
10138   eval "ac_cv_lib_$ac_lib_var=yes"
10139 else
10140   echo "configure: failed program was:" >&5
10141   cat conftest.$ac_ext >&5
10142   rm -rf conftest*
10143   eval "ac_cv_lib_$ac_lib_var=no"
10144 fi
10145 rm -f conftest*
10146 LIBS="$ac_save_LIBS"
10147
10148 fi
10149 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10150   echo "$ac_t""yes" 1>&6
10151     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10152     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10153   cat >> confdefs.h <<EOF
10154 #define $ac_tr_lib 1
10155 EOF
10156
10157   LIBS="-lresolv $LIBS"
10158
10159 else
10160   echo "$ac_t""no" 1>&6
10161 fi
10162
10163         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10164 fi
10165
10166 if test $ac_cv_func_res_query = no ; then 
10167         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10168 echo "configure:10169: checking for __res_query in -lresolv" >&5
10169 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10170 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10171   echo $ac_n "(cached) $ac_c" 1>&6
10172 else
10173   ac_save_LIBS="$LIBS"
10174 LIBS="-lresolv  $LIBS"
10175 cat > conftest.$ac_ext <<EOF
10176 #line 10177 "configure"
10177 #include "confdefs.h"
10178 /* Override any gcc2 internal prototype to avoid an error.  */
10179 /* We use char because int might match the return type of a gcc2
10180     builtin and then its argument prototype would still apply.  */
10181 char __res_query();
10182
10183 int main() {
10184 __res_query()
10185 ; return 0; }
10186 EOF
10187 if { (eval echo configure:10188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10188   rm -rf conftest*
10189   eval "ac_cv_lib_$ac_lib_var=yes"
10190 else
10191   echo "configure: failed program was:" >&5
10192   cat conftest.$ac_ext >&5
10193   rm -rf conftest*
10194   eval "ac_cv_lib_$ac_lib_var=no"
10195 fi
10196 rm -f conftest*
10197 LIBS="$ac_save_LIBS"
10198
10199 fi
10200 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10201   echo "$ac_t""yes" 1>&6
10202     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10203     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10204   cat >> confdefs.h <<EOF
10205 #define $ac_tr_lib 1
10206 EOF
10207
10208   LIBS="-lresolv $LIBS"
10209
10210 else
10211   echo "$ac_t""no" 1>&6
10212 fi
10213
10214         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10215 fi
10216
10217 if test "$ac_cv_func_res_query" = yes ; then
10218         cat >> confdefs.h <<\EOF
10219 #define HAVE_RES_QUERY 1
10220 EOF
10221
10222
10223         if test $ol_enable_dnssrv != no ; then
10224                 ol_link_dnssrv=yes
10225         fi
10226 fi
10227
10228 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10229         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10230 fi
10231
10232 for ac_func in getaddrinfo gai_strerror inet_ntop 
10233 do
10234 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10235 echo "configure:10236: checking for $ac_func" >&5
10236 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10237   echo $ac_n "(cached) $ac_c" 1>&6
10238 else
10239   cat > conftest.$ac_ext <<EOF
10240 #line 10241 "configure"
10241 #include "confdefs.h"
10242 /* System header to define __stub macros and hopefully few prototypes,
10243     which can conflict with char $ac_func(); below.  */
10244 #include <assert.h>
10245 /* Override any gcc2 internal prototype to avoid an error.  */
10246 /* We use char because int might match the return type of a gcc2
10247     builtin and then its argument prototype would still apply.  */
10248 char $ac_func();
10249 char (*f)();
10250
10251 int main() {
10252
10253 /* The GNU C library defines this for functions which it implements
10254     to always fail with ENOSYS.  Some functions are actually named
10255     something starting with __ and the normal name is an alias.  */
10256 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10257 choke me
10258 #else
10259 f = $ac_func;
10260 #endif
10261
10262 ; return 0; }
10263 EOF
10264 if { (eval echo configure:10265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10265   rm -rf conftest*
10266   eval "ac_cv_func_$ac_func=yes"
10267 else
10268   echo "configure: failed program was:" >&5
10269   cat conftest.$ac_ext >&5
10270   rm -rf conftest*
10271   eval "ac_cv_func_$ac_func=no"
10272 fi
10273 rm -f conftest*
10274 fi
10275
10276 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10277   echo "$ac_t""yes" 1>&6
10278     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10279   cat >> confdefs.h <<EOF
10280 #define $ac_tr_func 1
10281 EOF
10282  
10283 else
10284   echo "$ac_t""no" 1>&6
10285 fi
10286 done
10287
10288
10289 ol_link_ipv6=no
10290 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10291         if test $ol_enable_ipv6 = yes ; then
10292                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10293         fi
10294 elif test $ol_enable_ipv6 != no ; then
10295         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10296 echo "configure:10297: checking INET6_ADDRSTRLEN" >&5
10297 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10298   echo $ac_n "(cached) $ac_c" 1>&6
10299 else
10300   
10301                 cat > conftest.$ac_ext <<EOF
10302 #line 10303 "configure"
10303 #include "confdefs.h"
10304
10305 #                       include <netinet/in.h>
10306 #                       ifdef INET6_ADDRSTRLEN
10307                                 __has_inet6_addrstrlen__;
10308 #                       endif
10309                 
10310 EOF
10311 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10312   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10313   rm -rf conftest*
10314   ol_cv_inet6_addrstrlen=yes
10315 else
10316   rm -rf conftest*
10317   ol_cv_inet6_addrstrlen=no
10318 fi
10319 rm -f conftest*
10320
10321 fi
10322
10323 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10324
10325
10326         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10327 echo "configure:10328: checking struct sockaddr_storage" >&5
10328 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10329   echo $ac_n "(cached) $ac_c" 1>&6
10330 else
10331   
10332                 cat > conftest.$ac_ext <<EOF
10333 #line 10334 "configure"
10334 #include "confdefs.h"
10335
10336 #include <sys/types.h>
10337 #include <sys/socket.h>
10338
10339 int main() {
10340
10341                         struct sockaddr_storage ss;
10342
10343 ; return 0; }
10344 EOF
10345 if { (eval echo configure:10346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10346   rm -rf conftest*
10347   ol_cv_struct_sockaddr_storage=yes
10348 else
10349   echo "configure: failed program was:" >&5
10350   cat conftest.$ac_ext >&5
10351   rm -rf conftest*
10352   ol_cv_struct_sockaddr_storage=no
10353 fi
10354 rm -f conftest*
10355 fi
10356
10357 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10358
10359         if test $ol_cv_inet6_addrstrlen = yes \
10360                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10361                 ol_link_ipv6=yes
10362         elif test $ol_enable_ipv6 = yes \
10363                         -a $ol_cv_inet6_addrstrlen = no ; then
10364                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10365         elif test $ol_enable_ipv6 = yes \
10366                         -a $ol_cv_struct_sockaddr_storage = no ; then
10367                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10368         fi
10369 fi
10370
10371 if test $ol_enable_local != no ; then
10372         for ac_hdr in sys/un.h 
10373 do
10374 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10375 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10376 echo "configure:10377: checking for $ac_hdr" >&5
10377 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10378   echo $ac_n "(cached) $ac_c" 1>&6
10379 else
10380   cat > conftest.$ac_ext <<EOF
10381 #line 10382 "configure"
10382 #include "confdefs.h"
10383 #include <$ac_hdr>
10384 EOF
10385 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10386 { (eval echo configure:10387: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10387 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10388 if test -z "$ac_err"; then
10389   rm -rf conftest*
10390   eval "ac_cv_header_$ac_safe=yes"
10391 else
10392   echo "$ac_err" >&5
10393   echo "configure: failed program was:" >&5
10394   cat conftest.$ac_ext >&5
10395   rm -rf conftest*
10396   eval "ac_cv_header_$ac_safe=no"
10397 fi
10398 rm -f conftest*
10399 fi
10400 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10401   echo "$ac_t""yes" 1>&6
10402     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10403   cat >> confdefs.h <<EOF
10404 #define $ac_tr_hdr 1
10405 EOF
10406  
10407 else
10408   echo "$ac_t""no" 1>&6
10409 fi
10410 done
10411
10412
10413         if test $ol_enable_local = auto ; then
10414                 ol_enable_local=$ac_cv_header_sys_un_h
10415         elif test $ac_cv_header_sys_un_h = no ; then
10416                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10417         fi
10418 fi
10419
10420 ol_link_kbind=no
10421 ol_link_kpasswd=no
10422 ol_link_krb5=no
10423 ol_link_krb4=no
10424
10425 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10426         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10427         -o $ol_with_kerberos = k425 ; then
10428
10429         for ac_hdr in krb5.h
10430 do
10431 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10432 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10433 echo "configure:10434: checking for $ac_hdr" >&5
10434 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10435   echo $ac_n "(cached) $ac_c" 1>&6
10436 else
10437   cat > conftest.$ac_ext <<EOF
10438 #line 10439 "configure"
10439 #include "confdefs.h"
10440 #include <$ac_hdr>
10441 EOF
10442 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10443 { (eval echo configure:10444: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10444 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10445 if test -z "$ac_err"; then
10446   rm -rf conftest*
10447   eval "ac_cv_header_$ac_safe=yes"
10448 else
10449   echo "$ac_err" >&5
10450   echo "configure: failed program was:" >&5
10451   cat conftest.$ac_ext >&5
10452   rm -rf conftest*
10453   eval "ac_cv_header_$ac_safe=no"
10454 fi
10455 rm -f conftest*
10456 fi
10457 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10458   echo "$ac_t""yes" 1>&6
10459     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10460   cat >> confdefs.h <<EOF
10461 #define $ac_tr_hdr 1
10462 EOF
10463  
10464 else
10465   echo "$ac_t""no" 1>&6
10466 fi
10467 done
10468
10469
10470         if test $ac_cv_header_krb5_h = yes ; then
10471                                 for ac_hdr in heim_err.h
10472 do
10473 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10474 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10475 echo "configure:10476: checking for $ac_hdr" >&5
10476 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10477   echo $ac_n "(cached) $ac_c" 1>&6
10478 else
10479   cat > conftest.$ac_ext <<EOF
10480 #line 10481 "configure"
10481 #include "confdefs.h"
10482 #include <$ac_hdr>
10483 EOF
10484 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10485 { (eval echo configure:10486: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10486 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10487 if test -z "$ac_err"; then
10488   rm -rf conftest*
10489   eval "ac_cv_header_$ac_safe=yes"
10490 else
10491   echo "$ac_err" >&5
10492   echo "configure: failed program was:" >&5
10493   cat conftest.$ac_ext >&5
10494   rm -rf conftest*
10495   eval "ac_cv_header_$ac_safe=no"
10496 fi
10497 rm -f conftest*
10498 fi
10499 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10500   echo "$ac_t""yes" 1>&6
10501     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10502   cat >> confdefs.h <<EOF
10503 #define $ac_tr_hdr 1
10504 EOF
10505  
10506 else
10507   echo "$ac_t""no" 1>&6
10508 fi
10509 done
10510
10511                 if test $ac_cv_header_heim_err_h = yes ; then
10512                         krb5_impl=heimdal
10513                 else
10514                         krb5_impl=mit
10515                 fi
10516
10517                 if test $krb5_impl = mit; then
10518                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10519 echo "configure:10520: checking for main in -lk5crypto" >&5
10520 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10521 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10522   echo $ac_n "(cached) $ac_c" 1>&6
10523 else
10524   ac_save_LIBS="$LIBS"
10525 LIBS="-lk5crypto  $LIBS"
10526 cat > conftest.$ac_ext <<EOF
10527 #line 10528 "configure"
10528 #include "confdefs.h"
10529
10530 int main() {
10531 main()
10532 ; return 0; }
10533 EOF
10534 if { (eval echo configure:10535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10535   rm -rf conftest*
10536   eval "ac_cv_lib_$ac_lib_var=yes"
10537 else
10538   echo "configure: failed program was:" >&5
10539   cat conftest.$ac_ext >&5
10540   rm -rf conftest*
10541   eval "ac_cv_lib_$ac_lib_var=no"
10542 fi
10543 rm -f conftest*
10544 LIBS="$ac_save_LIBS"
10545
10546 fi
10547 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10548   echo "$ac_t""yes" 1>&6
10549   krb5crypto=k5crypto
10550 else
10551   echo "$ac_t""no" 1>&6
10552 krb5crypto=crypto
10553 fi
10554
10555
10556                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10557 echo "configure:10558: checking for main in -lkrb5" >&5
10558 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10559 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10560   echo $ac_n "(cached) $ac_c" 1>&6
10561 else
10562   ac_save_LIBS="$LIBS"
10563 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10564 cat > conftest.$ac_ext <<EOF
10565 #line 10566 "configure"
10566 #include "confdefs.h"
10567
10568 int main() {
10569 main()
10570 ; return 0; }
10571 EOF
10572 if { (eval echo configure:10573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10573   rm -rf conftest*
10574   eval "ac_cv_lib_$ac_lib_var=yes"
10575 else
10576   echo "configure: failed program was:" >&5
10577   cat conftest.$ac_ext >&5
10578   rm -rf conftest*
10579   eval "ac_cv_lib_$ac_lib_var=no"
10580 fi
10581 rm -f conftest*
10582 LIBS="$ac_save_LIBS"
10583
10584 fi
10585 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10586   echo "$ac_t""yes" 1>&6
10587   have_krb5=yes
10588                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10589 else
10590   echo "$ac_t""no" 1>&6
10591 have_krb5=no
10592 fi
10593
10594
10595                 elif test $krb5_impl = heimdal; then
10596                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10597 echo "configure:10598: checking for main in -ldes" >&5
10598 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10599 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10600   echo $ac_n "(cached) $ac_c" 1>&6
10601 else
10602   ac_save_LIBS="$LIBS"
10603 LIBS="-ldes  $LIBS"
10604 cat > conftest.$ac_ext <<EOF
10605 #line 10606 "configure"
10606 #include "confdefs.h"
10607
10608 int main() {
10609 main()
10610 ; return 0; }
10611 EOF
10612 if { (eval echo configure:10613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10613   rm -rf conftest*
10614   eval "ac_cv_lib_$ac_lib_var=yes"
10615 else
10616   echo "configure: failed program was:" >&5
10617   cat conftest.$ac_ext >&5
10618   rm -rf conftest*
10619   eval "ac_cv_lib_$ac_lib_var=no"
10620 fi
10621 rm -f conftest*
10622 LIBS="$ac_save_LIBS"
10623
10624 fi
10625 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10626   echo "$ac_t""yes" 1>&6
10627   krb5crypto=des
10628 else
10629   echo "$ac_t""no" 1>&6
10630 krb5crypto=crypto
10631 fi
10632
10633
10634                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10635 echo "configure:10636: checking for main in -lkrb5" >&5
10636 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10637 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10638   echo $ac_n "(cached) $ac_c" 1>&6
10639 else
10640   ac_save_LIBS="$LIBS"
10641 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10642 cat > conftest.$ac_ext <<EOF
10643 #line 10644 "configure"
10644 #include "confdefs.h"
10645
10646 int main() {
10647 main()
10648 ; return 0; }
10649 EOF
10650 if { (eval echo configure:10651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10651   rm -rf conftest*
10652   eval "ac_cv_lib_$ac_lib_var=yes"
10653 else
10654   echo "configure: failed program was:" >&5
10655   cat conftest.$ac_ext >&5
10656   rm -rf conftest*
10657   eval "ac_cv_lib_$ac_lib_var=no"
10658 fi
10659 rm -f conftest*
10660 LIBS="$ac_save_LIBS"
10661
10662 fi
10663 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10664   echo "$ac_t""yes" 1>&6
10665   have_krb5=yes
10666                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10667 else
10668   echo "$ac_t""no" 1>&6
10669 have_krb5=no
10670 fi
10671
10672
10673                         cat >> confdefs.h <<\EOF
10674 #define HAVE_HEIMDAL_KERBEROS 1
10675 EOF
10676
10677
10678                 else
10679                         have_krb5=no
10680                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
10681                 fi
10682
10683                 if test $have_krb5 = yes ; then
10684                         ol_link_krb5=yes
10685
10686                         cat >> confdefs.h <<\EOF
10687 #define HAVE_KRB5 1
10688 EOF
10689
10690
10691                         if test $ol_enable_kpasswd != no ; then
10692                                 ol_link_kpasswd=yes;
10693                         fi
10694
10695                         if test $ol_with_kerberos = k5only ; then
10696                                 ol_with_kerberos=found
10697                         fi
10698
10699                 elif test $ol_with_kerberos != auto ; then
10700                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10701                 fi
10702
10703         fi
10704 fi
10705
10706 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10707         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10708
10709         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10710 do
10711 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10712 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10713 echo "configure:10714: checking for $ac_hdr" >&5
10714 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10715   echo $ac_n "(cached) $ac_c" 1>&6
10716 else
10717   cat > conftest.$ac_ext <<EOF
10718 #line 10719 "configure"
10719 #include "confdefs.h"
10720 #include <$ac_hdr>
10721 EOF
10722 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10723 { (eval echo configure:10724: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10724 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10725 if test -z "$ac_err"; then
10726   rm -rf conftest*
10727   eval "ac_cv_header_$ac_safe=yes"
10728 else
10729   echo "$ac_err" >&5
10730   echo "configure: failed program was:" >&5
10731   cat conftest.$ac_ext >&5
10732   rm -rf conftest*
10733   eval "ac_cv_header_$ac_safe=no"
10734 fi
10735 rm -f conftest*
10736 fi
10737 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10738   echo "$ac_t""yes" 1>&6
10739     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10740   cat >> confdefs.h <<EOF
10741 #define $ac_tr_hdr 1
10742 EOF
10743  
10744 else
10745   echo "$ac_t""no" 1>&6
10746 fi
10747 done
10748
10749
10750         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10751                 if test $krb5_impl = mit; then
10752                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10753 echo "configure:10754: checking for main in -lkrb4" >&5
10754 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10755 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10756   echo $ac_n "(cached) $ac_c" 1>&6
10757 else
10758   ac_save_LIBS="$LIBS"
10759 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10760 cat > conftest.$ac_ext <<EOF
10761 #line 10762 "configure"
10762 #include "confdefs.h"
10763
10764 int main() {
10765 main()
10766 ; return 0; }
10767 EOF
10768 if { (eval echo configure:10769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10769   rm -rf conftest*
10770   eval "ac_cv_lib_$ac_lib_var=yes"
10771 else
10772   echo "configure: failed program was:" >&5
10773   cat conftest.$ac_ext >&5
10774   rm -rf conftest*
10775   eval "ac_cv_lib_$ac_lib_var=no"
10776 fi
10777 rm -f conftest*
10778 LIBS="$ac_save_LIBS"
10779
10780 fi
10781 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10782   echo "$ac_t""yes" 1>&6
10783   have_k425=yes
10784                                 KRB4_LIBS="-lkrb4 -ldes425"
10785 else
10786   echo "$ac_t""no" 1>&6
10787 have_k425=no
10788 fi
10789
10790
10791                 elif test $krb5_impl = heimdal; then
10792                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10793 echo "configure:10794: checking for main in -lkrb4" >&5
10794 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10795 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10796   echo $ac_n "(cached) $ac_c" 1>&6
10797 else
10798   ac_save_LIBS="$LIBS"
10799 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10800 cat > conftest.$ac_ext <<EOF
10801 #line 10802 "configure"
10802 #include "confdefs.h"
10803
10804 int main() {
10805 main()
10806 ; return 0; }
10807 EOF
10808 if { (eval echo configure:10809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10809   rm -rf conftest*
10810   eval "ac_cv_lib_$ac_lib_var=yes"
10811 else
10812   echo "configure: failed program was:" >&5
10813   cat conftest.$ac_ext >&5
10814   rm -rf conftest*
10815   eval "ac_cv_lib_$ac_lib_var=no"
10816 fi
10817 rm -f conftest*
10818 LIBS="$ac_save_LIBS"
10819
10820 fi
10821 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10822   echo "$ac_t""yes" 1>&6
10823   have_k425=yes
10824                                 KRB4_LIBS="-lkrb4"
10825 else
10826   echo "$ac_t""no" 1>&6
10827 have_k425=no
10828 fi
10829
10830
10831                 else
10832                         have_425=no
10833                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10834                 fi
10835
10836                 if test $have_k425 = yes ; then
10837                         ol_with_kerberos=found
10838                         ol_link_krb4=yes
10839
10840                         cat >> confdefs.h <<\EOF
10841 #define HAVE_KRB425 1
10842 EOF
10843
10844                         cat >> confdefs.h <<\EOF
10845 #define HAVE_KRB4 1
10846 EOF
10847
10848
10849                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10850 echo "configure:10851: checking for des_debug in Kerberos libraries" >&5
10851 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10852   echo $ac_n "(cached) $ac_c" 1>&6
10853 else
10854   
10855                                                                 save_LIBS="$LIBS"
10856                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10857                                 cat > conftest.$ac_ext <<EOF
10858 #line 10859 "configure"
10859 #include "confdefs.h"
10860
10861 #include <kerberosIV/krb.h>
10862 #include <kerberosIV/des.h>
10863 extern int des_debug;
10864
10865 int main() {
10866
10867 des_debug = 1;
10868
10869 ; return 0; }
10870 EOF
10871 if { (eval echo configure:10872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10872   rm -rf conftest*
10873   ol_cv_var_des_debug=yes
10874 else
10875   echo "configure: failed program was:" >&5
10876   cat conftest.$ac_ext >&5
10877   rm -rf conftest*
10878   ol_cv_var_des_debug=no
10879 fi
10880 rm -f conftest*
10881                                                                 LIBS="$save_LIBS"
10882                         
10883 fi
10884
10885 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10886
10887                         if test $ol_cv_var_des_debug = yes ; then
10888                                 cat >> confdefs.h <<\EOF
10889 #define HAVE_DES_DEBUG 1
10890 EOF
10891
10892                         fi
10893
10894                         LIBS="$save_LIBS"
10895                 fi
10896         fi
10897 fi
10898
10899 if test $ol_link_krb5 = yes ; then
10900         ol_with_kerberos=found
10901 fi
10902
10903 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10904         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10905
10906         for ac_hdr in krb.h des.h krb-archaeology.h 
10907 do
10908 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10909 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10910 echo "configure:10911: checking for $ac_hdr" >&5
10911 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10912   echo $ac_n "(cached) $ac_c" 1>&6
10913 else
10914   cat > conftest.$ac_ext <<EOF
10915 #line 10916 "configure"
10916 #include "confdefs.h"
10917 #include <$ac_hdr>
10918 EOF
10919 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10920 { (eval echo configure:10921: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10921 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10922 if test -z "$ac_err"; then
10923   rm -rf conftest*
10924   eval "ac_cv_header_$ac_safe=yes"
10925 else
10926   echo "$ac_err" >&5
10927   echo "configure: failed program was:" >&5
10928   cat conftest.$ac_ext >&5
10929   rm -rf conftest*
10930   eval "ac_cv_header_$ac_safe=no"
10931 fi
10932 rm -f conftest*
10933 fi
10934 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10935   echo "$ac_t""yes" 1>&6
10936     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10937   cat >> confdefs.h <<EOF
10938 #define $ac_tr_hdr 1
10939 EOF
10940  
10941 else
10942   echo "$ac_t""no" 1>&6
10943 fi
10944 done
10945
10946
10947         if test $ac_cv_header_krb_h = yes ; then
10948                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10949 echo "configure:10950: checking for main in -lkrb" >&5
10950 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10951 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10952   echo $ac_n "(cached) $ac_c" 1>&6
10953 else
10954   ac_save_LIBS="$LIBS"
10955 LIBS="-lkrb -ldes $LIBS"
10956 cat > conftest.$ac_ext <<EOF
10957 #line 10958 "configure"
10958 #include "confdefs.h"
10959
10960 int main() {
10961 main()
10962 ; return 0; }
10963 EOF
10964 if { (eval echo configure:10965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10965   rm -rf conftest*
10966   eval "ac_cv_lib_$ac_lib_var=yes"
10967 else
10968   echo "configure: failed program was:" >&5
10969   cat conftest.$ac_ext >&5
10970   rm -rf conftest*
10971   eval "ac_cv_lib_$ac_lib_var=no"
10972 fi
10973 rm -f conftest*
10974 LIBS="$ac_save_LIBS"
10975
10976 fi
10977 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10978   echo "$ac_t""yes" 1>&6
10979   have_k4=yes
10980 else
10981   echo "$ac_t""no" 1>&6
10982 have_k4=no
10983 fi
10984
10985
10986                 if test $have_k4 = yes ; then
10987                         ol_with_kerberos=found
10988                         ol_link_krb4=yes
10989
10990                         cat >> confdefs.h <<\EOF
10991 #define HAVE_KRB4 1
10992 EOF
10993
10994
10995                         KRB4_LIBS="-lkrb -ldes"
10996
10997                         if test $ac_cv_header_krb_archaeology_h = yes ; then
10998                                 cat >> confdefs.h <<\EOF
10999 #define HAVE_KTH_KERBEROS 1
11000 EOF
11001
11002                         fi
11003                 fi
11004         fi
11005 fi
11006
11007 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
11008         ol_link_kpasswd=yes
11009 fi
11010
11011 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
11012         ol_link_kbind=yes
11013
11014 elif test $ol_enable_kbind = yes ; then
11015         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11016 fi
11017
11018 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11019         cat >> confdefs.h <<\EOF
11020 #define HAVE_KERBEROS 1
11021 EOF
11022
11023
11024 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11025         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11026 fi
11027
11028 ol_link_tls=no
11029 if test $ol_with_tls != no ; then
11030         for ac_hdr in openssl/ssl.h ssl.h
11031 do
11032 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11033 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11034 echo "configure:11035: checking for $ac_hdr" >&5
11035 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11036   echo $ac_n "(cached) $ac_c" 1>&6
11037 else
11038   cat > conftest.$ac_ext <<EOF
11039 #line 11040 "configure"
11040 #include "confdefs.h"
11041 #include <$ac_hdr>
11042 EOF
11043 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11044 { (eval echo configure:11045: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11045 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11046 if test -z "$ac_err"; then
11047   rm -rf conftest*
11048   eval "ac_cv_header_$ac_safe=yes"
11049 else
11050   echo "$ac_err" >&5
11051   echo "configure: failed program was:" >&5
11052   cat conftest.$ac_ext >&5
11053   rm -rf conftest*
11054   eval "ac_cv_header_$ac_safe=no"
11055 fi
11056 rm -f conftest*
11057 fi
11058 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11059   echo "$ac_t""yes" 1>&6
11060     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11061   cat >> confdefs.h <<EOF
11062 #define $ac_tr_hdr 1
11063 EOF
11064  
11065 else
11066   echo "$ac_t""no" 1>&6
11067 fi
11068 done
11069
11070         
11071         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
11072                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11073 echo "configure:11074: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11074 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11075 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11076   echo $ac_n "(cached) $ac_c" 1>&6
11077 else
11078   ac_save_LIBS="$LIBS"
11079 LIBS="-lssl -lcrypto $LIBS"
11080 cat > conftest.$ac_ext <<EOF
11081 #line 11082 "configure"
11082 #include "confdefs.h"
11083 /* Override any gcc2 internal prototype to avoid an error.  */
11084 /* We use char because int might match the return type of a gcc2
11085     builtin and then its argument prototype would still apply.  */
11086 char SSLeay_add_ssl_algorithms();
11087
11088 int main() {
11089 SSLeay_add_ssl_algorithms()
11090 ; return 0; }
11091 EOF
11092 if { (eval echo configure:11093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11093   rm -rf conftest*
11094   eval "ac_cv_lib_$ac_lib_var=yes"
11095 else
11096   echo "configure: failed program was:" >&5
11097   cat conftest.$ac_ext >&5
11098   rm -rf conftest*
11099   eval "ac_cv_lib_$ac_lib_var=no"
11100 fi
11101 rm -f conftest*
11102 LIBS="$ac_save_LIBS"
11103
11104 fi
11105 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11106   echo "$ac_t""yes" 1>&6
11107   have_ssleay=yes
11108                         need_rsaref=no
11109 else
11110   echo "$ac_t""no" 1>&6
11111 have_ssleay=no
11112 fi
11113
11114                         
11115                 if test $have_ssleay = no ; then
11116                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11117 echo "configure:11118: checking for SSL_library_init in -lssl" >&5
11118 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11119 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11120   echo $ac_n "(cached) $ac_c" 1>&6
11121 else
11122   ac_save_LIBS="$LIBS"
11123 LIBS="-lssl -lcrypto $LIBS"
11124 cat > conftest.$ac_ext <<EOF
11125 #line 11126 "configure"
11126 #include "confdefs.h"
11127 /* Override any gcc2 internal prototype to avoid an error.  */
11128 /* We use char because int might match the return type of a gcc2
11129     builtin and then its argument prototype would still apply.  */
11130 char SSL_library_init();
11131
11132 int main() {
11133 SSL_library_init()
11134 ; return 0; }
11135 EOF
11136 if { (eval echo configure:11137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11137   rm -rf conftest*
11138   eval "ac_cv_lib_$ac_lib_var=yes"
11139 else
11140   echo "configure: failed program was:" >&5
11141   cat conftest.$ac_ext >&5
11142   rm -rf conftest*
11143   eval "ac_cv_lib_$ac_lib_var=no"
11144 fi
11145 rm -f conftest*
11146 LIBS="$ac_save_LIBS"
11147
11148 fi
11149 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11150   echo "$ac_t""yes" 1>&6
11151   have_ssleay=yes
11152                                 need_rsaref=no
11153 else
11154   echo "$ac_t""no" 1>&6
11155 have_ssleay=no
11156 fi
11157
11158                 fi
11159
11160                 if test $have_ssleay = no ; then
11161                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11162 echo "configure:11163: checking for ssl3_accept in -lssl" >&5
11163 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11164 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11165   echo $ac_n "(cached) $ac_c" 1>&6
11166 else
11167   ac_save_LIBS="$LIBS"
11168 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11169 cat > conftest.$ac_ext <<EOF
11170 #line 11171 "configure"
11171 #include "confdefs.h"
11172 /* Override any gcc2 internal prototype to avoid an error.  */
11173 /* We use char because int might match the return type of a gcc2
11174     builtin and then its argument prototype would still apply.  */
11175 char ssl3_accept();
11176
11177 int main() {
11178 ssl3_accept()
11179 ; return 0; }
11180 EOF
11181 if { (eval echo configure:11182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11182   rm -rf conftest*
11183   eval "ac_cv_lib_$ac_lib_var=yes"
11184 else
11185   echo "configure: failed program was:" >&5
11186   cat conftest.$ac_ext >&5
11187   rm -rf conftest*
11188   eval "ac_cv_lib_$ac_lib_var=no"
11189 fi
11190 rm -f conftest*
11191 LIBS="$ac_save_LIBS"
11192
11193 fi
11194 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11195   echo "$ac_t""yes" 1>&6
11196   have_ssleay=yes
11197                                 need_rsaref=yes
11198 else
11199   echo "$ac_t""no" 1>&6
11200 have_ssleay=no
11201 fi
11202
11203                 fi
11204
11205                 if test $have_ssleay = yes ; then
11206                         ol_with_tls=found
11207                         ol_link_tls=yes
11208
11209                         cat >> confdefs.h <<\EOF
11210 #define HAVE_SSLEAY 1
11211 EOF
11212
11213
11214                         if test $need_rsaref = yes; then
11215                                 cat >> confdefs.h <<\EOF
11216 #define HAVE_RSAREF 1
11217 EOF
11218
11219
11220                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11221                         else
11222                                 TLS_LIBS="-lssl -lcrypto"
11223                         fi
11224                 fi
11225         fi
11226
11227 else
11228         echo "configure: warning: TLS data protection not supported!" 1>&2
11229 fi
11230
11231 if test $ol_link_tls = yes ; then
11232         cat >> confdefs.h <<\EOF
11233 #define HAVE_TLS 1
11234 EOF
11235
11236
11237 elif test $ol_with_tls = auto ; then
11238         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11239         echo "configure: warning: TLS data protection not supported!" 1>&2
11240
11241 elif test $ol_with_tls != no ; then
11242         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11243 fi
11244
11245 if test $ol_enable_lmpasswd != no; then
11246         if test $ol_link_tls != yes ; then
11247                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11248         fi
11249
11250         cat >> confdefs.h <<\EOF
11251 #define SLAPD_LMHASH 1
11252 EOF
11253
11254 fi
11255
11256 for ac_func in \
11257         ctime_r                 \
11258         gethostbyname_r gethostbyaddr_r \
11259
11260 do
11261 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11262 echo "configure:11263: checking for $ac_func" >&5
11263 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11264   echo $ac_n "(cached) $ac_c" 1>&6
11265 else
11266   cat > conftest.$ac_ext <<EOF
11267 #line 11268 "configure"
11268 #include "confdefs.h"
11269 /* System header to define __stub macros and hopefully few prototypes,
11270     which can conflict with char $ac_func(); below.  */
11271 #include <assert.h>
11272 /* Override any gcc2 internal prototype to avoid an error.  */
11273 /* We use char because int might match the return type of a gcc2
11274     builtin and then its argument prototype would still apply.  */
11275 char $ac_func();
11276 char (*f)();
11277
11278 int main() {
11279
11280 /* The GNU C library defines this for functions which it implements
11281     to always fail with ENOSYS.  Some functions are actually named
11282     something starting with __ and the normal name is an alias.  */
11283 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11284 choke me
11285 #else
11286 f = $ac_func;
11287 #endif
11288
11289 ; return 0; }
11290 EOF
11291 if { (eval echo configure:11292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11292   rm -rf conftest*
11293   eval "ac_cv_func_$ac_func=yes"
11294 else
11295   echo "configure: failed program was:" >&5
11296   cat conftest.$ac_ext >&5
11297   rm -rf conftest*
11298   eval "ac_cv_func_$ac_func=no"
11299 fi
11300 rm -f conftest*
11301 fi
11302
11303 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11304   echo "$ac_t""yes" 1>&6
11305     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11306   cat >> confdefs.h <<EOF
11307 #define $ac_tr_func 1
11308 EOF
11309  
11310 else
11311   echo "$ac_t""no" 1>&6
11312 fi
11313 done
11314
11315
11316 if test "$ac_cv_func_ctime_r" = no ; then
11317         ol_cv_func_ctime_r_nargs=0
11318 else
11319         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
11320 echo "configure:11321: checking number of arguments of ctime_r" >&5
11321 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
11322   echo $ac_n "(cached) $ac_c" 1>&6
11323 else
11324   cat > conftest.$ac_ext <<EOF
11325 #line 11326 "configure"
11326 #include "confdefs.h"
11327 #include <time.h>
11328 int main() {
11329 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
11330 ; return 0; }
11331 EOF
11332 if { (eval echo configure:11333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11333   rm -rf conftest*
11334   ol_cv_func_ctime_r_nargs3=yes
11335 else
11336   echo "configure: failed program was:" >&5
11337   cat conftest.$ac_ext >&5
11338   rm -rf conftest*
11339   ol_cv_func_ctime_r_nargs3=no
11340 fi
11341 rm -f conftest*
11342
11343         cat > conftest.$ac_ext <<EOF
11344 #line 11345 "configure"
11345 #include "confdefs.h"
11346 #include <time.h>
11347 int main() {
11348 time_t ti; char *buffer; ctime_r(&ti,buffer);
11349 ; return 0; }
11350 EOF
11351 if { (eval echo configure:11352: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11352   rm -rf conftest*
11353   ol_cv_func_ctime_r_nargs2=yes
11354 else
11355   echo "configure: failed program was:" >&5
11356   cat conftest.$ac_ext >&5
11357   rm -rf conftest*
11358   ol_cv_func_ctime_r_nargs2=no
11359 fi
11360 rm -f conftest*
11361
11362         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
11363                 $ol_cv_func_ctime_r_nargs2 = no ; then
11364
11365                 ol_cv_func_ctime_r_nargs=3
11366
11367         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
11368                 $ol_cv_func_ctime_r_nargs2 = yes ; then
11369
11370                 ol_cv_func_ctime_r_nargs=2
11371
11372         else
11373                 ol_cv_func_ctime_r_nargs=0
11374         fi
11375   
11376 fi
11377
11378 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
11379
11380   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
11381         cat >> confdefs.h <<EOF
11382 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
11383 EOF
11384
11385   fi
11386
11387 fi
11388
11389 if test "$ac_cv_func_gethostbyname_r" = yes ; then
11390         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
11391 echo "configure:11392: checking number of arguments of gethostbyname_r" >&5
11392 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
11393   echo $ac_n "(cached) $ac_c" 1>&6
11394 else
11395   cat > conftest.$ac_ext <<EOF
11396 #line 11397 "configure"
11397 #include "confdefs.h"
11398 #include <sys/types.h>
11399 #include <sys/socket.h>
11400 #include <netinet/in.h>
11401 #include <netdb.h>
11402 #define BUFSIZE (sizeof(struct hostent)+10)
11403 int main() {
11404 struct hostent hent; char buffer[BUFSIZE];
11405                 int bufsize=BUFSIZE;int h_errno;
11406                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
11407                         buffer, bufsize, &h_errno);
11408 ; return 0; }
11409 EOF
11410 if { (eval echo configure:11411: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11411   rm -rf conftest*
11412   ol_cv_func_gethostbyname_r_nargs5=yes
11413 else
11414   echo "configure: failed program was:" >&5
11415   cat conftest.$ac_ext >&5
11416   rm -rf conftest*
11417   ol_cv_func_gethostbyname_r_nargs5=no
11418 fi
11419 rm -f conftest*
11420
11421         cat > conftest.$ac_ext <<EOF
11422 #line 11423 "configure"
11423 #include "confdefs.h"
11424 #include <sys/types.h>
11425 #include <sys/socket.h>
11426 #include <netinet/in.h>
11427 #include <netdb.h>
11428 #define BUFSIZE (sizeof(struct hostent)+10)
11429 int main() {
11430 struct hostent hent;struct hostent *rhent;
11431                 char buffer[BUFSIZE];
11432                 int bufsize=BUFSIZE;int h_errno;
11433                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
11434                         &rhent, &h_errno);
11435 ; return 0; }
11436 EOF
11437 if { (eval echo configure:11438: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11438   rm -rf conftest*
11439   ol_cv_func_gethostbyname_r_nargs6=yes
11440 else
11441   echo "configure: failed program was:" >&5
11442   cat conftest.$ac_ext >&5
11443   rm -rf conftest*
11444   ol_cv_func_gethostbyname_r_nargs6=no
11445 fi
11446 rm -f conftest*
11447
11448         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
11449                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
11450
11451                 ol_cv_func_gethostbyname_r_nargs=5
11452
11453         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
11454                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
11455
11456                 ol_cv_func_gethostbyname_r_nargs=6
11457
11458         else
11459                 ol_cv_func_gethostbyname_r_nargs=0
11460         fi
11461   
11462 fi
11463
11464 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
11465   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
11466         cat >> confdefs.h <<EOF
11467 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
11468 EOF
11469
11470   fi
11471
11472 else
11473         ol_cv_func_gethostbyname_r_nargs=0
11474 fi
11475  
11476 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
11477         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
11478 echo "configure:11479: checking number of arguments of gethostbyaddr_r" >&5
11479 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
11480   echo $ac_n "(cached) $ac_c" 1>&6
11481 else
11482   cat > conftest.$ac_ext <<EOF
11483 #line 11484 "configure"
11484 #include "confdefs.h"
11485 #include <sys/types.h>
11486 #include <sys/socket.h>
11487 #include <netinet/in.h>
11488 #include <netdb.h>
11489 #define BUFSIZE (sizeof(struct hostent)+10)
11490 int main() {
11491 struct hostent hent; char buffer[BUFSIZE]; 
11492             struct in_addr add;
11493             size_t alen=sizeof(struct in_addr);
11494             int bufsize=BUFSIZE;int h_errno;
11495                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
11496                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
11497 ; return 0; }
11498 EOF
11499 if { (eval echo configure:11500: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11500   rm -rf conftest*
11501   ol_cv_func_gethostbyaddr_r_nargs7=yes
11502 else
11503   echo "configure: failed program was:" >&5
11504   cat conftest.$ac_ext >&5
11505   rm -rf conftest*
11506   ol_cv_func_gethostbyaddr_r_nargs7=no
11507 fi
11508 rm -f conftest*
11509
11510         cat > conftest.$ac_ext <<EOF
11511 #line 11512 "configure"
11512 #include "confdefs.h"
11513 #include <sys/types.h>
11514 #include <sys/socket.h>
11515 #include <netinet/in.h>
11516 #include <netdb.h>
11517 #define BUFSIZE (sizeof(struct hostent)+10)
11518 int main() {
11519 struct hostent hent;
11520                 struct hostent *rhent; char buffer[BUFSIZE]; 
11521                 struct in_addr add;
11522                 size_t alen=sizeof(struct in_addr);
11523                 int bufsize=BUFSIZE;int h_errno;
11524                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
11525                         alen, AF_INET, &hent, buffer, bufsize, 
11526                         &rhent, &h_errno);
11527 ; return 0; }
11528 EOF
11529 if { (eval echo configure:11530: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11530   rm -rf conftest*
11531   ol_cv_func_gethostbyaddr_r_nargs8=yes
11532 else
11533   echo "configure: failed program was:" >&5
11534   cat conftest.$ac_ext >&5
11535   rm -rf conftest*
11536   ol_cv_func_gethostbyaddr_r_nargs8=no
11537 fi
11538 rm -f conftest*
11539
11540         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
11541                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
11542
11543                 ol_cv_func_gethostbyaddr_r_nargs=7
11544
11545         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
11546                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
11547
11548                 ol_cv_func_gethostbyaddr_r_nargs=8
11549
11550         else
11551                 ol_cv_func_gethostbyaddr_r_nargs=0
11552         fi
11553   
11554 fi
11555
11556 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
11557   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
11558     cat >> confdefs.h <<EOF
11559 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
11560 EOF
11561
11562   fi
11563
11564 else
11565         ol_cv_func_gethostbyaddr_r_nargs=0
11566 fi
11567
11568 if test "$ac_cv_func_ctime_r" = yes \
11569         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
11570         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
11571         -a "$ac_cv_func_gethostbyname_r" = yes \
11572         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
11573         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
11574         -a "$ac_cv_func_gethostbyaddr_r" = yes \
11575         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
11576         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
11577         ; then
11578  
11579         cat >> confdefs.h <<\EOF
11580 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
11581 EOF
11582
11583 fi
11584
11585 ol_link_threads=no
11586
11587 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11588         -o $ol_with_threads = nt ; then
11589
11590         
11591         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11592 echo "configure:11593: checking for _beginthread" >&5
11593 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11594   echo $ac_n "(cached) $ac_c" 1>&6
11595 else
11596   cat > conftest.$ac_ext <<EOF
11597 #line 11598 "configure"
11598 #include "confdefs.h"
11599 /* System header to define __stub macros and hopefully few prototypes,
11600     which can conflict with char _beginthread(); below.  */
11601 #include <assert.h>
11602 /* Override any gcc2 internal prototype to avoid an error.  */
11603 /* We use char because int might match the return type of a gcc2
11604     builtin and then its argument prototype would still apply.  */
11605 char _beginthread();
11606 char (*f)();
11607
11608 int main() {
11609
11610 /* The GNU C library defines this for functions which it implements
11611     to always fail with ENOSYS.  Some functions are actually named
11612     something starting with __ and the normal name is an alias.  */
11613 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11614 choke me
11615 #else
11616 f = _beginthread;
11617 #endif
11618
11619 ; return 0; }
11620 EOF
11621 if { (eval echo configure:11622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11622   rm -rf conftest*
11623   eval "ac_cv_func__beginthread=yes"
11624 else
11625   echo "configure: failed program was:" >&5
11626   cat conftest.$ac_ext >&5
11627   rm -rf conftest*
11628   eval "ac_cv_func__beginthread=no"
11629 fi
11630 rm -f conftest*
11631 fi
11632
11633 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11634   echo "$ac_t""yes" 1>&6
11635   :
11636 else
11637   echo "$ac_t""no" 1>&6
11638 fi
11639
11640
11641         if test $ac_cv_func__beginthread = yes ; then
11642                 cat >> confdefs.h <<\EOF
11643 #define HAVE_NT_THREADS 1
11644 EOF
11645
11646                 ol_cv_nt_threads=yes
11647         fi
11648
11649
11650         if test "$ol_cv_nt_threads" = yes ; then
11651                 ol_link_threads=nt
11652                 ol_with_threads=found
11653                 ol_with_yielding_select=yes
11654
11655                 cat >> confdefs.h <<\EOF
11656 #define HAVE_NT_SERVICE_MANAGER 1
11657 EOF
11658
11659                 cat >> confdefs.h <<\EOF
11660 #define HAVE_NT_EVENT_LOG 1
11661 EOF
11662
11663         fi
11664
11665         if test $ol_with_threads = nt ; then
11666                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11667         fi
11668 fi
11669
11670 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11671         -o $ol_with_threads = posix ; then
11672
11673         for ac_hdr in pthread.h
11674 do
11675 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11676 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11677 echo "configure:11678: checking for $ac_hdr" >&5
11678 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11679   echo $ac_n "(cached) $ac_c" 1>&6
11680 else
11681   cat > conftest.$ac_ext <<EOF
11682 #line 11683 "configure"
11683 #include "confdefs.h"
11684 #include <$ac_hdr>
11685 EOF
11686 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11687 { (eval echo configure:11688: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11688 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11689 if test -z "$ac_err"; then
11690   rm -rf conftest*
11691   eval "ac_cv_header_$ac_safe=yes"
11692 else
11693   echo "$ac_err" >&5
11694   echo "configure: failed program was:" >&5
11695   cat conftest.$ac_ext >&5
11696   rm -rf conftest*
11697   eval "ac_cv_header_$ac_safe=no"
11698 fi
11699 rm -f conftest*
11700 fi
11701 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11702   echo "$ac_t""yes" 1>&6
11703     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11704   cat >> confdefs.h <<EOF
11705 #define $ac_tr_hdr 1
11706 EOF
11707  
11708 else
11709   echo "$ac_t""no" 1>&6
11710 fi
11711 done
11712
11713
11714         if test $ac_cv_header_pthread_h = yes ; then
11715                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11716 echo "configure:11717: checking POSIX thread version" >&5
11717 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11718   echo $ac_n "(cached) $ac_c" 1>&6
11719 else
11720   
11721         cat > conftest.$ac_ext <<EOF
11722 #line 11723 "configure"
11723 #include "confdefs.h"
11724
11725 #               include <pthread.h>
11726                 /* this check could be improved */
11727 #               ifdef PTHREAD_ONCE_INIT
11728                         pthread_version_final;
11729 #               endif
11730         
11731 EOF
11732 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11733   egrep "pthread_version_final" >/dev/null 2>&1; then
11734   rm -rf conftest*
11735   ol_pthread_final=yes
11736 else
11737   rm -rf conftest*
11738   ol_pthread_final=no
11739 fi
11740 rm -f conftest*
11741
11742
11743         cat > conftest.$ac_ext <<EOF
11744 #line 11745 "configure"
11745 #include "confdefs.h"
11746
11747 #               include <pthread.h>
11748                 /* this check could be improved */
11749 #               ifdef pthread_once_init
11750                         pthread_version_draft4;
11751 #               endif
11752         
11753 EOF
11754 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11755   egrep "pthread_version_draft4" >/dev/null 2>&1; then
11756   rm -rf conftest*
11757   ol_pthread_draft4=yes
11758 else
11759   rm -rf conftest*
11760   ol_pthread_draft4=no
11761 fi
11762 rm -f conftest*
11763
11764
11765         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
11766                 ol_cv_pthread_version=final
11767         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
11768                 ol_cv_pthread_version=draft4
11769         else
11770                 ol_cv_pthread_version=unknown
11771         fi
11772
11773 fi
11774
11775 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11776
11777
11778                 if test $ol_cv_pthread_version = final ; then
11779                         cat >> confdefs.h <<\EOF
11780 #define HAVE_PTHREADS_FINAL 1
11781 EOF
11782
11783                 elif test $ol_cv_pthread_version = draft4 ; then
11784                         cat >> confdefs.h <<\EOF
11785 #define HAVE_PTHREADS_D4 1
11786 EOF
11787
11788                 else
11789                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11790                 fi
11791
11792                 # consider threads found
11793                 ol_with_threads=found
11794
11795                 
11796         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11797 echo "configure:11798: checking for LinuxThreads pthread.h" >&5
11798 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11799   echo $ac_n "(cached) $ac_c" 1>&6
11800 else
11801   cat > conftest.$ac_ext <<EOF
11802 #line 11803 "configure"
11803 #include "confdefs.h"
11804 #include <pthread.h>
11805 EOF
11806 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11807   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11808   rm -rf conftest*
11809   ol_cv_header_linux_threads=yes
11810 else
11811   rm -rf conftest*
11812   ol_cv_header_linux_threads=no
11813 fi
11814 rm -f conftest*
11815
11816                 
11817 fi
11818
11819 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11820         if test $ol_cv_header_linux_threads = yes; then
11821                 cat >> confdefs.h <<\EOF
11822 #define HAVE_LINUX_THREADS 1
11823 EOF
11824
11825         fi
11826
11827                 
11828         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11829 echo "configure:11830: checking for GNU Pth pthread.h" >&5
11830 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11831   echo $ac_n "(cached) $ac_c" 1>&6
11832 else
11833   cat > conftest.$ac_ext <<EOF
11834 #line 11835 "configure"
11835 #include "confdefs.h"
11836 #include <pthread.h>
11837 #ifdef _POSIX_THREAD_IS_GNU_PTH
11838         __gnu_pth__;
11839 #endif
11840
11841 EOF
11842 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11843   egrep "__gnu_pth__" >/dev/null 2>&1; then
11844   rm -rf conftest*
11845   ol_cv_header_gnu_pth_pthread_h=yes
11846 else
11847   rm -rf conftest*
11848   ol_cv_header_gnu_pth_pthread_h=no
11849 fi
11850 rm -f conftest*
11851
11852                 
11853 fi
11854
11855 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11856
11857
11858                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11859                         for ac_hdr in sched.h
11860 do
11861 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11862 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11863 echo "configure:11864: checking for $ac_hdr" >&5
11864 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11865   echo $ac_n "(cached) $ac_c" 1>&6
11866 else
11867   cat > conftest.$ac_ext <<EOF
11868 #line 11869 "configure"
11869 #include "confdefs.h"
11870 #include <$ac_hdr>
11871 EOF
11872 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11873 { (eval echo configure:11874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11874 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11875 if test -z "$ac_err"; then
11876   rm -rf conftest*
11877   eval "ac_cv_header_$ac_safe=yes"
11878 else
11879   echo "$ac_err" >&5
11880   echo "configure: failed program was:" >&5
11881   cat conftest.$ac_ext >&5
11882   rm -rf conftest*
11883   eval "ac_cv_header_$ac_safe=no"
11884 fi
11885 rm -f conftest*
11886 fi
11887 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11888   echo "$ac_t""yes" 1>&6
11889     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11890   cat >> confdefs.h <<EOF
11891 #define $ac_tr_hdr 1
11892 EOF
11893  
11894 else
11895   echo "$ac_t""no" 1>&6
11896 fi
11897 done
11898
11899                 fi
11900
11901                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11902                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11903 echo "configure:11904: checking for pthread_create in default libraries" >&5
11904 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11905   echo $ac_n "(cached) $ac_c" 1>&6
11906 else
11907   
11908                 if test "$cross_compiling" = yes; then
11909   cat > conftest.$ac_ext <<EOF
11910 #line 11911 "configure"
11911 #include "confdefs.h"
11912 /* pthread test headers */
11913 #include <pthread.h>
11914 #ifndef NULL
11915 #define NULL (void*)0
11916 #endif
11917
11918 static void *task(p)
11919         void *p;
11920 {
11921         return (void *) (p == NULL);
11922 }
11923
11924 int main() {
11925
11926         /* pthread test function */
11927         pthread_t t;
11928         int status;
11929         int detach = 1;
11930
11931 #ifdef HAVE_PTHREADS_FINAL
11932         /* Final pthreads */
11933         pthread_attr_t attr;
11934
11935         status = pthread_attr_init(&attr);
11936         if( status ) return status;
11937
11938 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11939         if( !detach ) {
11940 #if defined( PTHREAD_CREATE_JOINABLE )
11941                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11942 #else
11943                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11944 #endif
11945
11946 #ifdef PTHREAD_CREATE_DETACHED
11947         } else {
11948                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11949 #endif
11950         }
11951         if( status ) return status;
11952 #endif
11953
11954         status = pthread_create( &t, &attr, task, NULL );
11955         if( status ) return status;
11956
11957 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11958         if( detach ) {
11959                 /* give thread a chance to complete */
11960                 /* it should remain joinable and hence detachable */
11961                 sleep( 1 );
11962
11963                 status = pthread_detach( t );
11964                 if( status ) return status;
11965         }
11966 #endif
11967
11968 #else
11969         /* Draft 4 pthreads */
11970         status = pthread_create( &t, pthread_attr_default, task, NULL );
11971         if( status ) return status;
11972
11973         if( detach ) {
11974                 /* give thread a chance to complete */
11975                 /* it should remain joinable and hence detachable */
11976                 sleep( 1 );
11977
11978                 status = pthread_detach( &t );
11979                 if( status ) return status;
11980         }
11981 #endif
11982
11983 #ifdef HAVE_LINUX_THREADS
11984         pthread_kill_other_threads_np();
11985 #endif
11986
11987         return 0;
11988
11989 ; return 0; }
11990 EOF
11991 if { (eval echo configure:11992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11992   rm -rf conftest*
11993   ol_cv_pthread_create=yes
11994 else
11995   echo "configure: failed program was:" >&5
11996   cat conftest.$ac_ext >&5
11997   rm -rf conftest*
11998   ol_cv_pthread_create=no
11999 fi
12000 rm -f conftest*
12001 else
12002   cat > conftest.$ac_ext <<EOF
12003 #line 12004 "configure"
12004 #include "confdefs.h"
12005 /* pthread test headers */
12006 #include <pthread.h>
12007 #ifndef NULL
12008 #define NULL (void*)0
12009 #endif
12010
12011 static void *task(p)
12012         void *p;
12013 {
12014         return (void *) (p == NULL);
12015 }
12016
12017
12018 int main(argc, argv)
12019         int argc;
12020         char **argv;
12021 {
12022
12023         /* pthread test function */
12024         pthread_t t;
12025         int status;
12026         int detach = 1;
12027
12028 #ifdef HAVE_PTHREADS_FINAL
12029         /* Final pthreads */
12030         pthread_attr_t attr;
12031
12032         status = pthread_attr_init(&attr);
12033         if( status ) return status;
12034
12035 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12036         if( !detach ) {
12037 #if defined( PTHREAD_CREATE_JOINABLE )
12038                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12039 #else
12040                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12041 #endif
12042
12043 #ifdef PTHREAD_CREATE_DETACHED
12044         } else {
12045                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12046 #endif
12047         }
12048         if( status ) return status;
12049 #endif
12050
12051         status = pthread_create( &t, &attr, task, NULL );
12052         if( status ) return status;
12053
12054 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12055         if( detach ) {
12056                 /* give thread a chance to complete */
12057                 /* it should remain joinable and hence detachable */
12058                 sleep( 1 );
12059
12060                 status = pthread_detach( t );
12061                 if( status ) return status;
12062         }
12063 #endif
12064
12065 #else
12066         /* Draft 4 pthreads */
12067         status = pthread_create( &t, pthread_attr_default, task, NULL );
12068         if( status ) return status;
12069
12070         if( detach ) {
12071                 /* give thread a chance to complete */
12072                 /* it should remain joinable and hence detachable */
12073                 sleep( 1 );
12074
12075                 status = pthread_detach( &t );
12076                 if( status ) return status;
12077         }
12078 #endif
12079
12080 #ifdef HAVE_LINUX_THREADS
12081         pthread_kill_other_threads_np();
12082 #endif
12083
12084         return 0;
12085
12086 }
12087
12088 EOF
12089 if { (eval echo configure:12090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12090 then
12091   ol_cv_pthread_create=yes
12092 else
12093   echo "configure: failed program was:" >&5
12094   cat conftest.$ac_ext >&5
12095   rm -fr conftest*
12096   ol_cv_pthread_create=no
12097 fi
12098 rm -fr conftest*
12099 fi
12100
12101 fi
12102
12103 echo "$ac_t""$ol_cv_pthread_create" 1>&6
12104
12105                 if test $ol_cv_pthread_create != no ; then
12106                         ol_link_threads=posix
12107                         ol_link_pthreads=""
12108                 fi
12109                 
12110                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
12111 if test "$ol_link_threads" = no ; then
12112         # try -kthread
12113         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
12114 echo "configure:12115: checking for pthread link with -kthread" >&5
12115 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
12116   echo $ac_n "(cached) $ac_c" 1>&6
12117 else
12118   
12119                 # save the flags
12120                 ol_LIBS="$LIBS"
12121                 LIBS="-kthread $LIBS"
12122
12123                 if test "$cross_compiling" = yes; then
12124   cat > conftest.$ac_ext <<EOF
12125 #line 12126 "configure"
12126 #include "confdefs.h"
12127 /* pthread test headers */
12128 #include <pthread.h>
12129 #ifndef NULL
12130 #define NULL (void*)0
12131 #endif
12132
12133 static void *task(p)
12134         void *p;
12135 {
12136         return (void *) (p == NULL);
12137 }
12138
12139 int main() {
12140
12141         /* pthread test function */
12142         pthread_t t;
12143         int status;
12144         int detach = 1;
12145
12146 #ifdef HAVE_PTHREADS_FINAL
12147         /* Final pthreads */
12148         pthread_attr_t attr;
12149
12150         status = pthread_attr_init(&attr);
12151         if( status ) return status;
12152
12153 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12154         if( !detach ) {
12155 #if defined( PTHREAD_CREATE_JOINABLE )
12156                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12157 #else
12158                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12159 #endif
12160
12161 #ifdef PTHREAD_CREATE_DETACHED
12162         } else {
12163                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12164 #endif
12165         }
12166         if( status ) return status;
12167 #endif
12168
12169         status = pthread_create( &t, &attr, task, NULL );
12170         if( status ) return status;
12171
12172 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12173         if( detach ) {
12174                 /* give thread a chance to complete */
12175                 /* it should remain joinable and hence detachable */
12176                 sleep( 1 );
12177
12178                 status = pthread_detach( t );
12179                 if( status ) return status;
12180         }
12181 #endif
12182
12183 #else
12184         /* Draft 4 pthreads */
12185         status = pthread_create( &t, pthread_attr_default, task, NULL );
12186         if( status ) return status;
12187
12188         if( detach ) {
12189                 /* give thread a chance to complete */
12190                 /* it should remain joinable and hence detachable */
12191                 sleep( 1 );
12192
12193                 status = pthread_detach( &t );
12194                 if( status ) return status;
12195         }
12196 #endif
12197
12198 #ifdef HAVE_LINUX_THREADS
12199         pthread_kill_other_threads_np();
12200 #endif
12201
12202         return 0;
12203
12204 ; return 0; }
12205 EOF
12206 if { (eval echo configure:12207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12207   rm -rf conftest*
12208   ol_cv_pthread_kthread=yes
12209 else
12210   echo "configure: failed program was:" >&5
12211   cat conftest.$ac_ext >&5
12212   rm -rf conftest*
12213   ol_cv_pthread_kthread=no
12214 fi
12215 rm -f conftest*
12216 else
12217   cat > conftest.$ac_ext <<EOF
12218 #line 12219 "configure"
12219 #include "confdefs.h"
12220 /* pthread test headers */
12221 #include <pthread.h>
12222 #ifndef NULL
12223 #define NULL (void*)0
12224 #endif
12225
12226 static void *task(p)
12227         void *p;
12228 {
12229         return (void *) (p == NULL);
12230 }
12231
12232
12233 int main(argc, argv)
12234         int argc;
12235         char **argv;
12236 {
12237
12238         /* pthread test function */
12239         pthread_t t;
12240         int status;
12241         int detach = 1;
12242
12243 #ifdef HAVE_PTHREADS_FINAL
12244         /* Final pthreads */
12245         pthread_attr_t attr;
12246
12247         status = pthread_attr_init(&attr);
12248         if( status ) return status;
12249
12250 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12251         if( !detach ) {
12252 #if defined( PTHREAD_CREATE_JOINABLE )
12253                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12254 #else
12255                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12256 #endif
12257
12258 #ifdef PTHREAD_CREATE_DETACHED
12259         } else {
12260                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12261 #endif
12262         }
12263         if( status ) return status;
12264 #endif
12265
12266         status = pthread_create( &t, &attr, task, NULL );
12267         if( status ) return status;
12268
12269 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12270         if( detach ) {
12271                 /* give thread a chance to complete */
12272                 /* it should remain joinable and hence detachable */
12273                 sleep( 1 );
12274
12275                 status = pthread_detach( t );
12276                 if( status ) return status;
12277         }
12278 #endif
12279
12280 #else
12281         /* Draft 4 pthreads */
12282         status = pthread_create( &t, pthread_attr_default, task, NULL );
12283         if( status ) return status;
12284
12285         if( detach ) {
12286                 /* give thread a chance to complete */
12287                 /* it should remain joinable and hence detachable */
12288                 sleep( 1 );
12289
12290                 status = pthread_detach( &t );
12291                 if( status ) return status;
12292         }
12293 #endif
12294
12295 #ifdef HAVE_LINUX_THREADS
12296         pthread_kill_other_threads_np();
12297 #endif
12298
12299         return 0;
12300
12301 }
12302
12303 EOF
12304 if { (eval echo configure:12305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12305 then
12306   ol_cv_pthread_kthread=yes
12307 else
12308   echo "configure: failed program was:" >&5
12309   cat conftest.$ac_ext >&5
12310   rm -fr conftest*
12311   ol_cv_pthread_kthread=no
12312 fi
12313 rm -fr conftest*
12314 fi
12315
12316
12317                 # restore the LIBS
12318                 LIBS="$ol_LIBS"
12319         
12320 fi
12321
12322 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12323
12324         if test $ol_cv_pthread_kthread = yes ; then
12325                 ol_link_pthreads="-kthread"
12326                 ol_link_threads=posix
12327         fi
12328 fi
12329
12330                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12331 if test "$ol_link_threads" = no ; then
12332         # try -pthread
12333         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12334 echo "configure:12335: checking for pthread link with -pthread" >&5
12335 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12336   echo $ac_n "(cached) $ac_c" 1>&6
12337 else
12338   
12339                 # save the flags
12340                 ol_LIBS="$LIBS"
12341                 LIBS="-pthread $LIBS"
12342
12343                 if test "$cross_compiling" = yes; then
12344   cat > conftest.$ac_ext <<EOF
12345 #line 12346 "configure"
12346 #include "confdefs.h"
12347 /* pthread test headers */
12348 #include <pthread.h>
12349 #ifndef NULL
12350 #define NULL (void*)0
12351 #endif
12352
12353 static void *task(p)
12354         void *p;
12355 {
12356         return (void *) (p == NULL);
12357 }
12358
12359 int main() {
12360
12361         /* pthread test function */
12362         pthread_t t;
12363         int status;
12364         int detach = 1;
12365
12366 #ifdef HAVE_PTHREADS_FINAL
12367         /* Final pthreads */
12368         pthread_attr_t attr;
12369
12370         status = pthread_attr_init(&attr);
12371         if( status ) return status;
12372
12373 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12374         if( !detach ) {
12375 #if defined( PTHREAD_CREATE_JOINABLE )
12376                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12377 #else
12378                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12379 #endif
12380
12381 #ifdef PTHREAD_CREATE_DETACHED
12382         } else {
12383                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12384 #endif
12385         }
12386         if( status ) return status;
12387 #endif
12388
12389         status = pthread_create( &t, &attr, task, NULL );
12390         if( status ) return status;
12391
12392 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12393         if( detach ) {
12394                 /* give thread a chance to complete */
12395                 /* it should remain joinable and hence detachable */
12396                 sleep( 1 );
12397
12398                 status = pthread_detach( t );
12399                 if( status ) return status;
12400         }
12401 #endif
12402
12403 #else
12404         /* Draft 4 pthreads */
12405         status = pthread_create( &t, pthread_attr_default, task, NULL );
12406         if( status ) return status;
12407
12408         if( detach ) {
12409                 /* give thread a chance to complete */
12410                 /* it should remain joinable and hence detachable */
12411                 sleep( 1 );
12412
12413                 status = pthread_detach( &t );
12414                 if( status ) return status;
12415         }
12416 #endif
12417
12418 #ifdef HAVE_LINUX_THREADS
12419         pthread_kill_other_threads_np();
12420 #endif
12421
12422         return 0;
12423
12424 ; return 0; }
12425 EOF
12426 if { (eval echo configure:12427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12427   rm -rf conftest*
12428   ol_cv_pthread_pthread=yes
12429 else
12430   echo "configure: failed program was:" >&5
12431   cat conftest.$ac_ext >&5
12432   rm -rf conftest*
12433   ol_cv_pthread_pthread=no
12434 fi
12435 rm -f conftest*
12436 else
12437   cat > conftest.$ac_ext <<EOF
12438 #line 12439 "configure"
12439 #include "confdefs.h"
12440 /* pthread test headers */
12441 #include <pthread.h>
12442 #ifndef NULL
12443 #define NULL (void*)0
12444 #endif
12445
12446 static void *task(p)
12447         void *p;
12448 {
12449         return (void *) (p == NULL);
12450 }
12451
12452
12453 int main(argc, argv)
12454         int argc;
12455         char **argv;
12456 {
12457
12458         /* pthread test function */
12459         pthread_t t;
12460         int status;
12461         int detach = 1;
12462
12463 #ifdef HAVE_PTHREADS_FINAL
12464         /* Final pthreads */
12465         pthread_attr_t attr;
12466
12467         status = pthread_attr_init(&attr);
12468         if( status ) return status;
12469
12470 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12471         if( !detach ) {
12472 #if defined( PTHREAD_CREATE_JOINABLE )
12473                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12474 #else
12475                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12476 #endif
12477
12478 #ifdef PTHREAD_CREATE_DETACHED
12479         } else {
12480                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12481 #endif
12482         }
12483         if( status ) return status;
12484 #endif
12485
12486         status = pthread_create( &t, &attr, task, NULL );
12487         if( status ) return status;
12488
12489 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12490         if( detach ) {
12491                 /* give thread a chance to complete */
12492                 /* it should remain joinable and hence detachable */
12493                 sleep( 1 );
12494
12495                 status = pthread_detach( t );
12496                 if( status ) return status;
12497         }
12498 #endif
12499
12500 #else
12501         /* Draft 4 pthreads */
12502         status = pthread_create( &t, pthread_attr_default, task, NULL );
12503         if( status ) return status;
12504
12505         if( detach ) {
12506                 /* give thread a chance to complete */
12507                 /* it should remain joinable and hence detachable */
12508                 sleep( 1 );
12509
12510                 status = pthread_detach( &t );
12511                 if( status ) return status;
12512         }
12513 #endif
12514
12515 #ifdef HAVE_LINUX_THREADS
12516         pthread_kill_other_threads_np();
12517 #endif
12518
12519         return 0;
12520
12521 }
12522
12523 EOF
12524 if { (eval echo configure:12525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12525 then
12526   ol_cv_pthread_pthread=yes
12527 else
12528   echo "configure: failed program was:" >&5
12529   cat conftest.$ac_ext >&5
12530   rm -fr conftest*
12531   ol_cv_pthread_pthread=no
12532 fi
12533 rm -fr conftest*
12534 fi
12535
12536
12537                 # restore the LIBS
12538                 LIBS="$ol_LIBS"
12539         
12540 fi
12541
12542 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12543
12544         if test $ol_cv_pthread_pthread = yes ; then
12545                 ol_link_pthreads="-pthread"
12546                 ol_link_threads=posix
12547         fi
12548 fi
12549
12550                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12551 if test "$ol_link_threads" = no ; then
12552         # try -pthreads
12553         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12554 echo "configure:12555: checking for pthread link with -pthreads" >&5
12555 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12556   echo $ac_n "(cached) $ac_c" 1>&6
12557 else
12558   
12559                 # save the flags
12560                 ol_LIBS="$LIBS"
12561                 LIBS="-pthreads $LIBS"
12562
12563                 if test "$cross_compiling" = yes; then
12564   cat > conftest.$ac_ext <<EOF
12565 #line 12566 "configure"
12566 #include "confdefs.h"
12567 /* pthread test headers */
12568 #include <pthread.h>
12569 #ifndef NULL
12570 #define NULL (void*)0
12571 #endif
12572
12573 static void *task(p)
12574         void *p;
12575 {
12576         return (void *) (p == NULL);
12577 }
12578
12579 int main() {
12580
12581         /* pthread test function */
12582         pthread_t t;
12583         int status;
12584         int detach = 1;
12585
12586 #ifdef HAVE_PTHREADS_FINAL
12587         /* Final pthreads */
12588         pthread_attr_t attr;
12589
12590         status = pthread_attr_init(&attr);
12591         if( status ) return status;
12592
12593 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12594         if( !detach ) {
12595 #if defined( PTHREAD_CREATE_JOINABLE )
12596                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12597 #else
12598                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12599 #endif
12600
12601 #ifdef PTHREAD_CREATE_DETACHED
12602         } else {
12603                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12604 #endif
12605         }
12606         if( status ) return status;
12607 #endif
12608
12609         status = pthread_create( &t, &attr, task, NULL );
12610         if( status ) return status;
12611
12612 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12613         if( detach ) {
12614                 /* give thread a chance to complete */
12615                 /* it should remain joinable and hence detachable */
12616                 sleep( 1 );
12617
12618                 status = pthread_detach( t );
12619                 if( status ) return status;
12620         }
12621 #endif
12622
12623 #else
12624         /* Draft 4 pthreads */
12625         status = pthread_create( &t, pthread_attr_default, task, NULL );
12626         if( status ) return status;
12627
12628         if( detach ) {
12629                 /* give thread a chance to complete */
12630                 /* it should remain joinable and hence detachable */
12631                 sleep( 1 );
12632
12633                 status = pthread_detach( &t );
12634                 if( status ) return status;
12635         }
12636 #endif
12637
12638 #ifdef HAVE_LINUX_THREADS
12639         pthread_kill_other_threads_np();
12640 #endif
12641
12642         return 0;
12643
12644 ; return 0; }
12645 EOF
12646 if { (eval echo configure:12647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12647   rm -rf conftest*
12648   ol_cv_pthread_pthreads=yes
12649 else
12650   echo "configure: failed program was:" >&5
12651   cat conftest.$ac_ext >&5
12652   rm -rf conftest*
12653   ol_cv_pthread_pthreads=no
12654 fi
12655 rm -f conftest*
12656 else
12657   cat > conftest.$ac_ext <<EOF
12658 #line 12659 "configure"
12659 #include "confdefs.h"
12660 /* pthread test headers */
12661 #include <pthread.h>
12662 #ifndef NULL
12663 #define NULL (void*)0
12664 #endif
12665
12666 static void *task(p)
12667         void *p;
12668 {
12669         return (void *) (p == NULL);
12670 }
12671
12672
12673 int main(argc, argv)
12674         int argc;
12675         char **argv;
12676 {
12677
12678         /* pthread test function */
12679         pthread_t t;
12680         int status;
12681         int detach = 1;
12682
12683 #ifdef HAVE_PTHREADS_FINAL
12684         /* Final pthreads */
12685         pthread_attr_t attr;
12686
12687         status = pthread_attr_init(&attr);
12688         if( status ) return status;
12689
12690 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12691         if( !detach ) {
12692 #if defined( PTHREAD_CREATE_JOINABLE )
12693                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12694 #else
12695                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12696 #endif
12697
12698 #ifdef PTHREAD_CREATE_DETACHED
12699         } else {
12700                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12701 #endif
12702         }
12703         if( status ) return status;
12704 #endif
12705
12706         status = pthread_create( &t, &attr, task, NULL );
12707         if( status ) return status;
12708
12709 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12710         if( detach ) {
12711                 /* give thread a chance to complete */
12712                 /* it should remain joinable and hence detachable */
12713                 sleep( 1 );
12714
12715                 status = pthread_detach( t );
12716                 if( status ) return status;
12717         }
12718 #endif
12719
12720 #else
12721         /* Draft 4 pthreads */
12722         status = pthread_create( &t, pthread_attr_default, task, NULL );
12723         if( status ) return status;
12724
12725         if( detach ) {
12726                 /* give thread a chance to complete */
12727                 /* it should remain joinable and hence detachable */
12728                 sleep( 1 );
12729
12730                 status = pthread_detach( &t );
12731                 if( status ) return status;
12732         }
12733 #endif
12734
12735 #ifdef HAVE_LINUX_THREADS
12736         pthread_kill_other_threads_np();
12737 #endif
12738
12739         return 0;
12740
12741 }
12742
12743 EOF
12744 if { (eval echo configure:12745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12745 then
12746   ol_cv_pthread_pthreads=yes
12747 else
12748   echo "configure: failed program was:" >&5
12749   cat conftest.$ac_ext >&5
12750   rm -fr conftest*
12751   ol_cv_pthread_pthreads=no
12752 fi
12753 rm -fr conftest*
12754 fi
12755
12756
12757                 # restore the LIBS
12758                 LIBS="$ol_LIBS"
12759         
12760 fi
12761
12762 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12763
12764         if test $ol_cv_pthread_pthreads = yes ; then
12765                 ol_link_pthreads="-pthreads"
12766                 ol_link_threads=posix
12767         fi
12768 fi
12769
12770                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12771 if test "$ol_link_threads" = no ; then
12772         # try -mthreads
12773         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12774 echo "configure:12775: checking for pthread link with -mthreads" >&5
12775 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12776   echo $ac_n "(cached) $ac_c" 1>&6
12777 else
12778   
12779                 # save the flags
12780                 ol_LIBS="$LIBS"
12781                 LIBS="-mthreads $LIBS"
12782
12783                 if test "$cross_compiling" = yes; then
12784   cat > conftest.$ac_ext <<EOF
12785 #line 12786 "configure"
12786 #include "confdefs.h"
12787 /* pthread test headers */
12788 #include <pthread.h>
12789 #ifndef NULL
12790 #define NULL (void*)0
12791 #endif
12792
12793 static void *task(p)
12794         void *p;
12795 {
12796         return (void *) (p == NULL);
12797 }
12798
12799 int main() {
12800
12801         /* pthread test function */
12802         pthread_t t;
12803         int status;
12804         int detach = 1;
12805
12806 #ifdef HAVE_PTHREADS_FINAL
12807         /* Final pthreads */
12808         pthread_attr_t attr;
12809
12810         status = pthread_attr_init(&attr);
12811         if( status ) return status;
12812
12813 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12814         if( !detach ) {
12815 #if defined( PTHREAD_CREATE_JOINABLE )
12816                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12817 #else
12818                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12819 #endif
12820
12821 #ifdef PTHREAD_CREATE_DETACHED
12822         } else {
12823                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12824 #endif
12825         }
12826         if( status ) return status;
12827 #endif
12828
12829         status = pthread_create( &t, &attr, task, NULL );
12830         if( status ) return status;
12831
12832 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12833         if( detach ) {
12834                 /* give thread a chance to complete */
12835                 /* it should remain joinable and hence detachable */
12836                 sleep( 1 );
12837
12838                 status = pthread_detach( t );
12839                 if( status ) return status;
12840         }
12841 #endif
12842
12843 #else
12844         /* Draft 4 pthreads */
12845         status = pthread_create( &t, pthread_attr_default, task, NULL );
12846         if( status ) return status;
12847
12848         if( detach ) {
12849                 /* give thread a chance to complete */
12850                 /* it should remain joinable and hence detachable */
12851                 sleep( 1 );
12852
12853                 status = pthread_detach( &t );
12854                 if( status ) return status;
12855         }
12856 #endif
12857
12858 #ifdef HAVE_LINUX_THREADS
12859         pthread_kill_other_threads_np();
12860 #endif
12861
12862         return 0;
12863
12864 ; return 0; }
12865 EOF
12866 if { (eval echo configure:12867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12867   rm -rf conftest*
12868   ol_cv_pthread_mthreads=yes
12869 else
12870   echo "configure: failed program was:" >&5
12871   cat conftest.$ac_ext >&5
12872   rm -rf conftest*
12873   ol_cv_pthread_mthreads=no
12874 fi
12875 rm -f conftest*
12876 else
12877   cat > conftest.$ac_ext <<EOF
12878 #line 12879 "configure"
12879 #include "confdefs.h"
12880 /* pthread test headers */
12881 #include <pthread.h>
12882 #ifndef NULL
12883 #define NULL (void*)0
12884 #endif
12885
12886 static void *task(p)
12887         void *p;
12888 {
12889         return (void *) (p == NULL);
12890 }
12891
12892
12893 int main(argc, argv)
12894         int argc;
12895         char **argv;
12896 {
12897
12898         /* pthread test function */
12899         pthread_t t;
12900         int status;
12901         int detach = 1;
12902
12903 #ifdef HAVE_PTHREADS_FINAL
12904         /* Final pthreads */
12905         pthread_attr_t attr;
12906
12907         status = pthread_attr_init(&attr);
12908         if( status ) return status;
12909
12910 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12911         if( !detach ) {
12912 #if defined( PTHREAD_CREATE_JOINABLE )
12913                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12914 #else
12915                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12916 #endif
12917
12918 #ifdef PTHREAD_CREATE_DETACHED
12919         } else {
12920                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12921 #endif
12922         }
12923         if( status ) return status;
12924 #endif
12925
12926         status = pthread_create( &t, &attr, task, NULL );
12927         if( status ) return status;
12928
12929 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12930         if( detach ) {
12931                 /* give thread a chance to complete */
12932                 /* it should remain joinable and hence detachable */
12933                 sleep( 1 );
12934
12935                 status = pthread_detach( t );
12936                 if( status ) return status;
12937         }
12938 #endif
12939
12940 #else
12941         /* Draft 4 pthreads */
12942         status = pthread_create( &t, pthread_attr_default, task, NULL );
12943         if( status ) return status;
12944
12945         if( detach ) {
12946                 /* give thread a chance to complete */
12947                 /* it should remain joinable and hence detachable */
12948                 sleep( 1 );
12949
12950                 status = pthread_detach( &t );
12951                 if( status ) return status;
12952         }
12953 #endif
12954
12955 #ifdef HAVE_LINUX_THREADS
12956         pthread_kill_other_threads_np();
12957 #endif
12958
12959         return 0;
12960
12961 }
12962
12963 EOF
12964 if { (eval echo configure:12965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12965 then
12966   ol_cv_pthread_mthreads=yes
12967 else
12968   echo "configure: failed program was:" >&5
12969   cat conftest.$ac_ext >&5
12970   rm -fr conftest*
12971   ol_cv_pthread_mthreads=no
12972 fi
12973 rm -fr conftest*
12974 fi
12975
12976
12977                 # restore the LIBS
12978                 LIBS="$ol_LIBS"
12979         
12980 fi
12981
12982 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12983
12984         if test $ol_cv_pthread_mthreads = yes ; then
12985                 ol_link_pthreads="-mthreads"
12986                 ol_link_threads=posix
12987         fi
12988 fi
12989
12990                 # Pthread try link: -thread (ol_cv_pthread_thread)
12991 if test "$ol_link_threads" = no ; then
12992         # try -thread
12993         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12994 echo "configure:12995: checking for pthread link with -thread" >&5
12995 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12996   echo $ac_n "(cached) $ac_c" 1>&6
12997 else
12998   
12999                 # save the flags
13000                 ol_LIBS="$LIBS"
13001                 LIBS="-thread $LIBS"
13002
13003                 if test "$cross_compiling" = yes; then
13004   cat > conftest.$ac_ext <<EOF
13005 #line 13006 "configure"
13006 #include "confdefs.h"
13007 /* pthread test headers */
13008 #include <pthread.h>
13009 #ifndef NULL
13010 #define NULL (void*)0
13011 #endif
13012
13013 static void *task(p)
13014         void *p;
13015 {
13016         return (void *) (p == NULL);
13017 }
13018
13019 int main() {
13020
13021         /* pthread test function */
13022         pthread_t t;
13023         int status;
13024         int detach = 1;
13025
13026 #ifdef HAVE_PTHREADS_FINAL
13027         /* Final pthreads */
13028         pthread_attr_t attr;
13029
13030         status = pthread_attr_init(&attr);
13031         if( status ) return status;
13032
13033 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13034         if( !detach ) {
13035 #if defined( PTHREAD_CREATE_JOINABLE )
13036                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13037 #else
13038                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13039 #endif
13040
13041 #ifdef PTHREAD_CREATE_DETACHED
13042         } else {
13043                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13044 #endif
13045         }
13046         if( status ) return status;
13047 #endif
13048
13049         status = pthread_create( &t, &attr, task, NULL );
13050         if( status ) return status;
13051
13052 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13053         if( detach ) {
13054                 /* give thread a chance to complete */
13055                 /* it should remain joinable and hence detachable */
13056                 sleep( 1 );
13057
13058                 status = pthread_detach( t );
13059                 if( status ) return status;
13060         }
13061 #endif
13062
13063 #else
13064         /* Draft 4 pthreads */
13065         status = pthread_create( &t, pthread_attr_default, task, NULL );
13066         if( status ) return status;
13067
13068         if( detach ) {
13069                 /* give thread a chance to complete */
13070                 /* it should remain joinable and hence detachable */
13071                 sleep( 1 );
13072
13073                 status = pthread_detach( &t );
13074                 if( status ) return status;
13075         }
13076 #endif
13077
13078 #ifdef HAVE_LINUX_THREADS
13079         pthread_kill_other_threads_np();
13080 #endif
13081
13082         return 0;
13083
13084 ; return 0; }
13085 EOF
13086 if { (eval echo configure:13087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13087   rm -rf conftest*
13088   ol_cv_pthread_thread=yes
13089 else
13090   echo "configure: failed program was:" >&5
13091   cat conftest.$ac_ext >&5
13092   rm -rf conftest*
13093   ol_cv_pthread_thread=no
13094 fi
13095 rm -f conftest*
13096 else
13097   cat > conftest.$ac_ext <<EOF
13098 #line 13099 "configure"
13099 #include "confdefs.h"
13100 /* pthread test headers */
13101 #include <pthread.h>
13102 #ifndef NULL
13103 #define NULL (void*)0
13104 #endif
13105
13106 static void *task(p)
13107         void *p;
13108 {
13109         return (void *) (p == NULL);
13110 }
13111
13112
13113 int main(argc, argv)
13114         int argc;
13115         char **argv;
13116 {
13117
13118         /* pthread test function */
13119         pthread_t t;
13120         int status;
13121         int detach = 1;
13122
13123 #ifdef HAVE_PTHREADS_FINAL
13124         /* Final pthreads */
13125         pthread_attr_t attr;
13126
13127         status = pthread_attr_init(&attr);
13128         if( status ) return status;
13129
13130 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13131         if( !detach ) {
13132 #if defined( PTHREAD_CREATE_JOINABLE )
13133                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13134 #else
13135                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13136 #endif
13137
13138 #ifdef PTHREAD_CREATE_DETACHED
13139         } else {
13140                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13141 #endif
13142         }
13143         if( status ) return status;
13144 #endif
13145
13146         status = pthread_create( &t, &attr, task, NULL );
13147         if( status ) return status;
13148
13149 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13150         if( detach ) {
13151                 /* give thread a chance to complete */
13152                 /* it should remain joinable and hence detachable */
13153                 sleep( 1 );
13154
13155                 status = pthread_detach( t );
13156                 if( status ) return status;
13157         }
13158 #endif
13159
13160 #else
13161         /* Draft 4 pthreads */
13162         status = pthread_create( &t, pthread_attr_default, task, NULL );
13163         if( status ) return status;
13164
13165         if( detach ) {
13166                 /* give thread a chance to complete */
13167                 /* it should remain joinable and hence detachable */
13168                 sleep( 1 );
13169
13170                 status = pthread_detach( &t );
13171                 if( status ) return status;
13172         }
13173 #endif
13174
13175 #ifdef HAVE_LINUX_THREADS
13176         pthread_kill_other_threads_np();
13177 #endif
13178
13179         return 0;
13180
13181 }
13182
13183 EOF
13184 if { (eval echo configure:13185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13185 then
13186   ol_cv_pthread_thread=yes
13187 else
13188   echo "configure: failed program was:" >&5
13189   cat conftest.$ac_ext >&5
13190   rm -fr conftest*
13191   ol_cv_pthread_thread=no
13192 fi
13193 rm -fr conftest*
13194 fi
13195
13196
13197                 # restore the LIBS
13198                 LIBS="$ol_LIBS"
13199         
13200 fi
13201
13202 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
13203
13204         if test $ol_cv_pthread_thread = yes ; then
13205                 ol_link_pthreads="-thread"
13206                 ol_link_threads=posix
13207         fi
13208 fi
13209
13210
13211                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
13212 if test "$ol_link_threads" = no ; then
13213         # try -lpthread -lmach -lexc -lc_r
13214         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
13215 echo "configure:13216: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
13216 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
13217   echo $ac_n "(cached) $ac_c" 1>&6
13218 else
13219   
13220                 # save the flags
13221                 ol_LIBS="$LIBS"
13222                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
13223
13224                 if test "$cross_compiling" = yes; then
13225   cat > conftest.$ac_ext <<EOF
13226 #line 13227 "configure"
13227 #include "confdefs.h"
13228 /* pthread test headers */
13229 #include <pthread.h>
13230 #ifndef NULL
13231 #define NULL (void*)0
13232 #endif
13233
13234 static void *task(p)
13235         void *p;
13236 {
13237         return (void *) (p == NULL);
13238 }
13239
13240 int main() {
13241
13242         /* pthread test function */
13243         pthread_t t;
13244         int status;
13245         int detach = 1;
13246
13247 #ifdef HAVE_PTHREADS_FINAL
13248         /* Final pthreads */
13249         pthread_attr_t attr;
13250
13251         status = pthread_attr_init(&attr);
13252         if( status ) return status;
13253
13254 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13255         if( !detach ) {
13256 #if defined( PTHREAD_CREATE_JOINABLE )
13257                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13258 #else
13259                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13260 #endif
13261
13262 #ifdef PTHREAD_CREATE_DETACHED
13263         } else {
13264                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13265 #endif
13266         }
13267         if( status ) return status;
13268 #endif
13269
13270         status = pthread_create( &t, &attr, task, NULL );
13271         if( status ) return status;
13272
13273 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13274         if( detach ) {
13275                 /* give thread a chance to complete */
13276                 /* it should remain joinable and hence detachable */
13277                 sleep( 1 );
13278
13279                 status = pthread_detach( t );
13280                 if( status ) return status;
13281         }
13282 #endif
13283
13284 #else
13285         /* Draft 4 pthreads */
13286         status = pthread_create( &t, pthread_attr_default, task, NULL );
13287         if( status ) return status;
13288
13289         if( detach ) {
13290                 /* give thread a chance to complete */
13291                 /* it should remain joinable and hence detachable */
13292                 sleep( 1 );
13293
13294                 status = pthread_detach( &t );
13295                 if( status ) return status;
13296         }
13297 #endif
13298
13299 #ifdef HAVE_LINUX_THREADS
13300         pthread_kill_other_threads_np();
13301 #endif
13302
13303         return 0;
13304
13305 ; return 0; }
13306 EOF
13307 if { (eval echo configure:13308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13308   rm -rf conftest*
13309   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13310 else
13311   echo "configure: failed program was:" >&5
13312   cat conftest.$ac_ext >&5
13313   rm -rf conftest*
13314   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13315 fi
13316 rm -f conftest*
13317 else
13318   cat > conftest.$ac_ext <<EOF
13319 #line 13320 "configure"
13320 #include "confdefs.h"
13321 /* pthread test headers */
13322 #include <pthread.h>
13323 #ifndef NULL
13324 #define NULL (void*)0
13325 #endif
13326
13327 static void *task(p)
13328         void *p;
13329 {
13330         return (void *) (p == NULL);
13331 }
13332
13333
13334 int main(argc, argv)
13335         int argc;
13336         char **argv;
13337 {
13338
13339         /* pthread test function */
13340         pthread_t t;
13341         int status;
13342         int detach = 1;
13343
13344 #ifdef HAVE_PTHREADS_FINAL
13345         /* Final pthreads */
13346         pthread_attr_t attr;
13347
13348         status = pthread_attr_init(&attr);
13349         if( status ) return status;
13350
13351 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13352         if( !detach ) {
13353 #if defined( PTHREAD_CREATE_JOINABLE )
13354                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13355 #else
13356                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13357 #endif
13358
13359 #ifdef PTHREAD_CREATE_DETACHED
13360         } else {
13361                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13362 #endif
13363         }
13364         if( status ) return status;
13365 #endif
13366
13367         status = pthread_create( &t, &attr, task, NULL );
13368         if( status ) return status;
13369
13370 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13371         if( detach ) {
13372                 /* give thread a chance to complete */
13373                 /* it should remain joinable and hence detachable */
13374                 sleep( 1 );
13375
13376                 status = pthread_detach( t );
13377                 if( status ) return status;
13378         }
13379 #endif
13380
13381 #else
13382         /* Draft 4 pthreads */
13383         status = pthread_create( &t, pthread_attr_default, task, NULL );
13384         if( status ) return status;
13385
13386         if( detach ) {
13387                 /* give thread a chance to complete */
13388                 /* it should remain joinable and hence detachable */
13389                 sleep( 1 );
13390
13391                 status = pthread_detach( &t );
13392                 if( status ) return status;
13393         }
13394 #endif
13395
13396 #ifdef HAVE_LINUX_THREADS
13397         pthread_kill_other_threads_np();
13398 #endif
13399
13400         return 0;
13401
13402 }
13403
13404 EOF
13405 if { (eval echo configure:13406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13406 then
13407   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13408 else
13409   echo "configure: failed program was:" >&5
13410   cat conftest.$ac_ext >&5
13411   rm -fr conftest*
13412   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13413 fi
13414 rm -fr conftest*
13415 fi
13416
13417
13418                 # restore the LIBS
13419                 LIBS="$ol_LIBS"
13420         
13421 fi
13422
13423 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13424
13425         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13426                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13427                 ol_link_threads=posix
13428         fi
13429 fi
13430
13431                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13432 if test "$ol_link_threads" = no ; then
13433         # try -lpthread -lmach -lexc
13434         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13435 echo "configure:13436: checking for pthread link with -lpthread -lmach -lexc" >&5
13436 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13437   echo $ac_n "(cached) $ac_c" 1>&6
13438 else
13439   
13440                 # save the flags
13441                 ol_LIBS="$LIBS"
13442                 LIBS="-lpthread -lmach -lexc $LIBS"
13443
13444                 if test "$cross_compiling" = yes; then
13445   cat > conftest.$ac_ext <<EOF
13446 #line 13447 "configure"
13447 #include "confdefs.h"
13448 /* pthread test headers */
13449 #include <pthread.h>
13450 #ifndef NULL
13451 #define NULL (void*)0
13452 #endif
13453
13454 static void *task(p)
13455         void *p;
13456 {
13457         return (void *) (p == NULL);
13458 }
13459
13460 int main() {
13461
13462         /* pthread test function */
13463         pthread_t t;
13464         int status;
13465         int detach = 1;
13466
13467 #ifdef HAVE_PTHREADS_FINAL
13468         /* Final pthreads */
13469         pthread_attr_t attr;
13470
13471         status = pthread_attr_init(&attr);
13472         if( status ) return status;
13473
13474 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13475         if( !detach ) {
13476 #if defined( PTHREAD_CREATE_JOINABLE )
13477                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13478 #else
13479                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13480 #endif
13481
13482 #ifdef PTHREAD_CREATE_DETACHED
13483         } else {
13484                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13485 #endif
13486         }
13487         if( status ) return status;
13488 #endif
13489
13490         status = pthread_create( &t, &attr, task, NULL );
13491         if( status ) return status;
13492
13493 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13494         if( detach ) {
13495                 /* give thread a chance to complete */
13496                 /* it should remain joinable and hence detachable */
13497                 sleep( 1 );
13498
13499                 status = pthread_detach( t );
13500                 if( status ) return status;
13501         }
13502 #endif
13503
13504 #else
13505         /* Draft 4 pthreads */
13506         status = pthread_create( &t, pthread_attr_default, task, NULL );
13507         if( status ) return status;
13508
13509         if( detach ) {
13510                 /* give thread a chance to complete */
13511                 /* it should remain joinable and hence detachable */
13512                 sleep( 1 );
13513
13514                 status = pthread_detach( &t );
13515                 if( status ) return status;
13516         }
13517 #endif
13518
13519 #ifdef HAVE_LINUX_THREADS
13520         pthread_kill_other_threads_np();
13521 #endif
13522
13523         return 0;
13524
13525 ; return 0; }
13526 EOF
13527 if { (eval echo configure:13528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13528   rm -rf conftest*
13529   ol_cv_pthread_lpthread_lmach_lexc=yes
13530 else
13531   echo "configure: failed program was:" >&5
13532   cat conftest.$ac_ext >&5
13533   rm -rf conftest*
13534   ol_cv_pthread_lpthread_lmach_lexc=no
13535 fi
13536 rm -f conftest*
13537 else
13538   cat > conftest.$ac_ext <<EOF
13539 #line 13540 "configure"
13540 #include "confdefs.h"
13541 /* pthread test headers */
13542 #include <pthread.h>
13543 #ifndef NULL
13544 #define NULL (void*)0
13545 #endif
13546
13547 static void *task(p)
13548         void *p;
13549 {
13550         return (void *) (p == NULL);
13551 }
13552
13553
13554 int main(argc, argv)
13555         int argc;
13556         char **argv;
13557 {
13558
13559         /* pthread test function */
13560         pthread_t t;
13561         int status;
13562         int detach = 1;
13563
13564 #ifdef HAVE_PTHREADS_FINAL
13565         /* Final pthreads */
13566         pthread_attr_t attr;
13567
13568         status = pthread_attr_init(&attr);
13569         if( status ) return status;
13570
13571 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13572         if( !detach ) {
13573 #if defined( PTHREAD_CREATE_JOINABLE )
13574                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13575 #else
13576                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13577 #endif
13578
13579 #ifdef PTHREAD_CREATE_DETACHED
13580         } else {
13581                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13582 #endif
13583         }
13584         if( status ) return status;
13585 #endif
13586
13587         status = pthread_create( &t, &attr, task, NULL );
13588         if( status ) return status;
13589
13590 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13591         if( detach ) {
13592                 /* give thread a chance to complete */
13593                 /* it should remain joinable and hence detachable */
13594                 sleep( 1 );
13595
13596                 status = pthread_detach( t );
13597                 if( status ) return status;
13598         }
13599 #endif
13600
13601 #else
13602         /* Draft 4 pthreads */
13603         status = pthread_create( &t, pthread_attr_default, task, NULL );
13604         if( status ) return status;
13605
13606         if( detach ) {
13607                 /* give thread a chance to complete */
13608                 /* it should remain joinable and hence detachable */
13609                 sleep( 1 );
13610
13611                 status = pthread_detach( &t );
13612                 if( status ) return status;
13613         }
13614 #endif
13615
13616 #ifdef HAVE_LINUX_THREADS
13617         pthread_kill_other_threads_np();
13618 #endif
13619
13620         return 0;
13621
13622 }
13623
13624 EOF
13625 if { (eval echo configure:13626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13626 then
13627   ol_cv_pthread_lpthread_lmach_lexc=yes
13628 else
13629   echo "configure: failed program was:" >&5
13630   cat conftest.$ac_ext >&5
13631   rm -fr conftest*
13632   ol_cv_pthread_lpthread_lmach_lexc=no
13633 fi
13634 rm -fr conftest*
13635 fi
13636
13637
13638                 # restore the LIBS
13639                 LIBS="$ol_LIBS"
13640         
13641 fi
13642
13643 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13644
13645         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13646                 ol_link_pthreads="-lpthread -lmach -lexc"
13647                 ol_link_threads=posix
13648         fi
13649 fi
13650
13651
13652                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13653 if test "$ol_link_threads" = no ; then
13654         # try -lpthread -Wl,-woff,85
13655         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13656 echo "configure:13657: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13657 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13658   echo $ac_n "(cached) $ac_c" 1>&6
13659 else
13660   
13661                 # save the flags
13662                 ol_LIBS="$LIBS"
13663                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13664
13665                 if test "$cross_compiling" = yes; then
13666   cat > conftest.$ac_ext <<EOF
13667 #line 13668 "configure"
13668 #include "confdefs.h"
13669 /* pthread test headers */
13670 #include <pthread.h>
13671 #ifndef NULL
13672 #define NULL (void*)0
13673 #endif
13674
13675 static void *task(p)
13676         void *p;
13677 {
13678         return (void *) (p == NULL);
13679 }
13680
13681 int main() {
13682
13683         /* pthread test function */
13684         pthread_t t;
13685         int status;
13686         int detach = 1;
13687
13688 #ifdef HAVE_PTHREADS_FINAL
13689         /* Final pthreads */
13690         pthread_attr_t attr;
13691
13692         status = pthread_attr_init(&attr);
13693         if( status ) return status;
13694
13695 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13696         if( !detach ) {
13697 #if defined( PTHREAD_CREATE_JOINABLE )
13698                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13699 #else
13700                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13701 #endif
13702
13703 #ifdef PTHREAD_CREATE_DETACHED
13704         } else {
13705                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13706 #endif
13707         }
13708         if( status ) return status;
13709 #endif
13710
13711         status = pthread_create( &t, &attr, task, NULL );
13712         if( status ) return status;
13713
13714 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13715         if( detach ) {
13716                 /* give thread a chance to complete */
13717                 /* it should remain joinable and hence detachable */
13718                 sleep( 1 );
13719
13720                 status = pthread_detach( t );
13721                 if( status ) return status;
13722         }
13723 #endif
13724
13725 #else
13726         /* Draft 4 pthreads */
13727         status = pthread_create( &t, pthread_attr_default, task, NULL );
13728         if( status ) return status;
13729
13730         if( detach ) {
13731                 /* give thread a chance to complete */
13732                 /* it should remain joinable and hence detachable */
13733                 sleep( 1 );
13734
13735                 status = pthread_detach( &t );
13736                 if( status ) return status;
13737         }
13738 #endif
13739
13740 #ifdef HAVE_LINUX_THREADS
13741         pthread_kill_other_threads_np();
13742 #endif
13743
13744         return 0;
13745
13746 ; return 0; }
13747 EOF
13748 if { (eval echo configure:13749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13749   rm -rf conftest*
13750   ol_cv_pthread_lib_lpthread_woff=yes
13751 else
13752   echo "configure: failed program was:" >&5
13753   cat conftest.$ac_ext >&5
13754   rm -rf conftest*
13755   ol_cv_pthread_lib_lpthread_woff=no
13756 fi
13757 rm -f conftest*
13758 else
13759   cat > conftest.$ac_ext <<EOF
13760 #line 13761 "configure"
13761 #include "confdefs.h"
13762 /* pthread test headers */
13763 #include <pthread.h>
13764 #ifndef NULL
13765 #define NULL (void*)0
13766 #endif
13767
13768 static void *task(p)
13769         void *p;
13770 {
13771         return (void *) (p == NULL);
13772 }
13773
13774
13775 int main(argc, argv)
13776         int argc;
13777         char **argv;
13778 {
13779
13780         /* pthread test function */
13781         pthread_t t;
13782         int status;
13783         int detach = 1;
13784
13785 #ifdef HAVE_PTHREADS_FINAL
13786         /* Final pthreads */
13787         pthread_attr_t attr;
13788
13789         status = pthread_attr_init(&attr);
13790         if( status ) return status;
13791
13792 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13793         if( !detach ) {
13794 #if defined( PTHREAD_CREATE_JOINABLE )
13795                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13796 #else
13797                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13798 #endif
13799
13800 #ifdef PTHREAD_CREATE_DETACHED
13801         } else {
13802                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13803 #endif
13804         }
13805         if( status ) return status;
13806 #endif
13807
13808         status = pthread_create( &t, &attr, task, NULL );
13809         if( status ) return status;
13810
13811 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13812         if( detach ) {
13813                 /* give thread a chance to complete */
13814                 /* it should remain joinable and hence detachable */
13815                 sleep( 1 );
13816
13817                 status = pthread_detach( t );
13818                 if( status ) return status;
13819         }
13820 #endif
13821
13822 #else
13823         /* Draft 4 pthreads */
13824         status = pthread_create( &t, pthread_attr_default, task, NULL );
13825         if( status ) return status;
13826
13827         if( detach ) {
13828                 /* give thread a chance to complete */
13829                 /* it should remain joinable and hence detachable */
13830                 sleep( 1 );
13831
13832                 status = pthread_detach( &t );
13833                 if( status ) return status;
13834         }
13835 #endif
13836
13837 #ifdef HAVE_LINUX_THREADS
13838         pthread_kill_other_threads_np();
13839 #endif
13840
13841         return 0;
13842
13843 }
13844
13845 EOF
13846 if { (eval echo configure:13847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13847 then
13848   ol_cv_pthread_lib_lpthread_woff=yes
13849 else
13850   echo "configure: failed program was:" >&5
13851   cat conftest.$ac_ext >&5
13852   rm -fr conftest*
13853   ol_cv_pthread_lib_lpthread_woff=no
13854 fi
13855 rm -fr conftest*
13856 fi
13857
13858
13859                 # restore the LIBS
13860                 LIBS="$ol_LIBS"
13861         
13862 fi
13863
13864 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13865
13866         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13867                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13868                 ol_link_threads=posix
13869         fi
13870 fi
13871
13872
13873                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13874 if test "$ol_link_threads" = no ; then
13875         # try -lpthread
13876         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13877 echo "configure:13878: checking for pthread link with -lpthread" >&5
13878 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13879   echo $ac_n "(cached) $ac_c" 1>&6
13880 else
13881   
13882                 # save the flags
13883                 ol_LIBS="$LIBS"
13884                 LIBS="-lpthread $LIBS"
13885
13886                 if test "$cross_compiling" = yes; then
13887   cat > conftest.$ac_ext <<EOF
13888 #line 13889 "configure"
13889 #include "confdefs.h"
13890 /* pthread test headers */
13891 #include <pthread.h>
13892 #ifndef NULL
13893 #define NULL (void*)0
13894 #endif
13895
13896 static void *task(p)
13897         void *p;
13898 {
13899         return (void *) (p == NULL);
13900 }
13901
13902 int main() {
13903
13904         /* pthread test function */
13905         pthread_t t;
13906         int status;
13907         int detach = 1;
13908
13909 #ifdef HAVE_PTHREADS_FINAL
13910         /* Final pthreads */
13911         pthread_attr_t attr;
13912
13913         status = pthread_attr_init(&attr);
13914         if( status ) return status;
13915
13916 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13917         if( !detach ) {
13918 #if defined( PTHREAD_CREATE_JOINABLE )
13919                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13920 #else
13921                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13922 #endif
13923
13924 #ifdef PTHREAD_CREATE_DETACHED
13925         } else {
13926                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13927 #endif
13928         }
13929         if( status ) return status;
13930 #endif
13931
13932         status = pthread_create( &t, &attr, task, NULL );
13933         if( status ) return status;
13934
13935 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13936         if( detach ) {
13937                 /* give thread a chance to complete */
13938                 /* it should remain joinable and hence detachable */
13939                 sleep( 1 );
13940
13941                 status = pthread_detach( t );
13942                 if( status ) return status;
13943         }
13944 #endif
13945
13946 #else
13947         /* Draft 4 pthreads */
13948         status = pthread_create( &t, pthread_attr_default, task, NULL );
13949         if( status ) return status;
13950
13951         if( detach ) {
13952                 /* give thread a chance to complete */
13953                 /* it should remain joinable and hence detachable */
13954                 sleep( 1 );
13955
13956                 status = pthread_detach( &t );
13957                 if( status ) return status;
13958         }
13959 #endif
13960
13961 #ifdef HAVE_LINUX_THREADS
13962         pthread_kill_other_threads_np();
13963 #endif
13964
13965         return 0;
13966
13967 ; return 0; }
13968 EOF
13969 if { (eval echo configure:13970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13970   rm -rf conftest*
13971   ol_cv_pthread_lpthread=yes
13972 else
13973   echo "configure: failed program was:" >&5
13974   cat conftest.$ac_ext >&5
13975   rm -rf conftest*
13976   ol_cv_pthread_lpthread=no
13977 fi
13978 rm -f conftest*
13979 else
13980   cat > conftest.$ac_ext <<EOF
13981 #line 13982 "configure"
13982 #include "confdefs.h"
13983 /* pthread test headers */
13984 #include <pthread.h>
13985 #ifndef NULL
13986 #define NULL (void*)0
13987 #endif
13988
13989 static void *task(p)
13990         void *p;
13991 {
13992         return (void *) (p == NULL);
13993 }
13994
13995
13996 int main(argc, argv)
13997         int argc;
13998         char **argv;
13999 {
14000
14001         /* pthread test function */
14002         pthread_t t;
14003         int status;
14004         int detach = 1;
14005
14006 #ifdef HAVE_PTHREADS_FINAL
14007         /* Final pthreads */
14008         pthread_attr_t attr;
14009
14010         status = pthread_attr_init(&attr);
14011         if( status ) return status;
14012
14013 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14014         if( !detach ) {
14015 #if defined( PTHREAD_CREATE_JOINABLE )
14016                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14017 #else
14018                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14019 #endif
14020
14021 #ifdef PTHREAD_CREATE_DETACHED
14022         } else {
14023                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14024 #endif
14025         }
14026         if( status ) return status;
14027 #endif
14028
14029         status = pthread_create( &t, &attr, task, NULL );
14030         if( status ) return status;
14031
14032 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14033         if( detach ) {
14034                 /* give thread a chance to complete */
14035                 /* it should remain joinable and hence detachable */
14036                 sleep( 1 );
14037
14038                 status = pthread_detach( t );
14039                 if( status ) return status;
14040         }
14041 #endif
14042
14043 #else
14044         /* Draft 4 pthreads */
14045         status = pthread_create( &t, pthread_attr_default, task, NULL );
14046         if( status ) return status;
14047
14048         if( detach ) {
14049                 /* give thread a chance to complete */
14050                 /* it should remain joinable and hence detachable */
14051                 sleep( 1 );
14052
14053                 status = pthread_detach( &t );
14054                 if( status ) return status;
14055         }
14056 #endif
14057
14058 #ifdef HAVE_LINUX_THREADS
14059         pthread_kill_other_threads_np();
14060 #endif
14061
14062         return 0;
14063
14064 }
14065
14066 EOF
14067 if { (eval echo configure:14068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14068 then
14069   ol_cv_pthread_lpthread=yes
14070 else
14071   echo "configure: failed program was:" >&5
14072   cat conftest.$ac_ext >&5
14073   rm -fr conftest*
14074   ol_cv_pthread_lpthread=no
14075 fi
14076 rm -fr conftest*
14077 fi
14078
14079
14080                 # restore the LIBS
14081                 LIBS="$ol_LIBS"
14082         
14083 fi
14084
14085 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
14086
14087         if test $ol_cv_pthread_lpthread = yes ; then
14088                 ol_link_pthreads="-lpthread"
14089                 ol_link_threads=posix
14090         fi
14091 fi
14092
14093                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
14094 if test "$ol_link_threads" = no ; then
14095         # try -lc_r
14096         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
14097 echo "configure:14098: checking for pthread link with -lc_r" >&5
14098 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
14099   echo $ac_n "(cached) $ac_c" 1>&6
14100 else
14101   
14102                 # save the flags
14103                 ol_LIBS="$LIBS"
14104                 LIBS="-lc_r $LIBS"
14105
14106                 if test "$cross_compiling" = yes; then
14107   cat > conftest.$ac_ext <<EOF
14108 #line 14109 "configure"
14109 #include "confdefs.h"
14110 /* pthread test headers */
14111 #include <pthread.h>
14112 #ifndef NULL
14113 #define NULL (void*)0
14114 #endif
14115
14116 static void *task(p)
14117         void *p;
14118 {
14119         return (void *) (p == NULL);
14120 }
14121
14122 int main() {
14123
14124         /* pthread test function */
14125         pthread_t t;
14126         int status;
14127         int detach = 1;
14128
14129 #ifdef HAVE_PTHREADS_FINAL
14130         /* Final pthreads */
14131         pthread_attr_t attr;
14132
14133         status = pthread_attr_init(&attr);
14134         if( status ) return status;
14135
14136 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14137         if( !detach ) {
14138 #if defined( PTHREAD_CREATE_JOINABLE )
14139                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14140 #else
14141                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14142 #endif
14143
14144 #ifdef PTHREAD_CREATE_DETACHED
14145         } else {
14146                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14147 #endif
14148         }
14149         if( status ) return status;
14150 #endif
14151
14152         status = pthread_create( &t, &attr, task, NULL );
14153         if( status ) return status;
14154
14155 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14156         if( detach ) {
14157                 /* give thread a chance to complete */
14158                 /* it should remain joinable and hence detachable */
14159                 sleep( 1 );
14160
14161                 status = pthread_detach( t );
14162                 if( status ) return status;
14163         }
14164 #endif
14165
14166 #else
14167         /* Draft 4 pthreads */
14168         status = pthread_create( &t, pthread_attr_default, task, NULL );
14169         if( status ) return status;
14170
14171         if( detach ) {
14172                 /* give thread a chance to complete */
14173                 /* it should remain joinable and hence detachable */
14174                 sleep( 1 );
14175
14176                 status = pthread_detach( &t );
14177                 if( status ) return status;
14178         }
14179 #endif
14180
14181 #ifdef HAVE_LINUX_THREADS
14182         pthread_kill_other_threads_np();
14183 #endif
14184
14185         return 0;
14186
14187 ; return 0; }
14188 EOF
14189 if { (eval echo configure:14190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14190   rm -rf conftest*
14191   ol_cv_pthread_lc_r=yes
14192 else
14193   echo "configure: failed program was:" >&5
14194   cat conftest.$ac_ext >&5
14195   rm -rf conftest*
14196   ol_cv_pthread_lc_r=no
14197 fi
14198 rm -f conftest*
14199 else
14200   cat > conftest.$ac_ext <<EOF
14201 #line 14202 "configure"
14202 #include "confdefs.h"
14203 /* pthread test headers */
14204 #include <pthread.h>
14205 #ifndef NULL
14206 #define NULL (void*)0
14207 #endif
14208
14209 static void *task(p)
14210         void *p;
14211 {
14212         return (void *) (p == NULL);
14213 }
14214
14215
14216 int main(argc, argv)
14217         int argc;
14218         char **argv;
14219 {
14220
14221         /* pthread test function */
14222         pthread_t t;
14223         int status;
14224         int detach = 1;
14225
14226 #ifdef HAVE_PTHREADS_FINAL
14227         /* Final pthreads */
14228         pthread_attr_t attr;
14229
14230         status = pthread_attr_init(&attr);
14231         if( status ) return status;
14232
14233 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14234         if( !detach ) {
14235 #if defined( PTHREAD_CREATE_JOINABLE )
14236                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14237 #else
14238                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14239 #endif
14240
14241 #ifdef PTHREAD_CREATE_DETACHED
14242         } else {
14243                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14244 #endif
14245         }
14246         if( status ) return status;
14247 #endif
14248
14249         status = pthread_create( &t, &attr, task, NULL );
14250         if( status ) return status;
14251
14252 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14253         if( detach ) {
14254                 /* give thread a chance to complete */
14255                 /* it should remain joinable and hence detachable */
14256                 sleep( 1 );
14257
14258                 status = pthread_detach( t );
14259                 if( status ) return status;
14260         }
14261 #endif
14262
14263 #else
14264         /* Draft 4 pthreads */
14265         status = pthread_create( &t, pthread_attr_default, task, NULL );
14266         if( status ) return status;
14267
14268         if( detach ) {
14269                 /* give thread a chance to complete */
14270                 /* it should remain joinable and hence detachable */
14271                 sleep( 1 );
14272
14273                 status = pthread_detach( &t );
14274                 if( status ) return status;
14275         }
14276 #endif
14277
14278 #ifdef HAVE_LINUX_THREADS
14279         pthread_kill_other_threads_np();
14280 #endif
14281
14282         return 0;
14283
14284 }
14285
14286 EOF
14287 if { (eval echo configure:14288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14288 then
14289   ol_cv_pthread_lc_r=yes
14290 else
14291   echo "configure: failed program was:" >&5
14292   cat conftest.$ac_ext >&5
14293   rm -fr conftest*
14294   ol_cv_pthread_lc_r=no
14295 fi
14296 rm -fr conftest*
14297 fi
14298
14299
14300                 # restore the LIBS
14301                 LIBS="$ol_LIBS"
14302         
14303 fi
14304
14305 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
14306
14307         if test $ol_cv_pthread_lc_r = yes ; then
14308                 ol_link_pthreads="-lc_r"
14309                 ol_link_threads=posix
14310         fi
14311 fi
14312
14313
14314                 # Pthread try link: -threads (ol_cv_pthread_threads)
14315 if test "$ol_link_threads" = no ; then
14316         # try -threads
14317         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
14318 echo "configure:14319: checking for pthread link with -threads" >&5
14319 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
14320   echo $ac_n "(cached) $ac_c" 1>&6
14321 else
14322   
14323                 # save the flags
14324                 ol_LIBS="$LIBS"
14325                 LIBS="-threads $LIBS"
14326
14327                 if test "$cross_compiling" = yes; then
14328   cat > conftest.$ac_ext <<EOF
14329 #line 14330 "configure"
14330 #include "confdefs.h"
14331 /* pthread test headers */
14332 #include <pthread.h>
14333 #ifndef NULL
14334 #define NULL (void*)0
14335 #endif
14336
14337 static void *task(p)
14338         void *p;
14339 {
14340         return (void *) (p == NULL);
14341 }
14342
14343 int main() {
14344
14345         /* pthread test function */
14346         pthread_t t;
14347         int status;
14348         int detach = 1;
14349
14350 #ifdef HAVE_PTHREADS_FINAL
14351         /* Final pthreads */
14352         pthread_attr_t attr;
14353
14354         status = pthread_attr_init(&attr);
14355         if( status ) return status;
14356
14357 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14358         if( !detach ) {
14359 #if defined( PTHREAD_CREATE_JOINABLE )
14360                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14361 #else
14362                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14363 #endif
14364
14365 #ifdef PTHREAD_CREATE_DETACHED
14366         } else {
14367                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14368 #endif
14369         }
14370         if( status ) return status;
14371 #endif
14372
14373         status = pthread_create( &t, &attr, task, NULL );
14374         if( status ) return status;
14375
14376 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14377         if( detach ) {
14378                 /* give thread a chance to complete */
14379                 /* it should remain joinable and hence detachable */
14380                 sleep( 1 );
14381
14382                 status = pthread_detach( t );
14383                 if( status ) return status;
14384         }
14385 #endif
14386
14387 #else
14388         /* Draft 4 pthreads */
14389         status = pthread_create( &t, pthread_attr_default, task, NULL );
14390         if( status ) return status;
14391
14392         if( detach ) {
14393                 /* give thread a chance to complete */
14394                 /* it should remain joinable and hence detachable */
14395                 sleep( 1 );
14396
14397                 status = pthread_detach( &t );
14398                 if( status ) return status;
14399         }
14400 #endif
14401
14402 #ifdef HAVE_LINUX_THREADS
14403         pthread_kill_other_threads_np();
14404 #endif
14405
14406         return 0;
14407
14408 ; return 0; }
14409 EOF
14410 if { (eval echo configure:14411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14411   rm -rf conftest*
14412   ol_cv_pthread_threads=yes
14413 else
14414   echo "configure: failed program was:" >&5
14415   cat conftest.$ac_ext >&5
14416   rm -rf conftest*
14417   ol_cv_pthread_threads=no
14418 fi
14419 rm -f conftest*
14420 else
14421   cat > conftest.$ac_ext <<EOF
14422 #line 14423 "configure"
14423 #include "confdefs.h"
14424 /* pthread test headers */
14425 #include <pthread.h>
14426 #ifndef NULL
14427 #define NULL (void*)0
14428 #endif
14429
14430 static void *task(p)
14431         void *p;
14432 {
14433         return (void *) (p == NULL);
14434 }
14435
14436
14437 int main(argc, argv)
14438         int argc;
14439         char **argv;
14440 {
14441
14442         /* pthread test function */
14443         pthread_t t;
14444         int status;
14445         int detach = 1;
14446
14447 #ifdef HAVE_PTHREADS_FINAL
14448         /* Final pthreads */
14449         pthread_attr_t attr;
14450
14451         status = pthread_attr_init(&attr);
14452         if( status ) return status;
14453
14454 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14455         if( !detach ) {
14456 #if defined( PTHREAD_CREATE_JOINABLE )
14457                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14458 #else
14459                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14460 #endif
14461
14462 #ifdef PTHREAD_CREATE_DETACHED
14463         } else {
14464                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14465 #endif
14466         }
14467         if( status ) return status;
14468 #endif
14469
14470         status = pthread_create( &t, &attr, task, NULL );
14471         if( status ) return status;
14472
14473 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14474         if( detach ) {
14475                 /* give thread a chance to complete */
14476                 /* it should remain joinable and hence detachable */
14477                 sleep( 1 );
14478
14479                 status = pthread_detach( t );
14480                 if( status ) return status;
14481         }
14482 #endif
14483
14484 #else
14485         /* Draft 4 pthreads */
14486         status = pthread_create( &t, pthread_attr_default, task, NULL );
14487         if( status ) return status;
14488
14489         if( detach ) {
14490                 /* give thread a chance to complete */
14491                 /* it should remain joinable and hence detachable */
14492                 sleep( 1 );
14493
14494                 status = pthread_detach( &t );
14495                 if( status ) return status;
14496         }
14497 #endif
14498
14499 #ifdef HAVE_LINUX_THREADS
14500         pthread_kill_other_threads_np();
14501 #endif
14502
14503         return 0;
14504
14505 }
14506
14507 EOF
14508 if { (eval echo configure:14509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14509 then
14510   ol_cv_pthread_threads=yes
14511 else
14512   echo "configure: failed program was:" >&5
14513   cat conftest.$ac_ext >&5
14514   rm -fr conftest*
14515   ol_cv_pthread_threads=no
14516 fi
14517 rm -fr conftest*
14518 fi
14519
14520
14521                 # restore the LIBS
14522                 LIBS="$ol_LIBS"
14523         
14524 fi
14525
14526 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14527
14528         if test $ol_cv_pthread_threads = yes ; then
14529                 ol_link_pthreads="-threads"
14530                 ol_link_threads=posix
14531         fi
14532 fi
14533
14534
14535                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14536 if test "$ol_link_threads" = no ; then
14537         # try -lpthreads -lmach -lexc -lc_r
14538         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14539 echo "configure:14540: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14540 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14541   echo $ac_n "(cached) $ac_c" 1>&6
14542 else
14543   
14544                 # save the flags
14545                 ol_LIBS="$LIBS"
14546                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14547
14548                 if test "$cross_compiling" = yes; then
14549   cat > conftest.$ac_ext <<EOF
14550 #line 14551 "configure"
14551 #include "confdefs.h"
14552 /* pthread test headers */
14553 #include <pthread.h>
14554 #ifndef NULL
14555 #define NULL (void*)0
14556 #endif
14557
14558 static void *task(p)
14559         void *p;
14560 {
14561         return (void *) (p == NULL);
14562 }
14563
14564 int main() {
14565
14566         /* pthread test function */
14567         pthread_t t;
14568         int status;
14569         int detach = 1;
14570
14571 #ifdef HAVE_PTHREADS_FINAL
14572         /* Final pthreads */
14573         pthread_attr_t attr;
14574
14575         status = pthread_attr_init(&attr);
14576         if( status ) return status;
14577
14578 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14579         if( !detach ) {
14580 #if defined( PTHREAD_CREATE_JOINABLE )
14581                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14582 #else
14583                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14584 #endif
14585
14586 #ifdef PTHREAD_CREATE_DETACHED
14587         } else {
14588                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14589 #endif
14590         }
14591         if( status ) return status;
14592 #endif
14593
14594         status = pthread_create( &t, &attr, task, NULL );
14595         if( status ) return status;
14596
14597 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14598         if( detach ) {
14599                 /* give thread a chance to complete */
14600                 /* it should remain joinable and hence detachable */
14601                 sleep( 1 );
14602
14603                 status = pthread_detach( t );
14604                 if( status ) return status;
14605         }
14606 #endif
14607
14608 #else
14609         /* Draft 4 pthreads */
14610         status = pthread_create( &t, pthread_attr_default, task, NULL );
14611         if( status ) return status;
14612
14613         if( detach ) {
14614                 /* give thread a chance to complete */
14615                 /* it should remain joinable and hence detachable */
14616                 sleep( 1 );
14617
14618                 status = pthread_detach( &t );
14619                 if( status ) return status;
14620         }
14621 #endif
14622
14623 #ifdef HAVE_LINUX_THREADS
14624         pthread_kill_other_threads_np();
14625 #endif
14626
14627         return 0;
14628
14629 ; return 0; }
14630 EOF
14631 if { (eval echo configure:14632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14632   rm -rf conftest*
14633   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14634 else
14635   echo "configure: failed program was:" >&5
14636   cat conftest.$ac_ext >&5
14637   rm -rf conftest*
14638   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14639 fi
14640 rm -f conftest*
14641 else
14642   cat > conftest.$ac_ext <<EOF
14643 #line 14644 "configure"
14644 #include "confdefs.h"
14645 /* pthread test headers */
14646 #include <pthread.h>
14647 #ifndef NULL
14648 #define NULL (void*)0
14649 #endif
14650
14651 static void *task(p)
14652         void *p;
14653 {
14654         return (void *) (p == NULL);
14655 }
14656
14657
14658 int main(argc, argv)
14659         int argc;
14660         char **argv;
14661 {
14662
14663         /* pthread test function */
14664         pthread_t t;
14665         int status;
14666         int detach = 1;
14667
14668 #ifdef HAVE_PTHREADS_FINAL
14669         /* Final pthreads */
14670         pthread_attr_t attr;
14671
14672         status = pthread_attr_init(&attr);
14673         if( status ) return status;
14674
14675 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14676         if( !detach ) {
14677 #if defined( PTHREAD_CREATE_JOINABLE )
14678                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14679 #else
14680                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14681 #endif
14682
14683 #ifdef PTHREAD_CREATE_DETACHED
14684         } else {
14685                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14686 #endif
14687         }
14688         if( status ) return status;
14689 #endif
14690
14691         status = pthread_create( &t, &attr, task, NULL );
14692         if( status ) return status;
14693
14694 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14695         if( detach ) {
14696                 /* give thread a chance to complete */
14697                 /* it should remain joinable and hence detachable */
14698                 sleep( 1 );
14699
14700                 status = pthread_detach( t );
14701                 if( status ) return status;
14702         }
14703 #endif
14704
14705 #else
14706         /* Draft 4 pthreads */
14707         status = pthread_create( &t, pthread_attr_default, task, NULL );
14708         if( status ) return status;
14709
14710         if( detach ) {
14711                 /* give thread a chance to complete */
14712                 /* it should remain joinable and hence detachable */
14713                 sleep( 1 );
14714
14715                 status = pthread_detach( &t );
14716                 if( status ) return status;
14717         }
14718 #endif
14719
14720 #ifdef HAVE_LINUX_THREADS
14721         pthread_kill_other_threads_np();
14722 #endif
14723
14724         return 0;
14725
14726 }
14727
14728 EOF
14729 if { (eval echo configure:14730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14730 then
14731   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14732 else
14733   echo "configure: failed program was:" >&5
14734   cat conftest.$ac_ext >&5
14735   rm -fr conftest*
14736   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14737 fi
14738 rm -fr conftest*
14739 fi
14740
14741
14742                 # restore the LIBS
14743                 LIBS="$ol_LIBS"
14744         
14745 fi
14746
14747 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14748
14749         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14750                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14751                 ol_link_threads=posix
14752         fi
14753 fi
14754
14755                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14756 if test "$ol_link_threads" = no ; then
14757         # try -lpthreads -lmach -lexc
14758         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14759 echo "configure:14760: checking for pthread link with -lpthreads -lmach -lexc" >&5
14760 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14761   echo $ac_n "(cached) $ac_c" 1>&6
14762 else
14763   
14764                 # save the flags
14765                 ol_LIBS="$LIBS"
14766                 LIBS="-lpthreads -lmach -lexc $LIBS"
14767
14768                 if test "$cross_compiling" = yes; then
14769   cat > conftest.$ac_ext <<EOF
14770 #line 14771 "configure"
14771 #include "confdefs.h"
14772 /* pthread test headers */
14773 #include <pthread.h>
14774 #ifndef NULL
14775 #define NULL (void*)0
14776 #endif
14777
14778 static void *task(p)
14779         void *p;
14780 {
14781         return (void *) (p == NULL);
14782 }
14783
14784 int main() {
14785
14786         /* pthread test function */
14787         pthread_t t;
14788         int status;
14789         int detach = 1;
14790
14791 #ifdef HAVE_PTHREADS_FINAL
14792         /* Final pthreads */
14793         pthread_attr_t attr;
14794
14795         status = pthread_attr_init(&attr);
14796         if( status ) return status;
14797
14798 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14799         if( !detach ) {
14800 #if defined( PTHREAD_CREATE_JOINABLE )
14801                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14802 #else
14803                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14804 #endif
14805
14806 #ifdef PTHREAD_CREATE_DETACHED
14807         } else {
14808                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14809 #endif
14810         }
14811         if( status ) return status;
14812 #endif
14813
14814         status = pthread_create( &t, &attr, task, NULL );
14815         if( status ) return status;
14816
14817 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14818         if( detach ) {
14819                 /* give thread a chance to complete */
14820                 /* it should remain joinable and hence detachable */
14821                 sleep( 1 );
14822
14823                 status = pthread_detach( t );
14824                 if( status ) return status;
14825         }
14826 #endif
14827
14828 #else
14829         /* Draft 4 pthreads */
14830         status = pthread_create( &t, pthread_attr_default, task, NULL );
14831         if( status ) return status;
14832
14833         if( detach ) {
14834                 /* give thread a chance to complete */
14835                 /* it should remain joinable and hence detachable */
14836                 sleep( 1 );
14837
14838                 status = pthread_detach( &t );
14839                 if( status ) return status;
14840         }
14841 #endif
14842
14843 #ifdef HAVE_LINUX_THREADS
14844         pthread_kill_other_threads_np();
14845 #endif
14846
14847         return 0;
14848
14849 ; return 0; }
14850 EOF
14851 if { (eval echo configure:14852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14852   rm -rf conftest*
14853   ol_cv_pthread_lpthreads_lmach_lexc=yes
14854 else
14855   echo "configure: failed program was:" >&5
14856   cat conftest.$ac_ext >&5
14857   rm -rf conftest*
14858   ol_cv_pthread_lpthreads_lmach_lexc=no
14859 fi
14860 rm -f conftest*
14861 else
14862   cat > conftest.$ac_ext <<EOF
14863 #line 14864 "configure"
14864 #include "confdefs.h"
14865 /* pthread test headers */
14866 #include <pthread.h>
14867 #ifndef NULL
14868 #define NULL (void*)0
14869 #endif
14870
14871 static void *task(p)
14872         void *p;
14873 {
14874         return (void *) (p == NULL);
14875 }
14876
14877
14878 int main(argc, argv)
14879         int argc;
14880         char **argv;
14881 {
14882
14883         /* pthread test function */
14884         pthread_t t;
14885         int status;
14886         int detach = 1;
14887
14888 #ifdef HAVE_PTHREADS_FINAL
14889         /* Final pthreads */
14890         pthread_attr_t attr;
14891
14892         status = pthread_attr_init(&attr);
14893         if( status ) return status;
14894
14895 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14896         if( !detach ) {
14897 #if defined( PTHREAD_CREATE_JOINABLE )
14898                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14899 #else
14900                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14901 #endif
14902
14903 #ifdef PTHREAD_CREATE_DETACHED
14904         } else {
14905                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14906 #endif
14907         }
14908         if( status ) return status;
14909 #endif
14910
14911         status = pthread_create( &t, &attr, task, NULL );
14912         if( status ) return status;
14913
14914 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14915         if( detach ) {
14916                 /* give thread a chance to complete */
14917                 /* it should remain joinable and hence detachable */
14918                 sleep( 1 );
14919
14920                 status = pthread_detach( t );
14921                 if( status ) return status;
14922         }
14923 #endif
14924
14925 #else
14926         /* Draft 4 pthreads */
14927         status = pthread_create( &t, pthread_attr_default, task, NULL );
14928         if( status ) return status;
14929
14930         if( detach ) {
14931                 /* give thread a chance to complete */
14932                 /* it should remain joinable and hence detachable */
14933                 sleep( 1 );
14934
14935                 status = pthread_detach( &t );
14936                 if( status ) return status;
14937         }
14938 #endif
14939
14940 #ifdef HAVE_LINUX_THREADS
14941         pthread_kill_other_threads_np();
14942 #endif
14943
14944         return 0;
14945
14946 }
14947
14948 EOF
14949 if { (eval echo configure:14950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14950 then
14951   ol_cv_pthread_lpthreads_lmach_lexc=yes
14952 else
14953   echo "configure: failed program was:" >&5
14954   cat conftest.$ac_ext >&5
14955   rm -fr conftest*
14956   ol_cv_pthread_lpthreads_lmach_lexc=no
14957 fi
14958 rm -fr conftest*
14959 fi
14960
14961
14962                 # restore the LIBS
14963                 LIBS="$ol_LIBS"
14964         
14965 fi
14966
14967 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14968
14969         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14970                 ol_link_pthreads="-lpthreads -lmach -lexc"
14971                 ol_link_threads=posix
14972         fi
14973 fi
14974
14975                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14976 if test "$ol_link_threads" = no ; then
14977         # try -lpthreads -lexc
14978         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14979 echo "configure:14980: checking for pthread link with -lpthreads -lexc" >&5
14980 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14981   echo $ac_n "(cached) $ac_c" 1>&6
14982 else
14983   
14984                 # save the flags
14985                 ol_LIBS="$LIBS"
14986                 LIBS="-lpthreads -lexc $LIBS"
14987
14988                 if test "$cross_compiling" = yes; then
14989   cat > conftest.$ac_ext <<EOF
14990 #line 14991 "configure"
14991 #include "confdefs.h"
14992 /* pthread test headers */
14993 #include <pthread.h>
14994 #ifndef NULL
14995 #define NULL (void*)0
14996 #endif
14997
14998 static void *task(p)
14999         void *p;
15000 {
15001         return (void *) (p == NULL);
15002 }
15003
15004 int main() {
15005
15006         /* pthread test function */
15007         pthread_t t;
15008         int status;
15009         int detach = 1;
15010
15011 #ifdef HAVE_PTHREADS_FINAL
15012         /* Final pthreads */
15013         pthread_attr_t attr;
15014
15015         status = pthread_attr_init(&attr);
15016         if( status ) return status;
15017
15018 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15019         if( !detach ) {
15020 #if defined( PTHREAD_CREATE_JOINABLE )
15021                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15022 #else
15023                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15024 #endif
15025
15026 #ifdef PTHREAD_CREATE_DETACHED
15027         } else {
15028                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15029 #endif
15030         }
15031         if( status ) return status;
15032 #endif
15033
15034         status = pthread_create( &t, &attr, task, NULL );
15035         if( status ) return status;
15036
15037 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15038         if( detach ) {
15039                 /* give thread a chance to complete */
15040                 /* it should remain joinable and hence detachable */
15041                 sleep( 1 );
15042
15043                 status = pthread_detach( t );
15044                 if( status ) return status;
15045         }
15046 #endif
15047
15048 #else
15049         /* Draft 4 pthreads */
15050         status = pthread_create( &t, pthread_attr_default, task, NULL );
15051         if( status ) return status;
15052
15053         if( detach ) {
15054                 /* give thread a chance to complete */
15055                 /* it should remain joinable and hence detachable */
15056                 sleep( 1 );
15057
15058                 status = pthread_detach( &t );
15059                 if( status ) return status;
15060         }
15061 #endif
15062
15063 #ifdef HAVE_LINUX_THREADS
15064         pthread_kill_other_threads_np();
15065 #endif
15066
15067         return 0;
15068
15069 ; return 0; }
15070 EOF
15071 if { (eval echo configure:15072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15072   rm -rf conftest*
15073   ol_cv_pthread_lpthreads_lexc=yes
15074 else
15075   echo "configure: failed program was:" >&5
15076   cat conftest.$ac_ext >&5
15077   rm -rf conftest*
15078   ol_cv_pthread_lpthreads_lexc=no
15079 fi
15080 rm -f conftest*
15081 else
15082   cat > conftest.$ac_ext <<EOF
15083 #line 15084 "configure"
15084 #include "confdefs.h"
15085 /* pthread test headers */
15086 #include <pthread.h>
15087 #ifndef NULL
15088 #define NULL (void*)0
15089 #endif
15090
15091 static void *task(p)
15092         void *p;
15093 {
15094         return (void *) (p == NULL);
15095 }
15096
15097
15098 int main(argc, argv)
15099         int argc;
15100         char **argv;
15101 {
15102
15103         /* pthread test function */
15104         pthread_t t;
15105         int status;
15106         int detach = 1;
15107
15108 #ifdef HAVE_PTHREADS_FINAL
15109         /* Final pthreads */
15110         pthread_attr_t attr;
15111
15112         status = pthread_attr_init(&attr);
15113         if( status ) return status;
15114
15115 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15116         if( !detach ) {
15117 #if defined( PTHREAD_CREATE_JOINABLE )
15118                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15119 #else
15120                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15121 #endif
15122
15123 #ifdef PTHREAD_CREATE_DETACHED
15124         } else {
15125                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15126 #endif
15127         }
15128         if( status ) return status;
15129 #endif
15130
15131         status = pthread_create( &t, &attr, task, NULL );
15132         if( status ) return status;
15133
15134 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15135         if( detach ) {
15136                 /* give thread a chance to complete */
15137                 /* it should remain joinable and hence detachable */
15138                 sleep( 1 );
15139
15140                 status = pthread_detach( t );
15141                 if( status ) return status;
15142         }
15143 #endif
15144
15145 #else
15146         /* Draft 4 pthreads */
15147         status = pthread_create( &t, pthread_attr_default, task, NULL );
15148         if( status ) return status;
15149
15150         if( detach ) {
15151                 /* give thread a chance to complete */
15152                 /* it should remain joinable and hence detachable */
15153                 sleep( 1 );
15154
15155                 status = pthread_detach( &t );
15156                 if( status ) return status;
15157         }
15158 #endif
15159
15160 #ifdef HAVE_LINUX_THREADS
15161         pthread_kill_other_threads_np();
15162 #endif
15163
15164         return 0;
15165
15166 }
15167
15168 EOF
15169 if { (eval echo configure:15170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15170 then
15171   ol_cv_pthread_lpthreads_lexc=yes
15172 else
15173   echo "configure: failed program was:" >&5
15174   cat conftest.$ac_ext >&5
15175   rm -fr conftest*
15176   ol_cv_pthread_lpthreads_lexc=no
15177 fi
15178 rm -fr conftest*
15179 fi
15180
15181
15182                 # restore the LIBS
15183                 LIBS="$ol_LIBS"
15184         
15185 fi
15186
15187 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
15188
15189         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
15190                 ol_link_pthreads="-lpthreads -lexc"
15191                 ol_link_threads=posix
15192         fi
15193 fi
15194
15195
15196                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
15197 if test "$ol_link_threads" = no ; then
15198         # try -lpthreads
15199         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
15200 echo "configure:15201: checking for pthread link with -lpthreads" >&5
15201 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
15202   echo $ac_n "(cached) $ac_c" 1>&6
15203 else
15204   
15205                 # save the flags
15206                 ol_LIBS="$LIBS"
15207                 LIBS="-lpthreads $LIBS"
15208
15209                 if test "$cross_compiling" = yes; then
15210   cat > conftest.$ac_ext <<EOF
15211 #line 15212 "configure"
15212 #include "confdefs.h"
15213 /* pthread test headers */
15214 #include <pthread.h>
15215 #ifndef NULL
15216 #define NULL (void*)0
15217 #endif
15218
15219 static void *task(p)
15220         void *p;
15221 {
15222         return (void *) (p == NULL);
15223 }
15224
15225 int main() {
15226
15227         /* pthread test function */
15228         pthread_t t;
15229         int status;
15230         int detach = 1;
15231
15232 #ifdef HAVE_PTHREADS_FINAL
15233         /* Final pthreads */
15234         pthread_attr_t attr;
15235
15236         status = pthread_attr_init(&attr);
15237         if( status ) return status;
15238
15239 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15240         if( !detach ) {
15241 #if defined( PTHREAD_CREATE_JOINABLE )
15242                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15243 #else
15244                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15245 #endif
15246
15247 #ifdef PTHREAD_CREATE_DETACHED
15248         } else {
15249                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15250 #endif
15251         }
15252         if( status ) return status;
15253 #endif
15254
15255         status = pthread_create( &t, &attr, task, NULL );
15256         if( status ) return status;
15257
15258 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15259         if( detach ) {
15260                 /* give thread a chance to complete */
15261                 /* it should remain joinable and hence detachable */
15262                 sleep( 1 );
15263
15264                 status = pthread_detach( t );
15265                 if( status ) return status;
15266         }
15267 #endif
15268
15269 #else
15270         /* Draft 4 pthreads */
15271         status = pthread_create( &t, pthread_attr_default, task, NULL );
15272         if( status ) return status;
15273
15274         if( detach ) {
15275                 /* give thread a chance to complete */
15276                 /* it should remain joinable and hence detachable */
15277                 sleep( 1 );
15278
15279                 status = pthread_detach( &t );
15280                 if( status ) return status;
15281         }
15282 #endif
15283
15284 #ifdef HAVE_LINUX_THREADS
15285         pthread_kill_other_threads_np();
15286 #endif
15287
15288         return 0;
15289
15290 ; return 0; }
15291 EOF
15292 if { (eval echo configure:15293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15293   rm -rf conftest*
15294   ol_cv_pthread_lib_lpthreads=yes
15295 else
15296   echo "configure: failed program was:" >&5
15297   cat conftest.$ac_ext >&5
15298   rm -rf conftest*
15299   ol_cv_pthread_lib_lpthreads=no
15300 fi
15301 rm -f conftest*
15302 else
15303   cat > conftest.$ac_ext <<EOF
15304 #line 15305 "configure"
15305 #include "confdefs.h"
15306 /* pthread test headers */
15307 #include <pthread.h>
15308 #ifndef NULL
15309 #define NULL (void*)0
15310 #endif
15311
15312 static void *task(p)
15313         void *p;
15314 {
15315         return (void *) (p == NULL);
15316 }
15317
15318
15319 int main(argc, argv)
15320         int argc;
15321         char **argv;
15322 {
15323
15324         /* pthread test function */
15325         pthread_t t;
15326         int status;
15327         int detach = 1;
15328
15329 #ifdef HAVE_PTHREADS_FINAL
15330         /* Final pthreads */
15331         pthread_attr_t attr;
15332
15333         status = pthread_attr_init(&attr);
15334         if( status ) return status;
15335
15336 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15337         if( !detach ) {
15338 #if defined( PTHREAD_CREATE_JOINABLE )
15339                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15340 #else
15341                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15342 #endif
15343
15344 #ifdef PTHREAD_CREATE_DETACHED
15345         } else {
15346                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15347 #endif
15348         }
15349         if( status ) return status;
15350 #endif
15351
15352         status = pthread_create( &t, &attr, task, NULL );
15353         if( status ) return status;
15354
15355 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15356         if( detach ) {
15357                 /* give thread a chance to complete */
15358                 /* it should remain joinable and hence detachable */
15359                 sleep( 1 );
15360
15361                 status = pthread_detach( t );
15362                 if( status ) return status;
15363         }
15364 #endif
15365
15366 #else
15367         /* Draft 4 pthreads */
15368         status = pthread_create( &t, pthread_attr_default, task, NULL );
15369         if( status ) return status;
15370
15371         if( detach ) {
15372                 /* give thread a chance to complete */
15373                 /* it should remain joinable and hence detachable */
15374                 sleep( 1 );
15375
15376                 status = pthread_detach( &t );
15377                 if( status ) return status;
15378         }
15379 #endif
15380
15381 #ifdef HAVE_LINUX_THREADS
15382         pthread_kill_other_threads_np();
15383 #endif
15384
15385         return 0;
15386
15387 }
15388
15389 EOF
15390 if { (eval echo configure:15391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15391 then
15392   ol_cv_pthread_lib_lpthreads=yes
15393 else
15394   echo "configure: failed program was:" >&5
15395   cat conftest.$ac_ext >&5
15396   rm -fr conftest*
15397   ol_cv_pthread_lib_lpthreads=no
15398 fi
15399 rm -fr conftest*
15400 fi
15401
15402
15403                 # restore the LIBS
15404                 LIBS="$ol_LIBS"
15405         
15406 fi
15407
15408 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
15409
15410         if test $ol_cv_pthread_lib_lpthreads = yes ; then
15411                 ol_link_pthreads="-lpthreads"
15412                 ol_link_threads=posix
15413         fi
15414 fi
15415
15416
15417                 if test $ol_link_threads != no ; then
15418                         cat >> confdefs.h <<\EOF
15419 #define HAVE_PTHREADS 1
15420 EOF
15421
15422
15423                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
15424
15425                                                 save_CPPFLAGS="$CPPFLAGS"
15426                         save_LIBS="$LIBS"
15427                         LIBS="$LTHREAD_LIBS $LIBS"
15428
15429                                                                                                 for ac_func in sched_yield pthread_yield
15430 do
15431 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15432 echo "configure:15433: checking for $ac_func" >&5
15433 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15434   echo $ac_n "(cached) $ac_c" 1>&6
15435 else
15436   cat > conftest.$ac_ext <<EOF
15437 #line 15438 "configure"
15438 #include "confdefs.h"
15439 /* System header to define __stub macros and hopefully few prototypes,
15440     which can conflict with char $ac_func(); below.  */
15441 #include <assert.h>
15442 /* Override any gcc2 internal prototype to avoid an error.  */
15443 /* We use char because int might match the return type of a gcc2
15444     builtin and then its argument prototype would still apply.  */
15445 char $ac_func();
15446 char (*f)();
15447
15448 int main() {
15449
15450 /* The GNU C library defines this for functions which it implements
15451     to always fail with ENOSYS.  Some functions are actually named
15452     something starting with __ and the normal name is an alias.  */
15453 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15454 choke me
15455 #else
15456 f = $ac_func;
15457 #endif
15458
15459 ; return 0; }
15460 EOF
15461 if { (eval echo configure:15462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15462   rm -rf conftest*
15463   eval "ac_cv_func_$ac_func=yes"
15464 else
15465   echo "configure: failed program was:" >&5
15466   cat conftest.$ac_ext >&5
15467   rm -rf conftest*
15468   eval "ac_cv_func_$ac_func=no"
15469 fi
15470 rm -f conftest*
15471 fi
15472
15473 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15474   echo "$ac_t""yes" 1>&6
15475     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15476   cat >> confdefs.h <<EOF
15477 #define $ac_tr_func 1
15478 EOF
15479  
15480 else
15481   echo "$ac_t""no" 1>&6
15482 fi
15483 done
15484
15485
15486                         if test $ac_cv_func_sched_yield = no -a \
15487                                 $ac_cv_func_pthread_yield = no ; then
15488                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
15489 echo "configure:15490: checking for sched_yield in -lrt" >&5
15490 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
15491 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15492   echo $ac_n "(cached) $ac_c" 1>&6
15493 else
15494   ac_save_LIBS="$LIBS"
15495 LIBS="-lrt  $LIBS"
15496 cat > conftest.$ac_ext <<EOF
15497 #line 15498 "configure"
15498 #include "confdefs.h"
15499 /* Override any gcc2 internal prototype to avoid an error.  */
15500 /* We use char because int might match the return type of a gcc2
15501     builtin and then its argument prototype would still apply.  */
15502 char sched_yield();
15503
15504 int main() {
15505 sched_yield()
15506 ; return 0; }
15507 EOF
15508 if { (eval echo configure:15509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15509   rm -rf conftest*
15510   eval "ac_cv_lib_$ac_lib_var=yes"
15511 else
15512   echo "configure: failed program was:" >&5
15513   cat conftest.$ac_ext >&5
15514   rm -rf conftest*
15515   eval "ac_cv_lib_$ac_lib_var=no"
15516 fi
15517 rm -f conftest*
15518 LIBS="$ac_save_LIBS"
15519
15520 fi
15521 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15522   echo "$ac_t""yes" 1>&6
15523   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
15524                                         cat >> confdefs.h <<\EOF
15525 #define HAVE_SCHED_YIELD 1
15526 EOF
15527
15528                                         ac_cv_func_sched_yield=yes
15529 else
15530   echo "$ac_t""no" 1>&6
15531 ac_cv_func_sched_yield=no
15532 fi
15533
15534                         fi
15535                         if test $ac_cv_func_sched_yield = no -a \
15536                                 $ac_cv_func_pthread_yield = no ; then
15537                                                                                                 for ac_func in thr_yield
15538 do
15539 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15540 echo "configure:15541: checking for $ac_func" >&5
15541 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15542   echo $ac_n "(cached) $ac_c" 1>&6
15543 else
15544   cat > conftest.$ac_ext <<EOF
15545 #line 15546 "configure"
15546 #include "confdefs.h"
15547 /* System header to define __stub macros and hopefully few prototypes,
15548     which can conflict with char $ac_func(); below.  */
15549 #include <assert.h>
15550 /* Override any gcc2 internal prototype to avoid an error.  */
15551 /* We use char because int might match the return type of a gcc2
15552     builtin and then its argument prototype would still apply.  */
15553 char $ac_func();
15554 char (*f)();
15555
15556 int main() {
15557
15558 /* The GNU C library defines this for functions which it implements
15559     to always fail with ENOSYS.  Some functions are actually named
15560     something starting with __ and the normal name is an alias.  */
15561 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15562 choke me
15563 #else
15564 f = $ac_func;
15565 #endif
15566
15567 ; return 0; }
15568 EOF
15569 if { (eval echo configure:15570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15570   rm -rf conftest*
15571   eval "ac_cv_func_$ac_func=yes"
15572 else
15573   echo "configure: failed program was:" >&5
15574   cat conftest.$ac_ext >&5
15575   rm -rf conftest*
15576   eval "ac_cv_func_$ac_func=no"
15577 fi
15578 rm -f conftest*
15579 fi
15580
15581 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15582   echo "$ac_t""yes" 1>&6
15583     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15584   cat >> confdefs.h <<EOF
15585 #define $ac_tr_func 1
15586 EOF
15587  
15588 else
15589   echo "$ac_t""no" 1>&6
15590 fi
15591 done
15592
15593                         fi
15594                         if test $ac_cv_func_sched_yield = no -a \
15595                                 $ac_cv_func_pthread_yield = no -a \
15596                                 "$ac_cv_func_thr_yield" = no ; then
15597                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
15598                         fi
15599
15600                                                 for ac_func in pthread_kill pthread_rwlock_destroy
15601 do
15602 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15603 echo "configure:15604: checking for $ac_func" >&5
15604 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15605   echo $ac_n "(cached) $ac_c" 1>&6
15606 else
15607   cat > conftest.$ac_ext <<EOF
15608 #line 15609 "configure"
15609 #include "confdefs.h"
15610 /* System header to define __stub macros and hopefully few prototypes,
15611     which can conflict with char $ac_func(); below.  */
15612 #include <assert.h>
15613 /* Override any gcc2 internal prototype to avoid an error.  */
15614 /* We use char because int might match the return type of a gcc2
15615     builtin and then its argument prototype would still apply.  */
15616 char $ac_func();
15617 char (*f)();
15618
15619 int main() {
15620
15621 /* The GNU C library defines this for functions which it implements
15622     to always fail with ENOSYS.  Some functions are actually named
15623     something starting with __ and the normal name is an alias.  */
15624 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15625 choke me
15626 #else
15627 f = $ac_func;
15628 #endif
15629
15630 ; return 0; }
15631 EOF
15632 if { (eval echo configure:15633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15633   rm -rf conftest*
15634   eval "ac_cv_func_$ac_func=yes"
15635 else
15636   echo "configure: failed program was:" >&5
15637   cat conftest.$ac_ext >&5
15638   rm -rf conftest*
15639   eval "ac_cv_func_$ac_func=no"
15640 fi
15641 rm -f conftest*
15642 fi
15643
15644 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15645   echo "$ac_t""yes" 1>&6
15646     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15647   cat >> confdefs.h <<EOF
15648 #define $ac_tr_func 1
15649 EOF
15650  
15651 else
15652   echo "$ac_t""no" 1>&6
15653 fi
15654 done
15655
15656
15657                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
15658 echo "configure:15659: checking for pthread_detach with <pthread.h>" >&5
15659 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
15660   echo $ac_n "(cached) $ac_c" 1>&6
15661 else
15662   
15663                                                                 cat > conftest.$ac_ext <<EOF
15664 #line 15665 "configure"
15665 #include "confdefs.h"
15666
15667 #include <pthread.h>
15668 #ifndef NULL
15669 #define NULL (void*)0
15670 #endif
15671
15672 int main() {
15673 pthread_detach(NULL);
15674 ; return 0; }
15675 EOF
15676 if { (eval echo configure:15677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15677   rm -rf conftest*
15678   ol_cv_func_pthread_detach=yes
15679 else
15680   echo "configure: failed program was:" >&5
15681   cat conftest.$ac_ext >&5
15682   rm -rf conftest*
15683   ol_cv_func_pthread_detach=no
15684 fi
15685 rm -f conftest*
15686                         
15687 fi
15688
15689 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15690
15691                         if test $ol_cv_func_pthread_detach = no ; then
15692                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15693                         fi
15694
15695                         cat >> confdefs.h <<\EOF
15696 #define HAVE_PTHREAD_DETACH 1
15697 EOF
15698
15699
15700                                                 for ac_func in \
15701                                 pthread_setconcurrency \
15702                                 pthread_getconcurrency \
15703                                 thr_setconcurrency \
15704                                 thr_getconcurrency \
15705                         
15706 do
15707 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15708 echo "configure:15709: checking for $ac_func" >&5
15709 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15710   echo $ac_n "(cached) $ac_c" 1>&6
15711 else
15712   cat > conftest.$ac_ext <<EOF
15713 #line 15714 "configure"
15714 #include "confdefs.h"
15715 /* System header to define __stub macros and hopefully few prototypes,
15716     which can conflict with char $ac_func(); below.  */
15717 #include <assert.h>
15718 /* Override any gcc2 internal prototype to avoid an error.  */
15719 /* We use char because int might match the return type of a gcc2
15720     builtin and then its argument prototype would still apply.  */
15721 char $ac_func();
15722 char (*f)();
15723
15724 int main() {
15725
15726 /* The GNU C library defines this for functions which it implements
15727     to always fail with ENOSYS.  Some functions are actually named
15728     something starting with __ and the normal name is an alias.  */
15729 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15730 choke me
15731 #else
15732 f = $ac_func;
15733 #endif
15734
15735 ; return 0; }
15736 EOF
15737 if { (eval echo configure:15738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15738   rm -rf conftest*
15739   eval "ac_cv_func_$ac_func=yes"
15740 else
15741   echo "configure: failed program was:" >&5
15742   cat conftest.$ac_ext >&5
15743   rm -rf conftest*
15744   eval "ac_cv_func_$ac_func=no"
15745 fi
15746 rm -f conftest*
15747 fi
15748
15749 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15750   echo "$ac_t""yes" 1>&6
15751     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15752   cat >> confdefs.h <<EOF
15753 #define $ac_tr_func 1
15754 EOF
15755  
15756 else
15757   echo "$ac_t""no" 1>&6
15758 fi
15759 done
15760
15761
15762                         
15763         for ac_func in pthread_kill_other_threads_np
15764 do
15765 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15766 echo "configure:15767: checking for $ac_func" >&5
15767 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15768   echo $ac_n "(cached) $ac_c" 1>&6
15769 else
15770   cat > conftest.$ac_ext <<EOF
15771 #line 15772 "configure"
15772 #include "confdefs.h"
15773 /* System header to define __stub macros and hopefully few prototypes,
15774     which can conflict with char $ac_func(); below.  */
15775 #include <assert.h>
15776 /* Override any gcc2 internal prototype to avoid an error.  */
15777 /* We use char because int might match the return type of a gcc2
15778     builtin and then its argument prototype would still apply.  */
15779 char $ac_func();
15780 char (*f)();
15781
15782 int main() {
15783
15784 /* The GNU C library defines this for functions which it implements
15785     to always fail with ENOSYS.  Some functions are actually named
15786     something starting with __ and the normal name is an alias.  */
15787 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15788 choke me
15789 #else
15790 f = $ac_func;
15791 #endif
15792
15793 ; return 0; }
15794 EOF
15795 if { (eval echo configure:15796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15796   rm -rf conftest*
15797   eval "ac_cv_func_$ac_func=yes"
15798 else
15799   echo "configure: failed program was:" >&5
15800   cat conftest.$ac_ext >&5
15801   rm -rf conftest*
15802   eval "ac_cv_func_$ac_func=no"
15803 fi
15804 rm -f conftest*
15805 fi
15806
15807 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15808   echo "$ac_t""yes" 1>&6
15809     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15810   cat >> confdefs.h <<EOF
15811 #define $ac_tr_func 1
15812 EOF
15813  
15814 else
15815   echo "$ac_t""no" 1>&6
15816 fi
15817 done
15818
15819         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15820 echo "configure:15821: checking for LinuxThreads implementation" >&5
15821 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15822   echo $ac_n "(cached) $ac_c" 1>&6
15823 else
15824   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15825 fi
15826
15827 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15828
15829                         
15830         
15831         
15832         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15833 echo "configure:15834: checking for LinuxThreads consistency" >&5
15834 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15835   echo $ac_n "(cached) $ac_c" 1>&6
15836 else
15837   
15838                 if test $ol_cv_header_linux_threads = yes -a \
15839                         $ol_cv_sys_linux_threads = yes; then
15840                         ol_cv_linux_threads=yes
15841                 elif test $ol_cv_header_linux_threads = no -a \
15842                         $ol_cv_sys_linux_threads = no; then
15843                         ol_cv_linux_threads=no
15844                 else
15845                         ol_cv_linux_threads=error
15846                 fi
15847         
15848 fi
15849
15850 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15851
15852
15853                         if test $ol_cv_linux_threads = error; then
15854                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15855                         fi
15856
15857                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15858 echo "configure:15859: checking if pthread_create() works" >&5
15859 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15860   echo $ac_n "(cached) $ac_c" 1>&6
15861 else
15862   
15863                         if test "$cross_compiling" = yes; then
15864                                 ol_cv_pthread_create_works=yes
15865 else
15866   cat > conftest.$ac_ext <<EOF
15867 #line 15868 "configure"
15868 #include "confdefs.h"
15869 /* pthread test headers */
15870 #include <pthread.h>
15871 #ifndef NULL
15872 #define NULL (void*)0
15873 #endif
15874
15875 static void *task(p)
15876         void *p;
15877 {
15878         return (void *) (p == NULL);
15879 }
15880
15881
15882 int main(argc, argv)
15883         int argc;
15884         char **argv;
15885 {
15886
15887         /* pthread test function */
15888         pthread_t t;
15889         int status;
15890         int detach = 1;
15891
15892 #ifdef HAVE_PTHREADS_FINAL
15893         /* Final pthreads */
15894         pthread_attr_t attr;
15895
15896         status = pthread_attr_init(&attr);
15897         if( status ) return status;
15898
15899 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15900         if( !detach ) {
15901 #if defined( PTHREAD_CREATE_JOINABLE )
15902                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15903 #else
15904                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15905 #endif
15906
15907 #ifdef PTHREAD_CREATE_DETACHED
15908         } else {
15909                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15910 #endif
15911         }
15912         if( status ) return status;
15913 #endif
15914
15915         status = pthread_create( &t, &attr, task, NULL );
15916         if( status ) return status;
15917
15918 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15919         if( detach ) {
15920                 /* give thread a chance to complete */
15921                 /* it should remain joinable and hence detachable */
15922                 sleep( 1 );
15923
15924                 status = pthread_detach( t );
15925                 if( status ) return status;
15926         }
15927 #endif
15928
15929 #else
15930         /* Draft 4 pthreads */
15931         status = pthread_create( &t, pthread_attr_default, task, NULL );
15932         if( status ) return status;
15933
15934         if( detach ) {
15935                 /* give thread a chance to complete */
15936                 /* it should remain joinable and hence detachable */
15937                 sleep( 1 );
15938
15939                 status = pthread_detach( &t );
15940                 if( status ) return status;
15941         }
15942 #endif
15943
15944 #ifdef HAVE_LINUX_THREADS
15945         pthread_kill_other_threads_np();
15946 #endif
15947
15948         return 0;
15949
15950 }
15951
15952 EOF
15953 if { (eval echo configure:15954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15954 then
15955   ol_cv_pthread_create_works=yes
15956 else
15957   echo "configure: failed program was:" >&5
15958   cat conftest.$ac_ext >&5
15959   rm -fr conftest*
15960   ol_cv_pthread_create_works=no
15961 fi
15962 rm -fr conftest*
15963 fi
15964
15965 fi
15966
15967 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15968
15969                         if test $ol_cv_pthread_create_works = no ; then
15970                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15971                         fi
15972
15973                                                 if test $ol_with_yielding_select = auto ; then
15974                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15975 echo "configure:15976: checking if select yields when using pthreads" >&5
15976 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15977   echo $ac_n "(cached) $ac_c" 1>&6
15978 else
15979   
15980                                 if test "$cross_compiling" = yes; then
15981   ol_cv_pthread_select_yields=cross
15982 else
15983   cat > conftest.$ac_ext <<EOF
15984 #line 15985 "configure"
15985 #include "confdefs.h"
15986
15987 #include <sys/types.h>
15988 #include <sys/time.h>
15989 #include <unistd.h>
15990 #include <pthread.h>
15991 #ifndef NULL
15992 #define NULL (void*) 0
15993 #endif
15994
15995 static int fildes[2];
15996
15997 static void *task(p)
15998         void *p;
15999 {
16000         int i;
16001         struct timeval tv;
16002
16003         fd_set rfds;
16004
16005         tv.tv_sec=10;
16006         tv.tv_usec=0;
16007
16008         FD_ZERO(&rfds);
16009         FD_SET(fildes[0], &rfds);
16010
16011         /* we're not interested in any fds */
16012         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
16013
16014         if(i < 0) {
16015                 perror("select");
16016                 exit(10);
16017         }
16018
16019         exit(0); /* if we exit here, the select blocked the whole process */
16020 }
16021
16022 int main(argc, argv)
16023         int argc;
16024         char **argv;
16025 {
16026         pthread_t t;
16027
16028         /* create a pipe to select */
16029         if(pipe(&fildes[0])) {
16030                 perror("select");
16031                 exit(1);
16032         }
16033
16034 #ifdef HAVE_PTHREAD_SETCONCURRENCY
16035         (void) pthread_setconcurrency(2);
16036 #else
16037 #ifdef HAVE_THR_SETCONCURRENCY
16038         /* Set Solaris LWP concurrency to 2 */
16039         thr_setconcurrency(2);
16040 #endif
16041 #endif
16042
16043 #if HAVE_PTHREADS_D4
16044         pthread_create(&t, pthread_attr_default, task, NULL);
16045 #else
16046         pthread_create(&t, NULL, task, NULL);
16047 #endif
16048
16049 #if HAVE_SCHED_YIELD
16050         sched_yield();  /* make sure task runs first */
16051 #else
16052 #ifdef HAVE_PTHREAD_YIELD
16053         pthread_yield();        /* make sure task runs first */
16054 #endif
16055 #endif
16056
16057         exit(2);
16058 }
16059 EOF
16060 if { (eval echo configure:16061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16061 then
16062   ol_cv_pthread_select_yields=no
16063 else
16064   echo "configure: failed program was:" >&5
16065   cat conftest.$ac_ext >&5
16066   rm -fr conftest*
16067   ol_cv_pthread_select_yields=yes
16068 fi
16069 rm -fr conftest*
16070 fi
16071
16072 fi
16073
16074 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
16075
16076                                 if test $ol_cv_pthread_select_yields = cross ; then
16077                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
16078                                 fi
16079
16080                                 if test $ol_cv_pthread_select_yields = yes ; then
16081                                         ol_with_yielding_select=yes
16082                                 fi
16083                         fi
16084
16085                                                 CPPFLAGS="$save_CPPFLAGS"
16086                         LIBS="$save_LIBS"
16087                 else
16088                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
16089                 fi
16090         fi
16091
16092         if test $ol_with_threads = posix ; then
16093                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
16094         fi
16095 fi
16096
16097 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16098         -o $ol_with_threads = mach ; then
16099
16100                 for ac_hdr in mach/cthreads.h cthreads.h
16101 do
16102 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16103 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16104 echo "configure:16105: checking for $ac_hdr" >&5
16105 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16106   echo $ac_n "(cached) $ac_c" 1>&6
16107 else
16108   cat > conftest.$ac_ext <<EOF
16109 #line 16110 "configure"
16110 #include "confdefs.h"
16111 #include <$ac_hdr>
16112 EOF
16113 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16114 { (eval echo configure:16115: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16115 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16116 if test -z "$ac_err"; then
16117   rm -rf conftest*
16118   eval "ac_cv_header_$ac_safe=yes"
16119 else
16120   echo "$ac_err" >&5
16121   echo "configure: failed program was:" >&5
16122   cat conftest.$ac_ext >&5
16123   rm -rf conftest*
16124   eval "ac_cv_header_$ac_safe=no"
16125 fi
16126 rm -f conftest*
16127 fi
16128 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16129   echo "$ac_t""yes" 1>&6
16130     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16131   cat >> confdefs.h <<EOF
16132 #define $ac_tr_hdr 1
16133 EOF
16134  
16135 else
16136   echo "$ac_t""no" 1>&6
16137 fi
16138 done
16139
16140         if test $ac_cv_header_mach_cthreads_h = yes ; then
16141                 ol_with_threads=found
16142
16143                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
16144 echo "configure:16145: checking for cthread_fork" >&5
16145 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
16146   echo $ac_n "(cached) $ac_c" 1>&6
16147 else
16148   cat > conftest.$ac_ext <<EOF
16149 #line 16150 "configure"
16150 #include "confdefs.h"
16151 /* System header to define __stub macros and hopefully few prototypes,
16152     which can conflict with char cthread_fork(); below.  */
16153 #include <assert.h>
16154 /* Override any gcc2 internal prototype to avoid an error.  */
16155 /* We use char because int might match the return type of a gcc2
16156     builtin and then its argument prototype would still apply.  */
16157 char cthread_fork();
16158 char (*f)();
16159
16160 int main() {
16161
16162 /* The GNU C library defines this for functions which it implements
16163     to always fail with ENOSYS.  Some functions are actually named
16164     something starting with __ and the normal name is an alias.  */
16165 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
16166 choke me
16167 #else
16168 f = cthread_fork;
16169 #endif
16170
16171 ; return 0; }
16172 EOF
16173 if { (eval echo configure:16174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16174   rm -rf conftest*
16175   eval "ac_cv_func_cthread_fork=yes"
16176 else
16177   echo "configure: failed program was:" >&5
16178   cat conftest.$ac_ext >&5
16179   rm -rf conftest*
16180   eval "ac_cv_func_cthread_fork=no"
16181 fi
16182 rm -f conftest*
16183 fi
16184
16185 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
16186   echo "$ac_t""yes" 1>&6
16187   ol_link_threads=yes
16188 else
16189   echo "$ac_t""no" 1>&6
16190 fi
16191
16192
16193                 if test $ol_link_threads = no ; then
16194                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
16195 echo "configure:16196: checking for cthread_fork with -all_load" >&5
16196 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
16197   echo $ac_n "(cached) $ac_c" 1>&6
16198 else
16199   
16200                                                                 save_LIBS="$LIBS"
16201                                 LIBS="-all_load $LIBS"
16202                                 cat > conftest.$ac_ext <<EOF
16203 #line 16204 "configure"
16204 #include "confdefs.h"
16205 #include <mach/cthreads.h>
16206 int main() {
16207
16208                                         cthread_fork((void *)0, (void *)0);
16209                                         
16210 ; return 0; }
16211 EOF
16212 if { (eval echo configure:16213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16213   rm -rf conftest*
16214   ol_cv_cthread_all_load=yes
16215 else
16216   echo "configure: failed program was:" >&5
16217   cat conftest.$ac_ext >&5
16218   rm -rf conftest*
16219   ol_cv_cthread_all_load=no
16220 fi
16221 rm -f conftest*
16222                                                                 LIBS="$save_LIBS"
16223                         
16224 fi
16225
16226 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
16227
16228                         if test $ol_cv_cthread_all_load = yes ; then
16229                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
16230                                 ol_link_threads=mach
16231                                 ol_with_threads=found
16232                         fi
16233                 fi
16234
16235         elif test $ac_cv_header_cthreads_h = yes ; then
16236                                 
16237                 ol_with_threads=found
16238  
16239                                 save_LIBS="$LIBS"
16240                 LIBS="$LIBS -lthreads"
16241                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
16242 echo "configure:16243: checking for cthread_fork" >&5
16243 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
16244   echo $ac_n "(cached) $ac_c" 1>&6
16245 else
16246   cat > conftest.$ac_ext <<EOF
16247 #line 16248 "configure"
16248 #include "confdefs.h"
16249 /* System header to define __stub macros and hopefully few prototypes,
16250     which can conflict with char cthread_fork(); below.  */
16251 #include <assert.h>
16252 /* Override any gcc2 internal prototype to avoid an error.  */
16253 /* We use char because int might match the return type of a gcc2
16254     builtin and then its argument prototype would still apply.  */
16255 char cthread_fork();
16256 char (*f)();
16257
16258 int main() {
16259
16260 /* The GNU C library defines this for functions which it implements
16261     to always fail with ENOSYS.  Some functions are actually named
16262     something starting with __ and the normal name is an alias.  */
16263 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
16264 choke me
16265 #else
16266 f = cthread_fork;
16267 #endif
16268
16269 ; return 0; }
16270 EOF
16271 if { (eval echo configure:16272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16272   rm -rf conftest*
16273   eval "ac_cv_func_cthread_fork=yes"
16274 else
16275   echo "configure: failed program was:" >&5
16276   cat conftest.$ac_ext >&5
16277   rm -rf conftest*
16278   eval "ac_cv_func_cthread_fork=no"
16279 fi
16280 rm -f conftest*
16281 fi
16282
16283 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
16284   echo "$ac_t""yes" 1>&6
16285   ol_link_threads=yes
16286 else
16287   echo "$ac_t""no" 1>&6
16288 fi
16289
16290                 LIBS="$save_LIBS"
16291
16292                 if test $ol_link_threads = yes ; then
16293                         LTHREAD_LIBS="-lthreads"
16294                         ol_link_threads=mach
16295                         ol_with_threads=found
16296                 else
16297                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
16298                 fi
16299
16300         elif test $ol_with_threads = mach ; then
16301                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
16302         fi
16303
16304         if test $ol_link_threads = mach ; then
16305                 cat >> confdefs.h <<\EOF
16306 #define HAVE_MACH_CTHREADS 1
16307 EOF
16308
16309         elif test $ol_with_threads = found ; then
16310                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
16311         fi
16312 fi
16313
16314 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16315         -o $ol_with_threads = pth ; then
16316
16317         for ac_hdr in pth.h
16318 do
16319 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16320 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16321 echo "configure:16322: checking for $ac_hdr" >&5
16322 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16323   echo $ac_n "(cached) $ac_c" 1>&6
16324 else
16325   cat > conftest.$ac_ext <<EOF
16326 #line 16327 "configure"
16327 #include "confdefs.h"
16328 #include <$ac_hdr>
16329 EOF
16330 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16331 { (eval echo configure:16332: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16332 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16333 if test -z "$ac_err"; then
16334   rm -rf conftest*
16335   eval "ac_cv_header_$ac_safe=yes"
16336 else
16337   echo "$ac_err" >&5
16338   echo "configure: failed program was:" >&5
16339   cat conftest.$ac_ext >&5
16340   rm -rf conftest*
16341   eval "ac_cv_header_$ac_safe=no"
16342 fi
16343 rm -f conftest*
16344 fi
16345 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16346   echo "$ac_t""yes" 1>&6
16347     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16348   cat >> confdefs.h <<EOF
16349 #define $ac_tr_hdr 1
16350 EOF
16351  
16352 else
16353   echo "$ac_t""no" 1>&6
16354 fi
16355 done
16356
16357
16358         if test $ac_cv_header_pth_h = yes ; then
16359                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
16360 echo "configure:16361: checking for pth_version in -lpth" >&5
16361 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
16362 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16363   echo $ac_n "(cached) $ac_c" 1>&6
16364 else
16365   ac_save_LIBS="$LIBS"
16366 LIBS="-lpth  $LIBS"
16367 cat > conftest.$ac_ext <<EOF
16368 #line 16369 "configure"
16369 #include "confdefs.h"
16370 /* Override any gcc2 internal prototype to avoid an error.  */
16371 /* We use char because int might match the return type of a gcc2
16372     builtin and then its argument prototype would still apply.  */
16373 char pth_version();
16374
16375 int main() {
16376 pth_version()
16377 ; return 0; }
16378 EOF
16379 if { (eval echo configure:16380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16380   rm -rf conftest*
16381   eval "ac_cv_lib_$ac_lib_var=yes"
16382 else
16383   echo "configure: failed program was:" >&5
16384   cat conftest.$ac_ext >&5
16385   rm -rf conftest*
16386   eval "ac_cv_lib_$ac_lib_var=no"
16387 fi
16388 rm -f conftest*
16389 LIBS="$ac_save_LIBS"
16390
16391 fi
16392 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16393   echo "$ac_t""yes" 1>&6
16394   have_pth=yes
16395 else
16396   echo "$ac_t""no" 1>&6
16397 have_pth=no
16398 fi
16399
16400
16401                 if test $have_pth = yes ; then
16402                         cat >> confdefs.h <<\EOF
16403 #define HAVE_GNU_PTH 1
16404 EOF
16405
16406                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
16407                         ol_link_threads=pth
16408                         ol_with_threads=found
16409
16410                         if test $ol_with_yielding_select = auto ; then
16411                                 ol_with_yielding_select=yes
16412                         fi
16413                 fi
16414         fi
16415 fi
16416
16417 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16418         -o $ol_with_threads = lwp ; then
16419
16420                 for ac_hdr in thread.h synch.h
16421 do
16422 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16423 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16424 echo "configure:16425: checking for $ac_hdr" >&5
16425 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16426   echo $ac_n "(cached) $ac_c" 1>&6
16427 else
16428   cat > conftest.$ac_ext <<EOF
16429 #line 16430 "configure"
16430 #include "confdefs.h"
16431 #include <$ac_hdr>
16432 EOF
16433 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16434 { (eval echo configure:16435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16435 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16436 if test -z "$ac_err"; then
16437   rm -rf conftest*
16438   eval "ac_cv_header_$ac_safe=yes"
16439 else
16440   echo "$ac_err" >&5
16441   echo "configure: failed program was:" >&5
16442   cat conftest.$ac_ext >&5
16443   rm -rf conftest*
16444   eval "ac_cv_header_$ac_safe=no"
16445 fi
16446 rm -f conftest*
16447 fi
16448 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16449   echo "$ac_t""yes" 1>&6
16450     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16451   cat >> confdefs.h <<EOF
16452 #define $ac_tr_hdr 1
16453 EOF
16454  
16455 else
16456   echo "$ac_t""no" 1>&6
16457 fi
16458 done
16459
16460         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
16461                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
16462 echo "configure:16463: checking for thr_create in -lthread" >&5
16463 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
16464 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16465   echo $ac_n "(cached) $ac_c" 1>&6
16466 else
16467   ac_save_LIBS="$LIBS"
16468 LIBS="-lthread  $LIBS"
16469 cat > conftest.$ac_ext <<EOF
16470 #line 16471 "configure"
16471 #include "confdefs.h"
16472 /* Override any gcc2 internal prototype to avoid an error.  */
16473 /* We use char because int might match the return type of a gcc2
16474     builtin and then its argument prototype would still apply.  */
16475 char thr_create();
16476
16477 int main() {
16478 thr_create()
16479 ; return 0; }
16480 EOF
16481 if { (eval echo configure:16482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16482   rm -rf conftest*
16483   eval "ac_cv_lib_$ac_lib_var=yes"
16484 else
16485   echo "configure: failed program was:" >&5
16486   cat conftest.$ac_ext >&5
16487   rm -rf conftest*
16488   eval "ac_cv_lib_$ac_lib_var=no"
16489 fi
16490 rm -f conftest*
16491 LIBS="$ac_save_LIBS"
16492
16493 fi
16494 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16495   echo "$ac_t""yes" 1>&6
16496   have_thr=yes
16497 else
16498   echo "$ac_t""no" 1>&6
16499 have_thr=no
16500 fi
16501
16502
16503                 if test $have_thr = yes ; then
16504                         cat >> confdefs.h <<\EOF
16505 #define HAVE_THR 1
16506 EOF
16507
16508                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
16509                         ol_link_threads=thr
16510
16511                         if test $ol_with_yielding_select = auto ; then
16512                                 ol_with_yielding_select=yes
16513                         fi
16514
16515                                                 for ac_func in \
16516                                 thr_setconcurrency \
16517                                 thr_getconcurrency \
16518                         
16519 do
16520 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16521 echo "configure:16522: checking for $ac_func" >&5
16522 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16523   echo $ac_n "(cached) $ac_c" 1>&6
16524 else
16525   cat > conftest.$ac_ext <<EOF
16526 #line 16527 "configure"
16527 #include "confdefs.h"
16528 /* System header to define __stub macros and hopefully few prototypes,
16529     which can conflict with char $ac_func(); below.  */
16530 #include <assert.h>
16531 /* Override any gcc2 internal prototype to avoid an error.  */
16532 /* We use char because int might match the return type of a gcc2
16533     builtin and then its argument prototype would still apply.  */
16534 char $ac_func();
16535 char (*f)();
16536
16537 int main() {
16538
16539 /* The GNU C library defines this for functions which it implements
16540     to always fail with ENOSYS.  Some functions are actually named
16541     something starting with __ and the normal name is an alias.  */
16542 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16543 choke me
16544 #else
16545 f = $ac_func;
16546 #endif
16547
16548 ; return 0; }
16549 EOF
16550 if { (eval echo configure:16551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16551   rm -rf conftest*
16552   eval "ac_cv_func_$ac_func=yes"
16553 else
16554   echo "configure: failed program was:" >&5
16555   cat conftest.$ac_ext >&5
16556   rm -rf conftest*
16557   eval "ac_cv_func_$ac_func=no"
16558 fi
16559 rm -f conftest*
16560 fi
16561
16562 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16563   echo "$ac_t""yes" 1>&6
16564     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16565   cat >> confdefs.h <<EOF
16566 #define $ac_tr_func 1
16567 EOF
16568  
16569 else
16570   echo "$ac_t""no" 1>&6
16571 fi
16572 done
16573
16574                 fi
16575         fi
16576
16577                 for ac_hdr in lwp/lwp.h
16578 do
16579 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16580 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16581 echo "configure:16582: checking for $ac_hdr" >&5
16582 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16583   echo $ac_n "(cached) $ac_c" 1>&6
16584 else
16585   cat > conftest.$ac_ext <<EOF
16586 #line 16587 "configure"
16587 #include "confdefs.h"
16588 #include <$ac_hdr>
16589 EOF
16590 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16591 { (eval echo configure:16592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16592 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16593 if test -z "$ac_err"; then
16594   rm -rf conftest*
16595   eval "ac_cv_header_$ac_safe=yes"
16596 else
16597   echo "$ac_err" >&5
16598   echo "configure: failed program was:" >&5
16599   cat conftest.$ac_ext >&5
16600   rm -rf conftest*
16601   eval "ac_cv_header_$ac_safe=no"
16602 fi
16603 rm -f conftest*
16604 fi
16605 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16606   echo "$ac_t""yes" 1>&6
16607     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16608   cat >> confdefs.h <<EOF
16609 #define $ac_tr_hdr 1
16610 EOF
16611  
16612 else
16613   echo "$ac_t""no" 1>&6
16614 fi
16615 done
16616
16617         if test $ac_cv_header_lwp_lwp_h = yes ; then
16618                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
16619 echo "configure:16620: checking for lwp_create in -llwp" >&5
16620 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
16621 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16622   echo $ac_n "(cached) $ac_c" 1>&6
16623 else
16624   ac_save_LIBS="$LIBS"
16625 LIBS="-llwp  $LIBS"
16626 cat > conftest.$ac_ext <<EOF
16627 #line 16628 "configure"
16628 #include "confdefs.h"
16629 /* Override any gcc2 internal prototype to avoid an error.  */
16630 /* We use char because int might match the return type of a gcc2
16631     builtin and then its argument prototype would still apply.  */
16632 char lwp_create();
16633
16634 int main() {
16635 lwp_create()
16636 ; return 0; }
16637 EOF
16638 if { (eval echo configure:16639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16639   rm -rf conftest*
16640   eval "ac_cv_lib_$ac_lib_var=yes"
16641 else
16642   echo "configure: failed program was:" >&5
16643   cat conftest.$ac_ext >&5
16644   rm -rf conftest*
16645   eval "ac_cv_lib_$ac_lib_var=no"
16646 fi
16647 rm -f conftest*
16648 LIBS="$ac_save_LIBS"
16649
16650 fi
16651 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16652   echo "$ac_t""yes" 1>&6
16653   have_lwp=yes
16654 else
16655   echo "$ac_t""no" 1>&6
16656 have_lwp=no
16657 fi
16658
16659
16660                 if test $have_lwp = yes ; then
16661                         cat >> confdefs.h <<\EOF
16662 #define HAVE_LWP 1
16663 EOF
16664
16665                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
16666                         ol_link_threads=lwp
16667
16668                         if test $ol_with_yielding_select = auto ; then
16669                                 ol_with_yielding_select=no
16670                         fi
16671                 fi
16672         fi
16673 fi
16674
16675 if test $ol_with_yielding_select = yes ; then
16676         cat >> confdefs.h <<\EOF
16677 #define HAVE_YIELDING_SELECT 1
16678 EOF
16679
16680 fi
16681
16682 if test $ol_with_threads = manual ; then
16683                 ol_link_threads=yes
16684
16685         echo "configure: warning: thread defines and link options must be set manually" 1>&2
16686
16687         for ac_hdr in pthread.h sched.h
16688 do
16689 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16690 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16691 echo "configure:16692: checking for $ac_hdr" >&5
16692 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16693   echo $ac_n "(cached) $ac_c" 1>&6
16694 else
16695   cat > conftest.$ac_ext <<EOF
16696 #line 16697 "configure"
16697 #include "confdefs.h"
16698 #include <$ac_hdr>
16699 EOF
16700 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16701 { (eval echo configure:16702: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16702 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16703 if test -z "$ac_err"; then
16704   rm -rf conftest*
16705   eval "ac_cv_header_$ac_safe=yes"
16706 else
16707   echo "$ac_err" >&5
16708   echo "configure: failed program was:" >&5
16709   cat conftest.$ac_ext >&5
16710   rm -rf conftest*
16711   eval "ac_cv_header_$ac_safe=no"
16712 fi
16713 rm -f conftest*
16714 fi
16715 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16716   echo "$ac_t""yes" 1>&6
16717     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16718   cat >> confdefs.h <<EOF
16719 #define $ac_tr_hdr 1
16720 EOF
16721  
16722 else
16723   echo "$ac_t""no" 1>&6
16724 fi
16725 done
16726
16727         for ac_func in sched_yield pthread_yield
16728 do
16729 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16730 echo "configure:16731: checking for $ac_func" >&5
16731 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16732   echo $ac_n "(cached) $ac_c" 1>&6
16733 else
16734   cat > conftest.$ac_ext <<EOF
16735 #line 16736 "configure"
16736 #include "confdefs.h"
16737 /* System header to define __stub macros and hopefully few prototypes,
16738     which can conflict with char $ac_func(); below.  */
16739 #include <assert.h>
16740 /* Override any gcc2 internal prototype to avoid an error.  */
16741 /* We use char because int might match the return type of a gcc2
16742     builtin and then its argument prototype would still apply.  */
16743 char $ac_func();
16744 char (*f)();
16745
16746 int main() {
16747
16748 /* The GNU C library defines this for functions which it implements
16749     to always fail with ENOSYS.  Some functions are actually named
16750     something starting with __ and the normal name is an alias.  */
16751 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16752 choke me
16753 #else
16754 f = $ac_func;
16755 #endif
16756
16757 ; return 0; }
16758 EOF
16759 if { (eval echo configure:16760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16760   rm -rf conftest*
16761   eval "ac_cv_func_$ac_func=yes"
16762 else
16763   echo "configure: failed program was:" >&5
16764   cat conftest.$ac_ext >&5
16765   rm -rf conftest*
16766   eval "ac_cv_func_$ac_func=no"
16767 fi
16768 rm -f conftest*
16769 fi
16770
16771 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16772   echo "$ac_t""yes" 1>&6
16773     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16774   cat >> confdefs.h <<EOF
16775 #define $ac_tr_func 1
16776 EOF
16777  
16778 else
16779   echo "$ac_t""no" 1>&6
16780 fi
16781 done
16782
16783         
16784         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16785 echo "configure:16786: checking for LinuxThreads pthread.h" >&5
16786 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16787   echo $ac_n "(cached) $ac_c" 1>&6
16788 else
16789   cat > conftest.$ac_ext <<EOF
16790 #line 16791 "configure"
16791 #include "confdefs.h"
16792 #include <pthread.h>
16793 EOF
16794 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16795   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16796   rm -rf conftest*
16797   ol_cv_header_linux_threads=yes
16798 else
16799   rm -rf conftest*
16800   ol_cv_header_linux_threads=no
16801 fi
16802 rm -f conftest*
16803
16804                 
16805 fi
16806
16807 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16808         if test $ol_cv_header_linux_threads = yes; then
16809                 cat >> confdefs.h <<\EOF
16810 #define HAVE_LINUX_THREADS 1
16811 EOF
16812
16813         fi
16814
16815
16816         for ac_hdr in mach/cthreads.h
16817 do
16818 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16819 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16820 echo "configure:16821: checking for $ac_hdr" >&5
16821 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16822   echo $ac_n "(cached) $ac_c" 1>&6
16823 else
16824   cat > conftest.$ac_ext <<EOF
16825 #line 16826 "configure"
16826 #include "confdefs.h"
16827 #include <$ac_hdr>
16828 EOF
16829 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16830 { (eval echo configure:16831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16831 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16832 if test -z "$ac_err"; then
16833   rm -rf conftest*
16834   eval "ac_cv_header_$ac_safe=yes"
16835 else
16836   echo "$ac_err" >&5
16837   echo "configure: failed program was:" >&5
16838   cat conftest.$ac_ext >&5
16839   rm -rf conftest*
16840   eval "ac_cv_header_$ac_safe=no"
16841 fi
16842 rm -f conftest*
16843 fi
16844 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16845   echo "$ac_t""yes" 1>&6
16846     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16847   cat >> confdefs.h <<EOF
16848 #define $ac_tr_hdr 1
16849 EOF
16850  
16851 else
16852   echo "$ac_t""no" 1>&6
16853 fi
16854 done
16855
16856         for ac_hdr in lwp/lwp.h
16857 do
16858 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16859 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16860 echo "configure:16861: checking for $ac_hdr" >&5
16861 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16862   echo $ac_n "(cached) $ac_c" 1>&6
16863 else
16864   cat > conftest.$ac_ext <<EOF
16865 #line 16866 "configure"
16866 #include "confdefs.h"
16867 #include <$ac_hdr>
16868 EOF
16869 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16870 { (eval echo configure:16871: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16871 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16872 if test -z "$ac_err"; then
16873   rm -rf conftest*
16874   eval "ac_cv_header_$ac_safe=yes"
16875 else
16876   echo "$ac_err" >&5
16877   echo "configure: failed program was:" >&5
16878   cat conftest.$ac_ext >&5
16879   rm -rf conftest*
16880   eval "ac_cv_header_$ac_safe=no"
16881 fi
16882 rm -f conftest*
16883 fi
16884 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16885   echo "$ac_t""yes" 1>&6
16886     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16887   cat >> confdefs.h <<EOF
16888 #define $ac_tr_hdr 1
16889 EOF
16890  
16891 else
16892   echo "$ac_t""no" 1>&6
16893 fi
16894 done
16895
16896         for ac_hdr in thread.h synch.h
16897 do
16898 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16899 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16900 echo "configure:16901: checking for $ac_hdr" >&5
16901 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16902   echo $ac_n "(cached) $ac_c" 1>&6
16903 else
16904   cat > conftest.$ac_ext <<EOF
16905 #line 16906 "configure"
16906 #include "confdefs.h"
16907 #include <$ac_hdr>
16908 EOF
16909 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16910 { (eval echo configure:16911: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16911 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16912 if test -z "$ac_err"; then
16913   rm -rf conftest*
16914   eval "ac_cv_header_$ac_safe=yes"
16915 else
16916   echo "$ac_err" >&5
16917   echo "configure: failed program was:" >&5
16918   cat conftest.$ac_ext >&5
16919   rm -rf conftest*
16920   eval "ac_cv_header_$ac_safe=no"
16921 fi
16922 rm -f conftest*
16923 fi
16924 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16925   echo "$ac_t""yes" 1>&6
16926     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16927   cat >> confdefs.h <<EOF
16928 #define $ac_tr_hdr 1
16929 EOF
16930  
16931 else
16932   echo "$ac_t""no" 1>&6
16933 fi
16934 done
16935
16936 fi
16937
16938 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16939                         cat >> confdefs.h <<\EOF
16940 #define REENTRANT 1
16941 EOF
16942
16943         cat >> confdefs.h <<\EOF
16944 #define _REENTRANT 1
16945 EOF
16946
16947         cat >> confdefs.h <<\EOF
16948 #define THREAD_SAFE 1
16949 EOF
16950
16951         cat >> confdefs.h <<\EOF
16952 #define _THREAD_SAFE 1
16953 EOF
16954
16955         cat >> confdefs.h <<\EOF
16956 #define THREADSAFE 1
16957 EOF
16958
16959         cat >> confdefs.h <<\EOF
16960 #define _THREADSAFE 1
16961 EOF
16962
16963         cat >> confdefs.h <<\EOF
16964 #define _SGI_MP_SOURCE 1
16965 EOF
16966
16967
16968                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16969 echo "configure:16970: checking for thread specific errno" >&5
16970 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16971   echo $ac_n "(cached) $ac_c" 1>&6
16972 else
16973   
16974                 cat > conftest.$ac_ext <<EOF
16975 #line 16976 "configure"
16976 #include "confdefs.h"
16977 #include <errno.h>
16978 int main() {
16979 errno = 0;
16980 ; return 0; }
16981 EOF
16982 if { (eval echo configure:16983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16983   rm -rf conftest*
16984   ol_cv_errno_thread_specific=yes
16985 else
16986   echo "configure: failed program was:" >&5
16987   cat conftest.$ac_ext >&5
16988   rm -rf conftest*
16989   ol_cv_errno_thread_specific=no
16990 fi
16991 rm -f conftest*
16992         
16993 fi
16994
16995 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16996
16997                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16998 echo "configure:16999: checking for thread specific h_errno" >&5
16999 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
17000   echo $ac_n "(cached) $ac_c" 1>&6
17001 else
17002   
17003                 cat > conftest.$ac_ext <<EOF
17004 #line 17005 "configure"
17005 #include "confdefs.h"
17006 #include <netdb.h>
17007 int main() {
17008 h_errno = 0;
17009 ; return 0; }
17010 EOF
17011 if { (eval echo configure:17012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17012   rm -rf conftest*
17013   ol_cv_h_errno_thread_specific=yes
17014 else
17015   echo "configure: failed program was:" >&5
17016   cat conftest.$ac_ext >&5
17017   rm -rf conftest*
17018   ol_cv_h_errno_thread_specific=no
17019 fi
17020 rm -f conftest*
17021         
17022 fi
17023
17024 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
17025
17026         if test $ol_cv_errno_thread_specific != yes \
17027                 -o $ol_cv_h_errno_thread_specific != yes ; then
17028                 LIBS="$LTHREAD_LIBS $LIBS"
17029                 LTHREAD_LIBS=""
17030         fi
17031
17032 fi  
17033
17034 if test $ol_link_threads = no ; then
17035         if test $ol_with_threads = yes ; then
17036                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
17037         fi
17038
17039         if test $ol_with_threads = auto ; then
17040                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
17041                 ol_with_threads=no
17042         fi
17043
17044         cat >> confdefs.h <<\EOF
17045 #define NO_THREADS 1
17046 EOF
17047
17048         LTHREAD_LIBS=""
17049 fi
17050
17051 if test $ol_link_threads != no ; then
17052         cat >> confdefs.h <<\EOF
17053 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
17054 EOF
17055
17056 fi
17057
17058 ol_link_ldbm=no 
17059
17060 if test $ol_with_ldbm_api = auto \
17061         -o $ol_with_ldbm_api = berkeley \
17062         -o $ol_with_ldbm_api = bcompat ; then
17063
17064         if test $ol_with_ldbm_api = bcompat; then \
17065                 for ac_hdr in db_185.h db.h
17066 do
17067 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17068 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17069 echo "configure:17070: checking for $ac_hdr" >&5
17070 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17071   echo $ac_n "(cached) $ac_c" 1>&6
17072 else
17073   cat > conftest.$ac_ext <<EOF
17074 #line 17075 "configure"
17075 #include "confdefs.h"
17076 #include <$ac_hdr>
17077 EOF
17078 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17079 { (eval echo configure:17080: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17080 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17081 if test -z "$ac_err"; then
17082   rm -rf conftest*
17083   eval "ac_cv_header_$ac_safe=yes"
17084 else
17085   echo "$ac_err" >&5
17086   echo "configure: failed program was:" >&5
17087   cat conftest.$ac_ext >&5
17088   rm -rf conftest*
17089   eval "ac_cv_header_$ac_safe=no"
17090 fi
17091 rm -f conftest*
17092 fi
17093 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17094   echo "$ac_t""yes" 1>&6
17095     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17096   cat >> confdefs.h <<EOF
17097 #define $ac_tr_hdr 1
17098 EOF
17099  
17100 else
17101   echo "$ac_t""no" 1>&6
17102 fi
17103 done
17104
17105 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
17106         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
17107 echo "configure:17108: checking if Berkeley DB header compatibility" >&5
17108 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
17109   echo $ac_n "(cached) $ac_c" 1>&6
17110 else
17111   
17112                 cat > conftest.$ac_ext <<EOF
17113 #line 17114 "configure"
17114 #include "confdefs.h"
17115
17116 #if HAVE_DB_185_H
17117 #       include <db_185.h>
17118 #else
17119 #       include <db.h>
17120 #endif
17121
17122  /* this check could be improved */
17123 #ifndef DB_VERSION_MAJOR
17124 #       define DB_VERSION_MAJOR 1
17125 #endif
17126
17127 #if DB_VERSION_MAJOR == 1 
17128         __db_version_1
17129 #endif
17130
17131 EOF
17132 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17133   egrep "__db_version_1" >/dev/null 2>&1; then
17134   rm -rf conftest*
17135   ol_cv_header_db1=yes
17136 else
17137   rm -rf conftest*
17138   ol_cv_header_db1=no
17139 fi
17140 rm -f conftest*
17141
17142 fi
17143
17144 echo "$ac_t""$ol_cv_header_db1" 1>&6
17145
17146         if test $ol_cv_header_db1 = yes ; then
17147                 ol_cv_lib_db=no
17148 if test $ol_cv_lib_db = no ; then
17149         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17150 echo "configure:17151: checking for Berkeley DB link (default)" >&5
17151 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17152   echo $ac_n "(cached) $ac_c" 1>&6
17153 else
17154   
17155         ol_DB_LIB=
17156         ol_LIBS=$LIBS
17157         LIBS="$ol_DB_LIB $LIBS"
17158
17159         cat > conftest.$ac_ext <<EOF
17160 #line 17161 "configure"
17161 #include "confdefs.h"
17162
17163 #ifdef HAVE_DB_185_H
17164 # include <db_185.h>
17165 #else
17166 # include <db.h>
17167 #endif
17168
17169 #ifndef DB_VERSION_MAJOR
17170 # define DB_VERSION_MAJOR 1
17171 #endif
17172
17173 #ifndef NULL
17174 #define NULL ((void*)0)
17175 #endif
17176
17177 int main() {
17178
17179 #if DB_VERSION_MAJOR > 1
17180         {
17181                 char *version;
17182                 int major, minor, patch;
17183
17184                 version = db_version( &major, &minor, &patch );
17185
17186                 if( major != DB_VERSION_MAJOR ||
17187                         minor < DB_VERSION_MINOR )
17188                 {
17189                         printf("Berkeley DB version mismatch\n"
17190                                 "\texpected: %s\n\tgot: %s\n",
17191                                 DB_VERSION_STRING, version);
17192                         return 1;
17193                 }
17194         }
17195 #endif
17196
17197 #if DB_VERSION_MAJOR > 2
17198         db_env_create( NULL, 0 );
17199 #elif DB_VERSION_MAJOR > 1
17200         db_appexit( NULL );
17201 #else
17202         (void) dbopen( NULL, 0, 0, 0, NULL);
17203 #endif
17204
17205 ; return 0; }
17206 EOF
17207 if { (eval echo configure:17208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17208   rm -rf conftest*
17209   ol_cv_db_none=yes
17210 else
17211   echo "configure: failed program was:" >&5
17212   cat conftest.$ac_ext >&5
17213   rm -rf conftest*
17214   ol_cv_db_none=no
17215 fi
17216 rm -f conftest*
17217
17218         LIBS="$ol_LIBS"
17219
17220 fi
17221
17222 echo "$ac_t""$ol_cv_db_none" 1>&6
17223
17224         if test $ol_cv_db_none = yes ; then
17225                 ol_cv_lib_db=yes
17226         fi
17227 fi
17228
17229 if test $ol_cv_lib_db = no ; then
17230         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17231 echo "configure:17232: checking for Berkeley DB link (-ldb4)" >&5
17232 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17233   echo $ac_n "(cached) $ac_c" 1>&6
17234 else
17235   
17236         ol_DB_LIB=-ldb4
17237         ol_LIBS=$LIBS
17238         LIBS="$ol_DB_LIB $LIBS"
17239
17240         cat > conftest.$ac_ext <<EOF
17241 #line 17242 "configure"
17242 #include "confdefs.h"
17243
17244 #ifdef HAVE_DB_185_H
17245 # include <db_185.h>
17246 #else
17247 # include <db.h>
17248 #endif
17249
17250 #ifndef DB_VERSION_MAJOR
17251 # define DB_VERSION_MAJOR 1
17252 #endif
17253
17254 #ifndef NULL
17255 #define NULL ((void*)0)
17256 #endif
17257
17258 int main() {
17259
17260 #if DB_VERSION_MAJOR > 1
17261         {
17262                 char *version;
17263                 int major, minor, patch;
17264
17265                 version = db_version( &major, &minor, &patch );
17266
17267                 if( major != DB_VERSION_MAJOR ||
17268                         minor < DB_VERSION_MINOR )
17269                 {
17270                         printf("Berkeley DB version mismatch\n"
17271                                 "\texpected: %s\n\tgot: %s\n",
17272                                 DB_VERSION_STRING, version);
17273                         return 1;
17274                 }
17275         }
17276 #endif
17277
17278 #if DB_VERSION_MAJOR > 2
17279         db_env_create( NULL, 0 );
17280 #elif DB_VERSION_MAJOR > 1
17281         db_appexit( NULL );
17282 #else
17283         (void) dbopen( NULL, 0, 0, 0, NULL);
17284 #endif
17285
17286 ; return 0; }
17287 EOF
17288 if { (eval echo configure:17289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17289   rm -rf conftest*
17290   ol_cv_db_db4=yes
17291 else
17292   echo "configure: failed program was:" >&5
17293   cat conftest.$ac_ext >&5
17294   rm -rf conftest*
17295   ol_cv_db_db4=no
17296 fi
17297 rm -f conftest*
17298
17299         LIBS="$ol_LIBS"
17300
17301 fi
17302
17303 echo "$ac_t""$ol_cv_db_db4" 1>&6
17304
17305         if test $ol_cv_db_db4 = yes ; then
17306                 ol_cv_lib_db=-ldb4
17307         fi
17308 fi
17309
17310 if test $ol_cv_lib_db = no ; then
17311         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17312 echo "configure:17313: checking for Berkeley DB link (-ldb-4)" >&5
17313 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17314   echo $ac_n "(cached) $ac_c" 1>&6
17315 else
17316   
17317         ol_DB_LIB=-ldb-4
17318         ol_LIBS=$LIBS
17319         LIBS="$ol_DB_LIB $LIBS"
17320
17321         cat > conftest.$ac_ext <<EOF
17322 #line 17323 "configure"
17323 #include "confdefs.h"
17324
17325 #ifdef HAVE_DB_185_H
17326 # include <db_185.h>
17327 #else
17328 # include <db.h>
17329 #endif
17330
17331 #ifndef DB_VERSION_MAJOR
17332 # define DB_VERSION_MAJOR 1
17333 #endif
17334
17335 #ifndef NULL
17336 #define NULL ((void*)0)
17337 #endif
17338
17339 int main() {
17340
17341 #if DB_VERSION_MAJOR > 1
17342         {
17343                 char *version;
17344                 int major, minor, patch;
17345
17346                 version = db_version( &major, &minor, &patch );
17347
17348                 if( major != DB_VERSION_MAJOR ||
17349                         minor < DB_VERSION_MINOR )
17350                 {
17351                         printf("Berkeley DB version mismatch\n"
17352                                 "\texpected: %s\n\tgot: %s\n",
17353                                 DB_VERSION_STRING, version);
17354                         return 1;
17355                 }
17356         }
17357 #endif
17358
17359 #if DB_VERSION_MAJOR > 2
17360         db_env_create( NULL, 0 );
17361 #elif DB_VERSION_MAJOR > 1
17362         db_appexit( NULL );
17363 #else
17364         (void) dbopen( NULL, 0, 0, 0, NULL);
17365 #endif
17366
17367 ; return 0; }
17368 EOF
17369 if { (eval echo configure:17370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17370   rm -rf conftest*
17371   ol_cv_db_db_4=yes
17372 else
17373   echo "configure: failed program was:" >&5
17374   cat conftest.$ac_ext >&5
17375   rm -rf conftest*
17376   ol_cv_db_db_4=no
17377 fi
17378 rm -f conftest*
17379
17380         LIBS="$ol_LIBS"
17381
17382 fi
17383
17384 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17385
17386         if test $ol_cv_db_db_4 = yes ; then
17387                 ol_cv_lib_db=-ldb-4
17388         fi
17389 fi
17390
17391 if test $ol_cv_lib_db = no ; then
17392         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17393 echo "configure:17394: checking for Berkeley DB link (-ldb)" >&5
17394 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17395   echo $ac_n "(cached) $ac_c" 1>&6
17396 else
17397   
17398         ol_DB_LIB=-ldb
17399         ol_LIBS=$LIBS
17400         LIBS="$ol_DB_LIB $LIBS"
17401
17402         cat > conftest.$ac_ext <<EOF
17403 #line 17404 "configure"
17404 #include "confdefs.h"
17405
17406 #ifdef HAVE_DB_185_H
17407 # include <db_185.h>
17408 #else
17409 # include <db.h>
17410 #endif
17411
17412 #ifndef DB_VERSION_MAJOR
17413 # define DB_VERSION_MAJOR 1
17414 #endif
17415
17416 #ifndef NULL
17417 #define NULL ((void*)0)
17418 #endif
17419
17420 int main() {
17421
17422 #if DB_VERSION_MAJOR > 1
17423         {
17424                 char *version;
17425                 int major, minor, patch;
17426
17427                 version = db_version( &major, &minor, &patch );
17428
17429                 if( major != DB_VERSION_MAJOR ||
17430                         minor < DB_VERSION_MINOR )
17431                 {
17432                         printf("Berkeley DB version mismatch\n"
17433                                 "\texpected: %s\n\tgot: %s\n",
17434                                 DB_VERSION_STRING, version);
17435                         return 1;
17436                 }
17437         }
17438 #endif
17439
17440 #if DB_VERSION_MAJOR > 2
17441         db_env_create( NULL, 0 );
17442 #elif DB_VERSION_MAJOR > 1
17443         db_appexit( NULL );
17444 #else
17445         (void) dbopen( NULL, 0, 0, 0, NULL);
17446 #endif
17447
17448 ; return 0; }
17449 EOF
17450 if { (eval echo configure:17451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17451   rm -rf conftest*
17452   ol_cv_db_db=yes
17453 else
17454   echo "configure: failed program was:" >&5
17455   cat conftest.$ac_ext >&5
17456   rm -rf conftest*
17457   ol_cv_db_db=no
17458 fi
17459 rm -f conftest*
17460
17461         LIBS="$ol_LIBS"
17462
17463 fi
17464
17465 echo "$ac_t""$ol_cv_db_db" 1>&6
17466
17467         if test $ol_cv_db_db = yes ; then
17468                 ol_cv_lib_db=-ldb
17469         fi
17470 fi
17471
17472 if test $ol_cv_lib_db = no ; then
17473         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17474 echo "configure:17475: checking for Berkeley DB link (-ldb3)" >&5
17475 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17476   echo $ac_n "(cached) $ac_c" 1>&6
17477 else
17478   
17479         ol_DB_LIB=-ldb3
17480         ol_LIBS=$LIBS
17481         LIBS="$ol_DB_LIB $LIBS"
17482
17483         cat > conftest.$ac_ext <<EOF
17484 #line 17485 "configure"
17485 #include "confdefs.h"
17486
17487 #ifdef HAVE_DB_185_H
17488 # include <db_185.h>
17489 #else
17490 # include <db.h>
17491 #endif
17492
17493 #ifndef DB_VERSION_MAJOR
17494 # define DB_VERSION_MAJOR 1
17495 #endif
17496
17497 #ifndef NULL
17498 #define NULL ((void*)0)
17499 #endif
17500
17501 int main() {
17502
17503 #if DB_VERSION_MAJOR > 1
17504         {
17505                 char *version;
17506                 int major, minor, patch;
17507
17508                 version = db_version( &major, &minor, &patch );
17509
17510                 if( major != DB_VERSION_MAJOR ||
17511                         minor < DB_VERSION_MINOR )
17512                 {
17513                         printf("Berkeley DB version mismatch\n"
17514                                 "\texpected: %s\n\tgot: %s\n",
17515                                 DB_VERSION_STRING, version);
17516                         return 1;
17517                 }
17518         }
17519 #endif
17520
17521 #if DB_VERSION_MAJOR > 2
17522         db_env_create( NULL, 0 );
17523 #elif DB_VERSION_MAJOR > 1
17524         db_appexit( NULL );
17525 #else
17526         (void) dbopen( NULL, 0, 0, 0, NULL);
17527 #endif
17528
17529 ; return 0; }
17530 EOF
17531 if { (eval echo configure:17532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17532   rm -rf conftest*
17533   ol_cv_db_db3=yes
17534 else
17535   echo "configure: failed program was:" >&5
17536   cat conftest.$ac_ext >&5
17537   rm -rf conftest*
17538   ol_cv_db_db3=no
17539 fi
17540 rm -f conftest*
17541
17542         LIBS="$ol_LIBS"
17543
17544 fi
17545
17546 echo "$ac_t""$ol_cv_db_db3" 1>&6
17547
17548         if test $ol_cv_db_db3 = yes ; then
17549                 ol_cv_lib_db=-ldb3
17550         fi
17551 fi
17552
17553 if test $ol_cv_lib_db = no ; then
17554         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17555 echo "configure:17556: checking for Berkeley DB link (-ldb-3)" >&5
17556 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17557   echo $ac_n "(cached) $ac_c" 1>&6
17558 else
17559   
17560         ol_DB_LIB=-ldb-3
17561         ol_LIBS=$LIBS
17562         LIBS="$ol_DB_LIB $LIBS"
17563
17564         cat > conftest.$ac_ext <<EOF
17565 #line 17566 "configure"
17566 #include "confdefs.h"
17567
17568 #ifdef HAVE_DB_185_H
17569 # include <db_185.h>
17570 #else
17571 # include <db.h>
17572 #endif
17573
17574 #ifndef DB_VERSION_MAJOR
17575 # define DB_VERSION_MAJOR 1
17576 #endif
17577
17578 #ifndef NULL
17579 #define NULL ((void*)0)
17580 #endif
17581
17582 int main() {
17583
17584 #if DB_VERSION_MAJOR > 1
17585         {
17586                 char *version;
17587                 int major, minor, patch;
17588
17589                 version = db_version( &major, &minor, &patch );
17590
17591                 if( major != DB_VERSION_MAJOR ||
17592                         minor < DB_VERSION_MINOR )
17593                 {
17594                         printf("Berkeley DB version mismatch\n"
17595                                 "\texpected: %s\n\tgot: %s\n",
17596                                 DB_VERSION_STRING, version);
17597                         return 1;
17598                 }
17599         }
17600 #endif
17601
17602 #if DB_VERSION_MAJOR > 2
17603         db_env_create( NULL, 0 );
17604 #elif DB_VERSION_MAJOR > 1
17605         db_appexit( NULL );
17606 #else
17607         (void) dbopen( NULL, 0, 0, 0, NULL);
17608 #endif
17609
17610 ; return 0; }
17611 EOF
17612 if { (eval echo configure:17613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17613   rm -rf conftest*
17614   ol_cv_db_db_3=yes
17615 else
17616   echo "configure: failed program was:" >&5
17617   cat conftest.$ac_ext >&5
17618   rm -rf conftest*
17619   ol_cv_db_db_3=no
17620 fi
17621 rm -f conftest*
17622
17623         LIBS="$ol_LIBS"
17624
17625 fi
17626
17627 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17628
17629         if test $ol_cv_db_db_3 = yes ; then
17630                 ol_cv_lib_db=-ldb-3
17631         fi
17632 fi
17633
17634 if test $ol_cv_lib_db = no ; then
17635         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17636 echo "configure:17637: checking for Berkeley DB link (-ldb2)" >&5
17637 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17638   echo $ac_n "(cached) $ac_c" 1>&6
17639 else
17640   
17641         ol_DB_LIB=-ldb2
17642         ol_LIBS=$LIBS
17643         LIBS="$ol_DB_LIB $LIBS"
17644
17645         cat > conftest.$ac_ext <<EOF
17646 #line 17647 "configure"
17647 #include "confdefs.h"
17648
17649 #ifdef HAVE_DB_185_H
17650 # include <db_185.h>
17651 #else
17652 # include <db.h>
17653 #endif
17654
17655 #ifndef DB_VERSION_MAJOR
17656 # define DB_VERSION_MAJOR 1
17657 #endif
17658
17659 #ifndef NULL
17660 #define NULL ((void*)0)
17661 #endif
17662
17663 int main() {
17664
17665 #if DB_VERSION_MAJOR > 1
17666         {
17667                 char *version;
17668                 int major, minor, patch;
17669
17670                 version = db_version( &major, &minor, &patch );
17671
17672                 if( major != DB_VERSION_MAJOR ||
17673                         minor < DB_VERSION_MINOR )
17674                 {
17675                         printf("Berkeley DB version mismatch\n"
17676                                 "\texpected: %s\n\tgot: %s\n",
17677                                 DB_VERSION_STRING, version);
17678                         return 1;
17679                 }
17680         }
17681 #endif
17682
17683 #if DB_VERSION_MAJOR > 2
17684         db_env_create( NULL, 0 );
17685 #elif DB_VERSION_MAJOR > 1
17686         db_appexit( NULL );
17687 #else
17688         (void) dbopen( NULL, 0, 0, 0, NULL);
17689 #endif
17690
17691 ; return 0; }
17692 EOF
17693 if { (eval echo configure:17694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17694   rm -rf conftest*
17695   ol_cv_db_db2=yes
17696 else
17697   echo "configure: failed program was:" >&5
17698   cat conftest.$ac_ext >&5
17699   rm -rf conftest*
17700   ol_cv_db_db2=no
17701 fi
17702 rm -f conftest*
17703
17704         LIBS="$ol_LIBS"
17705
17706 fi
17707
17708 echo "$ac_t""$ol_cv_db_db2" 1>&6
17709
17710         if test $ol_cv_db_db2 = yes ; then
17711                 ol_cv_lib_db=-ldb2
17712         fi
17713 fi
17714
17715 if test $ol_cv_lib_db = no ; then
17716         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17717 echo "configure:17718: checking for Berkeley DB link (-ldb-2)" >&5
17718 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17719   echo $ac_n "(cached) $ac_c" 1>&6
17720 else
17721   
17722         ol_DB_LIB=-ldb-2
17723         ol_LIBS=$LIBS
17724         LIBS="$ol_DB_LIB $LIBS"
17725
17726         cat > conftest.$ac_ext <<EOF
17727 #line 17728 "configure"
17728 #include "confdefs.h"
17729
17730 #ifdef HAVE_DB_185_H
17731 # include <db_185.h>
17732 #else
17733 # include <db.h>
17734 #endif
17735
17736 #ifndef DB_VERSION_MAJOR
17737 # define DB_VERSION_MAJOR 1
17738 #endif
17739
17740 #ifndef NULL
17741 #define NULL ((void*)0)
17742 #endif
17743
17744 int main() {
17745
17746 #if DB_VERSION_MAJOR > 1
17747         {
17748                 char *version;
17749                 int major, minor, patch;
17750
17751                 version = db_version( &major, &minor, &patch );
17752
17753                 if( major != DB_VERSION_MAJOR ||
17754                         minor < DB_VERSION_MINOR )
17755                 {
17756                         printf("Berkeley DB version mismatch\n"
17757                                 "\texpected: %s\n\tgot: %s\n",
17758                                 DB_VERSION_STRING, version);
17759                         return 1;
17760                 }
17761         }
17762 #endif
17763
17764 #if DB_VERSION_MAJOR > 2
17765         db_env_create( NULL, 0 );
17766 #elif DB_VERSION_MAJOR > 1
17767         db_appexit( NULL );
17768 #else
17769         (void) dbopen( NULL, 0, 0, 0, NULL);
17770 #endif
17771
17772 ; return 0; }
17773 EOF
17774 if { (eval echo configure:17775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17775   rm -rf conftest*
17776   ol_cv_db_db_2=yes
17777 else
17778   echo "configure: failed program was:" >&5
17779   cat conftest.$ac_ext >&5
17780   rm -rf conftest*
17781   ol_cv_db_db_2=no
17782 fi
17783 rm -f conftest*
17784
17785         LIBS="$ol_LIBS"
17786
17787 fi
17788
17789 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17790
17791         if test $ol_cv_db_db_2 = yes ; then
17792                 ol_cv_lib_db=-ldb-2
17793         fi
17794 fi
17795
17796 if test $ol_cv_lib_db = no ; then
17797         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17798 echo "configure:17799: checking for Berkeley DB link (-ldb1)" >&5
17799 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17800   echo $ac_n "(cached) $ac_c" 1>&6
17801 else
17802   
17803         ol_DB_LIB=-ldb1
17804         ol_LIBS=$LIBS
17805         LIBS="$ol_DB_LIB $LIBS"
17806
17807         cat > conftest.$ac_ext <<EOF
17808 #line 17809 "configure"
17809 #include "confdefs.h"
17810
17811 #ifdef HAVE_DB_185_H
17812 # include <db_185.h>
17813 #else
17814 # include <db.h>
17815 #endif
17816
17817 #ifndef DB_VERSION_MAJOR
17818 # define DB_VERSION_MAJOR 1
17819 #endif
17820
17821 #ifndef NULL
17822 #define NULL ((void*)0)
17823 #endif
17824
17825 int main() {
17826
17827 #if DB_VERSION_MAJOR > 1
17828         {
17829                 char *version;
17830                 int major, minor, patch;
17831
17832                 version = db_version( &major, &minor, &patch );
17833
17834                 if( major != DB_VERSION_MAJOR ||
17835                         minor < DB_VERSION_MINOR )
17836                 {
17837                         printf("Berkeley DB version mismatch\n"
17838                                 "\texpected: %s\n\tgot: %s\n",
17839                                 DB_VERSION_STRING, version);
17840                         return 1;
17841                 }
17842         }
17843 #endif
17844
17845 #if DB_VERSION_MAJOR > 2
17846         db_env_create( NULL, 0 );
17847 #elif DB_VERSION_MAJOR > 1
17848         db_appexit( NULL );
17849 #else
17850         (void) dbopen( NULL, 0, 0, 0, NULL);
17851 #endif
17852
17853 ; return 0; }
17854 EOF
17855 if { (eval echo configure:17856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17856   rm -rf conftest*
17857   ol_cv_db_db1=yes
17858 else
17859   echo "configure: failed program was:" >&5
17860   cat conftest.$ac_ext >&5
17861   rm -rf conftest*
17862   ol_cv_db_db1=no
17863 fi
17864 rm -f conftest*
17865
17866         LIBS="$ol_LIBS"
17867
17868 fi
17869
17870 echo "$ac_t""$ol_cv_db_db1" 1>&6
17871
17872         if test $ol_cv_db_db1 = yes ; then
17873                 ol_cv_lib_db=-ldb1
17874         fi
17875 fi
17876
17877 if test $ol_cv_lib_db = no ; then
17878         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
17879 echo "configure:17880: checking for Berkeley DB link (-ldb-1)" >&5
17880 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
17881   echo $ac_n "(cached) $ac_c" 1>&6
17882 else
17883   
17884         ol_DB_LIB=-ldb-1
17885         ol_LIBS=$LIBS
17886         LIBS="$ol_DB_LIB $LIBS"
17887
17888         cat > conftest.$ac_ext <<EOF
17889 #line 17890 "configure"
17890 #include "confdefs.h"
17891
17892 #ifdef HAVE_DB_185_H
17893 # include <db_185.h>
17894 #else
17895 # include <db.h>
17896 #endif
17897
17898 #ifndef DB_VERSION_MAJOR
17899 # define DB_VERSION_MAJOR 1
17900 #endif
17901
17902 #ifndef NULL
17903 #define NULL ((void*)0)
17904 #endif
17905
17906 int main() {
17907
17908 #if DB_VERSION_MAJOR > 1
17909         {
17910                 char *version;
17911                 int major, minor, patch;
17912
17913                 version = db_version( &major, &minor, &patch );
17914
17915                 if( major != DB_VERSION_MAJOR ||
17916                         minor < DB_VERSION_MINOR )
17917                 {
17918                         printf("Berkeley DB version mismatch\n"
17919                                 "\texpected: %s\n\tgot: %s\n",
17920                                 DB_VERSION_STRING, version);
17921                         return 1;
17922                 }
17923         }
17924 #endif
17925
17926 #if DB_VERSION_MAJOR > 2
17927         db_env_create( NULL, 0 );
17928 #elif DB_VERSION_MAJOR > 1
17929         db_appexit( NULL );
17930 #else
17931         (void) dbopen( NULL, 0, 0, 0, NULL);
17932 #endif
17933
17934 ; return 0; }
17935 EOF
17936 if { (eval echo configure:17937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17937   rm -rf conftest*
17938   ol_cv_db_db_1=yes
17939 else
17940   echo "configure: failed program was:" >&5
17941   cat conftest.$ac_ext >&5
17942   rm -rf conftest*
17943   ol_cv_db_db_1=no
17944 fi
17945 rm -f conftest*
17946
17947         LIBS="$ol_LIBS"
17948
17949 fi
17950
17951 echo "$ac_t""$ol_cv_db_db_1" 1>&6
17952
17953         if test $ol_cv_db_db_1 = yes ; then
17954                 ol_cv_lib_db=-ldb-1
17955         fi
17956 fi
17957
17958
17959                 if test "$ol_cv_lib_db" != no ; then
17960                         ol_cv_berkeley_db=yes
17961                 fi
17962         fi
17963 fi
17964
17965         else
17966                 ol_cv_berkeley_db=no
17967 for ac_hdr in db.h
17968 do
17969 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17970 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17971 echo "configure:17972: checking for $ac_hdr" >&5
17972 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17973   echo $ac_n "(cached) $ac_c" 1>&6
17974 else
17975   cat > conftest.$ac_ext <<EOF
17976 #line 17977 "configure"
17977 #include "confdefs.h"
17978 #include <$ac_hdr>
17979 EOF
17980 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17981 { (eval echo configure:17982: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17982 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17983 if test -z "$ac_err"; then
17984   rm -rf conftest*
17985   eval "ac_cv_header_$ac_safe=yes"
17986 else
17987   echo "$ac_err" >&5
17988   echo "configure: failed program was:" >&5
17989   cat conftest.$ac_ext >&5
17990   rm -rf conftest*
17991   eval "ac_cv_header_$ac_safe=no"
17992 fi
17993 rm -f conftest*
17994 fi
17995 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17996   echo "$ac_t""yes" 1>&6
17997     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17998   cat >> confdefs.h <<EOF
17999 #define $ac_tr_hdr 1
18000 EOF
18001  
18002 else
18003   echo "$ac_t""no" 1>&6
18004 fi
18005 done
18006
18007 if test $ac_cv_header_db_h = yes; then
18008         ol_cv_lib_db=no
18009 if test $ol_cv_lib_db = no ; then
18010         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
18011 echo "configure:18012: checking for Berkeley DB link (default)" >&5
18012 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
18013   echo $ac_n "(cached) $ac_c" 1>&6
18014 else
18015   
18016         ol_DB_LIB=
18017         ol_LIBS=$LIBS
18018         LIBS="$ol_DB_LIB $LIBS"
18019
18020         cat > conftest.$ac_ext <<EOF
18021 #line 18022 "configure"
18022 #include "confdefs.h"
18023
18024 #ifdef HAVE_DB_185_H
18025 # include <db_185.h>
18026 #else
18027 # include <db.h>
18028 #endif
18029
18030 #ifndef DB_VERSION_MAJOR
18031 # define DB_VERSION_MAJOR 1
18032 #endif
18033
18034 #ifndef NULL
18035 #define NULL ((void*)0)
18036 #endif
18037
18038 int main() {
18039
18040 #if DB_VERSION_MAJOR > 1
18041         {
18042                 char *version;
18043                 int major, minor, patch;
18044
18045                 version = db_version( &major, &minor, &patch );
18046
18047                 if( major != DB_VERSION_MAJOR ||
18048                         minor < DB_VERSION_MINOR )
18049                 {
18050                         printf("Berkeley DB version mismatch\n"
18051                                 "\texpected: %s\n\tgot: %s\n",
18052                                 DB_VERSION_STRING, version);
18053                         return 1;
18054                 }
18055         }
18056 #endif
18057
18058 #if DB_VERSION_MAJOR > 2
18059         db_env_create( NULL, 0 );
18060 #elif DB_VERSION_MAJOR > 1
18061         db_appexit( NULL );
18062 #else
18063         (void) dbopen( NULL, 0, 0, 0, NULL);
18064 #endif
18065
18066 ; return 0; }
18067 EOF
18068 if { (eval echo configure:18069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18069   rm -rf conftest*
18070   ol_cv_db_none=yes
18071 else
18072   echo "configure: failed program was:" >&5
18073   cat conftest.$ac_ext >&5
18074   rm -rf conftest*
18075   ol_cv_db_none=no
18076 fi
18077 rm -f conftest*
18078
18079         LIBS="$ol_LIBS"
18080
18081 fi
18082
18083 echo "$ac_t""$ol_cv_db_none" 1>&6
18084
18085         if test $ol_cv_db_none = yes ; then
18086                 ol_cv_lib_db=yes
18087         fi
18088 fi
18089
18090 if test $ol_cv_lib_db = no ; then
18091         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18092 echo "configure:18093: checking for Berkeley DB link (-ldb4)" >&5
18093 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18094   echo $ac_n "(cached) $ac_c" 1>&6
18095 else
18096   
18097         ol_DB_LIB=-ldb4
18098         ol_LIBS=$LIBS
18099         LIBS="$ol_DB_LIB $LIBS"
18100
18101         cat > conftest.$ac_ext <<EOF
18102 #line 18103 "configure"
18103 #include "confdefs.h"
18104
18105 #ifdef HAVE_DB_185_H
18106 # include <db_185.h>
18107 #else
18108 # include <db.h>
18109 #endif
18110
18111 #ifndef DB_VERSION_MAJOR
18112 # define DB_VERSION_MAJOR 1
18113 #endif
18114
18115 #ifndef NULL
18116 #define NULL ((void*)0)
18117 #endif
18118
18119 int main() {
18120
18121 #if DB_VERSION_MAJOR > 1
18122         {
18123                 char *version;
18124                 int major, minor, patch;
18125
18126                 version = db_version( &major, &minor, &patch );
18127
18128                 if( major != DB_VERSION_MAJOR ||
18129                         minor < DB_VERSION_MINOR )
18130                 {
18131                         printf("Berkeley DB version mismatch\n"
18132                                 "\texpected: %s\n\tgot: %s\n",
18133                                 DB_VERSION_STRING, version);
18134                         return 1;
18135                 }
18136         }
18137 #endif
18138
18139 #if DB_VERSION_MAJOR > 2
18140         db_env_create( NULL, 0 );
18141 #elif DB_VERSION_MAJOR > 1
18142         db_appexit( NULL );
18143 #else
18144         (void) dbopen( NULL, 0, 0, 0, NULL);
18145 #endif
18146
18147 ; return 0; }
18148 EOF
18149 if { (eval echo configure:18150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18150   rm -rf conftest*
18151   ol_cv_db_db4=yes
18152 else
18153   echo "configure: failed program was:" >&5
18154   cat conftest.$ac_ext >&5
18155   rm -rf conftest*
18156   ol_cv_db_db4=no
18157 fi
18158 rm -f conftest*
18159
18160         LIBS="$ol_LIBS"
18161
18162 fi
18163
18164 echo "$ac_t""$ol_cv_db_db4" 1>&6
18165
18166         if test $ol_cv_db_db4 = yes ; then
18167                 ol_cv_lib_db=-ldb4
18168         fi
18169 fi
18170
18171 if test $ol_cv_lib_db = no ; then
18172         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18173 echo "configure:18174: checking for Berkeley DB link (-ldb-4)" >&5
18174 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18175   echo $ac_n "(cached) $ac_c" 1>&6
18176 else
18177   
18178         ol_DB_LIB=-ldb-4
18179         ol_LIBS=$LIBS
18180         LIBS="$ol_DB_LIB $LIBS"
18181
18182         cat > conftest.$ac_ext <<EOF
18183 #line 18184 "configure"
18184 #include "confdefs.h"
18185
18186 #ifdef HAVE_DB_185_H
18187 # include <db_185.h>
18188 #else
18189 # include <db.h>
18190 #endif
18191
18192 #ifndef DB_VERSION_MAJOR
18193 # define DB_VERSION_MAJOR 1
18194 #endif
18195
18196 #ifndef NULL
18197 #define NULL ((void*)0)
18198 #endif
18199
18200 int main() {
18201
18202 #if DB_VERSION_MAJOR > 1
18203         {
18204                 char *version;
18205                 int major, minor, patch;
18206
18207                 version = db_version( &major, &minor, &patch );
18208
18209                 if( major != DB_VERSION_MAJOR ||
18210                         minor < DB_VERSION_MINOR )
18211                 {
18212                         printf("Berkeley DB version mismatch\n"
18213                                 "\texpected: %s\n\tgot: %s\n",
18214                                 DB_VERSION_STRING, version);
18215                         return 1;
18216                 }
18217         }
18218 #endif
18219
18220 #if DB_VERSION_MAJOR > 2
18221         db_env_create( NULL, 0 );
18222 #elif DB_VERSION_MAJOR > 1
18223         db_appexit( NULL );
18224 #else
18225         (void) dbopen( NULL, 0, 0, 0, NULL);
18226 #endif
18227
18228 ; return 0; }
18229 EOF
18230 if { (eval echo configure:18231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18231   rm -rf conftest*
18232   ol_cv_db_db_4=yes
18233 else
18234   echo "configure: failed program was:" >&5
18235   cat conftest.$ac_ext >&5
18236   rm -rf conftest*
18237   ol_cv_db_db_4=no
18238 fi
18239 rm -f conftest*
18240
18241         LIBS="$ol_LIBS"
18242
18243 fi
18244
18245 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18246
18247         if test $ol_cv_db_db_4 = yes ; then
18248                 ol_cv_lib_db=-ldb-4
18249         fi
18250 fi
18251
18252 if test $ol_cv_lib_db = no ; then
18253         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18254 echo "configure:18255: checking for Berkeley DB link (-ldb)" >&5
18255 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18256   echo $ac_n "(cached) $ac_c" 1>&6
18257 else
18258   
18259         ol_DB_LIB=-ldb
18260         ol_LIBS=$LIBS
18261         LIBS="$ol_DB_LIB $LIBS"
18262
18263         cat > conftest.$ac_ext <<EOF
18264 #line 18265 "configure"
18265 #include "confdefs.h"
18266
18267 #ifdef HAVE_DB_185_H
18268 # include <db_185.h>
18269 #else
18270 # include <db.h>
18271 #endif
18272
18273 #ifndef DB_VERSION_MAJOR
18274 # define DB_VERSION_MAJOR 1
18275 #endif
18276
18277 #ifndef NULL
18278 #define NULL ((void*)0)
18279 #endif
18280
18281 int main() {
18282
18283 #if DB_VERSION_MAJOR > 1
18284         {
18285                 char *version;
18286                 int major, minor, patch;
18287
18288                 version = db_version( &major, &minor, &patch );
18289
18290                 if( major != DB_VERSION_MAJOR ||
18291                         minor < DB_VERSION_MINOR )
18292                 {
18293                         printf("Berkeley DB version mismatch\n"
18294                                 "\texpected: %s\n\tgot: %s\n",
18295                                 DB_VERSION_STRING, version);
18296                         return 1;
18297                 }
18298         }
18299 #endif
18300
18301 #if DB_VERSION_MAJOR > 2
18302         db_env_create( NULL, 0 );
18303 #elif DB_VERSION_MAJOR > 1
18304         db_appexit( NULL );
18305 #else
18306         (void) dbopen( NULL, 0, 0, 0, NULL);
18307 #endif
18308
18309 ; return 0; }
18310 EOF
18311 if { (eval echo configure:18312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18312   rm -rf conftest*
18313   ol_cv_db_db=yes
18314 else
18315   echo "configure: failed program was:" >&5
18316   cat conftest.$ac_ext >&5
18317   rm -rf conftest*
18318   ol_cv_db_db=no
18319 fi
18320 rm -f conftest*
18321
18322         LIBS="$ol_LIBS"
18323
18324 fi
18325
18326 echo "$ac_t""$ol_cv_db_db" 1>&6
18327
18328         if test $ol_cv_db_db = yes ; then
18329                 ol_cv_lib_db=-ldb
18330         fi
18331 fi
18332
18333 if test $ol_cv_lib_db = no ; then
18334         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
18335 echo "configure:18336: checking for Berkeley DB link (-ldb3)" >&5
18336 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
18337   echo $ac_n "(cached) $ac_c" 1>&6
18338 else
18339   
18340         ol_DB_LIB=-ldb3
18341         ol_LIBS=$LIBS
18342         LIBS="$ol_DB_LIB $LIBS"
18343
18344         cat > conftest.$ac_ext <<EOF
18345 #line 18346 "configure"
18346 #include "confdefs.h"
18347
18348 #ifdef HAVE_DB_185_H
18349 # include <db_185.h>
18350 #else
18351 # include <db.h>
18352 #endif
18353
18354 #ifndef DB_VERSION_MAJOR
18355 # define DB_VERSION_MAJOR 1
18356 #endif
18357
18358 #ifndef NULL
18359 #define NULL ((void*)0)
18360 #endif
18361
18362 int main() {
18363
18364 #if DB_VERSION_MAJOR > 1
18365         {
18366                 char *version;
18367                 int major, minor, patch;
18368
18369                 version = db_version( &major, &minor, &patch );
18370
18371                 if( major != DB_VERSION_MAJOR ||
18372                         minor < DB_VERSION_MINOR )
18373                 {
18374                         printf("Berkeley DB version mismatch\n"
18375                                 "\texpected: %s\n\tgot: %s\n",
18376                                 DB_VERSION_STRING, version);
18377                         return 1;
18378                 }
18379         }
18380 #endif
18381
18382 #if DB_VERSION_MAJOR > 2
18383         db_env_create( NULL, 0 );
18384 #elif DB_VERSION_MAJOR > 1
18385         db_appexit( NULL );
18386 #else
18387         (void) dbopen( NULL, 0, 0, 0, NULL);
18388 #endif
18389
18390 ; return 0; }
18391 EOF
18392 if { (eval echo configure:18393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18393   rm -rf conftest*
18394   ol_cv_db_db3=yes
18395 else
18396   echo "configure: failed program was:" >&5
18397   cat conftest.$ac_ext >&5
18398   rm -rf conftest*
18399   ol_cv_db_db3=no
18400 fi
18401 rm -f conftest*
18402
18403         LIBS="$ol_LIBS"
18404
18405 fi
18406
18407 echo "$ac_t""$ol_cv_db_db3" 1>&6
18408
18409         if test $ol_cv_db_db3 = yes ; then
18410                 ol_cv_lib_db=-ldb3
18411         fi
18412 fi
18413
18414 if test $ol_cv_lib_db = no ; then
18415         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
18416 echo "configure:18417: checking for Berkeley DB link (-ldb-3)" >&5
18417 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
18418   echo $ac_n "(cached) $ac_c" 1>&6
18419 else
18420   
18421         ol_DB_LIB=-ldb-3
18422         ol_LIBS=$LIBS
18423         LIBS="$ol_DB_LIB $LIBS"
18424
18425         cat > conftest.$ac_ext <<EOF
18426 #line 18427 "configure"
18427 #include "confdefs.h"
18428
18429 #ifdef HAVE_DB_185_H
18430 # include <db_185.h>
18431 #else
18432 # include <db.h>
18433 #endif
18434
18435 #ifndef DB_VERSION_MAJOR
18436 # define DB_VERSION_MAJOR 1
18437 #endif
18438
18439 #ifndef NULL
18440 #define NULL ((void*)0)
18441 #endif
18442
18443 int main() {
18444
18445 #if DB_VERSION_MAJOR > 1
18446         {
18447                 char *version;
18448                 int major, minor, patch;
18449
18450                 version = db_version( &major, &minor, &patch );
18451
18452                 if( major != DB_VERSION_MAJOR ||
18453                         minor < DB_VERSION_MINOR )
18454                 {
18455                         printf("Berkeley DB version mismatch\n"
18456                                 "\texpected: %s\n\tgot: %s\n",
18457                                 DB_VERSION_STRING, version);
18458                         return 1;
18459                 }
18460         }
18461 #endif
18462
18463 #if DB_VERSION_MAJOR > 2
18464         db_env_create( NULL, 0 );
18465 #elif DB_VERSION_MAJOR > 1
18466         db_appexit( NULL );
18467 #else
18468         (void) dbopen( NULL, 0, 0, 0, NULL);
18469 #endif
18470
18471 ; return 0; }
18472 EOF
18473 if { (eval echo configure:18474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18474   rm -rf conftest*
18475   ol_cv_db_db_3=yes
18476 else
18477   echo "configure: failed program was:" >&5
18478   cat conftest.$ac_ext >&5
18479   rm -rf conftest*
18480   ol_cv_db_db_3=no
18481 fi
18482 rm -f conftest*
18483
18484         LIBS="$ol_LIBS"
18485
18486 fi
18487
18488 echo "$ac_t""$ol_cv_db_db_3" 1>&6
18489
18490         if test $ol_cv_db_db_3 = yes ; then
18491                 ol_cv_lib_db=-ldb-3
18492         fi
18493 fi
18494
18495 if test $ol_cv_lib_db = no ; then
18496         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
18497 echo "configure:18498: checking for Berkeley DB link (-ldb2)" >&5
18498 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
18499   echo $ac_n "(cached) $ac_c" 1>&6
18500 else
18501   
18502         ol_DB_LIB=-ldb2
18503         ol_LIBS=$LIBS
18504         LIBS="$ol_DB_LIB $LIBS"
18505
18506         cat > conftest.$ac_ext <<EOF
18507 #line 18508 "configure"
18508 #include "confdefs.h"
18509
18510 #ifdef HAVE_DB_185_H
18511 # include <db_185.h>
18512 #else
18513 # include <db.h>
18514 #endif
18515
18516 #ifndef DB_VERSION_MAJOR
18517 # define DB_VERSION_MAJOR 1
18518 #endif
18519
18520 #ifndef NULL
18521 #define NULL ((void*)0)
18522 #endif
18523
18524 int main() {
18525
18526 #if DB_VERSION_MAJOR > 1
18527         {
18528                 char *version;
18529                 int major, minor, patch;
18530
18531                 version = db_version( &major, &minor, &patch );
18532
18533                 if( major != DB_VERSION_MAJOR ||
18534                         minor < DB_VERSION_MINOR )
18535                 {
18536                         printf("Berkeley DB version mismatch\n"
18537                                 "\texpected: %s\n\tgot: %s\n",
18538                                 DB_VERSION_STRING, version);
18539                         return 1;
18540                 }
18541         }
18542 #endif
18543
18544 #if DB_VERSION_MAJOR > 2
18545         db_env_create( NULL, 0 );
18546 #elif DB_VERSION_MAJOR > 1
18547         db_appexit( NULL );
18548 #else
18549         (void) dbopen( NULL, 0, 0, 0, NULL);
18550 #endif
18551
18552 ; return 0; }
18553 EOF
18554 if { (eval echo configure:18555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18555   rm -rf conftest*
18556   ol_cv_db_db2=yes
18557 else
18558   echo "configure: failed program was:" >&5
18559   cat conftest.$ac_ext >&5
18560   rm -rf conftest*
18561   ol_cv_db_db2=no
18562 fi
18563 rm -f conftest*
18564
18565         LIBS="$ol_LIBS"
18566
18567 fi
18568
18569 echo "$ac_t""$ol_cv_db_db2" 1>&6
18570
18571         if test $ol_cv_db_db2 = yes ; then
18572                 ol_cv_lib_db=-ldb2
18573         fi
18574 fi
18575
18576 if test $ol_cv_lib_db = no ; then
18577         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18578 echo "configure:18579: checking for Berkeley DB link (-ldb-2)" >&5
18579 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18580   echo $ac_n "(cached) $ac_c" 1>&6
18581 else
18582   
18583         ol_DB_LIB=-ldb-2
18584         ol_LIBS=$LIBS
18585         LIBS="$ol_DB_LIB $LIBS"
18586
18587         cat > conftest.$ac_ext <<EOF
18588 #line 18589 "configure"
18589 #include "confdefs.h"
18590
18591 #ifdef HAVE_DB_185_H
18592 # include <db_185.h>
18593 #else
18594 # include <db.h>
18595 #endif
18596
18597 #ifndef DB_VERSION_MAJOR
18598 # define DB_VERSION_MAJOR 1
18599 #endif
18600
18601 #ifndef NULL
18602 #define NULL ((void*)0)
18603 #endif
18604
18605 int main() {
18606
18607 #if DB_VERSION_MAJOR > 1
18608         {
18609                 char *version;
18610                 int major, minor, patch;
18611
18612                 version = db_version( &major, &minor, &patch );
18613
18614                 if( major != DB_VERSION_MAJOR ||
18615                         minor < DB_VERSION_MINOR )
18616                 {
18617                         printf("Berkeley DB version mismatch\n"
18618                                 "\texpected: %s\n\tgot: %s\n",
18619                                 DB_VERSION_STRING, version);
18620                         return 1;
18621                 }
18622         }
18623 #endif
18624
18625 #if DB_VERSION_MAJOR > 2
18626         db_env_create( NULL, 0 );
18627 #elif DB_VERSION_MAJOR > 1
18628         db_appexit( NULL );
18629 #else
18630         (void) dbopen( NULL, 0, 0, 0, NULL);
18631 #endif
18632
18633 ; return 0; }
18634 EOF
18635 if { (eval echo configure:18636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18636   rm -rf conftest*
18637   ol_cv_db_db_2=yes
18638 else
18639   echo "configure: failed program was:" >&5
18640   cat conftest.$ac_ext >&5
18641   rm -rf conftest*
18642   ol_cv_db_db_2=no
18643 fi
18644 rm -f conftest*
18645
18646         LIBS="$ol_LIBS"
18647
18648 fi
18649
18650 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18651
18652         if test $ol_cv_db_db_2 = yes ; then
18653                 ol_cv_lib_db=-ldb-2
18654         fi
18655 fi
18656
18657 if test $ol_cv_lib_db = no ; then
18658         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18659 echo "configure:18660: checking for Berkeley DB link (-ldb1)" >&5
18660 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18661   echo $ac_n "(cached) $ac_c" 1>&6
18662 else
18663   
18664         ol_DB_LIB=-ldb1
18665         ol_LIBS=$LIBS
18666         LIBS="$ol_DB_LIB $LIBS"
18667
18668         cat > conftest.$ac_ext <<EOF
18669 #line 18670 "configure"
18670 #include "confdefs.h"
18671
18672 #ifdef HAVE_DB_185_H
18673 # include <db_185.h>
18674 #else
18675 # include <db.h>
18676 #endif
18677
18678 #ifndef DB_VERSION_MAJOR
18679 # define DB_VERSION_MAJOR 1
18680 #endif
18681
18682 #ifndef NULL
18683 #define NULL ((void*)0)
18684 #endif
18685
18686 int main() {
18687
18688 #if DB_VERSION_MAJOR > 1
18689         {
18690                 char *version;
18691                 int major, minor, patch;
18692
18693                 version = db_version( &major, &minor, &patch );
18694
18695                 if( major != DB_VERSION_MAJOR ||
18696                         minor < DB_VERSION_MINOR )
18697                 {
18698                         printf("Berkeley DB version mismatch\n"
18699                                 "\texpected: %s\n\tgot: %s\n",
18700                                 DB_VERSION_STRING, version);
18701                         return 1;
18702                 }
18703         }
18704 #endif
18705
18706 #if DB_VERSION_MAJOR > 2
18707         db_env_create( NULL, 0 );
18708 #elif DB_VERSION_MAJOR > 1
18709         db_appexit( NULL );
18710 #else
18711         (void) dbopen( NULL, 0, 0, 0, NULL);
18712 #endif
18713
18714 ; return 0; }
18715 EOF
18716 if { (eval echo configure:18717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18717   rm -rf conftest*
18718   ol_cv_db_db1=yes
18719 else
18720   echo "configure: failed program was:" >&5
18721   cat conftest.$ac_ext >&5
18722   rm -rf conftest*
18723   ol_cv_db_db1=no
18724 fi
18725 rm -f conftest*
18726
18727         LIBS="$ol_LIBS"
18728
18729 fi
18730
18731 echo "$ac_t""$ol_cv_db_db1" 1>&6
18732
18733         if test $ol_cv_db_db1 = yes ; then
18734                 ol_cv_lib_db=-ldb1
18735         fi
18736 fi
18737
18738 if test $ol_cv_lib_db = no ; then
18739         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18740 echo "configure:18741: checking for Berkeley DB link (-ldb-1)" >&5
18741 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18742   echo $ac_n "(cached) $ac_c" 1>&6
18743 else
18744   
18745         ol_DB_LIB=-ldb-1
18746         ol_LIBS=$LIBS
18747         LIBS="$ol_DB_LIB $LIBS"
18748
18749         cat > conftest.$ac_ext <<EOF
18750 #line 18751 "configure"
18751 #include "confdefs.h"
18752
18753 #ifdef HAVE_DB_185_H
18754 # include <db_185.h>
18755 #else
18756 # include <db.h>
18757 #endif
18758
18759 #ifndef DB_VERSION_MAJOR
18760 # define DB_VERSION_MAJOR 1
18761 #endif
18762
18763 #ifndef NULL
18764 #define NULL ((void*)0)
18765 #endif
18766
18767 int main() {
18768
18769 #if DB_VERSION_MAJOR > 1
18770         {
18771                 char *version;
18772                 int major, minor, patch;
18773
18774                 version = db_version( &major, &minor, &patch );
18775
18776                 if( major != DB_VERSION_MAJOR ||
18777                         minor < DB_VERSION_MINOR )
18778                 {
18779                         printf("Berkeley DB version mismatch\n"
18780                                 "\texpected: %s\n\tgot: %s\n",
18781                                 DB_VERSION_STRING, version);
18782                         return 1;
18783                 }
18784         }
18785 #endif
18786
18787 #if DB_VERSION_MAJOR > 2
18788         db_env_create( NULL, 0 );
18789 #elif DB_VERSION_MAJOR > 1
18790         db_appexit( NULL );
18791 #else
18792         (void) dbopen( NULL, 0, 0, 0, NULL);
18793 #endif
18794
18795 ; return 0; }
18796 EOF
18797 if { (eval echo configure:18798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18798   rm -rf conftest*
18799   ol_cv_db_db_1=yes
18800 else
18801   echo "configure: failed program was:" >&5
18802   cat conftest.$ac_ext >&5
18803   rm -rf conftest*
18804   ol_cv_db_db_1=no
18805 fi
18806 rm -f conftest*
18807
18808         LIBS="$ol_LIBS"
18809
18810 fi
18811
18812 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18813
18814         if test $ol_cv_db_db_1 = yes ; then
18815                 ol_cv_lib_db=-ldb-1
18816         fi
18817 fi
18818
18819
18820         if test "$ol_cv_lib_db" != no ; then
18821                 ol_cv_berkeley_db=yes
18822                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
18823 echo "configure:18824: checking for Berkeley DB thread support" >&5
18824 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
18825   echo $ac_n "(cached) $ac_c" 1>&6
18826 else
18827   
18828         ol_LIBS="$LIBS"
18829         if test $ol_cv_lib_db != yes ; then
18830                 LIBS="$ol_cv_lib_db"
18831         fi
18832
18833         if test "$cross_compiling" = yes; then
18834   ol_cv_berkeley_db_thread=cross
18835 else
18836   cat > conftest.$ac_ext <<EOF
18837 #line 18838 "configure"
18838 #include "confdefs.h"
18839
18840 #ifdef HAVE_DB_185_H
18841         choke me;
18842 #else
18843 #include <db.h>
18844 #endif
18845 #ifndef NULL
18846 #define NULL ((void *)0)
18847 #endif
18848 main()
18849 {
18850         int rc;
18851         u_int32_t flags = DB_CREATE |
18852 #ifdef DB_PRIVATE
18853                 DB_PRIVATE |
18854 #endif
18855                 DB_THREAD;
18856
18857 #if DB_VERSION_MAJOR > 2
18858         DB_ENV *env = NULL;
18859
18860         rc = db_env_create( &env, 0 );
18861
18862         flags |= DB_INIT_MPOOL;
18863 #ifdef DB_MPOOL_PRIVATE
18864         flags |= DB_MPOOL_PRIVATE;
18865 #endif
18866
18867         if( rc ) {
18868                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18869                 return rc;
18870         }
18871
18872 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
18873         rc = env->open( env, NULL, flags, 0 );
18874 #else
18875         rc = env->open( env, NULL, NULL, flags, 0 );
18876 #endif
18877
18878         if ( rc == 0 ) {
18879                 rc = env->close( env, 0 );
18880         }
18881
18882         if( rc ) {
18883                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18884                 return rc;
18885         }
18886
18887 #else
18888         DB_ENV env;
18889         memset( &env, '\0', sizeof(env) );
18890
18891         rc = db_appinit( NULL, NULL, &env, flags );
18892
18893         if( rc == 0 ) {
18894                 db_appexit( &env );
18895         }
18896
18897         unlink("__db_mpool.share");
18898         unlink("__db_lock.share");
18899 #endif
18900
18901         return rc;
18902 }
18903 EOF
18904 if { (eval echo configure:18905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
18905 then
18906   ol_cv_berkeley_db_thread=yes
18907 else
18908   echo "configure: failed program was:" >&5
18909   cat conftest.$ac_ext >&5
18910   rm -fr conftest*
18911   ol_cv_berkeley_db_thread=no
18912 fi
18913 rm -fr conftest*
18914 fi
18915
18916
18917         LIBS="$ol_LIBS"
18918
18919         if test $ol_cv_berkeley_db_thread != no ; then
18920                 cat >> confdefs.h <<\EOF
18921 #define HAVE_BERKELEY_DB_THREAD 1
18922 EOF
18923
18924         fi
18925
18926 fi
18927
18928 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
18929         fi
18930 fi
18931
18932         fi
18933
18934         if test $ol_cv_berkeley_db != no ; then
18935                 cat >> confdefs.h <<\EOF
18936 #define HAVE_BERKELEY_DB 1
18937 EOF
18938
18939
18940                 ol_link_ldbm=berkeley
18941                 ol_with_ldbm_api=berkeley
18942
18943                 if test $ol_with_ldbm_type = hash ; then
18944                         cat >> confdefs.h <<\EOF
18945 #define LDBM_USE_DBHASH 1
18946 EOF
18947
18948                 else
18949                         cat >> confdefs.h <<\EOF
18950 #define LDBM_USE_DBBTREE 1
18951 EOF
18952
18953                 fi
18954
18955                                                 if test $ol_cv_lib_db != yes ; then
18956                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
18957                 fi
18958         fi
18959 fi
18960
18961 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
18962         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
18963 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
18964         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
18965 echo "configure:18966: checking Berkeley DB version for BDB backend" >&5
18966 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
18967   echo $ac_n "(cached) $ac_c" 1>&6
18968 else
18969   
18970         cat > conftest.$ac_ext <<EOF
18971 #line 18972 "configure"
18972 #include "confdefs.h"
18973
18974 #include <db.h>
18975
18976  /* this check could be improved */
18977 #ifndef DB_VERSION_MAJOR
18978 #       define DB_VERSION_MAJOR 1
18979 #endif
18980
18981 /* require 4.0 or later */
18982 #if DB_VERSION_MAJOR >= 4 
18983         __db_version_compat
18984 #endif
18985         
18986 EOF
18987 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18988   egrep "__db_version_compat" >/dev/null 2>&1; then
18989   rm -rf conftest*
18990   ol_cv_bdb_compat=yes
18991 else
18992   rm -rf conftest*
18993   ol_cv_bdb_compat=no
18994 fi
18995 rm -f conftest*
18996
18997 fi
18998
18999 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
19000
19001
19002         if test $ol_cv_bdb_compat = yes ; then
19003                 ol_enable_bdb=yes
19004         elif test $ol_enable_bdb = yes ; then
19005                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
19006         else
19007                 ol_enable_bdb=no
19008         fi
19009 fi
19010
19011 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
19012         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
19013         ol_with_ldbm_api=none
19014 fi
19015
19016 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
19017         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
19018 echo "configure:19019: checking for MDBM library" >&5
19019 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
19020   echo $ac_n "(cached) $ac_c" 1>&6
19021 else
19022         ol_LIBS="$LIBS"
19023         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
19024 echo "configure:19025: checking for mdbm_set_chain" >&5
19025 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
19026   echo $ac_n "(cached) $ac_c" 1>&6
19027 else
19028   cat > conftest.$ac_ext <<EOF
19029 #line 19030 "configure"
19030 #include "confdefs.h"
19031 /* System header to define __stub macros and hopefully few prototypes,
19032     which can conflict with char mdbm_set_chain(); below.  */
19033 #include <assert.h>
19034 /* Override any gcc2 internal prototype to avoid an error.  */
19035 /* We use char because int might match the return type of a gcc2
19036     builtin and then its argument prototype would still apply.  */
19037 char mdbm_set_chain();
19038 char (*f)();
19039
19040 int main() {
19041
19042 /* The GNU C library defines this for functions which it implements
19043     to always fail with ENOSYS.  Some functions are actually named
19044     something starting with __ and the normal name is an alias.  */
19045 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
19046 choke me
19047 #else
19048 f = mdbm_set_chain;
19049 #endif
19050
19051 ; return 0; }
19052 EOF
19053 if { (eval echo configure:19054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19054   rm -rf conftest*
19055   eval "ac_cv_func_mdbm_set_chain=yes"
19056 else
19057   echo "configure: failed program was:" >&5
19058   cat conftest.$ac_ext >&5
19059   rm -rf conftest*
19060   eval "ac_cv_func_mdbm_set_chain=no"
19061 fi
19062 rm -f conftest*
19063 fi
19064
19065 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
19066   echo "$ac_t""yes" 1>&6
19067   ol_cv_lib_mdbm=yes
19068 else
19069   echo "$ac_t""no" 1>&6
19070
19071                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
19072 echo "configure:19073: checking for mdbm_set_chain in -lmdbm" >&5
19073 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
19074 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19075   echo $ac_n "(cached) $ac_c" 1>&6
19076 else
19077   ac_save_LIBS="$LIBS"
19078 LIBS="-lmdbm  $LIBS"
19079 cat > conftest.$ac_ext <<EOF
19080 #line 19081 "configure"
19081 #include "confdefs.h"
19082 /* Override any gcc2 internal prototype to avoid an error.  */
19083 /* We use char because int might match the return type of a gcc2
19084     builtin and then its argument prototype would still apply.  */
19085 char mdbm_set_chain();
19086
19087 int main() {
19088 mdbm_set_chain()
19089 ; return 0; }
19090 EOF
19091 if { (eval echo configure:19092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19092   rm -rf conftest*
19093   eval "ac_cv_lib_$ac_lib_var=yes"
19094 else
19095   echo "configure: failed program was:" >&5
19096   cat conftest.$ac_ext >&5
19097   rm -rf conftest*
19098   eval "ac_cv_lib_$ac_lib_var=no"
19099 fi
19100 rm -f conftest*
19101 LIBS="$ac_save_LIBS"
19102
19103 fi
19104 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19105   echo "$ac_t""yes" 1>&6
19106   ol_cv_lib_mdbm=-lmdbm
19107 else
19108   echo "$ac_t""no" 1>&6
19109 ol_cv_lib_mdbm=no
19110 fi
19111
19112         
19113 fi
19114
19115         LIBS="$ol_LIBS"
19116
19117 fi
19118
19119 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
19120
19121
19122  for ac_hdr in mdbm.h
19123 do
19124 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19125 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19126 echo "configure:19127: checking for $ac_hdr" >&5
19127 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19128   echo $ac_n "(cached) $ac_c" 1>&6
19129 else
19130   cat > conftest.$ac_ext <<EOF
19131 #line 19132 "configure"
19132 #include "confdefs.h"
19133 #include <$ac_hdr>
19134 EOF
19135 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19136 { (eval echo configure:19137: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19137 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19138 if test -z "$ac_err"; then
19139   rm -rf conftest*
19140   eval "ac_cv_header_$ac_safe=yes"
19141 else
19142   echo "$ac_err" >&5
19143   echo "configure: failed program was:" >&5
19144   cat conftest.$ac_ext >&5
19145   rm -rf conftest*
19146   eval "ac_cv_header_$ac_safe=no"
19147 fi
19148 rm -f conftest*
19149 fi
19150 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19151   echo "$ac_t""yes" 1>&6
19152     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19153   cat >> confdefs.h <<EOF
19154 #define $ac_tr_hdr 1
19155 EOF
19156  
19157 else
19158   echo "$ac_t""no" 1>&6
19159 fi
19160 done
19161
19162  echo $ac_n "checking for db""... $ac_c" 1>&6
19163 echo "configure:19164: checking for db" >&5
19164 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
19165   echo $ac_n "(cached) $ac_c" 1>&6
19166 else
19167   
19168         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
19169                 ol_cv_mdbm=no
19170         else
19171                 ol_cv_mdbm=yes
19172         fi
19173
19174 fi
19175
19176 echo "$ac_t""$ol_cv_mdbm" 1>&6
19177  if test $ol_cv_mdbm = yes ; then
19178         cat >> confdefs.h <<\EOF
19179 #define HAVE_MDBM 1
19180 EOF
19181
19182  fi
19183
19184
19185         if test $ol_cv_mdbm = yes ; then
19186                 ol_link_ldbm=mdbm
19187                 ol_with_ldbm_api=mdbm
19188                 if test $ol_cv_lib_mdbm != yes ; then
19189                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
19190                 fi
19191         fi
19192 fi
19193
19194 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
19195         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
19196 echo "configure:19197: checking for GDBM library" >&5
19197 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
19198   echo $ac_n "(cached) $ac_c" 1>&6
19199 else
19200         ol_LIBS="$LIBS"
19201         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
19202 echo "configure:19203: checking for gdbm_open" >&5
19203 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
19204   echo $ac_n "(cached) $ac_c" 1>&6
19205 else
19206   cat > conftest.$ac_ext <<EOF
19207 #line 19208 "configure"
19208 #include "confdefs.h"
19209 /* System header to define __stub macros and hopefully few prototypes,
19210     which can conflict with char gdbm_open(); below.  */
19211 #include <assert.h>
19212 /* Override any gcc2 internal prototype to avoid an error.  */
19213 /* We use char because int might match the return type of a gcc2
19214     builtin and then its argument prototype would still apply.  */
19215 char gdbm_open();
19216 char (*f)();
19217
19218 int main() {
19219
19220 /* The GNU C library defines this for functions which it implements
19221     to always fail with ENOSYS.  Some functions are actually named
19222     something starting with __ and the normal name is an alias.  */
19223 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
19224 choke me
19225 #else
19226 f = gdbm_open;
19227 #endif
19228
19229 ; return 0; }
19230 EOF
19231 if { (eval echo configure:19232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19232   rm -rf conftest*
19233   eval "ac_cv_func_gdbm_open=yes"
19234 else
19235   echo "configure: failed program was:" >&5
19236   cat conftest.$ac_ext >&5
19237   rm -rf conftest*
19238   eval "ac_cv_func_gdbm_open=no"
19239 fi
19240 rm -f conftest*
19241 fi
19242
19243 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
19244   echo "$ac_t""yes" 1>&6
19245   ol_cv_lib_gdbm=yes
19246 else
19247   echo "$ac_t""no" 1>&6
19248
19249                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
19250 echo "configure:19251: checking for gdbm_open in -lgdbm" >&5
19251 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
19252 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19253   echo $ac_n "(cached) $ac_c" 1>&6
19254 else
19255   ac_save_LIBS="$LIBS"
19256 LIBS="-lgdbm  $LIBS"
19257 cat > conftest.$ac_ext <<EOF
19258 #line 19259 "configure"
19259 #include "confdefs.h"
19260 /* Override any gcc2 internal prototype to avoid an error.  */
19261 /* We use char because int might match the return type of a gcc2
19262     builtin and then its argument prototype would still apply.  */
19263 char gdbm_open();
19264
19265 int main() {
19266 gdbm_open()
19267 ; return 0; }
19268 EOF
19269 if { (eval echo configure:19270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19270   rm -rf conftest*
19271   eval "ac_cv_lib_$ac_lib_var=yes"
19272 else
19273   echo "configure: failed program was:" >&5
19274   cat conftest.$ac_ext >&5
19275   rm -rf conftest*
19276   eval "ac_cv_lib_$ac_lib_var=no"
19277 fi
19278 rm -f conftest*
19279 LIBS="$ac_save_LIBS"
19280
19281 fi
19282 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19283   echo "$ac_t""yes" 1>&6
19284   ol_cv_lib_gdbm=-lgdbm
19285 else
19286   echo "$ac_t""no" 1>&6
19287 ol_cv_lib_gdbm=no
19288 fi
19289
19290         
19291 fi
19292
19293         LIBS="$ol_LIBS"
19294
19295 fi
19296
19297 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
19298
19299
19300  for ac_hdr in gdbm.h
19301 do
19302 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19303 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19304 echo "configure:19305: checking for $ac_hdr" >&5
19305 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19306   echo $ac_n "(cached) $ac_c" 1>&6
19307 else
19308   cat > conftest.$ac_ext <<EOF
19309 #line 19310 "configure"
19310 #include "confdefs.h"
19311 #include <$ac_hdr>
19312 EOF
19313 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19314 { (eval echo configure:19315: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19315 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19316 if test -z "$ac_err"; then
19317   rm -rf conftest*
19318   eval "ac_cv_header_$ac_safe=yes"
19319 else
19320   echo "$ac_err" >&5
19321   echo "configure: failed program was:" >&5
19322   cat conftest.$ac_ext >&5
19323   rm -rf conftest*
19324   eval "ac_cv_header_$ac_safe=no"
19325 fi
19326 rm -f conftest*
19327 fi
19328 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19329   echo "$ac_t""yes" 1>&6
19330     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19331   cat >> confdefs.h <<EOF
19332 #define $ac_tr_hdr 1
19333 EOF
19334  
19335 else
19336   echo "$ac_t""no" 1>&6
19337 fi
19338 done
19339
19340  echo $ac_n "checking for db""... $ac_c" 1>&6
19341 echo "configure:19342: checking for db" >&5
19342 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
19343   echo $ac_n "(cached) $ac_c" 1>&6
19344 else
19345   
19346         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
19347                 ol_cv_gdbm=no
19348         else
19349                 ol_cv_gdbm=yes
19350         fi
19351
19352 fi
19353
19354 echo "$ac_t""$ol_cv_gdbm" 1>&6
19355  if test $ol_cv_gdbm = yes ; then
19356         cat >> confdefs.h <<\EOF
19357 #define HAVE_GDBM 1
19358 EOF
19359
19360  fi
19361
19362
19363         if test $ol_cv_gdbm = yes ; then
19364                 ol_link_ldbm=gdbm
19365                 ol_with_ldbm_api=gdbm
19366
19367                 if test $ol_cv_lib_gdbm != yes ; then
19368                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
19369                 fi
19370         fi
19371 fi
19372
19373 if test $ol_with_ldbm_api = ndbm ; then
19374         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
19375 echo "configure:19376: checking for NDBM library" >&5
19376 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
19377   echo $ac_n "(cached) $ac_c" 1>&6
19378 else
19379         ol_LIBS="$LIBS"
19380         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
19381 echo "configure:19382: checking for dbm_open" >&5
19382 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
19383   echo $ac_n "(cached) $ac_c" 1>&6
19384 else
19385   cat > conftest.$ac_ext <<EOF
19386 #line 19387 "configure"
19387 #include "confdefs.h"
19388 /* System header to define __stub macros and hopefully few prototypes,
19389     which can conflict with char dbm_open(); below.  */
19390 #include <assert.h>
19391 /* Override any gcc2 internal prototype to avoid an error.  */
19392 /* We use char because int might match the return type of a gcc2
19393     builtin and then its argument prototype would still apply.  */
19394 char dbm_open();
19395 char (*f)();
19396
19397 int main() {
19398
19399 /* The GNU C library defines this for functions which it implements
19400     to always fail with ENOSYS.  Some functions are actually named
19401     something starting with __ and the normal name is an alias.  */
19402 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
19403 choke me
19404 #else
19405 f = dbm_open;
19406 #endif
19407
19408 ; return 0; }
19409 EOF
19410 if { (eval echo configure:19411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19411   rm -rf conftest*
19412   eval "ac_cv_func_dbm_open=yes"
19413 else
19414   echo "configure: failed program was:" >&5
19415   cat conftest.$ac_ext >&5
19416   rm -rf conftest*
19417   eval "ac_cv_func_dbm_open=no"
19418 fi
19419 rm -f conftest*
19420 fi
19421
19422 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
19423   echo "$ac_t""yes" 1>&6
19424   ol_cv_lib_ndbm=yes
19425 else
19426   echo "$ac_t""no" 1>&6
19427
19428                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
19429 echo "configure:19430: checking for dbm_open in -lndbm" >&5
19430 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19431 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19432   echo $ac_n "(cached) $ac_c" 1>&6
19433 else
19434   ac_save_LIBS="$LIBS"
19435 LIBS="-lndbm  $LIBS"
19436 cat > conftest.$ac_ext <<EOF
19437 #line 19438 "configure"
19438 #include "confdefs.h"
19439 /* Override any gcc2 internal prototype to avoid an error.  */
19440 /* We use char because int might match the return type of a gcc2
19441     builtin and then its argument prototype would still apply.  */
19442 char dbm_open();
19443
19444 int main() {
19445 dbm_open()
19446 ; return 0; }
19447 EOF
19448 if { (eval echo configure:19449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19449   rm -rf conftest*
19450   eval "ac_cv_lib_$ac_lib_var=yes"
19451 else
19452   echo "configure: failed program was:" >&5
19453   cat conftest.$ac_ext >&5
19454   rm -rf conftest*
19455   eval "ac_cv_lib_$ac_lib_var=no"
19456 fi
19457 rm -f conftest*
19458 LIBS="$ac_save_LIBS"
19459
19460 fi
19461 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19462   echo "$ac_t""yes" 1>&6
19463   ol_cv_lib_ndbm=-lndbm
19464 else
19465   echo "$ac_t""no" 1>&6
19466
19467                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
19468 echo "configure:19469: checking for dbm_open in -ldbm" >&5
19469 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19470 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19471   echo $ac_n "(cached) $ac_c" 1>&6
19472 else
19473   ac_save_LIBS="$LIBS"
19474 LIBS="-ldbm  $LIBS"
19475 cat > conftest.$ac_ext <<EOF
19476 #line 19477 "configure"
19477 #include "confdefs.h"
19478 /* Override any gcc2 internal prototype to avoid an error.  */
19479 /* We use char because int might match the return type of a gcc2
19480     builtin and then its argument prototype would still apply.  */
19481 char dbm_open();
19482
19483 int main() {
19484 dbm_open()
19485 ; return 0; }
19486 EOF
19487 if { (eval echo configure:19488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19488   rm -rf conftest*
19489   eval "ac_cv_lib_$ac_lib_var=yes"
19490 else
19491   echo "configure: failed program was:" >&5
19492   cat conftest.$ac_ext >&5
19493   rm -rf conftest*
19494   eval "ac_cv_lib_$ac_lib_var=no"
19495 fi
19496 rm -f conftest*
19497 LIBS="$ac_save_LIBS"
19498
19499 fi
19500 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19501   echo "$ac_t""yes" 1>&6
19502   ol_cv_lib_ndbm=-ldbm
19503 else
19504   echo "$ac_t""no" 1>&6
19505 ol_cv_lib_ndbm=no
19506 fi
19507                 
19508 fi
19509
19510         
19511 fi
19512
19513         LIBS="$ol_LIBS"
19514
19515 fi
19516
19517 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
19518
19519
19520  for ac_hdr in ndbm.h
19521 do
19522 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19523 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19524 echo "configure:19525: checking for $ac_hdr" >&5
19525 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19526   echo $ac_n "(cached) $ac_c" 1>&6
19527 else
19528   cat > conftest.$ac_ext <<EOF
19529 #line 19530 "configure"
19530 #include "confdefs.h"
19531 #include <$ac_hdr>
19532 EOF
19533 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19534 { (eval echo configure:19535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19535 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19536 if test -z "$ac_err"; then
19537   rm -rf conftest*
19538   eval "ac_cv_header_$ac_safe=yes"
19539 else
19540   echo "$ac_err" >&5
19541   echo "configure: failed program was:" >&5
19542   cat conftest.$ac_ext >&5
19543   rm -rf conftest*
19544   eval "ac_cv_header_$ac_safe=no"
19545 fi
19546 rm -f conftest*
19547 fi
19548 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19549   echo "$ac_t""yes" 1>&6
19550     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19551   cat >> confdefs.h <<EOF
19552 #define $ac_tr_hdr 1
19553 EOF
19554  
19555 else
19556   echo "$ac_t""no" 1>&6
19557 fi
19558 done
19559
19560  echo $ac_n "checking for db""... $ac_c" 1>&6
19561 echo "configure:19562: checking for db" >&5
19562 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
19563   echo $ac_n "(cached) $ac_c" 1>&6
19564 else
19565   
19566         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
19567                 ol_cv_ndbm=no
19568         else
19569                 ol_cv_ndbm=yes
19570         fi
19571
19572 fi
19573
19574 echo "$ac_t""$ol_cv_ndbm" 1>&6
19575  if test $ol_cv_ndbm = yes ; then
19576         cat >> confdefs.h <<\EOF
19577 #define HAVE_NDBM 1
19578 EOF
19579
19580  fi
19581
19582
19583         if test $ol_cv_ndbm = yes ; then
19584                 ol_link_ldbm=ndbm
19585                 ol_with_ldbm_api=ndbm
19586
19587                 if test $ol_cv_lib_ndbm != yes ; then
19588                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
19589                 fi
19590         fi
19591 fi
19592
19593 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
19594         echo "configure: warning: could not find suitable LDBM backend" 1>&2
19595         if test $ol_enable_ldbm = yes ; then
19596                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
19597         fi
19598
19599         echo "configure: warning: disabling LDBM" 1>&2
19600         ol_enable_ldbm=no
19601 fi
19602
19603 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
19604         BUILD_LIBS_DYNAMIC=shared
19605         cat >> confdefs.h <<\EOF
19606 #define LDAP_LIBS_DYNAMIC 1
19607 EOF
19608
19609 else
19610         BUILD_LIBS_DYNAMIC=static
19611 fi
19612
19613 if test $ol_enable_wrappers != no ; then
19614         for ac_hdr in tcpd.h
19615 do
19616 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19617 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19618 echo "configure:19619: checking for $ac_hdr" >&5
19619 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19620   echo $ac_n "(cached) $ac_c" 1>&6
19621 else
19622   cat > conftest.$ac_ext <<EOF
19623 #line 19624 "configure"
19624 #include "confdefs.h"
19625 #include <$ac_hdr>
19626 EOF
19627 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19628 { (eval echo configure:19629: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19629 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19630 if test -z "$ac_err"; then
19631   rm -rf conftest*
19632   eval "ac_cv_header_$ac_safe=yes"
19633 else
19634   echo "$ac_err" >&5
19635   echo "configure: failed program was:" >&5
19636   cat conftest.$ac_ext >&5
19637   rm -rf conftest*
19638   eval "ac_cv_header_$ac_safe=no"
19639 fi
19640 rm -f conftest*
19641 fi
19642 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19643   echo "$ac_t""yes" 1>&6
19644     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19645   cat >> confdefs.h <<EOF
19646 #define $ac_tr_hdr 1
19647 EOF
19648  
19649                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
19650 echo "configure:19651: checking for TCP wrappers library" >&5
19651                 save_LIBS="$LIBS"
19652                 LIBS="$LIBS -lwrap"
19653                 cat > conftest.$ac_ext <<EOF
19654 #line 19655 "configure"
19655 #include "confdefs.h"
19656
19657 #include <tcpd.h>
19658 int allow_severity = 0;
19659 int deny_severity  = 0;
19660
19661 struct request_info *req;
19662                 
19663 int main() {
19664
19665 hosts_access(req)
19666                 
19667 ; return 0; }
19668 EOF
19669 if { (eval echo configure:19670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19670   rm -rf conftest*
19671   echo "$ac_t""-lwrap" 1>&6
19672                 have_wrappers=yes
19673                 LIBS="$save_LIBS"
19674 else
19675   echo "configure: failed program was:" >&5
19676   cat conftest.$ac_ext >&5
19677   rm -rf conftest*
19678   
19679                                 LIBS="$LIBS -lnsl"
19680                 cat > conftest.$ac_ext <<EOF
19681 #line 19682 "configure"
19682 #include "confdefs.h"
19683
19684 #include <tcpd.h>
19685 int allow_severity = 0;
19686 int deny_severity  = 0;
19687
19688 struct request_info *req;
19689                 
19690 int main() {
19691
19692 hosts_access(req)
19693                 
19694 ; return 0; }
19695 EOF
19696 if { (eval echo configure:19697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19697   rm -rf conftest*
19698   echo "$ac_t""-lwrap -lnsl" 1>&6
19699                 have_wrappers=yes
19700                 LIBS="$save_LIBS -lnsl"
19701 else
19702   echo "configure: failed program was:" >&5
19703   cat conftest.$ac_ext >&5
19704   rm -rf conftest*
19705   
19706                 echo "$ac_t""no" 1>&6
19707                 have_wrappers=no
19708                 LIBS=$save_LIBS
19709 fi
19710 rm -f conftest*
19711 fi
19712 rm -f conftest*
19713 else
19714   echo "$ac_t""no" 1>&6
19715 have_wrappers=no
19716 fi
19717 done
19718
19719
19720         if test $have_wrappers = yes ; then
19721                 cat >> confdefs.h <<\EOF
19722 #define HAVE_TCPD 1
19723 EOF
19724
19725                 WRAP_LIBS="-lwrap"
19726         elif test $ol_enable_wrappers = yes ; then
19727                 { echo "configure: error: could not find TCP wrappers, select apppropriate options ore disable" 1>&2; exit 1; }
19728         else
19729                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
19730                 WRAP_LIBS=""
19731         fi
19732 fi
19733
19734 if test $ol_enable_syslog != no ; then
19735         echo $ac_n "checking for openlog""... $ac_c" 1>&6
19736 echo "configure:19737: checking for openlog" >&5
19737 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
19738   echo $ac_n "(cached) $ac_c" 1>&6
19739 else
19740   cat > conftest.$ac_ext <<EOF
19741 #line 19742 "configure"
19742 #include "confdefs.h"
19743 /* System header to define __stub macros and hopefully few prototypes,
19744     which can conflict with char openlog(); below.  */
19745 #include <assert.h>
19746 /* Override any gcc2 internal prototype to avoid an error.  */
19747 /* We use char because int might match the return type of a gcc2
19748     builtin and then its argument prototype would still apply.  */
19749 char openlog();
19750 char (*f)();
19751
19752 int main() {
19753
19754 /* The GNU C library defines this for functions which it implements
19755     to always fail with ENOSYS.  Some functions are actually named
19756     something starting with __ and the normal name is an alias.  */
19757 #if defined (__stub_openlog) || defined (__stub___openlog)
19758 choke me
19759 #else
19760 f = openlog;
19761 #endif
19762
19763 ; return 0; }
19764 EOF
19765 if { (eval echo configure:19766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19766   rm -rf conftest*
19767   eval "ac_cv_func_openlog=yes"
19768 else
19769   echo "configure: failed program was:" >&5
19770   cat conftest.$ac_ext >&5
19771   rm -rf conftest*
19772   eval "ac_cv_func_openlog=no"
19773 fi
19774 rm -f conftest*
19775 fi
19776
19777 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
19778   echo "$ac_t""yes" 1>&6
19779   :
19780 else
19781   echo "$ac_t""no" 1>&6
19782 fi
19783
19784         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
19785                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
19786         fi
19787         ol_enable_syslog=$ac_cv_func_openlog
19788 fi
19789
19790
19791 ol_link_sql=no
19792 if test $ol_enable_sql != no ; then
19793         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
19794 echo "configure:19795: checking for SQLDriverConnect in -liodbc" >&5
19795 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19796 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19797   echo $ac_n "(cached) $ac_c" 1>&6
19798 else
19799   ac_save_LIBS="$LIBS"
19800 LIBS="-liodbc  $LIBS"
19801 cat > conftest.$ac_ext <<EOF
19802 #line 19803 "configure"
19803 #include "confdefs.h"
19804 /* Override any gcc2 internal prototype to avoid an error.  */
19805 /* We use char because int might match the return type of a gcc2
19806     builtin and then its argument prototype would still apply.  */
19807 char SQLDriverConnect();
19808
19809 int main() {
19810 SQLDriverConnect()
19811 ; return 0; }
19812 EOF
19813 if { (eval echo configure:19814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19814   rm -rf conftest*
19815   eval "ac_cv_lib_$ac_lib_var=yes"
19816 else
19817   echo "configure: failed program was:" >&5
19818   cat conftest.$ac_ext >&5
19819   rm -rf conftest*
19820   eval "ac_cv_lib_$ac_lib_var=no"
19821 fi
19822 rm -f conftest*
19823 LIBS="$ac_save_LIBS"
19824
19825 fi
19826 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19827   echo "$ac_t""yes" 1>&6
19828   have_iodbc=yes
19829 else
19830   echo "$ac_t""no" 1>&6
19831 have_iodbc=no
19832 fi
19833
19834         if test $have_iodbc = yes ; then
19835                 ol_link_sql="-liodbc"
19836         else
19837                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
19838 echo "configure:19839: checking for SQLDriverConnect in -lodbc" >&5
19839 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19840 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19841   echo $ac_n "(cached) $ac_c" 1>&6
19842 else
19843   ac_save_LIBS="$LIBS"
19844 LIBS="-lodbc  $LIBS"
19845 cat > conftest.$ac_ext <<EOF
19846 #line 19847 "configure"
19847 #include "confdefs.h"
19848 /* Override any gcc2 internal prototype to avoid an error.  */
19849 /* We use char because int might match the return type of a gcc2
19850     builtin and then its argument prototype would still apply.  */
19851 char SQLDriverConnect();
19852
19853 int main() {
19854 SQLDriverConnect()
19855 ; return 0; }
19856 EOF
19857 if { (eval echo configure:19858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19858   rm -rf conftest*
19859   eval "ac_cv_lib_$ac_lib_var=yes"
19860 else
19861   echo "configure: failed program was:" >&5
19862   cat conftest.$ac_ext >&5
19863   rm -rf conftest*
19864   eval "ac_cv_lib_$ac_lib_var=no"
19865 fi
19866 rm -f conftest*
19867 LIBS="$ac_save_LIBS"
19868
19869 fi
19870 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19871   echo "$ac_t""yes" 1>&6
19872   have_odbc=yes
19873 else
19874   echo "$ac_t""no" 1>&6
19875 have_odbc=no
19876 fi
19877
19878                 if test $have_odbc = yes ; then
19879                         ol_link_sql="-lodbc"
19880                 fi
19881         fi
19882
19883         if test $ol_link_sql != no ; then
19884                 SLAPD_SQL_LIBS="$ol_link_sql"
19885
19886         elif test $ol_enable_sql != auto ; then
19887                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
19888         fi
19889 fi
19890
19891 if test $ol_enable_tcl != no ; then
19892         for ac_hdr in tcl.h
19893 do
19894 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19895 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19896 echo "configure:19897: checking for $ac_hdr" >&5
19897 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19898   echo $ac_n "(cached) $ac_c" 1>&6
19899 else
19900   cat > conftest.$ac_ext <<EOF
19901 #line 19902 "configure"
19902 #include "confdefs.h"
19903 #include <$ac_hdr>
19904 EOF
19905 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19906 { (eval echo configure:19907: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19907 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19908 if test -z "$ac_err"; then
19909   rm -rf conftest*
19910   eval "ac_cv_header_$ac_safe=yes"
19911 else
19912   echo "$ac_err" >&5
19913   echo "configure: failed program was:" >&5
19914   cat conftest.$ac_ext >&5
19915   rm -rf conftest*
19916   eval "ac_cv_header_$ac_safe=no"
19917 fi
19918 rm -f conftest*
19919 fi
19920 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19921   echo "$ac_t""yes" 1>&6
19922     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19923   cat >> confdefs.h <<EOF
19924 #define $ac_tr_hdr 1
19925 EOF
19926  
19927 else
19928   echo "$ac_t""no" 1>&6
19929 fi
19930 done
19931
19932
19933         if test $ac_cv_header_tcl_h != yes ; then
19934                 have_tcl=no
19935         else
19936                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
19937                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
19938 echo "configure:19939: checking for main in -l$lib" >&5
19939 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
19940 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19941   echo $ac_n "(cached) $ac_c" 1>&6
19942 else
19943   ac_save_LIBS="$LIBS"
19944 LIBS="-l$lib  $LIBS"
19945 cat > conftest.$ac_ext <<EOF
19946 #line 19947 "configure"
19947 #include "confdefs.h"
19948
19949 int main() {
19950 main()
19951 ; return 0; }
19952 EOF
19953 if { (eval echo configure:19954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19954   rm -rf conftest*
19955   eval "ac_cv_lib_$ac_lib_var=yes"
19956 else
19957   echo "configure: failed program was:" >&5
19958   cat conftest.$ac_ext >&5
19959   rm -rf conftest*
19960   eval "ac_cv_lib_$ac_lib_var=no"
19961 fi
19962 rm -f conftest*
19963 LIBS="$ac_save_LIBS"
19964
19965 fi
19966 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19967   echo "$ac_t""yes" 1>&6
19968   have_tcl=yes
19969                            if test x"$ol_with_tcl_module" = "xstatic" ; then
19970                                         SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
19971                            else
19972                                         MOD_TCL_LIB="-l${lib}"
19973                            fi;break
19974 else
19975   echo "$ac_t""no" 1>&6
19976 have_tcl=no
19977 fi
19978
19979                 done
19980         fi
19981
19982         if test $have_tcl != yes ; then
19983                 echo "configure: warning: could not find -ltcl" 1>&2
19984                 if test $ol_enable_tcl = yes ; then
19985                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
19986                 fi
19987
19988                 ol_enable_tcl=no
19989         fi
19990 fi
19991
19992 ol_link_termcap=no
19993 for ac_hdr in termcap.h ncurses.h
19994 do
19995 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19996 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19997 echo "configure:19998: checking for $ac_hdr" >&5
19998 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19999   echo $ac_n "(cached) $ac_c" 1>&6
20000 else
20001   cat > conftest.$ac_ext <<EOF
20002 #line 20003 "configure"
20003 #include "confdefs.h"
20004 #include <$ac_hdr>
20005 EOF
20006 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20007 { (eval echo configure:20008: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20008 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20009 if test -z "$ac_err"; then
20010   rm -rf conftest*
20011   eval "ac_cv_header_$ac_safe=yes"
20012 else
20013   echo "$ac_err" >&5
20014   echo "configure: failed program was:" >&5
20015   cat conftest.$ac_ext >&5
20016   rm -rf conftest*
20017   eval "ac_cv_header_$ac_safe=no"
20018 fi
20019 rm -f conftest*
20020 fi
20021 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20022   echo "$ac_t""yes" 1>&6
20023     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20024   cat >> confdefs.h <<EOF
20025 #define $ac_tr_hdr 1
20026 EOF
20027  
20028 else
20029   echo "$ac_t""no" 1>&6
20030 fi
20031 done
20032
20033
20034 if test $ol_link_termcap = no ; then
20035         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
20036 echo "configure:20037: checking for tputs in -ltermcap" >&5
20037 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
20038 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20039   echo $ac_n "(cached) $ac_c" 1>&6
20040 else
20041   ac_save_LIBS="$LIBS"
20042 LIBS="-ltermcap  $LIBS"
20043 cat > conftest.$ac_ext <<EOF
20044 #line 20045 "configure"
20045 #include "confdefs.h"
20046 /* Override any gcc2 internal prototype to avoid an error.  */
20047 /* We use char because int might match the return type of a gcc2
20048     builtin and then its argument prototype would still apply.  */
20049 char tputs();
20050
20051 int main() {
20052 tputs()
20053 ; return 0; }
20054 EOF
20055 if { (eval echo configure:20056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20056   rm -rf conftest*
20057   eval "ac_cv_lib_$ac_lib_var=yes"
20058 else
20059   echo "configure: failed program was:" >&5
20060   cat conftest.$ac_ext >&5
20061   rm -rf conftest*
20062   eval "ac_cv_lib_$ac_lib_var=no"
20063 fi
20064 rm -f conftest*
20065 LIBS="$ac_save_LIBS"
20066
20067 fi
20068 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20069   echo "$ac_t""yes" 1>&6
20070   have_termcap=yes
20071 else
20072   echo "$ac_t""no" 1>&6
20073 have_termcap=no
20074 fi
20075
20076         if test $have_termcap = yes ; then
20077                 cat >> confdefs.h <<\EOF
20078 #define HAVE_TERMCAP 1
20079 EOF
20080
20081                 ol_link_termcap=yes
20082                 TERMCAP_LIBS=-ltermcap
20083         fi
20084 fi
20085
20086 if test $ol_link_termcap = no ; then
20087         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
20088 echo "configure:20089: checking for initscr in -lncurses" >&5
20089 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
20090 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20091   echo $ac_n "(cached) $ac_c" 1>&6
20092 else
20093   ac_save_LIBS="$LIBS"
20094 LIBS="-lncurses  $LIBS"
20095 cat > conftest.$ac_ext <<EOF
20096 #line 20097 "configure"
20097 #include "confdefs.h"
20098 /* Override any gcc2 internal prototype to avoid an error.  */
20099 /* We use char because int might match the return type of a gcc2
20100     builtin and then its argument prototype would still apply.  */
20101 char initscr();
20102
20103 int main() {
20104 initscr()
20105 ; return 0; }
20106 EOF
20107 if { (eval echo configure:20108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20108   rm -rf conftest*
20109   eval "ac_cv_lib_$ac_lib_var=yes"
20110 else
20111   echo "configure: failed program was:" >&5
20112   cat conftest.$ac_ext >&5
20113   rm -rf conftest*
20114   eval "ac_cv_lib_$ac_lib_var=no"
20115 fi
20116 rm -f conftest*
20117 LIBS="$ac_save_LIBS"
20118
20119 fi
20120 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20121   echo "$ac_t""yes" 1>&6
20122   have_ncurses=yes
20123 else
20124   echo "$ac_t""no" 1>&6
20125 have_ncurses=no
20126 fi
20127
20128         if test $have_ncurses = yes ; then
20129                 cat >> confdefs.h <<\EOF
20130 #define HAVE_NCURSES 1
20131 EOF
20132
20133                 ol_link_termcap=yes
20134                 TERMCAP_LIBS=-lncurses
20135         fi
20136 fi
20137
20138 if test $ol_link_termcap = no ; then
20139         cat >> confdefs.h <<\EOF
20140 #define NO_TERMCAP 1
20141 EOF
20142
20143         TERMCAP_LIBS=
20144 fi
20145
20146 ol_link_sasl=no
20147 ol_link_spasswd=no
20148 if test $ol_with_cyrus_sasl != no ; then
20149         for ac_hdr in sasl/sasl.h sasl.h
20150 do
20151 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20152 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20153 echo "configure:20154: checking for $ac_hdr" >&5
20154 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20155   echo $ac_n "(cached) $ac_c" 1>&6
20156 else
20157   cat > conftest.$ac_ext <<EOF
20158 #line 20159 "configure"
20159 #include "confdefs.h"
20160 #include <$ac_hdr>
20161 EOF
20162 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20163 { (eval echo configure:20164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20164 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20165 if test -z "$ac_err"; then
20166   rm -rf conftest*
20167   eval "ac_cv_header_$ac_safe=yes"
20168 else
20169   echo "$ac_err" >&5
20170   echo "configure: failed program was:" >&5
20171   cat conftest.$ac_ext >&5
20172   rm -rf conftest*
20173   eval "ac_cv_header_$ac_safe=no"
20174 fi
20175 rm -f conftest*
20176 fi
20177 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20178   echo "$ac_t""yes" 1>&6
20179     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20180   cat >> confdefs.h <<EOF
20181 #define $ac_tr_hdr 1
20182 EOF
20183  
20184 else
20185   echo "$ac_t""no" 1>&6
20186 fi
20187 done
20188
20189
20190         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
20191                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
20192 echo "configure:20193: checking for sasl_client_init in -lsasl2" >&5
20193 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20194 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20195   echo $ac_n "(cached) $ac_c" 1>&6
20196 else
20197   ac_save_LIBS="$LIBS"
20198 LIBS="-lsasl2  $LIBS"
20199 cat > conftest.$ac_ext <<EOF
20200 #line 20201 "configure"
20201 #include "confdefs.h"
20202 /* Override any gcc2 internal prototype to avoid an error.  */
20203 /* We use char because int might match the return type of a gcc2
20204     builtin and then its argument prototype would still apply.  */
20205 char sasl_client_init();
20206
20207 int main() {
20208 sasl_client_init()
20209 ; return 0; }
20210 EOF
20211 if { (eval echo configure:20212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20212   rm -rf conftest*
20213   eval "ac_cv_lib_$ac_lib_var=yes"
20214 else
20215   echo "configure: failed program was:" >&5
20216   cat conftest.$ac_ext >&5
20217   rm -rf conftest*
20218   eval "ac_cv_lib_$ac_lib_var=no"
20219 fi
20220 rm -f conftest*
20221 LIBS="$ac_save_LIBS"
20222
20223 fi
20224 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20225   echo "$ac_t""yes" 1>&6
20226   ol_link_sasl="-lsasl2"
20227 else
20228   echo "$ac_t""no" 1>&6
20229 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
20230 echo "configure:20231: checking for sasl_client_init in -lsasl" >&5
20231 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20232 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20233   echo $ac_n "(cached) $ac_c" 1>&6
20234 else
20235   ac_save_LIBS="$LIBS"
20236 LIBS="-lsasl  $LIBS"
20237 cat > conftest.$ac_ext <<EOF
20238 #line 20239 "configure"
20239 #include "confdefs.h"
20240 /* Override any gcc2 internal prototype to avoid an error.  */
20241 /* We use char because int might match the return type of a gcc2
20242     builtin and then its argument prototype would still apply.  */
20243 char sasl_client_init();
20244
20245 int main() {
20246 sasl_client_init()
20247 ; return 0; }
20248 EOF
20249 if { (eval echo configure:20250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20250   rm -rf conftest*
20251   eval "ac_cv_lib_$ac_lib_var=yes"
20252 else
20253   echo "configure: failed program was:" >&5
20254   cat conftest.$ac_ext >&5
20255   rm -rf conftest*
20256   eval "ac_cv_lib_$ac_lib_var=no"
20257 fi
20258 rm -f conftest*
20259 LIBS="$ac_save_LIBS"
20260
20261 fi
20262 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20263   echo "$ac_t""yes" 1>&6
20264   ol_link_sasl="-lsasl"
20265 else
20266   echo "$ac_t""no" 1>&6
20267 fi
20268
20269 fi
20270
20271         fi
20272
20273         if test $ol_link_sasl = no ; then
20274                 if test $ol_with_cyrus_sasl != auto ; then
20275                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
20276                 else
20277                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
20278                         echo "configure: warning: SASL authentication not supported!" 1>&2
20279                         if test $ol_link_tls = no ; then
20280                                 echo "configure: warning: Strong authentication not supported!" 1>&2
20281                         fi
20282                 fi
20283         else
20284                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
20285 echo "configure:20286: checking Cyrus SASL library version" >&5
20286 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
20287   echo $ac_n "(cached) $ac_c" 1>&6
20288 else
20289   
20290         cat > conftest.$ac_ext <<EOF
20291 #line 20292 "configure"
20292 #include "confdefs.h"
20293
20294 #ifdef HAVE_SASL_SASL_H
20295 #include <sasl/sasl.h>
20296 #else
20297 #include <sasl.h>
20298 #endif
20299
20300 /* require 2.1.3 or later */
20301 #if SASL_VERSION_MAJOR == 1  && SASL_VERSION_MINOR >= 5
20302         char *__sasl_compat = "1.5.x okay";
20303 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
20304         __sasl_compat "2.2+ or better okay (we guess)";
20305 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
20306         && SASL_VERSION_STEP >=3
20307         __sasl_compat = "2.1.3+ or better okay";
20308 #endif
20309         
20310 EOF
20311 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20312   egrep "__sasl_compat" >/dev/null 2>&1; then
20313   rm -rf conftest*
20314   ol_cv_sasl_compat=yes
20315 else
20316   rm -rf conftest*
20317   ol_cv_sasl_compat=no
20318 fi
20319 rm -f conftest*
20320
20321 fi
20322
20323 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
20324
20325                 if test $ol_cv_sasl_compat = no ; then
20326                         ol_link_sasl=no
20327                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
20328                 fi
20329
20330                 cat >> confdefs.h <<\EOF
20331 #define HAVE_CYRUS_SASL 1
20332 EOF
20333
20334                 SASL_LIBS="$ol_link_sasl"
20335                 if test $ol_enable_spasswd != no ; then
20336                         ol_link_spasswd=yes
20337                 fi
20338
20339                 ac_save_LIBS="$LIBS"
20340                 LIBS="$LIBS $ol_link_sasl"
20341                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
20342 echo "configure:20343: checking for sasl_version" >&5
20343 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
20344   echo $ac_n "(cached) $ac_c" 1>&6
20345 else
20346   cat > conftest.$ac_ext <<EOF
20347 #line 20348 "configure"
20348 #include "confdefs.h"
20349 /* System header to define __stub macros and hopefully few prototypes,
20350     which can conflict with char sasl_version(); below.  */
20351 #include <assert.h>
20352 /* Override any gcc2 internal prototype to avoid an error.  */
20353 /* We use char because int might match the return type of a gcc2
20354     builtin and then its argument prototype would still apply.  */
20355 char sasl_version();
20356 char (*f)();
20357
20358 int main() {
20359
20360 /* The GNU C library defines this for functions which it implements
20361     to always fail with ENOSYS.  Some functions are actually named
20362     something starting with __ and the normal name is an alias.  */
20363 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
20364 choke me
20365 #else
20366 f = sasl_version;
20367 #endif
20368
20369 ; return 0; }
20370 EOF
20371 if { (eval echo configure:20372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20372   rm -rf conftest*
20373   eval "ac_cv_func_sasl_version=yes"
20374 else
20375   echo "configure: failed program was:" >&5
20376   cat conftest.$ac_ext >&5
20377   rm -rf conftest*
20378   eval "ac_cv_func_sasl_version=no"
20379 fi
20380 rm -f conftest*
20381 fi
20382
20383 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
20384   echo "$ac_t""yes" 1>&6
20385   cat >> confdefs.h <<\EOF
20386 #define HAVE_SASL_VERSION 1
20387 EOF
20388
20389 else
20390   echo "$ac_t""no" 1>&6
20391 fi
20392
20393                 LIBS="$ac_save_LIBS"
20394         fi
20395
20396 else
20397         echo "configure: warning: SASL authentication not supported!" 1>&2
20398         if test $ol_link_tls = no ; then
20399                 echo "configure: warning: Strong authentication not supported!" 1>&2
20400         fi
20401 fi
20402
20403 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
20404         dev=no
20405         if test -r /dev/urandom ; then
20406                 dev="/dev/urandom";
20407         elif test -r /idev/urandom ; then
20408                 dev="/idev/urandom";
20409         elif test -r /dev/srandom ; then
20410                 dev="/dev/srandom";
20411         elif test -r /dev/random ; then
20412                 dev="/dev/random";
20413         elif test -r /idev/random ; then
20414                 dev="/idev/random";
20415         fi
20416
20417         if test $dev != no ; then
20418                 cat >> confdefs.h <<EOF
20419 #define URANDOM_DEVICE "$dev"
20420 EOF
20421
20422         fi
20423 fi
20424
20425 ol_link_fetch=no
20426 if test $ol_with_fetch != no ; then
20427         ol_LIBS=$LIBS
20428 LIBS="-lfetch -lcom_err $LIBS"
20429 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
20430 echo "configure:20431: checking fetch(3) library" >&5
20431 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
20432   echo $ac_n "(cached) $ac_c" 1>&6
20433 else
20434   
20435         cat > conftest.$ac_ext <<EOF
20436 #line 20437 "configure"
20437 #include "confdefs.h"
20438
20439 #include <sys/param.h>
20440 #include <stdio.h>
20441 #include <fetch.h>
20442 int main() {
20443 struct url *u = fetchParseURL("file:///"); 
20444 ; return 0; }
20445 EOF
20446 if { (eval echo configure:20447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20447   rm -rf conftest*
20448   ol_cv_lib_fetch=yes
20449 else
20450   echo "configure: failed program was:" >&5
20451   cat conftest.$ac_ext >&5
20452   rm -rf conftest*
20453   ol_cv_lib_fetch=no
20454 fi
20455 rm -f conftest*
20456 fi
20457
20458 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
20459 LIBS=$ol_LIBS
20460 if test $ol_cv_lib_fetch != no ; then
20461         ol_link_fetch="-lfetch -lcom_err"
20462         cat >> confdefs.h <<\EOF
20463 #define HAVE_FETCH 1
20464 EOF
20465
20466 fi
20467
20468
20469         if test $ol_cv_lib_fetch != no ; then
20470                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
20471                 ol_link_fetch=freebsd
20472
20473         elif test $ol_with_fetch != auto ; then
20474                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
20475         fi 
20476 fi
20477
20478 ol_link_readline=no
20479 if test $ol_with_readline != no ; then
20480         for ac_hdr in readline/readline.h readline/history.h
20481 do
20482 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20483 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20484 echo "configure:20485: checking for $ac_hdr" >&5
20485 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20486   echo $ac_n "(cached) $ac_c" 1>&6
20487 else
20488   cat > conftest.$ac_ext <<EOF
20489 #line 20490 "configure"
20490 #include "confdefs.h"
20491 #include <$ac_hdr>
20492 EOF
20493 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20494 { (eval echo configure:20495: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20495 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20496 if test -z "$ac_err"; then
20497   rm -rf conftest*
20498   eval "ac_cv_header_$ac_safe=yes"
20499 else
20500   echo "$ac_err" >&5
20501   echo "configure: failed program was:" >&5
20502   cat conftest.$ac_ext >&5
20503   rm -rf conftest*
20504   eval "ac_cv_header_$ac_safe=no"
20505 fi
20506 rm -f conftest*
20507 fi
20508 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20509   echo "$ac_t""yes" 1>&6
20510     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20511   cat >> confdefs.h <<EOF
20512 #define $ac_tr_hdr 1
20513 EOF
20514  
20515 else
20516   echo "$ac_t""no" 1>&6
20517 fi
20518 done
20519
20520
20521         if test $ac_cv_header_readline_readline_h = yes ; then
20522                 save_LIBS="$LIBS"
20523                 LIBS="$TERMCAP_LIBS $LIBS"
20524                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
20525 echo "configure:20526: checking for readline in -lreadline" >&5
20526 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
20527 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20528   echo $ac_n "(cached) $ac_c" 1>&6
20529 else
20530   ac_save_LIBS="$LIBS"
20531 LIBS="-lreadline  $LIBS"
20532 cat > conftest.$ac_ext <<EOF
20533 #line 20534 "configure"
20534 #include "confdefs.h"
20535 /* Override any gcc2 internal prototype to avoid an error.  */
20536 /* We use char because int might match the return type of a gcc2
20537     builtin and then its argument prototype would still apply.  */
20538 char readline();
20539
20540 int main() {
20541 readline()
20542 ; return 0; }
20543 EOF
20544 if { (eval echo configure:20545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20545   rm -rf conftest*
20546   eval "ac_cv_lib_$ac_lib_var=yes"
20547 else
20548   echo "configure: failed program was:" >&5
20549   cat conftest.$ac_ext >&5
20550   rm -rf conftest*
20551   eval "ac_cv_lib_$ac_lib_var=no"
20552 fi
20553 rm -f conftest*
20554 LIBS="$ac_save_LIBS"
20555
20556 fi
20557 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20558   echo "$ac_t""yes" 1>&6
20559   have_readline=yes
20560 else
20561   echo "$ac_t""no" 1>&6
20562 have_readline=no
20563 fi
20564
20565                 LIBS="$save_LIBS"
20566                         
20567                 if test $have_readline = yes ; then
20568                         ol_with_readline=found
20569                         ol_link_readline=yes
20570
20571                         READLINE_LIBS="-lreadline"
20572                 fi
20573         fi
20574 fi
20575
20576 if test $ol_link_readline = yes ; then
20577         cat >> confdefs.h <<\EOF
20578 #define HAVE_READLINE 1
20579 EOF
20580
20581 fi
20582
20583
20584 if test $ol_enable_crypt != no ; then
20585         echo $ac_n "checking for crypt""... $ac_c" 1>&6
20586 echo "configure:20587: checking for crypt" >&5
20587 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
20588   echo $ac_n "(cached) $ac_c" 1>&6
20589 else
20590   cat > conftest.$ac_ext <<EOF
20591 #line 20592 "configure"
20592 #include "confdefs.h"
20593 /* System header to define __stub macros and hopefully few prototypes,
20594     which can conflict with char crypt(); below.  */
20595 #include <assert.h>
20596 /* Override any gcc2 internal prototype to avoid an error.  */
20597 /* We use char because int might match the return type of a gcc2
20598     builtin and then its argument prototype would still apply.  */
20599 char crypt();
20600 char (*f)();
20601
20602 int main() {
20603
20604 /* The GNU C library defines this for functions which it implements
20605     to always fail with ENOSYS.  Some functions are actually named
20606     something starting with __ and the normal name is an alias.  */
20607 #if defined (__stub_crypt) || defined (__stub___crypt)
20608 choke me
20609 #else
20610 f = crypt;
20611 #endif
20612
20613 ; return 0; }
20614 EOF
20615 if { (eval echo configure:20616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20616   rm -rf conftest*
20617   eval "ac_cv_func_crypt=yes"
20618 else
20619   echo "configure: failed program was:" >&5
20620   cat conftest.$ac_ext >&5
20621   rm -rf conftest*
20622   eval "ac_cv_func_crypt=no"
20623 fi
20624 rm -f conftest*
20625 fi
20626
20627 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
20628   echo "$ac_t""yes" 1>&6
20629   have_crypt=yes
20630 else
20631   echo "$ac_t""no" 1>&6
20632
20633                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
20634 echo "configure:20635: checking for crypt in -lcrypt" >&5
20635 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
20636 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20637   echo $ac_n "(cached) $ac_c" 1>&6
20638 else
20639   ac_save_LIBS="$LIBS"
20640 LIBS="-lcrypt  $LIBS"
20641 cat > conftest.$ac_ext <<EOF
20642 #line 20643 "configure"
20643 #include "confdefs.h"
20644 /* Override any gcc2 internal prototype to avoid an error.  */
20645 /* We use char because int might match the return type of a gcc2
20646     builtin and then its argument prototype would still apply.  */
20647 char crypt();
20648
20649 int main() {
20650 crypt()
20651 ; return 0; }
20652 EOF
20653 if { (eval echo configure:20654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20654   rm -rf conftest*
20655   eval "ac_cv_lib_$ac_lib_var=yes"
20656 else
20657   echo "configure: failed program was:" >&5
20658   cat conftest.$ac_ext >&5
20659   rm -rf conftest*
20660   eval "ac_cv_lib_$ac_lib_var=no"
20661 fi
20662 rm -f conftest*
20663 LIBS="$ac_save_LIBS"
20664
20665 fi
20666 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20667   echo "$ac_t""yes" 1>&6
20668   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
20669                         have_crypt=yes
20670 else
20671   echo "$ac_t""no" 1>&6
20672 have_crypt=no
20673 fi
20674
20675 fi
20676
20677
20678         if test $have_crypt = yes ; then
20679                 cat >> confdefs.h <<\EOF
20680 #define HAVE_CRYPT 1
20681 EOF
20682
20683         else
20684                 echo "configure: warning: could not find crypt" 1>&2
20685                 if test $ol_enable_crypt = yes ; then
20686                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
20687                 fi
20688
20689                 echo "configure: warning: disabling crypt support" 1>&2
20690                 ol_enable_crypt=no
20691         fi
20692 fi
20693
20694 if test $ol_enable_proctitle != no ; then
20695         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
20696 echo "configure:20697: checking for setproctitle" >&5
20697 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
20698   echo $ac_n "(cached) $ac_c" 1>&6
20699 else
20700   cat > conftest.$ac_ext <<EOF
20701 #line 20702 "configure"
20702 #include "confdefs.h"
20703 /* System header to define __stub macros and hopefully few prototypes,
20704     which can conflict with char setproctitle(); below.  */
20705 #include <assert.h>
20706 /* Override any gcc2 internal prototype to avoid an error.  */
20707 /* We use char because int might match the return type of a gcc2
20708     builtin and then its argument prototype would still apply.  */
20709 char setproctitle();
20710 char (*f)();
20711
20712 int main() {
20713
20714 /* The GNU C library defines this for functions which it implements
20715     to always fail with ENOSYS.  Some functions are actually named
20716     something starting with __ and the normal name is an alias.  */
20717 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
20718 choke me
20719 #else
20720 f = setproctitle;
20721 #endif
20722
20723 ; return 0; }
20724 EOF
20725 if { (eval echo configure:20726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20726   rm -rf conftest*
20727   eval "ac_cv_func_setproctitle=yes"
20728 else
20729   echo "configure: failed program was:" >&5
20730   cat conftest.$ac_ext >&5
20731   rm -rf conftest*
20732   eval "ac_cv_func_setproctitle=no"
20733 fi
20734 rm -f conftest*
20735 fi
20736
20737 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
20738   echo "$ac_t""yes" 1>&6
20739   have_setproctitle=yes
20740 else
20741   echo "$ac_t""no" 1>&6
20742
20743                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
20744 echo "configure:20745: checking for setproctitle in -lutil" >&5
20745 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
20746 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20747   echo $ac_n "(cached) $ac_c" 1>&6
20748 else
20749   ac_save_LIBS="$LIBS"
20750 LIBS="-lutil  $LIBS"
20751 cat > conftest.$ac_ext <<EOF
20752 #line 20753 "configure"
20753 #include "confdefs.h"
20754 /* Override any gcc2 internal prototype to avoid an error.  */
20755 /* We use char because int might match the return type of a gcc2
20756     builtin and then its argument prototype would still apply.  */
20757 char setproctitle();
20758
20759 int main() {
20760 setproctitle()
20761 ; return 0; }
20762 EOF
20763 if { (eval echo configure:20764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20764   rm -rf conftest*
20765   eval "ac_cv_lib_$ac_lib_var=yes"
20766 else
20767   echo "configure: failed program was:" >&5
20768   cat conftest.$ac_ext >&5
20769   rm -rf conftest*
20770   eval "ac_cv_lib_$ac_lib_var=no"
20771 fi
20772 rm -f conftest*
20773 LIBS="$ac_save_LIBS"
20774
20775 fi
20776 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20777   echo "$ac_t""yes" 1>&6
20778   have_setproctitle=yes
20779                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
20780 else
20781   echo "$ac_t""no" 1>&6
20782 have_setproctitle=no
20783                         LIBOBJS="$LIBOBJS setproctitle.o"
20784                         LIBSRCS="$LIBSRCS setproctitle.c"
20785 fi
20786
20787 fi
20788
20789
20790         if test $have_setproctitle = yes ; then
20791                 cat >> confdefs.h <<\EOF
20792 #define HAVE_SETPROCTITLE 1
20793 EOF
20794
20795         fi
20796 fi
20797
20798 if test $ol_enable_slp != no ; then
20799         for ac_hdr in slp.h 
20800 do
20801 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20802 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20803 echo "configure:20804: checking for $ac_hdr" >&5
20804 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20805   echo $ac_n "(cached) $ac_c" 1>&6
20806 else
20807   cat > conftest.$ac_ext <<EOF
20808 #line 20809 "configure"
20809 #include "confdefs.h"
20810 #include <$ac_hdr>
20811 EOF
20812 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20813 { (eval echo configure:20814: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20814 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20815 if test -z "$ac_err"; then
20816   rm -rf conftest*
20817   eval "ac_cv_header_$ac_safe=yes"
20818 else
20819   echo "$ac_err" >&5
20820   echo "configure: failed program was:" >&5
20821   cat conftest.$ac_ext >&5
20822   rm -rf conftest*
20823   eval "ac_cv_header_$ac_safe=no"
20824 fi
20825 rm -f conftest*
20826 fi
20827 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20828   echo "$ac_t""yes" 1>&6
20829     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20830   cat >> confdefs.h <<EOF
20831 #define $ac_tr_hdr 1
20832 EOF
20833  
20834 else
20835   echo "$ac_t""no" 1>&6
20836 fi
20837 done
20838
20839
20840         if test $ac_cv_header_slp_h = yes ; then
20841                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
20842 echo "configure:20843: checking for SLPOpen in -lslp" >&5
20843 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
20844 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20845   echo $ac_n "(cached) $ac_c" 1>&6
20846 else
20847   ac_save_LIBS="$LIBS"
20848 LIBS="-lslp  $LIBS"
20849 cat > conftest.$ac_ext <<EOF
20850 #line 20851 "configure"
20851 #include "confdefs.h"
20852 /* Override any gcc2 internal prototype to avoid an error.  */
20853 /* We use char because int might match the return type of a gcc2
20854     builtin and then its argument prototype would still apply.  */
20855 char SLPOpen();
20856
20857 int main() {
20858 SLPOpen()
20859 ; return 0; }
20860 EOF
20861 if { (eval echo configure:20862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20862   rm -rf conftest*
20863   eval "ac_cv_lib_$ac_lib_var=yes"
20864 else
20865   echo "configure: failed program was:" >&5
20866   cat conftest.$ac_ext >&5
20867   rm -rf conftest*
20868   eval "ac_cv_lib_$ac_lib_var=no"
20869 fi
20870 rm -f conftest*
20871 LIBS="$ac_save_LIBS"
20872
20873 fi
20874 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20875   echo "$ac_t""yes" 1>&6
20876   have_slp=yes
20877 else
20878   echo "$ac_t""no" 1>&6
20879 have_slp=no
20880 fi
20881
20882                 if test $have_slp = yes ; then
20883                         cat >> confdefs.h <<\EOF
20884 #define HAVE_SLP 1
20885 EOF
20886
20887                         SLAPD_SLP_LIBS=-lslp
20888                 fi
20889
20890         elif test $ol_enable_slp = yes ; then
20891                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
20892         fi
20893 fi
20894
20895 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
20896 echo "configure:20897: checking for ANSI C header files" >&5
20897 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
20898   echo $ac_n "(cached) $ac_c" 1>&6
20899 else
20900   cat > conftest.$ac_ext <<EOF
20901 #line 20902 "configure"
20902 #include "confdefs.h"
20903 #include <stdlib.h>
20904 #include <stdarg.h>
20905 #include <string.h>
20906 #include <float.h>
20907 EOF
20908 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20909 { (eval echo configure:20910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20910 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20911 if test -z "$ac_err"; then
20912   rm -rf conftest*
20913   ac_cv_header_stdc=yes
20914 else
20915   echo "$ac_err" >&5
20916   echo "configure: failed program was:" >&5
20917   cat conftest.$ac_ext >&5
20918   rm -rf conftest*
20919   ac_cv_header_stdc=no
20920 fi
20921 rm -f conftest*
20922
20923 if test $ac_cv_header_stdc = yes; then
20924   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
20925 cat > conftest.$ac_ext <<EOF
20926 #line 20927 "configure"
20927 #include "confdefs.h"
20928 #include <string.h>
20929 EOF
20930 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20931   egrep "memchr" >/dev/null 2>&1; then
20932   :
20933 else
20934   rm -rf conftest*
20935   ac_cv_header_stdc=no
20936 fi
20937 rm -f conftest*
20938
20939 fi
20940
20941 if test $ac_cv_header_stdc = yes; then
20942   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
20943 cat > conftest.$ac_ext <<EOF
20944 #line 20945 "configure"
20945 #include "confdefs.h"
20946 #include <stdlib.h>
20947 EOF
20948 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20949   egrep "free" >/dev/null 2>&1; then
20950   :
20951 else
20952   rm -rf conftest*
20953   ac_cv_header_stdc=no
20954 fi
20955 rm -f conftest*
20956
20957 fi
20958
20959 if test $ac_cv_header_stdc = yes; then
20960   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
20961 if test "$cross_compiling" = yes; then
20962   :
20963 else
20964   cat > conftest.$ac_ext <<EOF
20965 #line 20966 "configure"
20966 #include "confdefs.h"
20967 #include <ctype.h>
20968 #if ((' ' & 0x0FF) == 0x020)
20969 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
20970 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
20971 #else
20972 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
20973  || ('j' <= (c) && (c) <= 'r') \
20974  || ('s' <= (c) && (c) <= 'z'))
20975 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
20976 #endif
20977 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
20978 int main () { int i; for (i = 0; i < 256; i++)
20979 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
20980 exit (0); }
20981
20982 EOF
20983 if { (eval echo configure:20984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20984 then
20985   :
20986 else
20987   echo "configure: failed program was:" >&5
20988   cat conftest.$ac_ext >&5
20989   rm -fr conftest*
20990   ac_cv_header_stdc=no
20991 fi
20992 rm -fr conftest*
20993 fi
20994
20995 fi
20996 fi
20997
20998 echo "$ac_t""$ac_cv_header_stdc" 1>&6
20999 if test $ac_cv_header_stdc = yes; then
21000   cat >> confdefs.h <<\EOF
21001 #define STDC_HEADERS 1
21002 EOF
21003
21004 fi
21005
21006 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
21007 echo "configure:21008: checking for mode_t" >&5
21008 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
21009   echo $ac_n "(cached) $ac_c" 1>&6
21010 else
21011   cat > conftest.$ac_ext <<EOF
21012 #line 21013 "configure"
21013 #include "confdefs.h"
21014 #include <sys/types.h>
21015 #if STDC_HEADERS
21016 #include <stdlib.h>
21017 #include <stddef.h>
21018 #endif
21019
21020 EOF
21021 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21022   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21023   rm -rf conftest*
21024   eval "ac_cv_type_mode_t=yes"
21025 else
21026   rm -rf conftest*
21027   eval "ac_cv_type_mode_t=no"
21028 fi
21029 rm -f conftest*
21030
21031 fi
21032 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
21033   echo "$ac_t""yes" 1>&6
21034 else
21035   echo "$ac_t""no" 1>&6
21036   cat >> confdefs.h <<EOF
21037 #define mode_t int
21038 EOF
21039
21040 fi
21041
21042 echo $ac_n "checking for off_t""... $ac_c" 1>&6
21043 echo "configure:21044: checking for off_t" >&5
21044 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
21045   echo $ac_n "(cached) $ac_c" 1>&6
21046 else
21047   cat > conftest.$ac_ext <<EOF
21048 #line 21049 "configure"
21049 #include "confdefs.h"
21050 #include <sys/types.h>
21051 #if STDC_HEADERS
21052 #include <stdlib.h>
21053 #include <stddef.h>
21054 #endif
21055
21056 EOF
21057 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21058   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21059   rm -rf conftest*
21060   eval "ac_cv_type_off_t=yes"
21061 else
21062   rm -rf conftest*
21063   eval "ac_cv_type_off_t=no"
21064 fi
21065 rm -f conftest*
21066
21067 fi
21068 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
21069   echo "$ac_t""yes" 1>&6
21070 else
21071   echo "$ac_t""no" 1>&6
21072   cat >> confdefs.h <<EOF
21073 #define off_t long
21074 EOF
21075
21076 fi
21077
21078 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
21079 echo "configure:21080: checking for pid_t" >&5
21080 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
21081   echo $ac_n "(cached) $ac_c" 1>&6
21082 else
21083   cat > conftest.$ac_ext <<EOF
21084 #line 21085 "configure"
21085 #include "confdefs.h"
21086 #include <sys/types.h>
21087 #if STDC_HEADERS
21088 #include <stdlib.h>
21089 #include <stddef.h>
21090 #endif
21091
21092 EOF
21093 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21094   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21095   rm -rf conftest*
21096   eval "ac_cv_type_pid_t=yes"
21097 else
21098   rm -rf conftest*
21099   eval "ac_cv_type_pid_t=no"
21100 fi
21101 rm -f conftest*
21102
21103 fi
21104 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
21105   echo "$ac_t""yes" 1>&6
21106 else
21107   echo "$ac_t""no" 1>&6
21108   cat >> confdefs.h <<EOF
21109 #define pid_t int
21110 EOF
21111
21112 fi
21113
21114 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
21115 echo "configure:21116: checking for ptrdiff_t" >&5
21116 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
21117   echo $ac_n "(cached) $ac_c" 1>&6
21118 else
21119   cat > conftest.$ac_ext <<EOF
21120 #line 21121 "configure"
21121 #include "confdefs.h"
21122 #include <stddef.h>
21123 int main() {
21124 ptrdiff_t p
21125 ; return 0; }
21126 EOF
21127 if { (eval echo configure:21128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21128   rm -rf conftest*
21129   am_cv_type_ptrdiff_t=yes
21130 else
21131   echo "configure: failed program was:" >&5
21132   cat conftest.$ac_ext >&5
21133   rm -rf conftest*
21134   am_cv_type_ptrdiff_t=no
21135 fi
21136 rm -f conftest*
21137 fi
21138
21139 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
21140    if test $am_cv_type_ptrdiff_t = yes; then
21141      cat >> confdefs.h <<\EOF
21142 #define HAVE_PTRDIFF_T 1
21143 EOF
21144
21145    fi
21146
21147 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
21148 echo "configure:21149: checking return type of signal handlers" >&5
21149 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
21150   echo $ac_n "(cached) $ac_c" 1>&6
21151 else
21152   cat > conftest.$ac_ext <<EOF
21153 #line 21154 "configure"
21154 #include "confdefs.h"
21155 #include <sys/types.h>
21156 #include <signal.h>
21157 #ifdef signal
21158 #undef signal
21159 #endif
21160 #ifdef __cplusplus
21161 extern "C" void (*signal (int, void (*)(int)))(int);
21162 #else
21163 void (*signal ()) ();
21164 #endif
21165
21166 int main() {
21167 int i;
21168 ; return 0; }
21169 EOF
21170 if { (eval echo configure:21171: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21171   rm -rf conftest*
21172   ac_cv_type_signal=void
21173 else
21174   echo "configure: failed program was:" >&5
21175   cat conftest.$ac_ext >&5
21176   rm -rf conftest*
21177   ac_cv_type_signal=int
21178 fi
21179 rm -f conftest*
21180 fi
21181
21182 echo "$ac_t""$ac_cv_type_signal" 1>&6
21183 cat >> confdefs.h <<EOF
21184 #define RETSIGTYPE $ac_cv_type_signal
21185 EOF
21186
21187
21188 echo $ac_n "checking for size_t""... $ac_c" 1>&6
21189 echo "configure:21190: checking for size_t" >&5
21190 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
21191   echo $ac_n "(cached) $ac_c" 1>&6
21192 else
21193   cat > conftest.$ac_ext <<EOF
21194 #line 21195 "configure"
21195 #include "confdefs.h"
21196 #include <sys/types.h>
21197 #if STDC_HEADERS
21198 #include <stdlib.h>
21199 #include <stddef.h>
21200 #endif
21201
21202 EOF
21203 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21204   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21205   rm -rf conftest*
21206   eval "ac_cv_type_size_t=yes"
21207 else
21208   rm -rf conftest*
21209   eval "ac_cv_type_size_t=no"
21210 fi
21211 rm -f conftest*
21212
21213 fi
21214 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
21215   echo "$ac_t""yes" 1>&6
21216 else
21217   echo "$ac_t""no" 1>&6
21218   cat >> confdefs.h <<EOF
21219 #define size_t unsigned
21220 EOF
21221
21222 fi
21223
21224
21225 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
21226 echo "configure:21227: checking for ssize_t" >&5
21227 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
21228   echo $ac_n "(cached) $ac_c" 1>&6
21229 else
21230   cat > conftest.$ac_ext <<EOF
21231 #line 21232 "configure"
21232 #include "confdefs.h"
21233 #include <sys/types.h>
21234 #if STDC_HEADERS
21235 #include <stdlib.h>
21236 #include <stddef.h>
21237 #endif
21238
21239 EOF
21240 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21241   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21242   rm -rf conftest*
21243   eval "ac_cv_type_ssize_t=yes"
21244 else
21245   rm -rf conftest*
21246   eval "ac_cv_type_ssize_t=no"
21247 fi
21248 rm -f conftest*
21249
21250 fi
21251 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
21252   echo "$ac_t""yes" 1>&6
21253 else
21254   echo "$ac_t""no" 1>&6
21255   cat >> confdefs.h <<EOF
21256 #define ssize_t signed int
21257 EOF
21258
21259 fi
21260
21261 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
21262 echo "configure:21263: checking for caddr_t" >&5
21263 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
21264   echo $ac_n "(cached) $ac_c" 1>&6
21265 else
21266   cat > conftest.$ac_ext <<EOF
21267 #line 21268 "configure"
21268 #include "confdefs.h"
21269 #include <sys/types.h>
21270 #if STDC_HEADERS
21271 #include <stdlib.h>
21272 #include <stddef.h>
21273 #endif
21274
21275 EOF
21276 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21277   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21278   rm -rf conftest*
21279   eval "ac_cv_type_caddr_t=yes"
21280 else
21281   rm -rf conftest*
21282   eval "ac_cv_type_caddr_t=no"
21283 fi
21284 rm -f conftest*
21285
21286 fi
21287 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
21288   echo "$ac_t""yes" 1>&6
21289 else
21290   echo "$ac_t""no" 1>&6
21291   cat >> confdefs.h <<EOF
21292 #define caddr_t char *
21293 EOF
21294
21295 fi
21296
21297
21298 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
21299 echo "configure:21300: checking for socklen_t" >&5
21300 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
21301   echo $ac_n "(cached) $ac_c" 1>&6
21302 else
21303   cat > conftest.$ac_ext <<EOF
21304 #line 21305 "configure"
21305 #include "confdefs.h"
21306
21307 #ifdef HAVE_SYS_TYPES_H
21308 #include <sys/types.h>
21309 #endif
21310 #ifdef HAVE_SYS_SOCKET_H
21311 #include <sys/socket.h>
21312 #endif
21313
21314 int main() {
21315 socklen_t len;
21316 ; return 0; }
21317 EOF
21318 if { (eval echo configure:21319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21319   rm -rf conftest*
21320   ol_cv_type_socklen_t=yes
21321 else
21322   echo "configure: failed program was:" >&5
21323   cat conftest.$ac_ext >&5
21324   rm -rf conftest*
21325   ol_cv_type_socklen_t=no
21326 fi
21327 rm -f conftest*
21328 fi
21329
21330 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
21331   if test $ol_cv_type_socklen_t = no; then
21332     cat >> confdefs.h <<\EOF
21333 #define socklen_t int
21334 EOF
21335
21336   fi
21337  
21338 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
21339 echo "configure:21340: checking for member st_blksize in aggregate type struct stat" >&5
21340 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
21341   echo $ac_n "(cached) $ac_c" 1>&6
21342 else
21343   cat > conftest.$ac_ext <<EOF
21344 #line 21345 "configure"
21345 #include "confdefs.h"
21346 #include <sys/types.h>
21347 #include <sys/stat.h>
21348 int main() {
21349 struct stat foo; foo.st_blksize;
21350 ; return 0; }
21351 EOF
21352 if { (eval echo configure:21353: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21353   rm -rf conftest*
21354   ac_cv_c_struct_member_st_blksize=yes
21355 else
21356   echo "configure: failed program was:" >&5
21357   cat conftest.$ac_ext >&5
21358   rm -rf conftest*
21359   ac_cv_c_struct_member_st_blksize=no
21360 fi
21361 rm -f conftest*
21362 fi
21363
21364 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
21365 st_blksize="$ac_cv_c_struct_member_st_blksize"
21366 if test $ac_cv_c_struct_member_st_blksize = yes; then
21367   cat >> confdefs.h <<\EOF
21368 #define HAVE_ST_BLKSIZE 1
21369 EOF
21370
21371 fi
21372
21373 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
21374 echo "configure:21375: checking whether time.h and sys/time.h may both be included" >&5
21375 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
21376   echo $ac_n "(cached) $ac_c" 1>&6
21377 else
21378   cat > conftest.$ac_ext <<EOF
21379 #line 21380 "configure"
21380 #include "confdefs.h"
21381 #include <sys/types.h>
21382 #include <sys/time.h>
21383 #include <time.h>
21384 int main() {
21385 struct tm *tp;
21386 ; return 0; }
21387 EOF
21388 if { (eval echo configure:21389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21389   rm -rf conftest*
21390   ac_cv_header_time=yes
21391 else
21392   echo "configure: failed program was:" >&5
21393   cat conftest.$ac_ext >&5
21394   rm -rf conftest*
21395   ac_cv_header_time=no
21396 fi
21397 rm -f conftest*
21398 fi
21399
21400 echo "$ac_t""$ac_cv_header_time" 1>&6
21401 if test $ac_cv_header_time = yes; then
21402   cat >> confdefs.h <<\EOF
21403 #define TIME_WITH_SYS_TIME 1
21404 EOF
21405
21406 fi
21407
21408 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
21409 echo "configure:21410: checking whether struct tm is in sys/time.h or time.h" >&5
21410 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
21411   echo $ac_n "(cached) $ac_c" 1>&6
21412 else
21413   cat > conftest.$ac_ext <<EOF
21414 #line 21415 "configure"
21415 #include "confdefs.h"
21416 #include <sys/types.h>
21417 #include <time.h>
21418 int main() {
21419 struct tm *tp; tp->tm_sec;
21420 ; return 0; }
21421 EOF
21422 if { (eval echo configure:21423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21423   rm -rf conftest*
21424   ac_cv_struct_tm=time.h
21425 else
21426   echo "configure: failed program was:" >&5
21427   cat conftest.$ac_ext >&5
21428   rm -rf conftest*
21429   ac_cv_struct_tm=sys/time.h
21430 fi
21431 rm -f conftest*
21432 fi
21433
21434 echo "$ac_t""$ac_cv_struct_tm" 1>&6
21435 if test $ac_cv_struct_tm = sys/time.h; then
21436   cat >> confdefs.h <<\EOF
21437 #define TM_IN_SYS_TIME 1
21438 EOF
21439
21440 fi
21441
21442 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
21443 echo "configure:21444: checking for uid_t in sys/types.h" >&5
21444 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
21445   echo $ac_n "(cached) $ac_c" 1>&6
21446 else
21447   cat > conftest.$ac_ext <<EOF
21448 #line 21449 "configure"
21449 #include "confdefs.h"
21450 #include <sys/types.h>
21451 EOF
21452 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21453   egrep "uid_t" >/dev/null 2>&1; then
21454   rm -rf conftest*
21455   ac_cv_type_uid_t=yes
21456 else
21457   rm -rf conftest*
21458   ac_cv_type_uid_t=no
21459 fi
21460 rm -f conftest*
21461
21462 fi
21463
21464 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
21465 if test $ac_cv_type_uid_t = no; then
21466   cat >> confdefs.h <<\EOF
21467 #define uid_t int
21468 EOF
21469
21470   cat >> confdefs.h <<\EOF
21471 #define gid_t int
21472 EOF
21473
21474 fi
21475
21476 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
21477 echo "configure:21478: checking for sig_atomic_t" >&5
21478 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
21479   echo $ac_n "(cached) $ac_c" 1>&6
21480 else
21481   cat > conftest.$ac_ext <<EOF
21482 #line 21483 "configure"
21483 #include "confdefs.h"
21484 #include <signal.h>
21485 int main() {
21486 sig_atomic_t atomic;
21487 ; return 0; }
21488 EOF
21489 if { (eval echo configure:21490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21490   rm -rf conftest*
21491   ol_cv_type_sig_atomic_t=yes
21492 else
21493   echo "configure: failed program was:" >&5
21494   cat conftest.$ac_ext >&5
21495   rm -rf conftest*
21496   ol_cv_type_sig_atomic_t=no
21497 fi
21498 rm -f conftest*
21499 fi
21500
21501 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
21502   if test $ol_cv_type_sig_atomic_t = no; then
21503     cat >> confdefs.h <<\EOF
21504 #define sig_atomic_t int
21505 EOF
21506
21507   fi
21508  
21509
21510
21511 # test for pw_gecos in struct passwd
21512 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
21513 echo "configure:21514: checking struct passwd for pw_gecos" >&5
21514 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
21515   echo $ac_n "(cached) $ac_c" 1>&6
21516 else
21517   
21518         cat > conftest.$ac_ext <<EOF
21519 #line 21520 "configure"
21520 #include "confdefs.h"
21521 #include <pwd.h>
21522 int main() {
21523
21524         struct passwd pwd;
21525         pwd.pw_gecos = pwd.pw_name;
21526
21527 ; return 0; }
21528 EOF
21529 if { (eval echo configure:21530: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21530   rm -rf conftest*
21531   ol_cv_struct_passwd_pw_gecos=yes
21532 else
21533   echo "configure: failed program was:" >&5
21534   cat conftest.$ac_ext >&5
21535   rm -rf conftest*
21536   ol_cv_struct_passwd_pw_gecos=no
21537 fi
21538 rm -f conftest*
21539 fi
21540
21541 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
21542 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
21543         cat >> confdefs.h <<\EOF
21544 #define HAVE_PW_GECOS 1
21545 EOF
21546
21547 fi
21548
21549 # test for pw_passwd in struct passwd
21550 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
21551 echo "configure:21552: checking struct passwd for pw_passwd" >&5
21552 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
21553   echo $ac_n "(cached) $ac_c" 1>&6
21554 else
21555   
21556         cat > conftest.$ac_ext <<EOF
21557 #line 21558 "configure"
21558 #include "confdefs.h"
21559 #include <pwd.h>
21560 int main() {
21561
21562         struct passwd pwd;
21563         pwd.pw_passwd = pwd.pw_name;
21564
21565 ; return 0; }
21566 EOF
21567 if { (eval echo configure:21568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21568   rm -rf conftest*
21569   ol_cv_struct_passwd_pw_passwd=yes
21570 else
21571   echo "configure: failed program was:" >&5
21572   cat conftest.$ac_ext >&5
21573   rm -rf conftest*
21574   ol_cv_struct_passwd_pw_passwd=no
21575 fi
21576 rm -f conftest*
21577 fi
21578
21579 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
21580 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
21581         cat >> confdefs.h <<\EOF
21582 #define HAVE_PW_PASSWD 1
21583 EOF
21584
21585 fi
21586
21587
21588 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
21589 echo "configure:21590: checking if toupper() requires islower()" >&5
21590 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
21591   echo $ac_n "(cached) $ac_c" 1>&6
21592 else
21593   
21594         if test "$cross_compiling" = yes; then
21595   ol_cv_c_upper_lower=safe
21596 else
21597   cat > conftest.$ac_ext <<EOF
21598 #line 21599 "configure"
21599 #include "confdefs.h"
21600
21601 #include <ctype.h>
21602 main()
21603 {
21604         if ('C' == toupper('C'))
21605                 exit(0);
21606         else
21607                 exit(1);
21608 }
21609 EOF
21610 if { (eval echo configure:21611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21611 then
21612   ol_cv_c_upper_lower=no
21613 else
21614   echo "configure: failed program was:" >&5
21615   cat conftest.$ac_ext >&5
21616   rm -fr conftest*
21617   ol_cv_c_upper_lower=yes
21618 fi
21619 rm -fr conftest*
21620 fi
21621
21622 fi
21623
21624 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
21625 if test $ol_cv_c_upper_lower != no ; then
21626         cat >> confdefs.h <<\EOF
21627 #define C_UPPER_LOWER 1
21628 EOF
21629
21630 fi
21631
21632 echo $ac_n "checking for working const""... $ac_c" 1>&6
21633 echo "configure:21634: checking for working const" >&5
21634 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
21635   echo $ac_n "(cached) $ac_c" 1>&6
21636 else
21637   cat > conftest.$ac_ext <<EOF
21638 #line 21639 "configure"
21639 #include "confdefs.h"
21640
21641 int main() {
21642
21643 /* Ultrix mips cc rejects this.  */
21644 typedef int charset[2]; const charset x;
21645 /* SunOS 4.1.1 cc rejects this.  */
21646 char const *const *ccp;
21647 char **p;
21648 /* NEC SVR4.0.2 mips cc rejects this.  */
21649 struct point {int x, y;};
21650 static struct point const zero = {0,0};
21651 /* AIX XL C 1.02.0.0 rejects this.
21652    It does not let you subtract one const X* pointer from another in an arm
21653    of an if-expression whose if-part is not a constant expression */
21654 const char *g = "string";
21655 ccp = &g + (g ? g-g : 0);
21656 /* HPUX 7.0 cc rejects these. */
21657 ++ccp;
21658 p = (char**) ccp;
21659 ccp = (char const *const *) p;
21660 { /* SCO 3.2v4 cc rejects this.  */
21661   char *t;
21662   char const *s = 0 ? (char *) 0 : (char const *) 0;
21663
21664   *t++ = 0;
21665 }
21666 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
21667   int x[] = {25, 17};
21668   const int *foo = &x[0];
21669   ++foo;
21670 }
21671 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21672   typedef const int *iptr;
21673   iptr p = 0;
21674   ++p;
21675 }
21676 { /* AIX XL C 1.02.0.0 rejects this saying
21677      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21678   struct s { int j; const int *ap[3]; };
21679   struct s *b; b->j = 5;
21680 }
21681 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21682   const int foo = 10;
21683 }
21684
21685 ; return 0; }
21686 EOF
21687 if { (eval echo configure:21688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21688   rm -rf conftest*
21689   ac_cv_c_const=yes
21690 else
21691   echo "configure: failed program was:" >&5
21692   cat conftest.$ac_ext >&5
21693   rm -rf conftest*
21694   ac_cv_c_const=no
21695 fi
21696 rm -f conftest*
21697 fi
21698
21699 echo "$ac_t""$ac_cv_c_const" 1>&6
21700 if test $ac_cv_c_const = no; then
21701   cat >> confdefs.h <<\EOF
21702 #define const 
21703 EOF
21704
21705 fi
21706
21707 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
21708 echo "configure:21709: checking if compiler understands volatile" >&5
21709 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
21710   echo $ac_n "(cached) $ac_c" 1>&6
21711 else
21712   cat > conftest.$ac_ext <<EOF
21713 #line 21714 "configure"
21714 #include "confdefs.h"
21715 int x, y, z;
21716 int main() {
21717 volatile int a; int * volatile b = x ? &y : &z;
21718       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
21719       *b = 0;
21720 ; return 0; }
21721 EOF
21722 if { (eval echo configure:21723: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21723   rm -rf conftest*
21724   ol_cv_c_volatile=yes
21725 else
21726   echo "configure: failed program was:" >&5
21727   cat conftest.$ac_ext >&5
21728   rm -rf conftest*
21729   ol_cv_c_volatile=no
21730 fi
21731 rm -f conftest*
21732 fi
21733
21734 echo "$ac_t""$ol_cv_c_volatile" 1>&6
21735   if test $ol_cv_c_volatile = yes; then
21736     : 
21737   else
21738     cat >> confdefs.h <<\EOF
21739 #define volatile 
21740 EOF
21741
21742   fi
21743  
21744
21745 if test $cross_compiling = yes ; then
21746         cat >> confdefs.h <<\EOF
21747 #define CROSS_COMPILING 1
21748 EOF
21749
21750 else
21751         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
21752 echo "configure:21753: checking whether byte ordering is bigendian" >&5
21753 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
21754   echo $ac_n "(cached) $ac_c" 1>&6
21755 else
21756   ac_cv_c_bigendian=unknown
21757 # See if sys/param.h defines the BYTE_ORDER macro.
21758 cat > conftest.$ac_ext <<EOF
21759 #line 21760 "configure"
21760 #include "confdefs.h"
21761 #include <sys/types.h>
21762 #include <sys/param.h>
21763 int main() {
21764
21765 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
21766  bogus endian macros
21767 #endif
21768 ; return 0; }
21769 EOF
21770 if { (eval echo configure:21771: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21771   rm -rf conftest*
21772   # It does; now see whether it defined to BIG_ENDIAN or not.
21773 cat > conftest.$ac_ext <<EOF
21774 #line 21775 "configure"
21775 #include "confdefs.h"
21776 #include <sys/types.h>
21777 #include <sys/param.h>
21778 int main() {
21779
21780 #if BYTE_ORDER != BIG_ENDIAN
21781  not big endian
21782 #endif
21783 ; return 0; }
21784 EOF
21785 if { (eval echo configure:21786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21786   rm -rf conftest*
21787   ac_cv_c_bigendian=yes
21788 else
21789   echo "configure: failed program was:" >&5
21790   cat conftest.$ac_ext >&5
21791   rm -rf conftest*
21792   ac_cv_c_bigendian=no
21793 fi
21794 rm -f conftest*
21795 else
21796   echo "configure: failed program was:" >&5
21797   cat conftest.$ac_ext >&5
21798 fi
21799 rm -f conftest*
21800 if test $ac_cv_c_bigendian = unknown; then
21801 if test "$cross_compiling" = yes; then
21802     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
21803 else
21804   cat > conftest.$ac_ext <<EOF
21805 #line 21806 "configure"
21806 #include "confdefs.h"
21807 main () {
21808   /* Are we little or big endian?  From Harbison&Steele.  */
21809   union
21810   {
21811     long l;
21812     char c[sizeof (long)];
21813   } u;
21814   u.l = 1;
21815   exit (u.c[sizeof (long) - 1] == 1);
21816 }
21817 EOF
21818 if { (eval echo configure:21819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21819 then
21820   ac_cv_c_bigendian=no
21821 else
21822   echo "configure: failed program was:" >&5
21823   cat conftest.$ac_ext >&5
21824   rm -fr conftest*
21825   ac_cv_c_bigendian=yes
21826 fi
21827 rm -fr conftest*
21828 fi
21829
21830 fi
21831 fi
21832
21833 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
21834 if test $ac_cv_c_bigendian = yes; then
21835   cat >> confdefs.h <<\EOF
21836 #define WORDS_BIGENDIAN 1
21837 EOF
21838
21839 fi
21840
21841 fi
21842
21843 echo $ac_n "checking size of short""... $ac_c" 1>&6
21844 echo "configure:21845: checking size of short" >&5 
21845 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
21846   echo $ac_n "(cached) $ac_c" 1>&6
21847 else
21848   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21849   cat > conftest.$ac_ext <<EOF
21850 #line 21851 "configure"
21851 #include "confdefs.h"
21852 #include "confdefs.h" 
21853 #include <sys/types.h> 
21854  
21855
21856 int main() {
21857 switch (0) case 0: case (sizeof (short) == $ac_size):;
21858 ; return 0; }
21859 EOF
21860 if { (eval echo configure:21861: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21861   rm -rf conftest*
21862   ac_cv_sizeof_short=$ac_size
21863 else
21864   echo "configure: failed program was:" >&5
21865   cat conftest.$ac_ext >&5
21866 fi
21867 rm -f conftest* 
21868   if test x$ac_cv_sizeof_short != x ; then break; fi 
21869 done 
21870
21871 fi
21872  
21873 if test x$ac_cv_sizeof_short = x ; then 
21874   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
21875 fi 
21876 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
21877 cat >> confdefs.h <<EOF
21878 #define SIZEOF_SHORT $ac_cv_sizeof_short
21879 EOF
21880  
21881  
21882 echo $ac_n "checking size of int""... $ac_c" 1>&6
21883 echo "configure:21884: checking size of int" >&5 
21884 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
21885   echo $ac_n "(cached) $ac_c" 1>&6
21886 else
21887   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21888   cat > conftest.$ac_ext <<EOF
21889 #line 21890 "configure"
21890 #include "confdefs.h"
21891 #include "confdefs.h" 
21892 #include <sys/types.h> 
21893  
21894
21895 int main() {
21896 switch (0) case 0: case (sizeof (int) == $ac_size):;
21897 ; return 0; }
21898 EOF
21899 if { (eval echo configure:21900: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21900   rm -rf conftest*
21901   ac_cv_sizeof_int=$ac_size
21902 else
21903   echo "configure: failed program was:" >&5
21904   cat conftest.$ac_ext >&5
21905 fi
21906 rm -f conftest* 
21907   if test x$ac_cv_sizeof_int != x ; then break; fi 
21908 done 
21909
21910 fi
21911  
21912 if test x$ac_cv_sizeof_int = x ; then 
21913   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
21914 fi 
21915 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
21916 cat >> confdefs.h <<EOF
21917 #define SIZEOF_INT $ac_cv_sizeof_int
21918 EOF
21919  
21920  
21921 echo $ac_n "checking size of long""... $ac_c" 1>&6
21922 echo "configure:21923: checking size of long" >&5 
21923 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
21924   echo $ac_n "(cached) $ac_c" 1>&6
21925 else
21926   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21927   cat > conftest.$ac_ext <<EOF
21928 #line 21929 "configure"
21929 #include "confdefs.h"
21930 #include "confdefs.h" 
21931 #include <sys/types.h> 
21932  
21933
21934 int main() {
21935 switch (0) case 0: case (sizeof (long) == $ac_size):;
21936 ; return 0; }
21937 EOF
21938 if { (eval echo configure:21939: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21939   rm -rf conftest*
21940   ac_cv_sizeof_long=$ac_size
21941 else
21942   echo "configure: failed program was:" >&5
21943   cat conftest.$ac_ext >&5
21944 fi
21945 rm -f conftest* 
21946   if test x$ac_cv_sizeof_long != x ; then break; fi 
21947 done 
21948
21949 fi
21950  
21951 if test x$ac_cv_sizeof_long = x ; then 
21952   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
21953 fi 
21954 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
21955 cat >> confdefs.h <<EOF
21956 #define SIZEOF_LONG $ac_cv_sizeof_long
21957 EOF
21958  
21959
21960
21961 if test "$ac_cv_sizeof_int" -lt 4 ; then
21962         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
21963
21964         cat >> confdefs.h <<\EOF
21965 #define LBER_INT_T long
21966 EOF
21967
21968 else
21969         cat >> confdefs.h <<\EOF
21970 #define LBER_INT_T int
21971 EOF
21972
21973 fi
21974
21975 cat >> confdefs.h <<\EOF
21976 #define LBER_LEN_T long
21977 EOF
21978
21979 cat >> confdefs.h <<\EOF
21980 #define LBER_SOCKET_T int
21981 EOF
21982
21983 cat >> confdefs.h <<\EOF
21984 #define LBER_TAG_T long
21985 EOF
21986
21987
21988 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
21989 echo "configure:21990: checking for 8-bit clean memcmp" >&5
21990 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
21991   echo $ac_n "(cached) $ac_c" 1>&6
21992 else
21993   if test "$cross_compiling" = yes; then
21994   ac_cv_func_memcmp_clean=no
21995 else
21996   cat > conftest.$ac_ext <<EOF
21997 #line 21998 "configure"
21998 #include "confdefs.h"
21999
22000 main()
22001 {
22002   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
22003   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
22004 }
22005
22006 EOF
22007 if { (eval echo configure:22008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22008 then
22009   ac_cv_func_memcmp_clean=yes
22010 else
22011   echo "configure: failed program was:" >&5
22012   cat conftest.$ac_ext >&5
22013   rm -fr conftest*
22014   ac_cv_func_memcmp_clean=no
22015 fi
22016 rm -fr conftest*
22017 fi
22018
22019 fi
22020
22021 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
22022 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
22023
22024 echo $ac_n "checking for strftime""... $ac_c" 1>&6
22025 echo "configure:22026: checking for strftime" >&5
22026 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
22027   echo $ac_n "(cached) $ac_c" 1>&6
22028 else
22029   cat > conftest.$ac_ext <<EOF
22030 #line 22031 "configure"
22031 #include "confdefs.h"
22032 /* System header to define __stub macros and hopefully few prototypes,
22033     which can conflict with char strftime(); below.  */
22034 #include <assert.h>
22035 /* Override any gcc2 internal prototype to avoid an error.  */
22036 /* We use char because int might match the return type of a gcc2
22037     builtin and then its argument prototype would still apply.  */
22038 char strftime();
22039 char (*f)();
22040
22041 int main() {
22042
22043 /* The GNU C library defines this for functions which it implements
22044     to always fail with ENOSYS.  Some functions are actually named
22045     something starting with __ and the normal name is an alias.  */
22046 #if defined (__stub_strftime) || defined (__stub___strftime)
22047 choke me
22048 #else
22049 f = strftime;
22050 #endif
22051
22052 ; return 0; }
22053 EOF
22054 if { (eval echo configure:22055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22055   rm -rf conftest*
22056   eval "ac_cv_func_strftime=yes"
22057 else
22058   echo "configure: failed program was:" >&5
22059   cat conftest.$ac_ext >&5
22060   rm -rf conftest*
22061   eval "ac_cv_func_strftime=no"
22062 fi
22063 rm -f conftest*
22064 fi
22065
22066 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
22067   echo "$ac_t""yes" 1>&6
22068   cat >> confdefs.h <<\EOF
22069 #define HAVE_STRFTIME 1
22070 EOF
22071
22072 else
22073   echo "$ac_t""no" 1>&6
22074 # strftime is in -lintl on SCO UNIX.
22075 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
22076 echo "configure:22077: checking for strftime in -lintl" >&5
22077 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
22078 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22079   echo $ac_n "(cached) $ac_c" 1>&6
22080 else
22081   ac_save_LIBS="$LIBS"
22082 LIBS="-lintl  $LIBS"
22083 cat > conftest.$ac_ext <<EOF
22084 #line 22085 "configure"
22085 #include "confdefs.h"
22086 /* Override any gcc2 internal prototype to avoid an error.  */
22087 /* We use char because int might match the return type of a gcc2
22088     builtin and then its argument prototype would still apply.  */
22089 char strftime();
22090
22091 int main() {
22092 strftime()
22093 ; return 0; }
22094 EOF
22095 if { (eval echo configure:22096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22096   rm -rf conftest*
22097   eval "ac_cv_lib_$ac_lib_var=yes"
22098 else
22099   echo "configure: failed program was:" >&5
22100   cat conftest.$ac_ext >&5
22101   rm -rf conftest*
22102   eval "ac_cv_lib_$ac_lib_var=no"
22103 fi
22104 rm -f conftest*
22105 LIBS="$ac_save_LIBS"
22106
22107 fi
22108 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22109   echo "$ac_t""yes" 1>&6
22110   cat >> confdefs.h <<\EOF
22111 #define HAVE_STRFTIME 1
22112 EOF
22113
22114 LIBS="-lintl $LIBS"
22115 else
22116   echo "$ac_t""no" 1>&6
22117 fi
22118
22119 fi
22120
22121
22122 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
22123 echo "configure:22124: checking for inet_aton()" >&5
22124 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
22125   echo $ac_n "(cached) $ac_c" 1>&6
22126 else
22127   cat > conftest.$ac_ext <<EOF
22128 #line 22129 "configure"
22129 #include "confdefs.h"
22130
22131 #ifdef HAVE_SYS_TYPES_H
22132 #       include <sys/types.h>
22133 #endif
22134 #ifdef HAVE_SYS_SOCKET_H
22135 #       include <sys/socket.h>
22136 #       ifdef HAVE_SYS_SELECT_H
22137 #               include <sys/select.h>
22138 #       endif
22139 #       include <netinet/in.h>
22140 #       ifdef HAVE_ARPA_INET_H
22141 #               include <arpa/inet.h>
22142 #       endif
22143 #endif
22144
22145 int main() {
22146 struct in_addr in;
22147 int rc = inet_aton( "255.255.255.255", &in );
22148 ; return 0; }
22149 EOF
22150 if { (eval echo configure:22151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22151   rm -rf conftest*
22152   ol_cv_func_inet_aton=yes
22153 else
22154   echo "configure: failed program was:" >&5
22155   cat conftest.$ac_ext >&5
22156   rm -rf conftest*
22157   ol_cv_func_inet_aton=no
22158 fi
22159 rm -f conftest*
22160 fi
22161
22162 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
22163   if test $ol_cv_func_inet_aton != no; then
22164     cat >> confdefs.h <<\EOF
22165 #define HAVE_INET_ATON 1
22166 EOF
22167
22168   fi
22169  
22170
22171 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
22172 echo "configure:22173: checking for _spawnlp" >&5
22173 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
22174   echo $ac_n "(cached) $ac_c" 1>&6
22175 else
22176   cat > conftest.$ac_ext <<EOF
22177 #line 22178 "configure"
22178 #include "confdefs.h"
22179 /* System header to define __stub macros and hopefully few prototypes,
22180     which can conflict with char _spawnlp(); below.  */
22181 #include <assert.h>
22182 /* Override any gcc2 internal prototype to avoid an error.  */
22183 /* We use char because int might match the return type of a gcc2
22184     builtin and then its argument prototype would still apply.  */
22185 char _spawnlp();
22186 char (*f)();
22187
22188 int main() {
22189
22190 /* The GNU C library defines this for functions which it implements
22191     to always fail with ENOSYS.  Some functions are actually named
22192     something starting with __ and the normal name is an alias.  */
22193 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
22194 choke me
22195 #else
22196 f = _spawnlp;
22197 #endif
22198
22199 ; return 0; }
22200 EOF
22201 if { (eval echo configure:22202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22202   rm -rf conftest*
22203   eval "ac_cv_func__spawnlp=yes"
22204 else
22205   echo "configure: failed program was:" >&5
22206   cat conftest.$ac_ext >&5
22207   rm -rf conftest*
22208   eval "ac_cv_func__spawnlp=no"
22209 fi
22210 rm -f conftest*
22211 fi
22212
22213 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
22214   echo "$ac_t""yes" 1>&6
22215   cat >> confdefs.h <<\EOF
22216 #define HAVE_SPAWNLP 1
22217 EOF
22218
22219 else
22220   echo "$ac_t""no" 1>&6
22221 fi
22222
22223
22224 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
22225 echo "configure:22226: checking for _snprintf" >&5
22226 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
22227   echo $ac_n "(cached) $ac_c" 1>&6
22228 else
22229   cat > conftest.$ac_ext <<EOF
22230 #line 22231 "configure"
22231 #include "confdefs.h"
22232 /* System header to define __stub macros and hopefully few prototypes,
22233     which can conflict with char _snprintf(); below.  */
22234 #include <assert.h>
22235 /* Override any gcc2 internal prototype to avoid an error.  */
22236 /* We use char because int might match the return type of a gcc2
22237     builtin and then its argument prototype would still apply.  */
22238 char _snprintf();
22239 char (*f)();
22240
22241 int main() {
22242
22243 /* The GNU C library defines this for functions which it implements
22244     to always fail with ENOSYS.  Some functions are actually named
22245     something starting with __ and the normal name is an alias.  */
22246 #if defined (__stub__snprintf) || defined (__stub____snprintf)
22247 choke me
22248 #else
22249 f = _snprintf;
22250 #endif
22251
22252 ; return 0; }
22253 EOF
22254 if { (eval echo configure:22255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22255   rm -rf conftest*
22256   eval "ac_cv_func__snprintf=yes"
22257 else
22258   echo "configure: failed program was:" >&5
22259   cat conftest.$ac_ext >&5
22260   rm -rf conftest*
22261   eval "ac_cv_func__snprintf=no"
22262 fi
22263 rm -f conftest*
22264 fi
22265
22266 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
22267   echo "$ac_t""yes" 1>&6
22268   ac_cv_func_snprintf=yes
22269         cat >> confdefs.h <<\EOF
22270 #define snprintf _snprintf
22271 EOF
22272
22273
22274 else
22275   echo "$ac_t""no" 1>&6
22276 fi
22277
22278
22279 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
22280 echo "configure:22281: checking for _vsnprintf" >&5
22281 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
22282   echo $ac_n "(cached) $ac_c" 1>&6
22283 else
22284   cat > conftest.$ac_ext <<EOF
22285 #line 22286 "configure"
22286 #include "confdefs.h"
22287 /* System header to define __stub macros and hopefully few prototypes,
22288     which can conflict with char _vsnprintf(); below.  */
22289 #include <assert.h>
22290 /* Override any gcc2 internal prototype to avoid an error.  */
22291 /* We use char because int might match the return type of a gcc2
22292     builtin and then its argument prototype would still apply.  */
22293 char _vsnprintf();
22294 char (*f)();
22295
22296 int main() {
22297
22298 /* The GNU C library defines this for functions which it implements
22299     to always fail with ENOSYS.  Some functions are actually named
22300     something starting with __ and the normal name is an alias.  */
22301 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
22302 choke me
22303 #else
22304 f = _vsnprintf;
22305 #endif
22306
22307 ; return 0; }
22308 EOF
22309 if { (eval echo configure:22310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22310   rm -rf conftest*
22311   eval "ac_cv_func__vsnprintf=yes"
22312 else
22313   echo "configure: failed program was:" >&5
22314   cat conftest.$ac_ext >&5
22315   rm -rf conftest*
22316   eval "ac_cv_func__vsnprintf=no"
22317 fi
22318 rm -f conftest*
22319 fi
22320
22321 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
22322   echo "$ac_t""yes" 1>&6
22323   ac_cv_func_vsnprintf=yes
22324         cat >> confdefs.h <<\EOF
22325 #define vsnprintf _vsnprintf
22326 EOF
22327
22328
22329 else
22330   echo "$ac_t""no" 1>&6
22331 fi
22332
22333
22334 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
22335 echo "configure:22336: checking for vprintf" >&5
22336 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
22337   echo $ac_n "(cached) $ac_c" 1>&6
22338 else
22339   cat > conftest.$ac_ext <<EOF
22340 #line 22341 "configure"
22341 #include "confdefs.h"
22342 /* System header to define __stub macros and hopefully few prototypes,
22343     which can conflict with char vprintf(); below.  */
22344 #include <assert.h>
22345 /* Override any gcc2 internal prototype to avoid an error.  */
22346 /* We use char because int might match the return type of a gcc2
22347     builtin and then its argument prototype would still apply.  */
22348 char vprintf();
22349 char (*f)();
22350
22351 int main() {
22352
22353 /* The GNU C library defines this for functions which it implements
22354     to always fail with ENOSYS.  Some functions are actually named
22355     something starting with __ and the normal name is an alias.  */
22356 #if defined (__stub_vprintf) || defined (__stub___vprintf)
22357 choke me
22358 #else
22359 f = vprintf;
22360 #endif
22361
22362 ; return 0; }
22363 EOF
22364 if { (eval echo configure:22365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22365   rm -rf conftest*
22366   eval "ac_cv_func_vprintf=yes"
22367 else
22368   echo "configure: failed program was:" >&5
22369   cat conftest.$ac_ext >&5
22370   rm -rf conftest*
22371   eval "ac_cv_func_vprintf=no"
22372 fi
22373 rm -f conftest*
22374 fi
22375
22376 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
22377   echo "$ac_t""yes" 1>&6
22378   cat >> confdefs.h <<\EOF
22379 #define HAVE_VPRINTF 1
22380 EOF
22381
22382 else
22383   echo "$ac_t""no" 1>&6
22384 fi
22385
22386 if test "$ac_cv_func_vprintf" != yes; then
22387 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
22388 echo "configure:22389: checking for _doprnt" >&5
22389 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
22390   echo $ac_n "(cached) $ac_c" 1>&6
22391 else
22392   cat > conftest.$ac_ext <<EOF
22393 #line 22394 "configure"
22394 #include "confdefs.h"
22395 /* System header to define __stub macros and hopefully few prototypes,
22396     which can conflict with char _doprnt(); below.  */
22397 #include <assert.h>
22398 /* Override any gcc2 internal prototype to avoid an error.  */
22399 /* We use char because int might match the return type of a gcc2
22400     builtin and then its argument prototype would still apply.  */
22401 char _doprnt();
22402 char (*f)();
22403
22404 int main() {
22405
22406 /* The GNU C library defines this for functions which it implements
22407     to always fail with ENOSYS.  Some functions are actually named
22408     something starting with __ and the normal name is an alias.  */
22409 #if defined (__stub__doprnt) || defined (__stub____doprnt)
22410 choke me
22411 #else
22412 f = _doprnt;
22413 #endif
22414
22415 ; return 0; }
22416 EOF
22417 if { (eval echo configure:22418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22418   rm -rf conftest*
22419   eval "ac_cv_func__doprnt=yes"
22420 else
22421   echo "configure: failed program was:" >&5
22422   cat conftest.$ac_ext >&5
22423   rm -rf conftest*
22424   eval "ac_cv_func__doprnt=no"
22425 fi
22426 rm -f conftest*
22427 fi
22428
22429 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
22430   echo "$ac_t""yes" 1>&6
22431   cat >> confdefs.h <<\EOF
22432 #define HAVE_DOPRNT 1
22433 EOF
22434
22435 else
22436   echo "$ac_t""no" 1>&6
22437 fi
22438
22439 fi
22440
22441
22442 if test $ac_cv_func_vprintf = yes ; then
22443                 for ac_func in vsnprintf vsprintf
22444 do
22445 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22446 echo "configure:22447: checking for $ac_func" >&5
22447 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22448   echo $ac_n "(cached) $ac_c" 1>&6
22449 else
22450   cat > conftest.$ac_ext <<EOF
22451 #line 22452 "configure"
22452 #include "confdefs.h"
22453 /* System header to define __stub macros and hopefully few prototypes,
22454     which can conflict with char $ac_func(); below.  */
22455 #include <assert.h>
22456 /* Override any gcc2 internal prototype to avoid an error.  */
22457 /* We use char because int might match the return type of a gcc2
22458     builtin and then its argument prototype would still apply.  */
22459 char $ac_func();
22460 char (*f)();
22461
22462 int main() {
22463
22464 /* The GNU C library defines this for functions which it implements
22465     to always fail with ENOSYS.  Some functions are actually named
22466     something starting with __ and the normal name is an alias.  */
22467 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22468 choke me
22469 #else
22470 f = $ac_func;
22471 #endif
22472
22473 ; return 0; }
22474 EOF
22475 if { (eval echo configure:22476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22476   rm -rf conftest*
22477   eval "ac_cv_func_$ac_func=yes"
22478 else
22479   echo "configure: failed program was:" >&5
22480   cat conftest.$ac_ext >&5
22481   rm -rf conftest*
22482   eval "ac_cv_func_$ac_func=no"
22483 fi
22484 rm -f conftest*
22485 fi
22486
22487 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22488   echo "$ac_t""yes" 1>&6
22489     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22490   cat >> confdefs.h <<EOF
22491 #define $ac_tr_func 1
22492 EOF
22493  
22494 else
22495   echo "$ac_t""no" 1>&6
22496 fi
22497 done
22498
22499 fi
22500
22501 for ac_func in \
22502         bcopy                   \
22503         closesocket             \
22504         chroot                  \
22505         endgrent                \
22506         endpwent                \
22507         fcntl                   \
22508         flock                   \
22509         fstat                   \
22510         getdtablesize   \
22511         getgrgid                \
22512         gethostname             \
22513         getpass                 \
22514         getpassphrase   \
22515         getpwuid                \
22516         getpwnam                \
22517         getspnam                \
22518         gettimeofday    \
22519         initgroups              \
22520         lockf                   \
22521         memcpy                  \
22522         memmove                 \
22523         mkstemp                 \
22524         mktemp                  \
22525         pipe                    \
22526         read                    \
22527         recv                    \
22528         recvfrom                \
22529         recvmsg                 \
22530         setpwfile               \
22531         setgid                  \
22532         setegid                 \
22533         setsid                  \
22534         setuid                  \
22535         seteuid                 \
22536         sigaction               \
22537         signal                  \
22538         sigset                  \
22539         strdup                  \
22540         strerror                \
22541         strpbrk                 \
22542         strrchr                 \
22543         strsep                  \
22544         strstr                  \
22545         strtol                  \
22546         strtoul                 \
22547         strspn                  \
22548         sysconf                 \
22549         usleep                  \
22550         waitpid                 \
22551         wait4                   \
22552         write                   \
22553         send                    \
22554         sendto                  \
22555
22556 do
22557 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22558 echo "configure:22559: checking for $ac_func" >&5
22559 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22560   echo $ac_n "(cached) $ac_c" 1>&6
22561 else
22562   cat > conftest.$ac_ext <<EOF
22563 #line 22564 "configure"
22564 #include "confdefs.h"
22565 /* System header to define __stub macros and hopefully few prototypes,
22566     which can conflict with char $ac_func(); below.  */
22567 #include <assert.h>
22568 /* Override any gcc2 internal prototype to avoid an error.  */
22569 /* We use char because int might match the return type of a gcc2
22570     builtin and then its argument prototype would still apply.  */
22571 char $ac_func();
22572 char (*f)();
22573
22574 int main() {
22575
22576 /* The GNU C library defines this for functions which it implements
22577     to always fail with ENOSYS.  Some functions are actually named
22578     something starting with __ and the normal name is an alias.  */
22579 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22580 choke me
22581 #else
22582 f = $ac_func;
22583 #endif
22584
22585 ; return 0; }
22586 EOF
22587 if { (eval echo configure:22588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22588   rm -rf conftest*
22589   eval "ac_cv_func_$ac_func=yes"
22590 else
22591   echo "configure: failed program was:" >&5
22592   cat conftest.$ac_ext >&5
22593   rm -rf conftest*
22594   eval "ac_cv_func_$ac_func=no"
22595 fi
22596 rm -f conftest*
22597 fi
22598
22599 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22600   echo "$ac_t""yes" 1>&6
22601     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22602   cat >> confdefs.h <<EOF
22603 #define $ac_tr_func 1
22604 EOF
22605  
22606 else
22607   echo "$ac_t""no" 1>&6
22608 fi
22609 done
22610
22611
22612 for ac_func in getopt
22613 do
22614 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22615 echo "configure:22616: checking for $ac_func" >&5
22616 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22617   echo $ac_n "(cached) $ac_c" 1>&6
22618 else
22619   cat > conftest.$ac_ext <<EOF
22620 #line 22621 "configure"
22621 #include "confdefs.h"
22622 /* System header to define __stub macros and hopefully few prototypes,
22623     which can conflict with char $ac_func(); below.  */
22624 #include <assert.h>
22625 /* Override any gcc2 internal prototype to avoid an error.  */
22626 /* We use char because int might match the return type of a gcc2
22627     builtin and then its argument prototype would still apply.  */
22628 char $ac_func();
22629 char (*f)();
22630
22631 int main() {
22632
22633 /* The GNU C library defines this for functions which it implements
22634     to always fail with ENOSYS.  Some functions are actually named
22635     something starting with __ and the normal name is an alias.  */
22636 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22637 choke me
22638 #else
22639 f = $ac_func;
22640 #endif
22641
22642 ; return 0; }
22643 EOF
22644 if { (eval echo configure:22645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22645   rm -rf conftest*
22646   eval "ac_cv_func_$ac_func=yes"
22647 else
22648   echo "configure: failed program was:" >&5
22649   cat conftest.$ac_ext >&5
22650   rm -rf conftest*
22651   eval "ac_cv_func_$ac_func=no"
22652 fi
22653 rm -f conftest*
22654 fi
22655
22656 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22657   echo "$ac_t""yes" 1>&6
22658     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22659   cat >> confdefs.h <<EOF
22660 #define $ac_tr_func 1
22661 EOF
22662  
22663 else
22664   echo "$ac_t""no" 1>&6
22665 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
22666 fi
22667 done
22668
22669
22670
22671 if test "$ac_cv_func_getopt" != yes; then
22672         LIBSRCS="$LIBSRCS getopt.c"
22673 fi
22674
22675 # Check Configuration
22676 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
22677 echo "configure:22678: checking declaration of sys_errlist" >&5
22678 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
22679   echo $ac_n "(cached) $ac_c" 1>&6
22680 else
22681   
22682         cat > conftest.$ac_ext <<EOF
22683 #line 22684 "configure"
22684 #include "confdefs.h"
22685
22686 #include <stdio.h>
22687 #include <sys/types.h>
22688 #include <errno.h>
22689 #ifdef WINNT
22690 #include <stdlib.h>
22691 #endif 
22692 int main() {
22693 char *c = (char *) *sys_errlist
22694 ; return 0; }
22695 EOF
22696 if { (eval echo configure:22697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22697   rm -rf conftest*
22698   ol_cv_dcl_sys_errlist=yes
22699         ol_cv_have_sys_errlist=yes
22700 else
22701   echo "configure: failed program was:" >&5
22702   cat conftest.$ac_ext >&5
22703   rm -rf conftest*
22704   ol_cv_dcl_sys_errlist=no
22705 fi
22706 rm -f conftest*
22707 fi
22708
22709 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
22710 #
22711 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
22712 if test $ol_cv_dcl_sys_errlist = no ; then
22713         cat >> confdefs.h <<\EOF
22714 #define DECL_SYS_ERRLIST 1
22715 EOF
22716
22717
22718         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
22719 echo "configure:22720: checking existence of sys_errlist" >&5
22720 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
22721   echo $ac_n "(cached) $ac_c" 1>&6
22722 else
22723   
22724                 cat > conftest.$ac_ext <<EOF
22725 #line 22726 "configure"
22726 #include "confdefs.h"
22727 #include <errno.h>
22728 int main() {
22729 char *c = (char *) *sys_errlist
22730 ; return 0; }
22731 EOF
22732 if { (eval echo configure:22733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22733   rm -rf conftest*
22734   ol_cv_have_sys_errlist=yes
22735 else
22736   echo "configure: failed program was:" >&5
22737   cat conftest.$ac_ext >&5
22738   rm -rf conftest*
22739   ol_cv_have_sys_errlist=no
22740 fi
22741 rm -f conftest*
22742 fi
22743
22744 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
22745 fi
22746 if test $ol_cv_have_sys_errlist = yes ; then
22747         cat >> confdefs.h <<\EOF
22748 #define HAVE_SYS_ERRLIST 1
22749 EOF
22750
22751 fi
22752
22753
22754
22755 if test "$ol_enable_debug" != no ; then
22756         cat >> confdefs.h <<\EOF
22757 #define LDAP_DEBUG 1
22758 EOF
22759
22760 fi
22761 if test "$ol_enable_syslog" = yes ; then
22762         cat >> confdefs.h <<\EOF
22763 #define LDAP_SYSLOG 1
22764 EOF
22765
22766 fi
22767 if test "$ol_enable_cache" = no ; then
22768         cat >> confdefs.h <<\EOF
22769 #define LDAP_NOCACHE 1
22770 EOF
22771
22772 fi
22773 if test "$ol_link_kbind" != no ; then
22774         cat >> confdefs.h <<\EOF
22775 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
22776 EOF
22777
22778 fi
22779 if test "$ol_enable_proctitle" != no ; then
22780         cat >> confdefs.h <<\EOF
22781 #define LDAP_PROCTITLE 1
22782 EOF
22783
22784 fi
22785 if test "$ol_enable_referrals" != no ; then
22786         cat >> confdefs.h <<\EOF
22787 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
22788 EOF
22789
22790 fi
22791 if test "$ol_enable_local" != no; then
22792         cat >> confdefs.h <<\EOF
22793 #define LDAP_PF_LOCAL 1
22794 EOF
22795
22796 fi
22797 if test "$ol_link_ipv6" != no; then
22798         cat >> confdefs.h <<\EOF
22799 #define LDAP_PF_INET6 1
22800 EOF
22801
22802 fi
22803 if test "$ol_enable_cleartext" != no ; then
22804         cat >> confdefs.h <<\EOF
22805 #define SLAPD_CLEARTEXT 1
22806 EOF
22807
22808 fi
22809 if test "$ol_enable_crypt" != no ; then
22810         cat >> confdefs.h <<\EOF
22811 #define SLAPD_CRYPT 1
22812 EOF
22813
22814 fi
22815 if test "$ol_link_kpasswd" != no ; then
22816         cat >> confdefs.h <<\EOF
22817 #define SLAPD_KPASSWD 1
22818 EOF
22819
22820 fi
22821 if test "$ol_link_spasswd" != no ; then
22822         cat >> confdefs.h <<\EOF
22823 #define SLAPD_SPASSWD 1
22824 EOF
22825
22826 fi
22827 if test "$ol_enable_multimaster" != no ; then
22828         cat >> confdefs.h <<\EOF
22829 #define SLAPD_MULTIMASTER 1
22830 EOF
22831
22832 fi
22833 if test "$ol_enable_phonetic" != no ; then
22834         cat >> confdefs.h <<\EOF
22835 #define SLAPD_PHONETIC 1
22836 EOF
22837
22838 fi
22839 if test "$ol_enable_rlookups" != no ; then
22840         cat >> confdefs.h <<\EOF
22841 #define SLAPD_RLOOKUPS 1
22842 EOF
22843
22844 fi
22845 if test "$ol_enable_aci" != no ; then
22846         cat >> confdefs.h <<\EOF
22847 #define SLAPD_ACI_ENABLED 1
22848 EOF
22849
22850 fi
22851
22852 if test "$ol_link_modules" != no ; then
22853         cat >> confdefs.h <<\EOF
22854 #define SLAPD_MODULES 1
22855 EOF
22856
22857         BUILD_SLAPD=yes
22858         SLAPD_MODULES_LDFLAGS="-dlopen self"
22859 fi
22860
22861 if test "$ol_enable_bdb" != no ; then
22862         cat >> confdefs.h <<\EOF
22863 #define SLAPD_BDB 1
22864 EOF
22865
22866         BUILD_SLAPD=yes
22867         BUILD_BDB=yes
22868         if test "$ol_with_bdb_module" != static ; then
22869                 cat >> confdefs.h <<\EOF
22870 #define SLAPD_BDB_DYNAMIC 1
22871 EOF
22872
22873                 BUILD_BDB=mod
22874                 BUILD_BDB_DYNAMIC=shared
22875                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
22876         else
22877                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
22878         fi
22879 fi
22880
22881 if test "$ol_link_dnssrv" != no ; then
22882         cat >> confdefs.h <<\EOF
22883 #define SLAPD_DNSSRV 1
22884 EOF
22885
22886         BUILD_SLAPD=yes
22887         BUILD_DNSSRV=yes
22888         if test "$ol_with_dnssrv_module" != static ; then
22889                 cat >> confdefs.h <<\EOF
22890 #define SLAPD_DNSSRV_DYNAMIC 1
22891 EOF
22892
22893                 BUILD_DNSSRV=mod
22894                 BUILD_DNSSRV_DYNAMIC=shared
22895                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
22896         else
22897                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
22898         fi
22899 fi
22900
22901 if test "$ol_enable_ldap" != no ; then
22902         cat >> confdefs.h <<\EOF
22903 #define SLAPD_LDAP 1
22904 EOF
22905
22906         BUILD_SLAPD=yes
22907         BUILD_LDAP=yes
22908         if test "$ol_with_ldap_module" != static ; then
22909                 cat >> confdefs.h <<\EOF
22910 #define SLAPD_LDAP_DYNAMIC 1
22911 EOF
22912
22913                 BUILD_LDAP=mod
22914                 BUILD_LDAP_DYNAMIC=shared
22915                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
22916         else
22917                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
22918         fi
22919 fi
22920
22921 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
22922         cat >> confdefs.h <<\EOF
22923 #define SLAPD_LDBM 1
22924 EOF
22925
22926         BUILD_SLAPD=yes
22927         BUILD_LDBM=yes
22928         if test "$ol_with_ldbm_module" != static ; then
22929                 cat >> confdefs.h <<\EOF
22930 #define SLAPD_LDBM_DYNAMIC 1
22931 EOF
22932
22933                 BUILD_LDBM=mod
22934                 BUILD_LDBM_DYNAMIC=shared
22935                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
22936         else
22937                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
22938         fi
22939 fi
22940
22941 if test "$ol_enable_meta" != no ; then
22942         if test "$ol_enable_ldap" = no ; then
22943                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
22944         fi
22945         if test "$ol_enable_rewrite" = no ; then
22946                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
22947         fi
22948         cat >> confdefs.h <<\EOF
22949 #define SLAPD_META 1
22950 EOF
22951
22952         BUILD_SLAPD=yes
22953         BUILD_META=yes
22954         BUILD_LDAP=yes
22955         BUILD_REWRITE=yes
22956         if test "$ol_with_meta_module" != static ; then
22957                 cat >> confdefs.h <<\EOF
22958 #define SLAPD_META_DYNAMIC 1
22959 EOF
22960
22961                 BUILD_META=mod
22962                 BUILD_META_DYNAMIC=shared
22963                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
22964         else
22965                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
22966         fi
22967 fi
22968
22969 if test "$ol_enable_monitor" != no ; then
22970         cat >> confdefs.h <<\EOF
22971 #define SLAPD_MONITOR 1
22972 EOF
22973
22974         BUILD_SLAPD=yes
22975         BUILD_MONITOR=yes
22976         if test "$ol_with_monitor_module" != static ; then
22977                 cat >> confdefs.h <<\EOF
22978 #define SLAPD_MONITOR_DYNAMIC 1
22979 EOF
22980
22981                 BUILD_MONITOR=mod
22982                 BUILD_MONITOR_DYNAMIC=shared
22983                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
22984         else
22985                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
22986         fi
22987 fi
22988
22989 if test "$ol_enable_null" != no ; then
22990         cat >> confdefs.h <<\EOF
22991 #define SLAPD_NULL 1
22992 EOF
22993
22994         BUILD_SLAPD=yes
22995         BUILD_NULL=yes
22996         if test "$ol_with_null_module" != static ; then
22997                 cat >> confdefs.h <<\EOF
22998 #define SLAPD_NULL_DYNAMIC 1
22999 EOF
23000
23001                 BUILD_NULL=mod
23002                 BUILD_NULL_DYNAMIC=shared
23003                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
23004         else
23005                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
23006         fi
23007 fi
23008
23009 if test "$ol_enable_passwd" != no ; then
23010         cat >> confdefs.h <<\EOF
23011 #define SLAPD_PASSWD 1
23012 EOF
23013
23014         BUILD_SLAPD=yes
23015         BUILD_PASSWD=yes
23016         if test "$ol_with_passwd_module" != static ; then
23017                 cat >> confdefs.h <<\EOF
23018 #define SLAPD_PASSWD_DYNAMIC 1
23019 EOF
23020
23021                 BUILD_PASSWD=mod
23022                 BUILD_PASSWD_DYNAMIC=shared
23023                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
23024         else
23025                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
23026         fi
23027 fi
23028
23029 if test "$ol_link_perl" != no ; then
23030         cat >> confdefs.h <<\EOF
23031 #define SLAPD_PERL 1
23032 EOF
23033
23034         BUILD_SLAPD=yes
23035         BUILD_PERL=yes
23036         if test "$ol_with_perl_module" != static ; then
23037                 cat >> confdefs.h <<\EOF
23038 #define SLAPD_PERL_DYNAMIC 1
23039 EOF
23040
23041                 BUILD_PERL=mod
23042                 BUILD_PERL_DYNAMIC=shared
23043                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
23044         else
23045                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
23046         fi
23047 fi
23048
23049 if test "$ol_enable_shell" != no ; then
23050         cat >> confdefs.h <<\EOF
23051 #define SLAPD_SHELL 1
23052 EOF
23053
23054         BUILD_SLAPD=yes
23055         BUILD_SHELL=yes
23056         if test "$ol_with_shell_module" != static ; then
23057                 cat >> confdefs.h <<\EOF
23058 #define SLAPD_SHELL_DYNAMIC 1
23059 EOF
23060
23061                 BUILD_SHELL=mod
23062                 BUILD_SHELL_DYNAMIC=shared
23063                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
23064         else
23065                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
23066         fi
23067 fi
23068
23069 if test "$ol_enable_tcl" != no ; then
23070         cat >> confdefs.h <<\EOF
23071 #define SLAPD_TCL 1
23072 EOF
23073
23074         BUILD_SLAPD=yes
23075         BUILD_TCL=yes
23076         if test "$ol_with_tcl_module" != static; then
23077                 cat >> confdefs.h <<\EOF
23078 #define SLAPD_TCL_DYNAMIC 1
23079 EOF
23080
23081                 BUILD_TCL=mod
23082                 BUILD_TCL_DYNAMIC=shared
23083                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-tcl"
23084         else
23085                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-tcl"
23086         fi
23087 fi
23088
23089 if test "$ol_link_sql" != no ; then
23090         cat >> confdefs.h <<\EOF
23091 #define SLAPD_SQL 1
23092 EOF
23093
23094         BUILD_SLAPD=yes
23095         BUILD_SQL=yes
23096         if test "$ol_with_sql_module" != static; then
23097                 cat >> confdefs.h <<\EOF
23098 #define SLAPD_SQL_DYNAMIC 1
23099 EOF
23100
23101                 BUILD_SQL=mod
23102                 BUILD_SQL_DYNAMIC=shared
23103                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
23104         else
23105                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
23106         fi
23107 fi
23108
23109 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
23110         $BUILD_SLAPD = yes ; then
23111         BUILD_SLURPD=yes
23112 fi
23113
23114 if test "$ol_enable_rewrite" != no ; then
23115         cat >> confdefs.h <<\EOF
23116 #define ENABLE_REWRITE 1
23117 EOF
23118
23119         BUILD_REWRITE=yes
23120 fi
23121
23122
23123
23124 if test "$ac_cv_mingw32" = yes ; then
23125         PLAT=NT
23126         SLAPD_MODULES_LDFLAGS=
23127 else
23128         PLAT=UNIX
23129 fi
23130
23131
23132
23133
23134
23135
23136   
23137   
23138   
23139   
23140   
23141   
23142   
23143   
23144   
23145   
23146   
23147   
23148   
23149   
23150   
23151   
23152   
23153   
23154   
23155   
23156   
23157   
23158   
23159   
23160
23161
23162
23163
23164
23165
23166
23167
23168
23169
23170
23171
23172
23173
23174
23175
23176
23177
23178
23179
23180
23181
23182
23183
23184
23185
23186
23187
23188
23189
23190
23191
23192
23193
23194
23195
23196
23197 # Check whether --with-xxinstall or --without-xxinstall was given.
23198 if test "${with_xxinstall+set}" = set; then
23199   withval="$with_xxinstall"
23200   :
23201 fi
23202
23203
23204
23205 trap '' 1 2 15
23206
23207 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
23208
23209 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23210 # Let make expand exec_prefix.
23211 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23212
23213 # Any assignment to VPATH causes Sun make to only execute
23214 # the first set of double-colon rules, so remove it if not needed.
23215 # If there is a colon in the path, we need to keep it.
23216 if test "x$srcdir" = x.; then
23217   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
23218 fi
23219
23220 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
23221
23222 DEFS=-DHAVE_CONFIG_H
23223
23224 # Without the "./", some shells look in PATH for config.status.
23225 : ${CONFIG_STATUS=./config.status}
23226
23227 echo creating $CONFIG_STATUS
23228 rm -f $CONFIG_STATUS
23229 cat > $CONFIG_STATUS <<EOF
23230 #! /bin/sh
23231 # Generated automatically by configure.
23232 # Run this file to recreate the current configuration.
23233 # This directory was configured as follows,
23234 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
23235 #
23236 # $0 $ac_configure_args
23237 #
23238 # Compiler output produced by configure, useful for debugging
23239 # configure, is in ./config.log if it exists.
23240
23241 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
23242 for ac_option
23243 do
23244   case "\$ac_option" in
23245   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23246     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
23247     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
23248   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
23249     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
23250     exit 0 ;;
23251   -help | --help | --hel | --he | --h)
23252     echo "\$ac_cs_usage"; exit 0 ;;
23253   *) echo "\$ac_cs_usage"; exit 1 ;;
23254   esac
23255 done
23256
23257 ac_given_srcdir=$srcdir
23258 ac_given_INSTALL="$INSTALL"
23259
23260 trap 'rm -fr `echo "\
23261 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23262 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23263 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23264 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23265 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23266 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23267 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23268 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23269 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23270 include/Makefile:build/top.mk:include/Makefile.in \
23271 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23272 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
23273 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23274 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23275 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23276 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
23277 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
23278 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23279 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23280 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23281 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23282 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23283 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23284 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23285 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23286 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23287 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23288 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23289 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23290 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23291 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23292 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23293 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23294 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
23295 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23296 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
23297 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23298 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23299 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23300  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
23301 EOF
23302 cat >> $CONFIG_STATUS <<EOF
23303
23304 # Protect against being on the right side of a sed subst in config.status.
23305 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
23306  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
23307 $ac_vpsub
23308 $extrasub
23309 s%@SHELL@%$SHELL%g
23310 s%@CFLAGS@%$CFLAGS%g
23311 s%@CPPFLAGS@%$CPPFLAGS%g
23312 s%@CXXFLAGS@%$CXXFLAGS%g
23313 s%@FFLAGS@%$FFLAGS%g
23314 s%@DEFS@%$DEFS%g
23315 s%@LDFLAGS@%$LDFLAGS%g
23316 s%@LIBS@%$LIBS%g
23317 s%@exec_prefix@%$exec_prefix%g
23318 s%@prefix@%$prefix%g
23319 s%@program_transform_name@%$program_transform_name%g
23320 s%@bindir@%$bindir%g
23321 s%@sbindir@%$sbindir%g
23322 s%@libexecdir@%$libexecdir%g
23323 s%@datadir@%$datadir%g
23324 s%@sysconfdir@%$sysconfdir%g
23325 s%@sharedstatedir@%$sharedstatedir%g
23326 s%@localstatedir@%$localstatedir%g
23327 s%@libdir@%$libdir%g
23328 s%@includedir@%$includedir%g
23329 s%@oldincludedir@%$oldincludedir%g
23330 s%@infodir@%$infodir%g
23331 s%@mandir@%$mandir%g
23332 s%@host@%$host%g
23333 s%@host_alias@%$host_alias%g
23334 s%@host_cpu@%$host_cpu%g
23335 s%@host_vendor@%$host_vendor%g
23336 s%@host_os@%$host_os%g
23337 s%@target@%$target%g
23338 s%@target_alias@%$target_alias%g
23339 s%@target_cpu@%$target_cpu%g
23340 s%@target_vendor@%$target_vendor%g
23341 s%@target_os@%$target_os%g
23342 s%@build@%$build%g
23343 s%@build_alias@%$build_alias%g
23344 s%@build_cpu@%$build_cpu%g
23345 s%@build_vendor@%$build_vendor%g
23346 s%@build_os@%$build_os%g
23347 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
23348 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
23349 s%@INSTALL_DATA@%$INSTALL_DATA%g
23350 s%@PACKAGE@%$PACKAGE%g
23351 s%@VERSION@%$VERSION%g
23352 s%@ACLOCAL@%$ACLOCAL%g
23353 s%@AUTOCONF@%$AUTOCONF%g
23354 s%@AUTOMAKE@%$AUTOMAKE%g
23355 s%@AUTOHEADER@%$AUTOHEADER%g
23356 s%@MAKEINFO@%$MAKEINFO%g
23357 s%@install_sh@%$install_sh%g
23358 s%@AMTAR@%$AMTAR%g
23359 s%@AWK@%$AWK%g
23360 s%@AMTARFLAGS@%$AMTARFLAGS%g
23361 s%@SET_MAKE@%$SET_MAKE%g
23362 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
23363 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
23364 s%@top_builddir@%$top_builddir%g
23365 s%@ldap_subdir@%$ldap_subdir%g
23366 s%@CC@%$CC%g
23367 s%@AR@%$AR%g
23368 s%@LN_S@%$LN_S%g
23369 s%@OBJEXT@%$OBJEXT%g
23370 s%@EXEEXT@%$EXEEXT%g
23371 s%@ECHO@%$ECHO%g
23372 s%@RANLIB@%$RANLIB%g
23373 s%@STRIP@%$STRIP%g
23374 s%@DLLTOOL@%$DLLTOOL%g
23375 s%@AS@%$AS%g
23376 s%@OBJDUMP@%$OBJDUMP%g
23377 s%@CPP@%$CPP%g
23378 s%@LIBTOOL@%$LIBTOOL%g
23379 s%@LN_H@%$LN_H%g
23380 s%@SENDMAIL@%$SENDMAIL%g
23381 s%@EDITOR@%$EDITOR%g
23382 s%@PERLBIN@%$PERLBIN%g
23383 s%@OL_MKDEP@%$OL_MKDEP%g
23384 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
23385 s%@LIBOBJS@%$LIBOBJS%g
23386 s%@LIBSRCS@%$LIBSRCS%g
23387 s%@PLAT@%$PLAT%g
23388 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
23389 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
23390 s%@BUILD_BDB@%$BUILD_BDB%g
23391 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
23392 s%@BUILD_LDAP@%$BUILD_LDAP%g
23393 s%@BUILD_LDBM@%$BUILD_LDBM%g
23394 s%@BUILD_META@%$BUILD_META%g
23395 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
23396 s%@BUILD_NULL@%$BUILD_NULL%g
23397 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
23398 s%@BUILD_PERL@%$BUILD_PERL%g
23399 s%@BUILD_SHELL@%$BUILD_SHELL%g
23400 s%@BUILD_SQL@%$BUILD_SQL%g
23401 s%@BUILD_TCL@%$BUILD_TCL%g
23402 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
23403 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
23404 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
23405 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
23406 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
23407 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
23408 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
23409 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
23410 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
23411 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
23412 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
23413 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
23414 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
23415 s%@LDAP_LIBS@%$LDAP_LIBS%g
23416 s%@LDIF_LIBS@%$LDIF_LIBS%g
23417 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
23418 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
23419 s%@LDBM_LIBS@%$LDBM_LIBS%g
23420 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
23421 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
23422 s%@WRAP_LIBS@%$WRAP_LIBS%g
23423 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
23424 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
23425 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
23426 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
23427 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
23428 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
23429 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
23430 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
23431 s%@KRB4_LIBS@%$KRB4_LIBS%g
23432 s%@KRB5_LIBS@%$KRB5_LIBS%g
23433 s%@READLINE_LIBS@%$READLINE_LIBS%g
23434 s%@SASL_LIBS@%$SASL_LIBS%g
23435 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
23436 s%@TLS_LIBS@%$TLS_LIBS%g
23437 s%@MODULES_LIBS@%$MODULES_LIBS%g
23438 s%@AUTH_LIBS@%$AUTH_LIBS%g
23439 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
23440 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
23441 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
23442 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
23443
23444 CEOF
23445 EOF
23446
23447 cat >> $CONFIG_STATUS <<\EOF
23448
23449 # Split the substitutions into bite-sized pieces for seds with
23450 # small command number limits, like on Digital OSF/1 and HP-UX.
23451 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
23452 ac_file=1 # Number of current file.
23453 ac_beg=1 # First line for current file.
23454 ac_end=$ac_max_sed_cmds # Line after last line for current file.
23455 ac_more_lines=:
23456 ac_sed_cmds=""
23457 while $ac_more_lines; do
23458   if test $ac_beg -gt 1; then
23459     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
23460   else
23461     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
23462   fi
23463   if test ! -s conftest.s$ac_file; then
23464     ac_more_lines=false
23465     rm -f conftest.s$ac_file
23466   else
23467     if test -z "$ac_sed_cmds"; then
23468       ac_sed_cmds="sed -f conftest.s$ac_file"
23469     else
23470       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
23471     fi
23472     ac_file=`expr $ac_file + 1`
23473     ac_beg=$ac_end
23474     ac_end=`expr $ac_end + $ac_max_sed_cmds`
23475   fi
23476 done
23477 if test -z "$ac_sed_cmds"; then
23478   ac_sed_cmds=cat
23479 fi
23480 EOF
23481
23482 cat >> $CONFIG_STATUS <<EOF
23483
23484 CONFIG_FILES=\${CONFIG_FILES-"\
23485 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23486 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23487 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23488 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23489 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23490 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23491 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23492 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23493 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23494 include/Makefile:build/top.mk:include/Makefile.in \
23495 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23496 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
23497 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23498 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23499 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23500 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
23501 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
23502 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23503 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23504 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23505 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23506 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23507 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23508 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23509 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23510 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23511 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23512 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23513 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23514 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23515 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23516 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23517 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23518 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
23519 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23520 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
23521 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23522 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23523 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23524 "}
23525 EOF
23526 cat >> $CONFIG_STATUS <<\EOF
23527 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
23528   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23529   case "$ac_file" in
23530   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23531        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23532   *) ac_file_in="${ac_file}.in" ;;
23533   esac
23534
23535   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
23536
23537   # Remove last slash and all that follows it.  Not all systems have dirname.
23538   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23539   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23540     # The file is in a subdirectory.
23541     test ! -d "$ac_dir" && mkdir "$ac_dir"
23542     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
23543     # A "../" for each directory in $ac_dir_suffix.
23544     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
23545   else
23546     ac_dir_suffix= ac_dots=
23547   fi
23548
23549   case "$ac_given_srcdir" in
23550   .)  srcdir=.
23551       if test -z "$ac_dots"; then top_srcdir=.
23552       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
23553   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
23554   *) # Relative path.
23555     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
23556     top_srcdir="$ac_dots$ac_given_srcdir" ;;
23557   esac
23558
23559   case "$ac_given_INSTALL" in
23560   [/$]*) INSTALL="$ac_given_INSTALL" ;;
23561   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
23562   esac
23563
23564   echo creating "$ac_file"
23565   rm -f "$ac_file"
23566   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
23567   case "$ac_file" in
23568   *[Mm]akefile*) ac_comsub="1i\\
23569 # $configure_input" ;;
23570   *) ac_comsub= ;;
23571   esac
23572
23573   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23574   sed -e "$ac_comsub
23575 s%@configure_input@%$configure_input%g
23576 s%@srcdir@%$srcdir%g
23577 s%@top_srcdir@%$top_srcdir%g
23578 s%@INSTALL@%$INSTALL%g
23579 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
23580 fi; done
23581 rm -f conftest.s*
23582
23583 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23584 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23585 #
23586 # ac_d sets the value in "#define NAME VALUE" lines.
23587 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23588 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
23589 ac_dC='\3'
23590 ac_dD='%g'
23591 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23592 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23593 ac_uB='\([      ]\)%\1#\2define\3'
23594 ac_uC=' '
23595 ac_uD='\4%g'
23596 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23597 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23598 ac_eB='$%\1#\2define\3'
23599 ac_eC=' '
23600 ac_eD='%g'
23601
23602 if test "${CONFIG_HEADERS+set}" != set; then
23603 EOF
23604 cat >> $CONFIG_STATUS <<EOF
23605   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
23606 EOF
23607 cat >> $CONFIG_STATUS <<\EOF
23608 fi
23609 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
23610   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23611   case "$ac_file" in
23612   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23613        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23614   *) ac_file_in="${ac_file}.in" ;;
23615   esac
23616
23617   echo creating $ac_file
23618
23619   rm -f conftest.frag conftest.in conftest.out
23620   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23621   cat $ac_file_inputs > conftest.in
23622
23623 EOF
23624
23625 # Transform confdefs.h into a sed script conftest.vals that substitutes
23626 # the proper values into config.h.in to produce config.h.  And first:
23627 # Protect against being on the right side of a sed subst in config.status.
23628 # Protect against being in an unquoted here document in config.status.
23629 rm -f conftest.vals
23630 cat > conftest.hdr <<\EOF
23631 s/[\\&%]/\\&/g
23632 s%[\\$`]%\\&%g
23633 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
23634 s%ac_d%ac_u%gp
23635 s%ac_u%ac_e%gp
23636 EOF
23637 sed -n -f conftest.hdr confdefs.h > conftest.vals
23638 rm -f conftest.hdr
23639
23640 # This sed command replaces #undef with comments.  This is necessary, for
23641 # example, in the case of _POSIX_SOURCE, which is predefined and required
23642 # on some systems where configure will not decide to define it.
23643 cat >> conftest.vals <<\EOF
23644 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
23645 EOF
23646
23647 # Break up conftest.vals because some shells have a limit on
23648 # the size of here documents, and old seds have small limits too.
23649
23650 rm -f conftest.tail
23651 while :
23652 do
23653   ac_lines=`grep -c . conftest.vals`
23654   # grep -c gives empty output for an empty file on some AIX systems.
23655   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
23656   # Write a limited-size here document to conftest.frag.
23657   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
23658   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
23659   echo 'CEOF
23660   sed -f conftest.frag conftest.in > conftest.out
23661   rm -f conftest.in
23662   mv conftest.out conftest.in
23663 ' >> $CONFIG_STATUS
23664   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23665   rm -f conftest.vals
23666   mv conftest.tail conftest.vals
23667 done
23668 rm -f conftest.vals
23669
23670 cat >> $CONFIG_STATUS <<\EOF
23671   rm -f conftest.frag conftest.h
23672   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
23673   cat conftest.in >> conftest.h
23674   rm -f conftest.in
23675   if cmp -s $ac_file conftest.h 2>/dev/null; then
23676     echo "$ac_file is unchanged"
23677     rm -f conftest.h
23678   else
23679     # Remove last slash and all that follows it.  Not all systems have dirname.
23680       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23681       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23682       # The file is in a subdirectory.
23683       test ! -d "$ac_dir" && mkdir "$ac_dir"
23684     fi
23685     rm -f $ac_file
23686     mv conftest.h $ac_file
23687   fi
23688 fi; done
23689
23690 EOF
23691 cat >> $CONFIG_STATUS <<EOF
23692
23693 EOF
23694 cat >> $CONFIG_STATUS <<\EOF
23695
23696 date > stamp-h
23697 echo Please run \"make depend\" to build dependencies
23698
23699 exit 0
23700 EOF
23701 chmod +x $CONFIG_STATUS
23702 rm -fr confdefs* $ac_clean_files
23703 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
23704