]> git.sur5r.net Git - openldap/blob - configure
0b9e8f1fe426e5d05ee9ba7f06024aacfea7311d
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.435 2002/10/04 00:44:55 kurt 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 case "$target" in
8328 *-ibm-openedition)
8329         ac_cv_func_getopt=no
8330         cat >> confdefs.h <<\EOF
8331 #define BOTH_STRINGS_H 1
8332 EOF
8333
8334         ;;
8335 esac
8336
8337 ol_link_modules=no
8338 if test $ol_enable_modules != no ; then
8339         for ac_hdr in ltdl.h
8340 do
8341 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8342 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8343 echo "configure:8344: checking for $ac_hdr" >&5
8344 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8345   echo $ac_n "(cached) $ac_c" 1>&6
8346 else
8347   cat > conftest.$ac_ext <<EOF
8348 #line 8349 "configure"
8349 #include "confdefs.h"
8350 #include <$ac_hdr>
8351 EOF
8352 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8353 { (eval echo configure:8354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8354 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8355 if test -z "$ac_err"; then
8356   rm -rf conftest*
8357   eval "ac_cv_header_$ac_safe=yes"
8358 else
8359   echo "$ac_err" >&5
8360   echo "configure: failed program was:" >&5
8361   cat conftest.$ac_ext >&5
8362   rm -rf conftest*
8363   eval "ac_cv_header_$ac_safe=no"
8364 fi
8365 rm -f conftest*
8366 fi
8367 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8368   echo "$ac_t""yes" 1>&6
8369     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8370   cat >> confdefs.h <<EOF
8371 #define $ac_tr_hdr 1
8372 EOF
8373  
8374 else
8375   echo "$ac_t""no" 1>&6
8376 fi
8377 done
8378
8379
8380         if test $ac_cv_header_ltdl_h = no ; then
8381                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8382         fi
8383
8384         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8385 echo "configure:8386: checking for lt_dlinit in -lltdl" >&5
8386 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8387 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8388   echo $ac_n "(cached) $ac_c" 1>&6
8389 else
8390   ac_save_LIBS="$LIBS"
8391 LIBS="-lltdl  $LIBS"
8392 cat > conftest.$ac_ext <<EOF
8393 #line 8394 "configure"
8394 #include "confdefs.h"
8395 /* Override any gcc2 internal prototype to avoid an error.  */
8396 /* We use char because int might match the return type of a gcc2
8397     builtin and then its argument prototype would still apply.  */
8398 char lt_dlinit();
8399
8400 int main() {
8401 lt_dlinit()
8402 ; return 0; }
8403 EOF
8404 if { (eval echo configure:8405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8405   rm -rf conftest*
8406   eval "ac_cv_lib_$ac_lib_var=yes"
8407 else
8408   echo "configure: failed program was:" >&5
8409   cat conftest.$ac_ext >&5
8410   rm -rf conftest*
8411   eval "ac_cv_lib_$ac_lib_var=no"
8412 fi
8413 rm -f conftest*
8414 LIBS="$ac_save_LIBS"
8415
8416 fi
8417 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8418   echo "$ac_t""yes" 1>&6
8419   
8420                 MODULES_LIBS=-lltdl
8421                 cat >> confdefs.h <<\EOF
8422 #define HAVE_LIBLTDL 1
8423 EOF
8424
8425         
8426 else
8427   echo "$ac_t""no" 1>&6
8428 fi
8429
8430
8431         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8432                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8433         fi
8434         ol_link_modules=yes
8435 else
8436         ol_with_bdb_module=static
8437         ol_with_dnssrv_module=static
8438         ol_with_ldap_module=static
8439         ol_with_ldbm_module=static
8440         ol_with_meta_module=static
8441         ol_with_monitor_module=static
8442         ol_with_null_module=static
8443         ol_with_passwd_module=static
8444         ol_with_perl_module=static
8445         ol_with_shell_module=static
8446         ol_with_tcl_module=static
8447         ol_with_sql_module=static
8448 fi
8449
8450 # test for EBCDIC
8451 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8452 echo "configure:8453: checking for EBCDIC" >&5
8453 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8454   echo $ac_n "(cached) $ac_c" 1>&6
8455 else
8456   
8457         cat > conftest.$ac_ext <<EOF
8458 #line 8459 "configure"
8459 #include "confdefs.h"
8460
8461 #if !('M' == 0xd4)
8462 #include <__ASCII__/generate_error.h>
8463 #endif
8464
8465 EOF
8466 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8467 { (eval echo configure:8468: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8468 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8469 if test -z "$ac_err"; then
8470   rm -rf conftest*
8471   ol_cv_cpp_ebcdic=yes
8472 else
8473   echo "$ac_err" >&5
8474   echo "configure: failed program was:" >&5
8475   cat conftest.$ac_ext >&5
8476   rm -rf conftest*
8477   ol_cv_cpp_ebcdic=no
8478 fi
8479 rm -f conftest*
8480 fi
8481
8482 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8483 if test $ol_cv_cpp_ebcdic = yes ; then
8484         cat >> confdefs.h <<\EOF
8485 #define HAVE_EBCDIC 1
8486 EOF
8487
8488 fi
8489
8490 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8491 echo "configure:8492: checking for ANSI C header files" >&5
8492 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8493   echo $ac_n "(cached) $ac_c" 1>&6
8494 else
8495   cat > conftest.$ac_ext <<EOF
8496 #line 8497 "configure"
8497 #include "confdefs.h"
8498 #include <stdlib.h>
8499 #include <stdarg.h>
8500 #include <string.h>
8501 #include <float.h>
8502 EOF
8503 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8504 { (eval echo configure:8505: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8505 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8506 if test -z "$ac_err"; then
8507   rm -rf conftest*
8508   ol_cv_header_stdc=yes
8509 else
8510   echo "$ac_err" >&5
8511   echo "configure: failed program was:" >&5
8512   cat conftest.$ac_ext >&5
8513   rm -rf conftest*
8514   ol_cv_header_stdc=no
8515 fi
8516 rm -f conftest*
8517
8518 if test $ol_cv_header_stdc = yes; then
8519   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8520 cat > conftest.$ac_ext <<EOF
8521 #line 8522 "configure"
8522 #include "confdefs.h"
8523 #include <string.h>
8524 EOF
8525 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8526   egrep "memchr" >/dev/null 2>&1; then
8527   :
8528 else
8529   rm -rf conftest*
8530   ol_cv_header_stdc=no
8531 fi
8532 rm -f conftest*
8533
8534 fi
8535
8536 if test $ol_cv_header_stdc = yes; then
8537   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8538 cat > conftest.$ac_ext <<EOF
8539 #line 8540 "configure"
8540 #include "confdefs.h"
8541 #include <stdlib.h>
8542 EOF
8543 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8544   egrep "free" >/dev/null 2>&1; then
8545   :
8546 else
8547   rm -rf conftest*
8548   ol_cv_header_stdc=no
8549 fi
8550 rm -f conftest*
8551
8552 fi
8553
8554 if test $ol_cv_header_stdc = yes; then
8555   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8556 if test "$cross_compiling" = yes; then
8557   :
8558 else
8559   cat > conftest.$ac_ext <<EOF
8560 #line 8561 "configure"
8561 #include "confdefs.h"
8562 #include <ctype.h>
8563 #ifndef HAVE_EBCDIC
8564 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8565 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8566 #else
8567 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8568                 || ('j' <= (c) && (c) <= 'r') \
8569                 || ('s' <= (c) && (c) <= 'z'))
8570 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8571 #endif
8572 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8573 int main () { int i; for (i = 0; i < 256; i++)
8574 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8575 exit (0); }
8576
8577 EOF
8578 if { (eval echo configure:8579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8579 then
8580   :
8581 else
8582   echo "configure: failed program was:" >&5
8583   cat conftest.$ac_ext >&5
8584   rm -fr conftest*
8585   ol_cv_header_stdc=no
8586 fi
8587 rm -fr conftest*
8588 fi
8589
8590 fi
8591 fi
8592
8593 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8594 if test $ol_cv_header_stdc = yes; then
8595   cat >> confdefs.h <<\EOF
8596 #define STDC_HEADERS 1
8597 EOF
8598
8599 fi
8600 ac_cv_header_stdc=disable
8601
8602
8603 if test $ol_cv_header_stdc != yes; then
8604         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8605 fi
8606
8607 ac_header_dirent=no
8608 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8609 do
8610 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8611 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8612 echo "configure:8613: checking for $ac_hdr that defines DIR" >&5
8613 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8614   echo $ac_n "(cached) $ac_c" 1>&6
8615 else
8616   cat > conftest.$ac_ext <<EOF
8617 #line 8618 "configure"
8618 #include "confdefs.h"
8619 #include <sys/types.h>
8620 #include <$ac_hdr>
8621 int main() {
8622 DIR *dirp = 0;
8623 ; return 0; }
8624 EOF
8625 if { (eval echo configure:8626: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8626   rm -rf conftest*
8627   eval "ac_cv_header_dirent_$ac_safe=yes"
8628 else
8629   echo "configure: failed program was:" >&5
8630   cat conftest.$ac_ext >&5
8631   rm -rf conftest*
8632   eval "ac_cv_header_dirent_$ac_safe=no"
8633 fi
8634 rm -f conftest*
8635 fi
8636 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8637   echo "$ac_t""yes" 1>&6
8638     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8639   cat >> confdefs.h <<EOF
8640 #define $ac_tr_hdr 1
8641 EOF
8642  ac_header_dirent=$ac_hdr; break
8643 else
8644   echo "$ac_t""no" 1>&6
8645 fi
8646 done
8647 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8648 if test $ac_header_dirent = dirent.h; then
8649 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8650 echo "configure:8651: checking for opendir in -ldir" >&5
8651 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8652 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8653   echo $ac_n "(cached) $ac_c" 1>&6
8654 else
8655   ac_save_LIBS="$LIBS"
8656 LIBS="-ldir  $LIBS"
8657 cat > conftest.$ac_ext <<EOF
8658 #line 8659 "configure"
8659 #include "confdefs.h"
8660 /* Override any gcc2 internal prototype to avoid an error.  */
8661 /* We use char because int might match the return type of a gcc2
8662     builtin and then its argument prototype would still apply.  */
8663 char opendir();
8664
8665 int main() {
8666 opendir()
8667 ; return 0; }
8668 EOF
8669 if { (eval echo configure:8670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8670   rm -rf conftest*
8671   eval "ac_cv_lib_$ac_lib_var=yes"
8672 else
8673   echo "configure: failed program was:" >&5
8674   cat conftest.$ac_ext >&5
8675   rm -rf conftest*
8676   eval "ac_cv_lib_$ac_lib_var=no"
8677 fi
8678 rm -f conftest*
8679 LIBS="$ac_save_LIBS"
8680
8681 fi
8682 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8683   echo "$ac_t""yes" 1>&6
8684   LIBS="$LIBS -ldir"
8685 else
8686   echo "$ac_t""no" 1>&6
8687 fi
8688
8689 else
8690 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8691 echo "configure:8692: checking for opendir in -lx" >&5
8692 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8693 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8694   echo $ac_n "(cached) $ac_c" 1>&6
8695 else
8696   ac_save_LIBS="$LIBS"
8697 LIBS="-lx  $LIBS"
8698 cat > conftest.$ac_ext <<EOF
8699 #line 8700 "configure"
8700 #include "confdefs.h"
8701 /* Override any gcc2 internal prototype to avoid an error.  */
8702 /* We use char because int might match the return type of a gcc2
8703     builtin and then its argument prototype would still apply.  */
8704 char opendir();
8705
8706 int main() {
8707 opendir()
8708 ; return 0; }
8709 EOF
8710 if { (eval echo configure:8711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8711   rm -rf conftest*
8712   eval "ac_cv_lib_$ac_lib_var=yes"
8713 else
8714   echo "configure: failed program was:" >&5
8715   cat conftest.$ac_ext >&5
8716   rm -rf conftest*
8717   eval "ac_cv_lib_$ac_lib_var=no"
8718 fi
8719 rm -f conftest*
8720 LIBS="$ac_save_LIBS"
8721
8722 fi
8723 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8724   echo "$ac_t""yes" 1>&6
8725   LIBS="$LIBS -lx"
8726 else
8727   echo "$ac_t""no" 1>&6
8728 fi
8729
8730 fi
8731
8732 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8733 echo "configure:8734: checking for sys/wait.h that is POSIX.1 compatible" >&5
8734 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8735   echo $ac_n "(cached) $ac_c" 1>&6
8736 else
8737   cat > conftest.$ac_ext <<EOF
8738 #line 8739 "configure"
8739 #include "confdefs.h"
8740 #include <sys/types.h>
8741 #include <sys/wait.h>
8742 #ifndef WEXITSTATUS
8743 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8744 #endif
8745 #ifndef WIFEXITED
8746 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8747 #endif
8748 int main() {
8749 int s;
8750 wait (&s);
8751 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8752 ; return 0; }
8753 EOF
8754 if { (eval echo configure:8755: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8755   rm -rf conftest*
8756   ac_cv_header_sys_wait_h=yes
8757 else
8758   echo "configure: failed program was:" >&5
8759   cat conftest.$ac_ext >&5
8760   rm -rf conftest*
8761   ac_cv_header_sys_wait_h=no
8762 fi
8763 rm -f conftest*
8764 fi
8765
8766 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8767 if test $ac_cv_header_sys_wait_h = yes; then
8768   cat >> confdefs.h <<\EOF
8769 #define HAVE_SYS_WAIT_H 1
8770 EOF
8771
8772 fi
8773
8774 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8775 echo "configure:8776: checking POSIX termios" >&5
8776 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8777   echo $ac_n "(cached) $ac_c" 1>&6
8778 else
8779   cat > conftest.$ac_ext <<EOF
8780 #line 8781 "configure"
8781 #include "confdefs.h"
8782 #include <sys/types.h>
8783 #include <unistd.h>
8784 #include <termios.h>
8785 int main() {
8786 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8787    tcgetattr(0, 0);
8788 ; return 0; }
8789 EOF
8790 if { (eval echo configure:8791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8791   rm -rf conftest*
8792   am_cv_sys_posix_termios=yes
8793 else
8794   echo "configure: failed program was:" >&5
8795   cat conftest.$ac_ext >&5
8796   rm -rf conftest*
8797   am_cv_sys_posix_termios=no
8798 fi
8799 rm -f conftest*
8800 fi
8801
8802 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8803
8804
8805  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8806 echo "configure:8807: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8807 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8808   echo $ac_n "(cached) $ac_c" 1>&6
8809 else
8810   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8811
8812   gwinsz_in_termios_h=no
8813   if test $am_cv_sys_posix_termios = yes; then
8814     cat > conftest.$ac_ext <<EOF
8815 #line 8816 "configure"
8816 #include "confdefs.h"
8817 #include <sys/types.h>
8818 #     include <termios.h>
8819 #     ifdef TIOCGWINSZ
8820         yes
8821 #     endif
8822     
8823 EOF
8824 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8825   egrep "yes" >/dev/null 2>&1; then
8826   rm -rf conftest*
8827   gwinsz_in_termios_h=yes
8828 fi
8829 rm -f conftest*
8830
8831   fi
8832
8833   if test $gwinsz_in_termios_h = no; then
8834     cat > conftest.$ac_ext <<EOF
8835 #line 8836 "configure"
8836 #include "confdefs.h"
8837 #include <sys/types.h>
8838 #     include <sys/ioctl.h>
8839 #     ifdef TIOCGWINSZ
8840         yes
8841 #     endif
8842     
8843 EOF
8844 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8845   egrep "yes" >/dev/null 2>&1; then
8846   rm -rf conftest*
8847   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8848 fi
8849 rm -f conftest*
8850
8851   fi
8852   
8853 fi
8854
8855 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8856   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8857     cat >> confdefs.h <<\EOF
8858 #define GWINSZ_IN_SYS_IOCTL 1
8859 EOF
8860
8861   fi
8862
8863 if test $am_cv_sys_posix_termios = yes ; then
8864         cat >> confdefs.h <<\EOF
8865 #define HAVE_POSIX_TERMIOS 1
8866 EOF
8867
8868 fi
8869
8870 for ac_hdr in \
8871         arpa/inet.h             \
8872         arpa/nameser.h  \
8873         assert.h                \
8874         conio.h                 \
8875         crypt.h                 \
8876         direct.h                \
8877         errno.h                 \
8878         fcntl.h                 \
8879         filio.h                 \
8880         getopt.h                \
8881         grp.h                   \
8882         io.h                    \
8883         libutil.h               \
8884         limits.h                \
8885         locale.h                \
8886         netinet/tcp.h   \
8887         malloc.h                \
8888         memory.h                \
8889         psap.h                  \
8890         pwd.h                   \
8891         process.h               \
8892         resolv.h                \
8893         sgtty.h                 \
8894         shadow.h                \
8895         stddef.h                \
8896         string.h                \
8897         strings.h               \
8898         sysexits.h              \
8899         sys/file.h              \
8900         sys/filio.h             \
8901         sys/errno.h             \
8902         sys/ioctl.h             \
8903         sys/param.h             \
8904         sys/resource.h  \
8905         sys/select.h    \
8906         sys/socket.h    \
8907         sys/syslog.h    \
8908         sys/time.h              \
8909         sys/types.h             \
8910         syslog.h                \
8911         termios.h               \
8912         unistd.h                \
8913         winsock.h               \
8914         winsock2.h              \
8915
8916 do
8917 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8918 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8919 echo "configure:8920: checking for $ac_hdr" >&5
8920 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8921   echo $ac_n "(cached) $ac_c" 1>&6
8922 else
8923   cat > conftest.$ac_ext <<EOF
8924 #line 8925 "configure"
8925 #include "confdefs.h"
8926 #include <$ac_hdr>
8927 EOF
8928 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8929 { (eval echo configure:8930: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8930 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8931 if test -z "$ac_err"; then
8932   rm -rf conftest*
8933   eval "ac_cv_header_$ac_safe=yes"
8934 else
8935   echo "$ac_err" >&5
8936   echo "configure: failed program was:" >&5
8937   cat conftest.$ac_ext >&5
8938   rm -rf conftest*
8939   eval "ac_cv_header_$ac_safe=no"
8940 fi
8941 rm -f conftest*
8942 fi
8943 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8944   echo "$ac_t""yes" 1>&6
8945     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8946   cat >> confdefs.h <<EOF
8947 #define $ac_tr_hdr 1
8948 EOF
8949  
8950 else
8951   echo "$ac_t""no" 1>&6
8952 fi
8953 done
8954
8955
8956
8957
8958 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
8959 echo "configure:8960: checking for dlopen" >&5
8960 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
8961   echo $ac_n "(cached) $ac_c" 1>&6
8962 else
8963   cat > conftest.$ac_ext <<EOF
8964 #line 8965 "configure"
8965 #include "confdefs.h"
8966 /* System header to define __stub macros and hopefully few prototypes,
8967     which can conflict with char dlopen(); below.  */
8968 #include <assert.h>
8969 /* Override any gcc2 internal prototype to avoid an error.  */
8970 /* We use char because int might match the return type of a gcc2
8971     builtin and then its argument prototype would still apply.  */
8972 char dlopen();
8973 char (*f)();
8974
8975 int main() {
8976
8977 /* The GNU C library defines this for functions which it implements
8978     to always fail with ENOSYS.  Some functions are actually named
8979     something starting with __ and the normal name is an alias.  */
8980 #if defined (__stub_dlopen) || defined (__stub___dlopen)
8981 choke me
8982 #else
8983 f = dlopen;
8984 #endif
8985
8986 ; return 0; }
8987 EOF
8988 if { (eval echo configure:8989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8989   rm -rf conftest*
8990   eval "ac_cv_func_dlopen=yes"
8991 else
8992   echo "configure: failed program was:" >&5
8993   cat conftest.$ac_ext >&5
8994   rm -rf conftest*
8995   eval "ac_cv_func_dlopen=no"
8996 fi
8997 rm -f conftest*
8998 fi
8999
9000 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
9001   echo "$ac_t""yes" 1>&6
9002   :
9003 else
9004   echo "$ac_t""no" 1>&6
9005 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
9006 echo "configure:9007: checking for dlopen in -ldl" >&5
9007 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
9008 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9009   echo $ac_n "(cached) $ac_c" 1>&6
9010 else
9011   ac_save_LIBS="$LIBS"
9012 LIBS="-ldl  $LIBS"
9013 cat > conftest.$ac_ext <<EOF
9014 #line 9015 "configure"
9015 #include "confdefs.h"
9016 /* Override any gcc2 internal prototype to avoid an error.  */
9017 /* We use char because int might match the return type of a gcc2
9018     builtin and then its argument prototype would still apply.  */
9019 char dlopen();
9020
9021 int main() {
9022 dlopen()
9023 ; return 0; }
9024 EOF
9025 if { (eval echo configure:9026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9026   rm -rf conftest*
9027   eval "ac_cv_lib_$ac_lib_var=yes"
9028 else
9029   echo "configure: failed program was:" >&5
9030   cat conftest.$ac_ext >&5
9031   rm -rf conftest*
9032   eval "ac_cv_lib_$ac_lib_var=no"
9033 fi
9034 rm -f conftest*
9035 LIBS="$ac_save_LIBS"
9036
9037 fi
9038 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9039   echo "$ac_t""yes" 1>&6
9040     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9041     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9042   cat >> confdefs.h <<EOF
9043 #define $ac_tr_lib 1
9044 EOF
9045
9046   LIBS="-ldl $LIBS"
9047
9048 else
9049   echo "$ac_t""no" 1>&6
9050 fi
9051
9052 fi
9053
9054
9055 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
9056 echo "configure:9057: checking for sigset in -lV3" >&5
9057 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
9058 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9059   echo $ac_n "(cached) $ac_c" 1>&6
9060 else
9061   ac_save_LIBS="$LIBS"
9062 LIBS="-lV3  $LIBS"
9063 cat > conftest.$ac_ext <<EOF
9064 #line 9065 "configure"
9065 #include "confdefs.h"
9066 /* Override any gcc2 internal prototype to avoid an error.  */
9067 /* We use char because int might match the return type of a gcc2
9068     builtin and then its argument prototype would still apply.  */
9069 char sigset();
9070
9071 int main() {
9072 sigset()
9073 ; return 0; }
9074 EOF
9075 if { (eval echo configure:9076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9076   rm -rf conftest*
9077   eval "ac_cv_lib_$ac_lib_var=yes"
9078 else
9079   echo "configure: failed program was:" >&5
9080   cat conftest.$ac_ext >&5
9081   rm -rf conftest*
9082   eval "ac_cv_lib_$ac_lib_var=no"
9083 fi
9084 rm -f conftest*
9085 LIBS="$ac_save_LIBS"
9086
9087 fi
9088 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9089   echo "$ac_t""yes" 1>&6
9090     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9091     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9092   cat >> confdefs.h <<EOF
9093 #define $ac_tr_lib 1
9094 EOF
9095
9096   LIBS="-lV3 $LIBS"
9097
9098 else
9099   echo "$ac_t""no" 1>&6
9100 fi
9101
9102
9103 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9104 echo "configure:9105: checking for winsock" >&5
9105 save_LIBS="$LIBS"
9106 for curlib in ws2_32 wsock32; do
9107         LIBS="$LIBS -l$curlib"
9108         cat > conftest.$ac_ext <<EOF
9109 #line 9110 "configure"
9110 #include "confdefs.h"
9111
9112                         char socket@12();
9113                         char select@20();
9114                         char closesocket@4();
9115                         char gethostname@8();
9116                         
9117 int main() {
9118
9119                         socket@12();
9120                         select@20();
9121                         closesocket@4();
9122                         gethostname@8();
9123                         
9124 ; return 0; }
9125 EOF
9126 if { (eval echo configure:9127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9127   rm -rf conftest*
9128   have_winsock=yes
9129 else
9130   echo "configure: failed program was:" >&5
9131   cat conftest.$ac_ext >&5
9132   rm -rf conftest*
9133   have_winsock=no
9134 fi
9135 rm -f conftest*
9136
9137         if test $have_winsock = yes; then
9138                 cat >> confdefs.h <<\EOF
9139 #define HAVE_WINSOCK 1
9140 EOF
9141
9142                 ac_cv_func_socket=yes
9143                 ac_cv_func_select=yes
9144                 ac_cv_func_closesocket=yes
9145                 ac_cv_func_gethostname=yes
9146                 if test $curlib = ws2_32; then
9147                         have_winsock=winsock2
9148                         cat >> confdefs.h <<\EOF
9149 #define HAVE_WINSOCK2 1
9150 EOF
9151
9152                 fi
9153                 break
9154         fi
9155         LIBS="$save_LIBS"
9156 done
9157 echo "$ac_t""$have_winsock" 1>&6
9158
9159
9160 echo $ac_n "checking for socket""... $ac_c" 1>&6
9161 echo "configure:9162: checking for socket" >&5
9162 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9163   echo $ac_n "(cached) $ac_c" 1>&6
9164 else
9165   cat > conftest.$ac_ext <<EOF
9166 #line 9167 "configure"
9167 #include "confdefs.h"
9168 /* System header to define __stub macros and hopefully few prototypes,
9169     which can conflict with char socket(); below.  */
9170 #include <assert.h>
9171 /* Override any gcc2 internal prototype to avoid an error.  */
9172 /* We use char because int might match the return type of a gcc2
9173     builtin and then its argument prototype would still apply.  */
9174 char socket();
9175 char (*f)();
9176
9177 int main() {
9178
9179 /* The GNU C library defines this for functions which it implements
9180     to always fail with ENOSYS.  Some functions are actually named
9181     something starting with __ and the normal name is an alias.  */
9182 #if defined (__stub_socket) || defined (__stub___socket)
9183 choke me
9184 #else
9185 f = socket;
9186 #endif
9187
9188 ; return 0; }
9189 EOF
9190 if { (eval echo configure:9191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9191   rm -rf conftest*
9192   eval "ac_cv_func_socket=yes"
9193 else
9194   echo "configure: failed program was:" >&5
9195   cat conftest.$ac_ext >&5
9196   rm -rf conftest*
9197   eval "ac_cv_func_socket=no"
9198 fi
9199 rm -f conftest*
9200 fi
9201
9202 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9203   echo "$ac_t""yes" 1>&6
9204   :
9205 else
9206   echo "$ac_t""no" 1>&6
9207         
9208         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9209 echo "configure:9210: checking for main in -lsocket" >&5
9210 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9211 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9212   echo $ac_n "(cached) $ac_c" 1>&6
9213 else
9214   ac_save_LIBS="$LIBS"
9215 LIBS="-lsocket  $LIBS"
9216 cat > conftest.$ac_ext <<EOF
9217 #line 9218 "configure"
9218 #include "confdefs.h"
9219
9220 int main() {
9221 main()
9222 ; return 0; }
9223 EOF
9224 if { (eval echo configure:9225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9225   rm -rf conftest*
9226   eval "ac_cv_lib_$ac_lib_var=yes"
9227 else
9228   echo "configure: failed program was:" >&5
9229   cat conftest.$ac_ext >&5
9230   rm -rf conftest*
9231   eval "ac_cv_lib_$ac_lib_var=no"
9232 fi
9233 rm -f conftest*
9234 LIBS="$ac_save_LIBS"
9235
9236 fi
9237 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9238   echo "$ac_t""yes" 1>&6
9239     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9240     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9241   cat >> confdefs.h <<EOF
9242 #define $ac_tr_lib 1
9243 EOF
9244
9245   LIBS="-lsocket $LIBS"
9246
9247 else
9248   echo "$ac_t""no" 1>&6
9249 fi
9250
9251         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9252 echo "configure:9253: checking for main in -lnet" >&5
9253 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9254 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9255   echo $ac_n "(cached) $ac_c" 1>&6
9256 else
9257   ac_save_LIBS="$LIBS"
9258 LIBS="-lnet  $LIBS"
9259 cat > conftest.$ac_ext <<EOF
9260 #line 9261 "configure"
9261 #include "confdefs.h"
9262
9263 int main() {
9264 main()
9265 ; return 0; }
9266 EOF
9267 if { (eval echo configure:9268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9268   rm -rf conftest*
9269   eval "ac_cv_lib_$ac_lib_var=yes"
9270 else
9271   echo "configure: failed program was:" >&5
9272   cat conftest.$ac_ext >&5
9273   rm -rf conftest*
9274   eval "ac_cv_lib_$ac_lib_var=no"
9275 fi
9276 rm -f conftest*
9277 LIBS="$ac_save_LIBS"
9278
9279 fi
9280 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9281   echo "$ac_t""yes" 1>&6
9282     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9283     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9284   cat >> confdefs.h <<EOF
9285 #define $ac_tr_lib 1
9286 EOF
9287
9288   LIBS="-lnet $LIBS"
9289
9290 else
9291   echo "$ac_t""no" 1>&6
9292 fi
9293
9294         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9295 echo "configure:9296: checking for main in -lnsl_s" >&5
9296 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9297 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9298   echo $ac_n "(cached) $ac_c" 1>&6
9299 else
9300   ac_save_LIBS="$LIBS"
9301 LIBS="-lnsl_s  $LIBS"
9302 cat > conftest.$ac_ext <<EOF
9303 #line 9304 "configure"
9304 #include "confdefs.h"
9305
9306 int main() {
9307 main()
9308 ; return 0; }
9309 EOF
9310 if { (eval echo configure:9311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9311   rm -rf conftest*
9312   eval "ac_cv_lib_$ac_lib_var=yes"
9313 else
9314   echo "configure: failed program was:" >&5
9315   cat conftest.$ac_ext >&5
9316   rm -rf conftest*
9317   eval "ac_cv_lib_$ac_lib_var=no"
9318 fi
9319 rm -f conftest*
9320 LIBS="$ac_save_LIBS"
9321
9322 fi
9323 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9324   echo "$ac_t""yes" 1>&6
9325     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9326     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9327   cat >> confdefs.h <<EOF
9328 #define $ac_tr_lib 1
9329 EOF
9330
9331   LIBS="-lnsl_s $LIBS"
9332
9333 else
9334   echo "$ac_t""no" 1>&6
9335 fi
9336
9337         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9338 echo "configure:9339: checking for main in -lnsl" >&5
9339 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9340 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9341   echo $ac_n "(cached) $ac_c" 1>&6
9342 else
9343   ac_save_LIBS="$LIBS"
9344 LIBS="-lnsl  $LIBS"
9345 cat > conftest.$ac_ext <<EOF
9346 #line 9347 "configure"
9347 #include "confdefs.h"
9348
9349 int main() {
9350 main()
9351 ; return 0; }
9352 EOF
9353 if { (eval echo configure:9354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9354   rm -rf conftest*
9355   eval "ac_cv_lib_$ac_lib_var=yes"
9356 else
9357   echo "configure: failed program was:" >&5
9358   cat conftest.$ac_ext >&5
9359   rm -rf conftest*
9360   eval "ac_cv_lib_$ac_lib_var=no"
9361 fi
9362 rm -f conftest*
9363 LIBS="$ac_save_LIBS"
9364
9365 fi
9366 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9367   echo "$ac_t""yes" 1>&6
9368     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9369     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9370   cat >> confdefs.h <<EOF
9371 #define $ac_tr_lib 1
9372 EOF
9373
9374   LIBS="-lnsl $LIBS"
9375
9376 else
9377   echo "$ac_t""no" 1>&6
9378 fi
9379
9380         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9381 echo "configure:9382: checking for socket in -linet" >&5
9382 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9383 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9384   echo $ac_n "(cached) $ac_c" 1>&6
9385 else
9386   ac_save_LIBS="$LIBS"
9387 LIBS="-linet  $LIBS"
9388 cat > conftest.$ac_ext <<EOF
9389 #line 9390 "configure"
9390 #include "confdefs.h"
9391 /* Override any gcc2 internal prototype to avoid an error.  */
9392 /* We use char because int might match the return type of a gcc2
9393     builtin and then its argument prototype would still apply.  */
9394 char socket();
9395
9396 int main() {
9397 socket()
9398 ; return 0; }
9399 EOF
9400 if { (eval echo configure:9401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9401   rm -rf conftest*
9402   eval "ac_cv_lib_$ac_lib_var=yes"
9403 else
9404   echo "configure: failed program was:" >&5
9405   cat conftest.$ac_ext >&5
9406   rm -rf conftest*
9407   eval "ac_cv_lib_$ac_lib_var=no"
9408 fi
9409 rm -f conftest*
9410 LIBS="$ac_save_LIBS"
9411
9412 fi
9413 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9414   echo "$ac_t""yes" 1>&6
9415     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9416     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9417   cat >> confdefs.h <<EOF
9418 #define $ac_tr_lib 1
9419 EOF
9420
9421   LIBS="-linet $LIBS"
9422
9423 else
9424   echo "$ac_t""no" 1>&6
9425 fi
9426
9427         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9428 echo "configure:9429: checking for main in -lgen" >&5
9429 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9430 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9431   echo $ac_n "(cached) $ac_c" 1>&6
9432 else
9433   ac_save_LIBS="$LIBS"
9434 LIBS="-lgen  $LIBS"
9435 cat > conftest.$ac_ext <<EOF
9436 #line 9437 "configure"
9437 #include "confdefs.h"
9438
9439 int main() {
9440 main()
9441 ; return 0; }
9442 EOF
9443 if { (eval echo configure:9444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9444   rm -rf conftest*
9445   eval "ac_cv_lib_$ac_lib_var=yes"
9446 else
9447   echo "configure: failed program was:" >&5
9448   cat conftest.$ac_ext >&5
9449   rm -rf conftest*
9450   eval "ac_cv_lib_$ac_lib_var=no"
9451 fi
9452 rm -f conftest*
9453 LIBS="$ac_save_LIBS"
9454
9455 fi
9456 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9457   echo "$ac_t""yes" 1>&6
9458     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9459     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9460   cat >> confdefs.h <<EOF
9461 #define $ac_tr_lib 1
9462 EOF
9463
9464   LIBS="-lgen $LIBS"
9465
9466 else
9467   echo "$ac_t""no" 1>&6
9468 fi
9469
9470
9471 fi
9472
9473
9474 echo $ac_n "checking for select""... $ac_c" 1>&6
9475 echo "configure:9476: checking for select" >&5
9476 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9477   echo $ac_n "(cached) $ac_c" 1>&6
9478 else
9479   cat > conftest.$ac_ext <<EOF
9480 #line 9481 "configure"
9481 #include "confdefs.h"
9482 /* System header to define __stub macros and hopefully few prototypes,
9483     which can conflict with char select(); below.  */
9484 #include <assert.h>
9485 /* Override any gcc2 internal prototype to avoid an error.  */
9486 /* We use char because int might match the return type of a gcc2
9487     builtin and then its argument prototype would still apply.  */
9488 char select();
9489 char (*f)();
9490
9491 int main() {
9492
9493 /* The GNU C library defines this for functions which it implements
9494     to always fail with ENOSYS.  Some functions are actually named
9495     something starting with __ and the normal name is an alias.  */
9496 #if defined (__stub_select) || defined (__stub___select)
9497 choke me
9498 #else
9499 f = select;
9500 #endif
9501
9502 ; return 0; }
9503 EOF
9504 if { (eval echo configure:9505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9505   rm -rf conftest*
9506   eval "ac_cv_func_select=yes"
9507 else
9508   echo "configure: failed program was:" >&5
9509   cat conftest.$ac_ext >&5
9510   rm -rf conftest*
9511   eval "ac_cv_func_select=no"
9512 fi
9513 rm -f conftest*
9514 fi
9515
9516 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9517   echo "$ac_t""yes" 1>&6
9518   :
9519 else
9520   echo "$ac_t""no" 1>&6
9521 { echo "configure: error: select() required." 1>&2; exit 1; }
9522 fi
9523
9524
9525 if test "${ac_cv_header_winsock_h}" != yes; then
9526                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9527 echo "configure:9528: checking types of arguments for select()" >&5
9528  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9529   echo $ac_n "(cached) $ac_c" 1>&6
9530 else
9531    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9532   echo $ac_n "(cached) $ac_c" 1>&6
9533 else
9534     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9535   echo $ac_n "(cached) $ac_c" 1>&6
9536 else
9537      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9538      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9539       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9540        cat > conftest.$ac_ext <<EOF
9541 #line 9542 "configure"
9542 #include "confdefs.h"
9543 #ifdef HAVE_SYS_TYPES_H
9544 #include <sys/types.h>
9545 #endif
9546 #ifdef HAVE_SYS_TIME_H
9547 #include <sys/time.h>
9548 #endif
9549 #ifdef HAVE_SYS_SELECT_H
9550 #include <sys/select.h>
9551 #endif
9552 #ifdef HAVE_SYS_SOCKET_H
9553 #include <sys/socket.h>
9554 #endif
9555 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);
9556 int main() {
9557
9558 ; return 0; }
9559 EOF
9560 if { (eval echo configure:9561: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9561   rm -rf conftest*
9562           ac_not_found=no ; break 3
9563 else
9564   echo "configure: failed program was:" >&5
9565   cat conftest.$ac_ext >&5
9566   rm -rf conftest*
9567   ac_not_found=yes
9568 fi
9569 rm -f conftest*
9570       done
9571      done
9572     done
9573    
9574 fi
9575   
9576 fi
9577  
9578 fi
9579  if test "$ac_not_found" = yes; then
9580   ac_cv_func_select_arg1=int 
9581   ac_cv_func_select_arg234='int *' 
9582   ac_cv_func_select_arg5='struct timeval *'
9583  fi
9584  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9585  cat >> confdefs.h <<EOF
9586 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9587 EOF
9588
9589  cat >> confdefs.h <<EOF
9590 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9591 EOF
9592
9593  cat >> confdefs.h <<EOF
9594 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9595 EOF
9596
9597
9598 fi
9599
9600
9601 for ac_hdr in regex.h 
9602 do
9603 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9604 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9605 echo "configure:9606: checking for $ac_hdr" >&5
9606 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9607   echo $ac_n "(cached) $ac_c" 1>&6
9608 else
9609   cat > conftest.$ac_ext <<EOF
9610 #line 9611 "configure"
9611 #include "confdefs.h"
9612 #include <$ac_hdr>
9613 EOF
9614 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9615 { (eval echo configure:9616: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9616 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9617 if test -z "$ac_err"; then
9618   rm -rf conftest*
9619   eval "ac_cv_header_$ac_safe=yes"
9620 else
9621   echo "$ac_err" >&5
9622   echo "configure: failed program was:" >&5
9623   cat conftest.$ac_ext >&5
9624   rm -rf conftest*
9625   eval "ac_cv_header_$ac_safe=no"
9626 fi
9627 rm -f conftest*
9628 fi
9629 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9630   echo "$ac_t""yes" 1>&6
9631     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9632   cat >> confdefs.h <<EOF
9633 #define $ac_tr_hdr 1
9634 EOF
9635  
9636 else
9637   echo "$ac_t""no" 1>&6
9638 fi
9639 done
9640
9641 if test "$ac_cv_header_regex_h" != yes ; then
9642         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9643 fi
9644
9645 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9646 echo "configure:9647: checking for library containing regfree" >&5
9647 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9648   echo $ac_n "(cached) $ac_c" 1>&6
9649 else
9650   ac_func_search_save_LIBS="$LIBS"
9651 ac_cv_search_regfree="no"
9652 cat > conftest.$ac_ext <<EOF
9653 #line 9654 "configure"
9654 #include "confdefs.h"
9655 /* Override any gcc2 internal prototype to avoid an error.  */
9656 /* We use char because int might match the return type of a gcc2
9657     builtin and then its argument prototype would still apply.  */
9658 char regfree();
9659
9660 int main() {
9661 regfree()
9662 ; return 0; }
9663 EOF
9664 if { (eval echo configure:9665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9665   rm -rf conftest*
9666   ac_cv_search_regfree="none required"
9667 else
9668   echo "configure: failed program was:" >&5
9669   cat conftest.$ac_ext >&5
9670 fi
9671 rm -f conftest*
9672 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9673 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9674 cat > conftest.$ac_ext <<EOF
9675 #line 9676 "configure"
9676 #include "confdefs.h"
9677 /* Override any gcc2 internal prototype to avoid an error.  */
9678 /* We use char because int might match the return type of a gcc2
9679     builtin and then its argument prototype would still apply.  */
9680 char regfree();
9681
9682 int main() {
9683 regfree()
9684 ; return 0; }
9685 EOF
9686 if { (eval echo configure:9687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9687   rm -rf conftest*
9688   ac_cv_search_regfree="-l$ac_lib"
9689 break
9690 else
9691   echo "configure: failed program was:" >&5
9692   cat conftest.$ac_ext >&5
9693 fi
9694 rm -f conftest*
9695 done
9696 LIBS="$ac_func_search_save_LIBS"
9697 fi
9698
9699 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9700 if test "$ac_cv_search_regfree" != "no"; then
9701   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9702   :
9703 else :
9704   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9705 fi
9706
9707
9708 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9709 echo "configure:9710: checking for compatible POSIX regex" >&5
9710 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9711   echo $ac_n "(cached) $ac_c" 1>&6
9712 else
9713   
9714         if test "$cross_compiling" = yes; then
9715   ol_cv_c_posix_regex=cross
9716 else
9717   cat > conftest.$ac_ext <<EOF
9718 #line 9719 "configure"
9719 #include "confdefs.h"
9720
9721 #include <sys/types.h>
9722 #include <regex.h>
9723 static char *pattern, *string;
9724 main()
9725 {
9726         int rc;
9727         regex_t re;
9728
9729         pattern = "^A";
9730
9731         if(regcomp(&re, pattern, 0)) {
9732                 return -1;
9733         }
9734         
9735         string = "ALL MATCH";
9736         
9737         rc = regexec(&re, string, 0, (void*)0, 0);
9738
9739         regfree(&re);
9740
9741         return rc;
9742 }
9743 EOF
9744 if { (eval echo configure:9745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9745 then
9746   ol_cv_c_posix_regex=yes
9747 else
9748   echo "configure: failed program was:" >&5
9749   cat conftest.$ac_ext >&5
9750   rm -fr conftest*
9751   ol_cv_c_posix_regex=no
9752 fi
9753 rm -fr conftest*
9754 fi
9755
9756 fi
9757
9758 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9759
9760 if test "$ol_cv_c_posix_regex" = no ; then
9761         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9762 fi
9763
9764
9765 have_uuid=no
9766 for ac_hdr in sys/uuid.h
9767 do
9768 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9769 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9770 echo "configure:9771: checking for $ac_hdr" >&5
9771 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9772   echo $ac_n "(cached) $ac_c" 1>&6
9773 else
9774   cat > conftest.$ac_ext <<EOF
9775 #line 9776 "configure"
9776 #include "confdefs.h"
9777 #include <$ac_hdr>
9778 EOF
9779 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9780 { (eval echo configure:9781: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9781 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9782 if test -z "$ac_err"; then
9783   rm -rf conftest*
9784   eval "ac_cv_header_$ac_safe=yes"
9785 else
9786   echo "$ac_err" >&5
9787   echo "configure: failed program was:" >&5
9788   cat conftest.$ac_ext >&5
9789   rm -rf conftest*
9790   eval "ac_cv_header_$ac_safe=no"
9791 fi
9792 rm -f conftest*
9793 fi
9794 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9795   echo "$ac_t""yes" 1>&6
9796     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9797   cat >> confdefs.h <<EOF
9798 #define $ac_tr_hdr 1
9799 EOF
9800  
9801 else
9802   echo "$ac_t""no" 1>&6
9803 fi
9804 done
9805
9806 if test $ac_cv_header_sys_uuid_h = yes ; then
9807         save_LIBS="$LIBS"
9808         
9809 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9810 echo "configure:9811: checking for library containing uuid_to_str" >&5
9811 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9812   echo $ac_n "(cached) $ac_c" 1>&6
9813 else
9814   ac_func_search_save_LIBS="$LIBS"
9815 ac_cv_search_uuid_to_str="no"
9816 cat > conftest.$ac_ext <<EOF
9817 #line 9818 "configure"
9818 #include "confdefs.h"
9819 /* Override any gcc2 internal prototype to avoid an error.  */
9820 /* We use char because int might match the return type of a gcc2
9821     builtin and then its argument prototype would still apply.  */
9822 char uuid_to_str();
9823
9824 int main() {
9825 uuid_to_str()
9826 ; return 0; }
9827 EOF
9828 if { (eval echo configure:9829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9829   rm -rf conftest*
9830   ac_cv_search_uuid_to_str="none required"
9831 else
9832   echo "configure: failed program was:" >&5
9833   cat conftest.$ac_ext >&5
9834 fi
9835 rm -f conftest*
9836 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9837 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9838 cat > conftest.$ac_ext <<EOF
9839 #line 9840 "configure"
9840 #include "confdefs.h"
9841 /* Override any gcc2 internal prototype to avoid an error.  */
9842 /* We use char because int might match the return type of a gcc2
9843     builtin and then its argument prototype would still apply.  */
9844 char uuid_to_str();
9845
9846 int main() {
9847 uuid_to_str()
9848 ; return 0; }
9849 EOF
9850 if { (eval echo configure:9851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9851   rm -rf conftest*
9852   ac_cv_search_uuid_to_str="-l$ac_lib"
9853 break
9854 else
9855   echo "configure: failed program was:" >&5
9856   cat conftest.$ac_ext >&5
9857 fi
9858 rm -f conftest*
9859 done
9860 LIBS="$ac_func_search_save_LIBS"
9861 fi
9862
9863 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9864 if test "$ac_cv_search_uuid_to_str" != "no"; then
9865   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9866   have_uuid=yes
9867 else :
9868   :
9869 fi
9870         LIBS="$save_LIBS"
9871
9872         if test have_uuid = yes ; then
9873                 cat >> confdefs.h <<\EOF
9874 #define HAVE_UUID_TO_STR 1
9875 EOF
9876
9877
9878                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9879                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9880         fi
9881 fi
9882
9883 if test $have_uuid = no ; then
9884         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9885 echo "configure:9886: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9886         save_LIBS="$LIBS"
9887         LIBS="$LIBS -lrpcrt4"
9888         cat > conftest.$ac_ext <<EOF
9889 #line 9890 "configure"
9890 #include "confdefs.h"
9891
9892                 char UuidCreate@4();
9893                 char UuidToStringA@8();
9894                 
9895 int main() {
9896
9897                 UuidCreate@4();
9898                 UuidToStringA@8();
9899                 
9900 ; return 0; }
9901 EOF
9902 if { (eval echo configure:9903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9903   rm -rf conftest*
9904   need_rpcrt=yes
9905 else
9906   echo "configure: failed program was:" >&5
9907   cat conftest.$ac_ext >&5
9908   rm -rf conftest*
9909   need_rpcrt=no
9910 fi
9911 rm -f conftest*
9912         if test $need_rpcrt = yes; then
9913                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9914         fi
9915         LIBS="$save_LIBS"
9916         echo "$ac_t""$need_rpcrt" 1>&6
9917 fi
9918
9919 ol_link_dnssrv=no
9920 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9921 echo "configure:9922: checking for res_query" >&5
9922 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9923   echo $ac_n "(cached) $ac_c" 1>&6
9924 else
9925   cat > conftest.$ac_ext <<EOF
9926 #line 9927 "configure"
9927 #include "confdefs.h"
9928 /* System header to define __stub macros and hopefully few prototypes,
9929     which can conflict with char res_query(); below.  */
9930 #include <assert.h>
9931 /* Override any gcc2 internal prototype to avoid an error.  */
9932 /* We use char because int might match the return type of a gcc2
9933     builtin and then its argument prototype would still apply.  */
9934 char res_query();
9935 char (*f)();
9936
9937 int main() {
9938
9939 /* The GNU C library defines this for functions which it implements
9940     to always fail with ENOSYS.  Some functions are actually named
9941     something starting with __ and the normal name is an alias.  */
9942 #if defined (__stub_res_query) || defined (__stub___res_query)
9943 choke me
9944 #else
9945 f = res_query;
9946 #endif
9947
9948 ; return 0; }
9949 EOF
9950 if { (eval echo configure:9951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9951   rm -rf conftest*
9952   eval "ac_cv_func_res_query=yes"
9953 else
9954   echo "configure: failed program was:" >&5
9955   cat conftest.$ac_ext >&5
9956   rm -rf conftest*
9957   eval "ac_cv_func_res_query=no"
9958 fi
9959 rm -f conftest*
9960 fi
9961
9962 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9963   echo "$ac_t""yes" 1>&6
9964   :
9965 else
9966   echo "$ac_t""no" 1>&6
9967 fi
9968
9969 if test $ac_cv_func_res_query = no ; then 
9970         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9971 echo "configure:9972: checking for __res_query" >&5
9972 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9973   echo $ac_n "(cached) $ac_c" 1>&6
9974 else
9975   cat > conftest.$ac_ext <<EOF
9976 #line 9977 "configure"
9977 #include "confdefs.h"
9978 /* System header to define __stub macros and hopefully few prototypes,
9979     which can conflict with char __res_query(); below.  */
9980 #include <assert.h>
9981 /* Override any gcc2 internal prototype to avoid an error.  */
9982 /* We use char because int might match the return type of a gcc2
9983     builtin and then its argument prototype would still apply.  */
9984 char __res_query();
9985 char (*f)();
9986
9987 int main() {
9988
9989 /* The GNU C library defines this for functions which it implements
9990     to always fail with ENOSYS.  Some functions are actually named
9991     something starting with __ and the normal name is an alias.  */
9992 #if defined (__stub___res_query) || defined (__stub_____res_query)
9993 choke me
9994 #else
9995 f = __res_query;
9996 #endif
9997
9998 ; return 0; }
9999 EOF
10000 if { (eval echo configure:10001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10001   rm -rf conftest*
10002   eval "ac_cv_func___res_query=yes"
10003 else
10004   echo "configure: failed program was:" >&5
10005   cat conftest.$ac_ext >&5
10006   rm -rf conftest*
10007   eval "ac_cv_func___res_query=no"
10008 fi
10009 rm -f conftest*
10010 fi
10011
10012 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
10013   echo "$ac_t""yes" 1>&6
10014   :
10015 else
10016   echo "$ac_t""no" 1>&6
10017 fi
10018
10019         ac_cv_func_res_query=$ac_cv_func___res_query
10020 fi
10021
10022 if test $ac_cv_func_res_query = no ; then 
10023         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10024 echo "configure:10025: checking for res_query in -lbind" >&5
10025 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10026 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10027   echo $ac_n "(cached) $ac_c" 1>&6
10028 else
10029   ac_save_LIBS="$LIBS"
10030 LIBS="-lbind  $LIBS"
10031 cat > conftest.$ac_ext <<EOF
10032 #line 10033 "configure"
10033 #include "confdefs.h"
10034 /* Override any gcc2 internal prototype to avoid an error.  */
10035 /* We use char because int might match the return type of a gcc2
10036     builtin and then its argument prototype would still apply.  */
10037 char res_query();
10038
10039 int main() {
10040 res_query()
10041 ; return 0; }
10042 EOF
10043 if { (eval echo configure:10044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10044   rm -rf conftest*
10045   eval "ac_cv_lib_$ac_lib_var=yes"
10046 else
10047   echo "configure: failed program was:" >&5
10048   cat conftest.$ac_ext >&5
10049   rm -rf conftest*
10050   eval "ac_cv_lib_$ac_lib_var=no"
10051 fi
10052 rm -f conftest*
10053 LIBS="$ac_save_LIBS"
10054
10055 fi
10056 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10057   echo "$ac_t""yes" 1>&6
10058     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10059     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10060   cat >> confdefs.h <<EOF
10061 #define $ac_tr_lib 1
10062 EOF
10063
10064   LIBS="-lbind $LIBS"
10065
10066 else
10067   echo "$ac_t""no" 1>&6
10068 fi
10069
10070         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10071 fi
10072
10073 if test $ac_cv_func_res_query = no ; then 
10074         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10075 echo "configure:10076: checking for __res_query in -lbind" >&5
10076 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10077 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10078   echo $ac_n "(cached) $ac_c" 1>&6
10079 else
10080   ac_save_LIBS="$LIBS"
10081 LIBS="-lbind  $LIBS"
10082 cat > conftest.$ac_ext <<EOF
10083 #line 10084 "configure"
10084 #include "confdefs.h"
10085 /* Override any gcc2 internal prototype to avoid an error.  */
10086 /* We use char because int might match the return type of a gcc2
10087     builtin and then its argument prototype would still apply.  */
10088 char __res_query();
10089
10090 int main() {
10091 __res_query()
10092 ; return 0; }
10093 EOF
10094 if { (eval echo configure:10095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10095   rm -rf conftest*
10096   eval "ac_cv_lib_$ac_lib_var=yes"
10097 else
10098   echo "configure: failed program was:" >&5
10099   cat conftest.$ac_ext >&5
10100   rm -rf conftest*
10101   eval "ac_cv_lib_$ac_lib_var=no"
10102 fi
10103 rm -f conftest*
10104 LIBS="$ac_save_LIBS"
10105
10106 fi
10107 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10108   echo "$ac_t""yes" 1>&6
10109     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10110     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10111   cat >> confdefs.h <<EOF
10112 #define $ac_tr_lib 1
10113 EOF
10114
10115   LIBS="-lbind $LIBS"
10116
10117 else
10118   echo "$ac_t""no" 1>&6
10119 fi
10120
10121         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10122 fi
10123
10124 if test $ac_cv_func_res_query = no ; then 
10125         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10126 echo "configure:10127: checking for res_query in -lresolv" >&5
10127 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10128 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10129   echo $ac_n "(cached) $ac_c" 1>&6
10130 else
10131   ac_save_LIBS="$LIBS"
10132 LIBS="-lresolv  $LIBS"
10133 cat > conftest.$ac_ext <<EOF
10134 #line 10135 "configure"
10135 #include "confdefs.h"
10136 /* Override any gcc2 internal prototype to avoid an error.  */
10137 /* We use char because int might match the return type of a gcc2
10138     builtin and then its argument prototype would still apply.  */
10139 char res_query();
10140
10141 int main() {
10142 res_query()
10143 ; return 0; }
10144 EOF
10145 if { (eval echo configure:10146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10146   rm -rf conftest*
10147   eval "ac_cv_lib_$ac_lib_var=yes"
10148 else
10149   echo "configure: failed program was:" >&5
10150   cat conftest.$ac_ext >&5
10151   rm -rf conftest*
10152   eval "ac_cv_lib_$ac_lib_var=no"
10153 fi
10154 rm -f conftest*
10155 LIBS="$ac_save_LIBS"
10156
10157 fi
10158 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10159   echo "$ac_t""yes" 1>&6
10160     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10161     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10162   cat >> confdefs.h <<EOF
10163 #define $ac_tr_lib 1
10164 EOF
10165
10166   LIBS="-lresolv $LIBS"
10167
10168 else
10169   echo "$ac_t""no" 1>&6
10170 fi
10171
10172         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10173 fi
10174
10175 if test $ac_cv_func_res_query = no ; then 
10176         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10177 echo "configure:10178: checking for __res_query in -lresolv" >&5
10178 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10179 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10180   echo $ac_n "(cached) $ac_c" 1>&6
10181 else
10182   ac_save_LIBS="$LIBS"
10183 LIBS="-lresolv  $LIBS"
10184 cat > conftest.$ac_ext <<EOF
10185 #line 10186 "configure"
10186 #include "confdefs.h"
10187 /* Override any gcc2 internal prototype to avoid an error.  */
10188 /* We use char because int might match the return type of a gcc2
10189     builtin and then its argument prototype would still apply.  */
10190 char __res_query();
10191
10192 int main() {
10193 __res_query()
10194 ; return 0; }
10195 EOF
10196 if { (eval echo configure:10197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10197   rm -rf conftest*
10198   eval "ac_cv_lib_$ac_lib_var=yes"
10199 else
10200   echo "configure: failed program was:" >&5
10201   cat conftest.$ac_ext >&5
10202   rm -rf conftest*
10203   eval "ac_cv_lib_$ac_lib_var=no"
10204 fi
10205 rm -f conftest*
10206 LIBS="$ac_save_LIBS"
10207
10208 fi
10209 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10210   echo "$ac_t""yes" 1>&6
10211     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10212     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10213   cat >> confdefs.h <<EOF
10214 #define $ac_tr_lib 1
10215 EOF
10216
10217   LIBS="-lresolv $LIBS"
10218
10219 else
10220   echo "$ac_t""no" 1>&6
10221 fi
10222
10223         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10224 fi
10225
10226 if test "$ac_cv_func_res_query" = yes ; then
10227         cat >> confdefs.h <<\EOF
10228 #define HAVE_RES_QUERY 1
10229 EOF
10230
10231
10232         if test $ol_enable_dnssrv != no ; then
10233                 ol_link_dnssrv=yes
10234         fi
10235 fi
10236
10237 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10238         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10239 fi
10240
10241 for ac_func in getaddrinfo gai_strerror inet_ntop 
10242 do
10243 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10244 echo "configure:10245: checking for $ac_func" >&5
10245 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10246   echo $ac_n "(cached) $ac_c" 1>&6
10247 else
10248   cat > conftest.$ac_ext <<EOF
10249 #line 10250 "configure"
10250 #include "confdefs.h"
10251 /* System header to define __stub macros and hopefully few prototypes,
10252     which can conflict with char $ac_func(); below.  */
10253 #include <assert.h>
10254 /* Override any gcc2 internal prototype to avoid an error.  */
10255 /* We use char because int might match the return type of a gcc2
10256     builtin and then its argument prototype would still apply.  */
10257 char $ac_func();
10258 char (*f)();
10259
10260 int main() {
10261
10262 /* The GNU C library defines this for functions which it implements
10263     to always fail with ENOSYS.  Some functions are actually named
10264     something starting with __ and the normal name is an alias.  */
10265 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10266 choke me
10267 #else
10268 f = $ac_func;
10269 #endif
10270
10271 ; return 0; }
10272 EOF
10273 if { (eval echo configure:10274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10274   rm -rf conftest*
10275   eval "ac_cv_func_$ac_func=yes"
10276 else
10277   echo "configure: failed program was:" >&5
10278   cat conftest.$ac_ext >&5
10279   rm -rf conftest*
10280   eval "ac_cv_func_$ac_func=no"
10281 fi
10282 rm -f conftest*
10283 fi
10284
10285 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10286   echo "$ac_t""yes" 1>&6
10287     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10288   cat >> confdefs.h <<EOF
10289 #define $ac_tr_func 1
10290 EOF
10291  
10292 else
10293   echo "$ac_t""no" 1>&6
10294 fi
10295 done
10296
10297
10298 ol_link_ipv6=no
10299 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10300         if test $ol_enable_ipv6 = yes ; then
10301                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10302         fi
10303 elif test $ol_enable_ipv6 != no ; then
10304         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10305 echo "configure:10306: checking INET6_ADDRSTRLEN" >&5
10306 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10307   echo $ac_n "(cached) $ac_c" 1>&6
10308 else
10309   
10310                 cat > conftest.$ac_ext <<EOF
10311 #line 10312 "configure"
10312 #include "confdefs.h"
10313
10314 #                       include <netinet/in.h>
10315 #                       ifdef INET6_ADDRSTRLEN
10316                                 __has_inet6_addrstrlen__;
10317 #                       endif
10318                 
10319 EOF
10320 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10321   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10322   rm -rf conftest*
10323   ol_cv_inet6_addrstrlen=yes
10324 else
10325   rm -rf conftest*
10326   ol_cv_inet6_addrstrlen=no
10327 fi
10328 rm -f conftest*
10329
10330 fi
10331
10332 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10333
10334
10335         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10336 echo "configure:10337: checking struct sockaddr_storage" >&5
10337 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10338   echo $ac_n "(cached) $ac_c" 1>&6
10339 else
10340   
10341                 cat > conftest.$ac_ext <<EOF
10342 #line 10343 "configure"
10343 #include "confdefs.h"
10344
10345 #include <sys/types.h>
10346 #include <sys/socket.h>
10347
10348 int main() {
10349
10350                         struct sockaddr_storage ss;
10351
10352 ; return 0; }
10353 EOF
10354 if { (eval echo configure:10355: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10355   rm -rf conftest*
10356   ol_cv_struct_sockaddr_storage=yes
10357 else
10358   echo "configure: failed program was:" >&5
10359   cat conftest.$ac_ext >&5
10360   rm -rf conftest*
10361   ol_cv_struct_sockaddr_storage=no
10362 fi
10363 rm -f conftest*
10364 fi
10365
10366 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10367
10368         if test $ol_cv_inet6_addrstrlen = yes \
10369                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10370                 ol_link_ipv6=yes
10371         elif test $ol_enable_ipv6 = yes \
10372                         -a $ol_cv_inet6_addrstrlen = no ; then
10373                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10374         elif test $ol_enable_ipv6 = yes \
10375                         -a $ol_cv_struct_sockaddr_storage = no ; then
10376                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10377         fi
10378 fi
10379
10380 if test $ol_enable_local != no ; then
10381         for ac_hdr in sys/un.h 
10382 do
10383 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10384 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10385 echo "configure:10386: checking for $ac_hdr" >&5
10386 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10387   echo $ac_n "(cached) $ac_c" 1>&6
10388 else
10389   cat > conftest.$ac_ext <<EOF
10390 #line 10391 "configure"
10391 #include "confdefs.h"
10392 #include <$ac_hdr>
10393 EOF
10394 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10395 { (eval echo configure:10396: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10396 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10397 if test -z "$ac_err"; then
10398   rm -rf conftest*
10399   eval "ac_cv_header_$ac_safe=yes"
10400 else
10401   echo "$ac_err" >&5
10402   echo "configure: failed program was:" >&5
10403   cat conftest.$ac_ext >&5
10404   rm -rf conftest*
10405   eval "ac_cv_header_$ac_safe=no"
10406 fi
10407 rm -f conftest*
10408 fi
10409 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10410   echo "$ac_t""yes" 1>&6
10411     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10412   cat >> confdefs.h <<EOF
10413 #define $ac_tr_hdr 1
10414 EOF
10415  
10416 else
10417   echo "$ac_t""no" 1>&6
10418 fi
10419 done
10420
10421
10422         if test $ol_enable_local = auto ; then
10423                 ol_enable_local=$ac_cv_header_sys_un_h
10424         elif test $ac_cv_header_sys_un_h = no ; then
10425                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10426         fi
10427 fi
10428
10429 ol_link_kbind=no
10430 ol_link_kpasswd=no
10431 ol_link_krb5=no
10432 ol_link_krb4=no
10433
10434 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10435         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10436         -o $ol_with_kerberos = k425 ; then
10437
10438         for ac_hdr in krb5.h
10439 do
10440 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10441 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10442 echo "configure:10443: checking for $ac_hdr" >&5
10443 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10444   echo $ac_n "(cached) $ac_c" 1>&6
10445 else
10446   cat > conftest.$ac_ext <<EOF
10447 #line 10448 "configure"
10448 #include "confdefs.h"
10449 #include <$ac_hdr>
10450 EOF
10451 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10452 { (eval echo configure:10453: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10453 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10454 if test -z "$ac_err"; then
10455   rm -rf conftest*
10456   eval "ac_cv_header_$ac_safe=yes"
10457 else
10458   echo "$ac_err" >&5
10459   echo "configure: failed program was:" >&5
10460   cat conftest.$ac_ext >&5
10461   rm -rf conftest*
10462   eval "ac_cv_header_$ac_safe=no"
10463 fi
10464 rm -f conftest*
10465 fi
10466 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10467   echo "$ac_t""yes" 1>&6
10468     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10469   cat >> confdefs.h <<EOF
10470 #define $ac_tr_hdr 1
10471 EOF
10472  
10473 else
10474   echo "$ac_t""no" 1>&6
10475 fi
10476 done
10477
10478
10479         if test $ac_cv_header_krb5_h = yes ; then
10480                                 for ac_hdr in heim_err.h
10481 do
10482 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10483 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10484 echo "configure:10485: checking for $ac_hdr" >&5
10485 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10486   echo $ac_n "(cached) $ac_c" 1>&6
10487 else
10488   cat > conftest.$ac_ext <<EOF
10489 #line 10490 "configure"
10490 #include "confdefs.h"
10491 #include <$ac_hdr>
10492 EOF
10493 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10494 { (eval echo configure:10495: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10495 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10496 if test -z "$ac_err"; then
10497   rm -rf conftest*
10498   eval "ac_cv_header_$ac_safe=yes"
10499 else
10500   echo "$ac_err" >&5
10501   echo "configure: failed program was:" >&5
10502   cat conftest.$ac_ext >&5
10503   rm -rf conftest*
10504   eval "ac_cv_header_$ac_safe=no"
10505 fi
10506 rm -f conftest*
10507 fi
10508 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10509   echo "$ac_t""yes" 1>&6
10510     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10511   cat >> confdefs.h <<EOF
10512 #define $ac_tr_hdr 1
10513 EOF
10514  
10515 else
10516   echo "$ac_t""no" 1>&6
10517 fi
10518 done
10519
10520                 if test $ac_cv_header_heim_err_h = yes ; then
10521                         krb5_impl=heimdal
10522                 else
10523                         krb5_impl=mit
10524                 fi
10525
10526                 if test $krb5_impl = mit; then
10527                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10528 echo "configure:10529: checking for main in -lk5crypto" >&5
10529 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10530 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10531   echo $ac_n "(cached) $ac_c" 1>&6
10532 else
10533   ac_save_LIBS="$LIBS"
10534 LIBS="-lk5crypto  $LIBS"
10535 cat > conftest.$ac_ext <<EOF
10536 #line 10537 "configure"
10537 #include "confdefs.h"
10538
10539 int main() {
10540 main()
10541 ; return 0; }
10542 EOF
10543 if { (eval echo configure:10544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10544   rm -rf conftest*
10545   eval "ac_cv_lib_$ac_lib_var=yes"
10546 else
10547   echo "configure: failed program was:" >&5
10548   cat conftest.$ac_ext >&5
10549   rm -rf conftest*
10550   eval "ac_cv_lib_$ac_lib_var=no"
10551 fi
10552 rm -f conftest*
10553 LIBS="$ac_save_LIBS"
10554
10555 fi
10556 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10557   echo "$ac_t""yes" 1>&6
10558   krb5crypto=k5crypto
10559 else
10560   echo "$ac_t""no" 1>&6
10561 krb5crypto=crypto
10562 fi
10563
10564
10565                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10566 echo "configure:10567: checking for main in -lkrb5" >&5
10567 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10568 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10569   echo $ac_n "(cached) $ac_c" 1>&6
10570 else
10571   ac_save_LIBS="$LIBS"
10572 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10573 cat > conftest.$ac_ext <<EOF
10574 #line 10575 "configure"
10575 #include "confdefs.h"
10576
10577 int main() {
10578 main()
10579 ; return 0; }
10580 EOF
10581 if { (eval echo configure:10582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10582   rm -rf conftest*
10583   eval "ac_cv_lib_$ac_lib_var=yes"
10584 else
10585   echo "configure: failed program was:" >&5
10586   cat conftest.$ac_ext >&5
10587   rm -rf conftest*
10588   eval "ac_cv_lib_$ac_lib_var=no"
10589 fi
10590 rm -f conftest*
10591 LIBS="$ac_save_LIBS"
10592
10593 fi
10594 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10595   echo "$ac_t""yes" 1>&6
10596   have_krb5=yes
10597                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10598 else
10599   echo "$ac_t""no" 1>&6
10600 have_krb5=no
10601 fi
10602
10603
10604                 elif test $krb5_impl = heimdal; then
10605                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10606 echo "configure:10607: checking for main in -ldes" >&5
10607 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10608 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10609   echo $ac_n "(cached) $ac_c" 1>&6
10610 else
10611   ac_save_LIBS="$LIBS"
10612 LIBS="-ldes  $LIBS"
10613 cat > conftest.$ac_ext <<EOF
10614 #line 10615 "configure"
10615 #include "confdefs.h"
10616
10617 int main() {
10618 main()
10619 ; return 0; }
10620 EOF
10621 if { (eval echo configure:10622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10622   rm -rf conftest*
10623   eval "ac_cv_lib_$ac_lib_var=yes"
10624 else
10625   echo "configure: failed program was:" >&5
10626   cat conftest.$ac_ext >&5
10627   rm -rf conftest*
10628   eval "ac_cv_lib_$ac_lib_var=no"
10629 fi
10630 rm -f conftest*
10631 LIBS="$ac_save_LIBS"
10632
10633 fi
10634 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10635   echo "$ac_t""yes" 1>&6
10636   krb5crypto=des
10637 else
10638   echo "$ac_t""no" 1>&6
10639 krb5crypto=crypto
10640 fi
10641
10642
10643                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10644 echo "configure:10645: checking for main in -lkrb5" >&5
10645 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10646 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10647   echo $ac_n "(cached) $ac_c" 1>&6
10648 else
10649   ac_save_LIBS="$LIBS"
10650 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10651 cat > conftest.$ac_ext <<EOF
10652 #line 10653 "configure"
10653 #include "confdefs.h"
10654
10655 int main() {
10656 main()
10657 ; return 0; }
10658 EOF
10659 if { (eval echo configure:10660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10660   rm -rf conftest*
10661   eval "ac_cv_lib_$ac_lib_var=yes"
10662 else
10663   echo "configure: failed program was:" >&5
10664   cat conftest.$ac_ext >&5
10665   rm -rf conftest*
10666   eval "ac_cv_lib_$ac_lib_var=no"
10667 fi
10668 rm -f conftest*
10669 LIBS="$ac_save_LIBS"
10670
10671 fi
10672 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10673   echo "$ac_t""yes" 1>&6
10674   have_krb5=yes
10675                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10676 else
10677   echo "$ac_t""no" 1>&6
10678 have_krb5=no
10679 fi
10680
10681
10682                         cat >> confdefs.h <<\EOF
10683 #define HAVE_HEIMDAL_KERBEROS 1
10684 EOF
10685
10686
10687                 else
10688                         have_krb5=no
10689                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
10690                 fi
10691
10692                 if test $have_krb5 = yes ; then
10693                         ol_link_krb5=yes
10694
10695                         cat >> confdefs.h <<\EOF
10696 #define HAVE_KRB5 1
10697 EOF
10698
10699
10700                         if test $ol_enable_kpasswd != no ; then
10701                                 ol_link_kpasswd=yes;
10702                         fi
10703
10704                         if test $ol_with_kerberos = k5only ; then
10705                                 ol_with_kerberos=found
10706                         fi
10707
10708                 elif test $ol_with_kerberos != auto ; then
10709                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10710                 fi
10711
10712         fi
10713 fi
10714
10715 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10716         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10717
10718         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10719 do
10720 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10721 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10722 echo "configure:10723: checking for $ac_hdr" >&5
10723 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10724   echo $ac_n "(cached) $ac_c" 1>&6
10725 else
10726   cat > conftest.$ac_ext <<EOF
10727 #line 10728 "configure"
10728 #include "confdefs.h"
10729 #include <$ac_hdr>
10730 EOF
10731 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10732 { (eval echo configure:10733: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10733 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10734 if test -z "$ac_err"; then
10735   rm -rf conftest*
10736   eval "ac_cv_header_$ac_safe=yes"
10737 else
10738   echo "$ac_err" >&5
10739   echo "configure: failed program was:" >&5
10740   cat conftest.$ac_ext >&5
10741   rm -rf conftest*
10742   eval "ac_cv_header_$ac_safe=no"
10743 fi
10744 rm -f conftest*
10745 fi
10746 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10747   echo "$ac_t""yes" 1>&6
10748     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10749   cat >> confdefs.h <<EOF
10750 #define $ac_tr_hdr 1
10751 EOF
10752  
10753 else
10754   echo "$ac_t""no" 1>&6
10755 fi
10756 done
10757
10758
10759         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10760                 if test $krb5_impl = mit; then
10761                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10762 echo "configure:10763: checking for main in -lkrb4" >&5
10763 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10764 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10765   echo $ac_n "(cached) $ac_c" 1>&6
10766 else
10767   ac_save_LIBS="$LIBS"
10768 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10769 cat > conftest.$ac_ext <<EOF
10770 #line 10771 "configure"
10771 #include "confdefs.h"
10772
10773 int main() {
10774 main()
10775 ; return 0; }
10776 EOF
10777 if { (eval echo configure:10778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10778   rm -rf conftest*
10779   eval "ac_cv_lib_$ac_lib_var=yes"
10780 else
10781   echo "configure: failed program was:" >&5
10782   cat conftest.$ac_ext >&5
10783   rm -rf conftest*
10784   eval "ac_cv_lib_$ac_lib_var=no"
10785 fi
10786 rm -f conftest*
10787 LIBS="$ac_save_LIBS"
10788
10789 fi
10790 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10791   echo "$ac_t""yes" 1>&6
10792   have_k425=yes
10793                                 KRB4_LIBS="-lkrb4 -ldes425"
10794 else
10795   echo "$ac_t""no" 1>&6
10796 have_k425=no
10797 fi
10798
10799
10800                 elif test $krb5_impl = heimdal; then
10801                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10802 echo "configure:10803: checking for main in -lkrb4" >&5
10803 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10804 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10805   echo $ac_n "(cached) $ac_c" 1>&6
10806 else
10807   ac_save_LIBS="$LIBS"
10808 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10809 cat > conftest.$ac_ext <<EOF
10810 #line 10811 "configure"
10811 #include "confdefs.h"
10812
10813 int main() {
10814 main()
10815 ; return 0; }
10816 EOF
10817 if { (eval echo configure:10818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10818   rm -rf conftest*
10819   eval "ac_cv_lib_$ac_lib_var=yes"
10820 else
10821   echo "configure: failed program was:" >&5
10822   cat conftest.$ac_ext >&5
10823   rm -rf conftest*
10824   eval "ac_cv_lib_$ac_lib_var=no"
10825 fi
10826 rm -f conftest*
10827 LIBS="$ac_save_LIBS"
10828
10829 fi
10830 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10831   echo "$ac_t""yes" 1>&6
10832   have_k425=yes
10833                                 KRB4_LIBS="-lkrb4"
10834 else
10835   echo "$ac_t""no" 1>&6
10836 have_k425=no
10837 fi
10838
10839
10840                 else
10841                         have_425=no
10842                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10843                 fi
10844
10845                 if test $have_k425 = yes ; then
10846                         ol_with_kerberos=found
10847                         ol_link_krb4=yes
10848
10849                         cat >> confdefs.h <<\EOF
10850 #define HAVE_KRB425 1
10851 EOF
10852
10853                         cat >> confdefs.h <<\EOF
10854 #define HAVE_KRB4 1
10855 EOF
10856
10857
10858                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10859 echo "configure:10860: checking for des_debug in Kerberos libraries" >&5
10860 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10861   echo $ac_n "(cached) $ac_c" 1>&6
10862 else
10863   
10864                                                                 save_LIBS="$LIBS"
10865                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10866                                 cat > conftest.$ac_ext <<EOF
10867 #line 10868 "configure"
10868 #include "confdefs.h"
10869
10870 #include <kerberosIV/krb.h>
10871 #include <kerberosIV/des.h>
10872 extern int des_debug;
10873
10874 int main() {
10875
10876 des_debug = 1;
10877
10878 ; return 0; }
10879 EOF
10880 if { (eval echo configure:10881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10881   rm -rf conftest*
10882   ol_cv_var_des_debug=yes
10883 else
10884   echo "configure: failed program was:" >&5
10885   cat conftest.$ac_ext >&5
10886   rm -rf conftest*
10887   ol_cv_var_des_debug=no
10888 fi
10889 rm -f conftest*
10890                                                                 LIBS="$save_LIBS"
10891                         
10892 fi
10893
10894 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10895
10896                         if test $ol_cv_var_des_debug = yes ; then
10897                                 cat >> confdefs.h <<\EOF
10898 #define HAVE_DES_DEBUG 1
10899 EOF
10900
10901                         fi
10902
10903                         LIBS="$save_LIBS"
10904                 fi
10905         fi
10906 fi
10907
10908 if test $ol_link_krb5 = yes ; then
10909         ol_with_kerberos=found
10910 fi
10911
10912 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10913         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10914
10915         for ac_hdr in krb.h des.h krb-archaeology.h 
10916 do
10917 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10918 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10919 echo "configure:10920: checking for $ac_hdr" >&5
10920 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10921   echo $ac_n "(cached) $ac_c" 1>&6
10922 else
10923   cat > conftest.$ac_ext <<EOF
10924 #line 10925 "configure"
10925 #include "confdefs.h"
10926 #include <$ac_hdr>
10927 EOF
10928 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10929 { (eval echo configure:10930: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10930 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10931 if test -z "$ac_err"; then
10932   rm -rf conftest*
10933   eval "ac_cv_header_$ac_safe=yes"
10934 else
10935   echo "$ac_err" >&5
10936   echo "configure: failed program was:" >&5
10937   cat conftest.$ac_ext >&5
10938   rm -rf conftest*
10939   eval "ac_cv_header_$ac_safe=no"
10940 fi
10941 rm -f conftest*
10942 fi
10943 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10944   echo "$ac_t""yes" 1>&6
10945     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10946   cat >> confdefs.h <<EOF
10947 #define $ac_tr_hdr 1
10948 EOF
10949  
10950 else
10951   echo "$ac_t""no" 1>&6
10952 fi
10953 done
10954
10955
10956         if test $ac_cv_header_krb_h = yes ; then
10957                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10958 echo "configure:10959: checking for main in -lkrb" >&5
10959 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10960 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10961   echo $ac_n "(cached) $ac_c" 1>&6
10962 else
10963   ac_save_LIBS="$LIBS"
10964 LIBS="-lkrb -ldes $LIBS"
10965 cat > conftest.$ac_ext <<EOF
10966 #line 10967 "configure"
10967 #include "confdefs.h"
10968
10969 int main() {
10970 main()
10971 ; return 0; }
10972 EOF
10973 if { (eval echo configure:10974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10974   rm -rf conftest*
10975   eval "ac_cv_lib_$ac_lib_var=yes"
10976 else
10977   echo "configure: failed program was:" >&5
10978   cat conftest.$ac_ext >&5
10979   rm -rf conftest*
10980   eval "ac_cv_lib_$ac_lib_var=no"
10981 fi
10982 rm -f conftest*
10983 LIBS="$ac_save_LIBS"
10984
10985 fi
10986 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10987   echo "$ac_t""yes" 1>&6
10988   have_k4=yes
10989 else
10990   echo "$ac_t""no" 1>&6
10991 have_k4=no
10992 fi
10993
10994
10995                 if test $have_k4 = yes ; then
10996                         ol_with_kerberos=found
10997                         ol_link_krb4=yes
10998
10999                         cat >> confdefs.h <<\EOF
11000 #define HAVE_KRB4 1
11001 EOF
11002
11003
11004                         KRB4_LIBS="-lkrb -ldes"
11005
11006                         if test $ac_cv_header_krb_archaeology_h = yes ; then
11007                                 cat >> confdefs.h <<\EOF
11008 #define HAVE_KTH_KERBEROS 1
11009 EOF
11010
11011                         fi
11012                 fi
11013         fi
11014 fi
11015
11016 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
11017         ol_link_kpasswd=yes
11018 fi
11019
11020 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
11021         ol_link_kbind=yes
11022
11023 elif test $ol_enable_kbind = yes ; then
11024         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11025 fi
11026
11027 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11028         cat >> confdefs.h <<\EOF
11029 #define HAVE_KERBEROS 1
11030 EOF
11031
11032
11033 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11034         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11035 fi
11036
11037 ol_link_tls=no
11038 if test $ol_with_tls != no ; then
11039         for ac_hdr in openssl/ssl.h ssl.h
11040 do
11041 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11042 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11043 echo "configure:11044: checking for $ac_hdr" >&5
11044 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11045   echo $ac_n "(cached) $ac_c" 1>&6
11046 else
11047   cat > conftest.$ac_ext <<EOF
11048 #line 11049 "configure"
11049 #include "confdefs.h"
11050 #include <$ac_hdr>
11051 EOF
11052 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11053 { (eval echo configure:11054: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11054 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11055 if test -z "$ac_err"; then
11056   rm -rf conftest*
11057   eval "ac_cv_header_$ac_safe=yes"
11058 else
11059   echo "$ac_err" >&5
11060   echo "configure: failed program was:" >&5
11061   cat conftest.$ac_ext >&5
11062   rm -rf conftest*
11063   eval "ac_cv_header_$ac_safe=no"
11064 fi
11065 rm -f conftest*
11066 fi
11067 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11068   echo "$ac_t""yes" 1>&6
11069     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11070   cat >> confdefs.h <<EOF
11071 #define $ac_tr_hdr 1
11072 EOF
11073  
11074 else
11075   echo "$ac_t""no" 1>&6
11076 fi
11077 done
11078
11079         
11080         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
11081                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11082 echo "configure:11083: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11083 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11084 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11085   echo $ac_n "(cached) $ac_c" 1>&6
11086 else
11087   ac_save_LIBS="$LIBS"
11088 LIBS="-lssl -lcrypto $LIBS"
11089 cat > conftest.$ac_ext <<EOF
11090 #line 11091 "configure"
11091 #include "confdefs.h"
11092 /* Override any gcc2 internal prototype to avoid an error.  */
11093 /* We use char because int might match the return type of a gcc2
11094     builtin and then its argument prototype would still apply.  */
11095 char SSLeay_add_ssl_algorithms();
11096
11097 int main() {
11098 SSLeay_add_ssl_algorithms()
11099 ; return 0; }
11100 EOF
11101 if { (eval echo configure:11102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11102   rm -rf conftest*
11103   eval "ac_cv_lib_$ac_lib_var=yes"
11104 else
11105   echo "configure: failed program was:" >&5
11106   cat conftest.$ac_ext >&5
11107   rm -rf conftest*
11108   eval "ac_cv_lib_$ac_lib_var=no"
11109 fi
11110 rm -f conftest*
11111 LIBS="$ac_save_LIBS"
11112
11113 fi
11114 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11115   echo "$ac_t""yes" 1>&6
11116   have_ssleay=yes
11117                         need_rsaref=no
11118 else
11119   echo "$ac_t""no" 1>&6
11120 have_ssleay=no
11121 fi
11122
11123                         
11124                 if test $have_ssleay = no ; then
11125                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11126 echo "configure:11127: checking for SSL_library_init in -lssl" >&5
11127 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11128 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11129   echo $ac_n "(cached) $ac_c" 1>&6
11130 else
11131   ac_save_LIBS="$LIBS"
11132 LIBS="-lssl -lcrypto $LIBS"
11133 cat > conftest.$ac_ext <<EOF
11134 #line 11135 "configure"
11135 #include "confdefs.h"
11136 /* Override any gcc2 internal prototype to avoid an error.  */
11137 /* We use char because int might match the return type of a gcc2
11138     builtin and then its argument prototype would still apply.  */
11139 char SSL_library_init();
11140
11141 int main() {
11142 SSL_library_init()
11143 ; return 0; }
11144 EOF
11145 if { (eval echo configure:11146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11146   rm -rf conftest*
11147   eval "ac_cv_lib_$ac_lib_var=yes"
11148 else
11149   echo "configure: failed program was:" >&5
11150   cat conftest.$ac_ext >&5
11151   rm -rf conftest*
11152   eval "ac_cv_lib_$ac_lib_var=no"
11153 fi
11154 rm -f conftest*
11155 LIBS="$ac_save_LIBS"
11156
11157 fi
11158 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11159   echo "$ac_t""yes" 1>&6
11160   have_ssleay=yes
11161                                 need_rsaref=no
11162 else
11163   echo "$ac_t""no" 1>&6
11164 have_ssleay=no
11165 fi
11166
11167                 fi
11168
11169                 if test $have_ssleay = no ; then
11170                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11171 echo "configure:11172: checking for ssl3_accept in -lssl" >&5
11172 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11173 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11174   echo $ac_n "(cached) $ac_c" 1>&6
11175 else
11176   ac_save_LIBS="$LIBS"
11177 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11178 cat > conftest.$ac_ext <<EOF
11179 #line 11180 "configure"
11180 #include "confdefs.h"
11181 /* Override any gcc2 internal prototype to avoid an error.  */
11182 /* We use char because int might match the return type of a gcc2
11183     builtin and then its argument prototype would still apply.  */
11184 char ssl3_accept();
11185
11186 int main() {
11187 ssl3_accept()
11188 ; return 0; }
11189 EOF
11190 if { (eval echo configure:11191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11191   rm -rf conftest*
11192   eval "ac_cv_lib_$ac_lib_var=yes"
11193 else
11194   echo "configure: failed program was:" >&5
11195   cat conftest.$ac_ext >&5
11196   rm -rf conftest*
11197   eval "ac_cv_lib_$ac_lib_var=no"
11198 fi
11199 rm -f conftest*
11200 LIBS="$ac_save_LIBS"
11201
11202 fi
11203 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11204   echo "$ac_t""yes" 1>&6
11205   have_ssleay=yes
11206                                 need_rsaref=yes
11207 else
11208   echo "$ac_t""no" 1>&6
11209 have_ssleay=no
11210 fi
11211
11212                 fi
11213
11214                 if test $have_ssleay = yes ; then
11215                         ol_with_tls=found
11216                         ol_link_tls=yes
11217
11218                         cat >> confdefs.h <<\EOF
11219 #define HAVE_SSLEAY 1
11220 EOF
11221
11222
11223                         if test $need_rsaref = yes; then
11224                                 cat >> confdefs.h <<\EOF
11225 #define HAVE_RSAREF 1
11226 EOF
11227
11228
11229                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11230                         else
11231                                 TLS_LIBS="-lssl -lcrypto"
11232                         fi
11233                 fi
11234         fi
11235
11236 else
11237         echo "configure: warning: TLS data protection not supported!" 1>&2
11238 fi
11239
11240 if test $ol_link_tls = yes ; then
11241         cat >> confdefs.h <<\EOF
11242 #define HAVE_TLS 1
11243 EOF
11244
11245
11246 elif test $ol_with_tls = auto ; then
11247         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11248         echo "configure: warning: TLS data protection not supported!" 1>&2
11249
11250 elif test $ol_with_tls != no ; then
11251         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11252 fi
11253
11254 if test $ol_enable_lmpasswd != no; then
11255         if test $ol_link_tls != yes ; then
11256                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11257         fi
11258
11259         cat >> confdefs.h <<\EOF
11260 #define SLAPD_LMHASH 1
11261 EOF
11262
11263 fi
11264
11265 for ac_func in \
11266         ctime_r                 \
11267         gethostbyname_r gethostbyaddr_r \
11268
11269 do
11270 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11271 echo "configure:11272: checking for $ac_func" >&5
11272 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11273   echo $ac_n "(cached) $ac_c" 1>&6
11274 else
11275   cat > conftest.$ac_ext <<EOF
11276 #line 11277 "configure"
11277 #include "confdefs.h"
11278 /* System header to define __stub macros and hopefully few prototypes,
11279     which can conflict with char $ac_func(); below.  */
11280 #include <assert.h>
11281 /* Override any gcc2 internal prototype to avoid an error.  */
11282 /* We use char because int might match the return type of a gcc2
11283     builtin and then its argument prototype would still apply.  */
11284 char $ac_func();
11285 char (*f)();
11286
11287 int main() {
11288
11289 /* The GNU C library defines this for functions which it implements
11290     to always fail with ENOSYS.  Some functions are actually named
11291     something starting with __ and the normal name is an alias.  */
11292 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11293 choke me
11294 #else
11295 f = $ac_func;
11296 #endif
11297
11298 ; return 0; }
11299 EOF
11300 if { (eval echo configure:11301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11301   rm -rf conftest*
11302   eval "ac_cv_func_$ac_func=yes"
11303 else
11304   echo "configure: failed program was:" >&5
11305   cat conftest.$ac_ext >&5
11306   rm -rf conftest*
11307   eval "ac_cv_func_$ac_func=no"
11308 fi
11309 rm -f conftest*
11310 fi
11311
11312 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11313   echo "$ac_t""yes" 1>&6
11314     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11315   cat >> confdefs.h <<EOF
11316 #define $ac_tr_func 1
11317 EOF
11318  
11319 else
11320   echo "$ac_t""no" 1>&6
11321 fi
11322 done
11323
11324
11325 if test "$ac_cv_func_ctime_r" = no ; then
11326         ol_cv_func_ctime_r_nargs=0
11327 else
11328         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
11329 echo "configure:11330: checking number of arguments of ctime_r" >&5
11330 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
11331   echo $ac_n "(cached) $ac_c" 1>&6
11332 else
11333   cat > conftest.$ac_ext <<EOF
11334 #line 11335 "configure"
11335 #include "confdefs.h"
11336 #include <time.h>
11337 int main() {
11338 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
11339 ; return 0; }
11340 EOF
11341 if { (eval echo configure:11342: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11342   rm -rf conftest*
11343   ol_cv_func_ctime_r_nargs3=yes
11344 else
11345   echo "configure: failed program was:" >&5
11346   cat conftest.$ac_ext >&5
11347   rm -rf conftest*
11348   ol_cv_func_ctime_r_nargs3=no
11349 fi
11350 rm -f conftest*
11351
11352         cat > conftest.$ac_ext <<EOF
11353 #line 11354 "configure"
11354 #include "confdefs.h"
11355 #include <time.h>
11356 int main() {
11357 time_t ti; char *buffer; ctime_r(&ti,buffer);
11358 ; return 0; }
11359 EOF
11360 if { (eval echo configure:11361: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11361   rm -rf conftest*
11362   ol_cv_func_ctime_r_nargs2=yes
11363 else
11364   echo "configure: failed program was:" >&5
11365   cat conftest.$ac_ext >&5
11366   rm -rf conftest*
11367   ol_cv_func_ctime_r_nargs2=no
11368 fi
11369 rm -f conftest*
11370
11371         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
11372                 $ol_cv_func_ctime_r_nargs2 = no ; then
11373
11374                 ol_cv_func_ctime_r_nargs=3
11375
11376         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
11377                 $ol_cv_func_ctime_r_nargs2 = yes ; then
11378
11379                 ol_cv_func_ctime_r_nargs=2
11380
11381         else
11382                 ol_cv_func_ctime_r_nargs=0
11383         fi
11384   
11385 fi
11386
11387 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
11388
11389   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
11390         cat >> confdefs.h <<EOF
11391 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
11392 EOF
11393
11394   fi
11395
11396 fi
11397
11398 if test "$ac_cv_func_gethostbyname_r" = yes ; then
11399         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
11400 echo "configure:11401: checking number of arguments of gethostbyname_r" >&5
11401 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
11402   echo $ac_n "(cached) $ac_c" 1>&6
11403 else
11404   cat > conftest.$ac_ext <<EOF
11405 #line 11406 "configure"
11406 #include "confdefs.h"
11407 #include <sys/types.h>
11408 #include <sys/socket.h>
11409 #include <netinet/in.h>
11410 #include <netdb.h>
11411 #define BUFSIZE (sizeof(struct hostent)+10)
11412 int main() {
11413 struct hostent hent; char buffer[BUFSIZE];
11414                 int bufsize=BUFSIZE;int h_errno;
11415                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
11416                         buffer, bufsize, &h_errno);
11417 ; return 0; }
11418 EOF
11419 if { (eval echo configure:11420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11420   rm -rf conftest*
11421   ol_cv_func_gethostbyname_r_nargs5=yes
11422 else
11423   echo "configure: failed program was:" >&5
11424   cat conftest.$ac_ext >&5
11425   rm -rf conftest*
11426   ol_cv_func_gethostbyname_r_nargs5=no
11427 fi
11428 rm -f conftest*
11429
11430         cat > conftest.$ac_ext <<EOF
11431 #line 11432 "configure"
11432 #include "confdefs.h"
11433 #include <sys/types.h>
11434 #include <sys/socket.h>
11435 #include <netinet/in.h>
11436 #include <netdb.h>
11437 #define BUFSIZE (sizeof(struct hostent)+10)
11438 int main() {
11439 struct hostent hent;struct hostent *rhent;
11440                 char buffer[BUFSIZE];
11441                 int bufsize=BUFSIZE;int h_errno;
11442                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
11443                         &rhent, &h_errno);
11444 ; return 0; }
11445 EOF
11446 if { (eval echo configure:11447: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11447   rm -rf conftest*
11448   ol_cv_func_gethostbyname_r_nargs6=yes
11449 else
11450   echo "configure: failed program was:" >&5
11451   cat conftest.$ac_ext >&5
11452   rm -rf conftest*
11453   ol_cv_func_gethostbyname_r_nargs6=no
11454 fi
11455 rm -f conftest*
11456
11457         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
11458                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
11459
11460                 ol_cv_func_gethostbyname_r_nargs=5
11461
11462         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
11463                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
11464
11465                 ol_cv_func_gethostbyname_r_nargs=6
11466
11467         else
11468                 ol_cv_func_gethostbyname_r_nargs=0
11469         fi
11470   
11471 fi
11472
11473 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
11474   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
11475         cat >> confdefs.h <<EOF
11476 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
11477 EOF
11478
11479   fi
11480
11481 else
11482         ol_cv_func_gethostbyname_r_nargs=0
11483 fi
11484  
11485 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
11486         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
11487 echo "configure:11488: checking number of arguments of gethostbyaddr_r" >&5
11488 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
11489   echo $ac_n "(cached) $ac_c" 1>&6
11490 else
11491   cat > conftest.$ac_ext <<EOF
11492 #line 11493 "configure"
11493 #include "confdefs.h"
11494 #include <sys/types.h>
11495 #include <sys/socket.h>
11496 #include <netinet/in.h>
11497 #include <netdb.h>
11498 #define BUFSIZE (sizeof(struct hostent)+10)
11499 int main() {
11500 struct hostent hent; char buffer[BUFSIZE]; 
11501             struct in_addr add;
11502             size_t alen=sizeof(struct in_addr);
11503             int bufsize=BUFSIZE;int h_errno;
11504                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
11505                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
11506 ; return 0; }
11507 EOF
11508 if { (eval echo configure:11509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11509   rm -rf conftest*
11510   ol_cv_func_gethostbyaddr_r_nargs7=yes
11511 else
11512   echo "configure: failed program was:" >&5
11513   cat conftest.$ac_ext >&5
11514   rm -rf conftest*
11515   ol_cv_func_gethostbyaddr_r_nargs7=no
11516 fi
11517 rm -f conftest*
11518
11519         cat > conftest.$ac_ext <<EOF
11520 #line 11521 "configure"
11521 #include "confdefs.h"
11522 #include <sys/types.h>
11523 #include <sys/socket.h>
11524 #include <netinet/in.h>
11525 #include <netdb.h>
11526 #define BUFSIZE (sizeof(struct hostent)+10)
11527 int main() {
11528 struct hostent hent;
11529                 struct hostent *rhent; char buffer[BUFSIZE]; 
11530                 struct in_addr add;
11531                 size_t alen=sizeof(struct in_addr);
11532                 int bufsize=BUFSIZE;int h_errno;
11533                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
11534                         alen, AF_INET, &hent, buffer, bufsize, 
11535                         &rhent, &h_errno);
11536 ; return 0; }
11537 EOF
11538 if { (eval echo configure:11539: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11539   rm -rf conftest*
11540   ol_cv_func_gethostbyaddr_r_nargs8=yes
11541 else
11542   echo "configure: failed program was:" >&5
11543   cat conftest.$ac_ext >&5
11544   rm -rf conftest*
11545   ol_cv_func_gethostbyaddr_r_nargs8=no
11546 fi
11547 rm -f conftest*
11548
11549         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
11550                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
11551
11552                 ol_cv_func_gethostbyaddr_r_nargs=7
11553
11554         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
11555                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
11556
11557                 ol_cv_func_gethostbyaddr_r_nargs=8
11558
11559         else
11560                 ol_cv_func_gethostbyaddr_r_nargs=0
11561         fi
11562   
11563 fi
11564
11565 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
11566   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
11567     cat >> confdefs.h <<EOF
11568 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
11569 EOF
11570
11571   fi
11572
11573 else
11574         ol_cv_func_gethostbyaddr_r_nargs=0
11575 fi
11576
11577 if test "$ac_cv_func_ctime_r" = yes \
11578         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
11579         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
11580         -a "$ac_cv_func_gethostbyname_r" = yes \
11581         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
11582         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
11583         -a "$ac_cv_func_gethostbyaddr_r" = yes \
11584         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
11585         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
11586         ; then
11587  
11588         cat >> confdefs.h <<\EOF
11589 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
11590 EOF
11591
11592 fi
11593
11594 ol_link_threads=no
11595
11596 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11597         -o $ol_with_threads = nt ; then
11598
11599         
11600         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11601 echo "configure:11602: checking for _beginthread" >&5
11602 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11603   echo $ac_n "(cached) $ac_c" 1>&6
11604 else
11605   cat > conftest.$ac_ext <<EOF
11606 #line 11607 "configure"
11607 #include "confdefs.h"
11608 /* System header to define __stub macros and hopefully few prototypes,
11609     which can conflict with char _beginthread(); below.  */
11610 #include <assert.h>
11611 /* Override any gcc2 internal prototype to avoid an error.  */
11612 /* We use char because int might match the return type of a gcc2
11613     builtin and then its argument prototype would still apply.  */
11614 char _beginthread();
11615 char (*f)();
11616
11617 int main() {
11618
11619 /* The GNU C library defines this for functions which it implements
11620     to always fail with ENOSYS.  Some functions are actually named
11621     something starting with __ and the normal name is an alias.  */
11622 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11623 choke me
11624 #else
11625 f = _beginthread;
11626 #endif
11627
11628 ; return 0; }
11629 EOF
11630 if { (eval echo configure:11631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11631   rm -rf conftest*
11632   eval "ac_cv_func__beginthread=yes"
11633 else
11634   echo "configure: failed program was:" >&5
11635   cat conftest.$ac_ext >&5
11636   rm -rf conftest*
11637   eval "ac_cv_func__beginthread=no"
11638 fi
11639 rm -f conftest*
11640 fi
11641
11642 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11643   echo "$ac_t""yes" 1>&6
11644   :
11645 else
11646   echo "$ac_t""no" 1>&6
11647 fi
11648
11649
11650         if test $ac_cv_func__beginthread = yes ; then
11651                 cat >> confdefs.h <<\EOF
11652 #define HAVE_NT_THREADS 1
11653 EOF
11654
11655                 ol_cv_nt_threads=yes
11656         fi
11657
11658
11659         if test "$ol_cv_nt_threads" = yes ; then
11660                 ol_link_threads=nt
11661                 ol_with_threads=found
11662                 ol_with_yielding_select=yes
11663
11664                 cat >> confdefs.h <<\EOF
11665 #define HAVE_NT_SERVICE_MANAGER 1
11666 EOF
11667
11668                 cat >> confdefs.h <<\EOF
11669 #define HAVE_NT_EVENT_LOG 1
11670 EOF
11671
11672         fi
11673
11674         if test $ol_with_threads = nt ; then
11675                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11676         fi
11677 fi
11678
11679 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11680         -o $ol_with_threads = posix ; then
11681
11682         for ac_hdr in pthread.h
11683 do
11684 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11685 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11686 echo "configure:11687: checking for $ac_hdr" >&5
11687 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11688   echo $ac_n "(cached) $ac_c" 1>&6
11689 else
11690   cat > conftest.$ac_ext <<EOF
11691 #line 11692 "configure"
11692 #include "confdefs.h"
11693 #include <$ac_hdr>
11694 EOF
11695 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11696 { (eval echo configure:11697: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11697 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11698 if test -z "$ac_err"; then
11699   rm -rf conftest*
11700   eval "ac_cv_header_$ac_safe=yes"
11701 else
11702   echo "$ac_err" >&5
11703   echo "configure: failed program was:" >&5
11704   cat conftest.$ac_ext >&5
11705   rm -rf conftest*
11706   eval "ac_cv_header_$ac_safe=no"
11707 fi
11708 rm -f conftest*
11709 fi
11710 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11711   echo "$ac_t""yes" 1>&6
11712     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11713   cat >> confdefs.h <<EOF
11714 #define $ac_tr_hdr 1
11715 EOF
11716  
11717 else
11718   echo "$ac_t""no" 1>&6
11719 fi
11720 done
11721
11722
11723         if test $ac_cv_header_pthread_h = yes ; then
11724                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11725 echo "configure:11726: checking POSIX thread version" >&5
11726 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11727   echo $ac_n "(cached) $ac_c" 1>&6
11728 else
11729   
11730         cat > conftest.$ac_ext <<EOF
11731 #line 11732 "configure"
11732 #include "confdefs.h"
11733
11734 #               include <pthread.h>
11735         
11736 int main() {
11737
11738                 int i = PTHREAD_CREATE_JOINABLE;
11739         
11740 ; return 0; }
11741 EOF
11742 if { (eval echo configure:11743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11743   rm -rf conftest*
11744   
11745         cat > conftest.$ac_ext <<EOF
11746 #line 11747 "configure"
11747 #include "confdefs.h"
11748 #include <pthread.h>
11749 EOF
11750 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11751   egrep "pthread_detach" >/dev/null 2>&1; then
11752   rm -rf conftest*
11753   ol_cv_pthread_version=10
11754 else
11755   rm -rf conftest*
11756   ol_cv_pthread_version=8
11757 fi
11758 rm -f conftest*
11759
11760 else
11761   echo "configure: failed program was:" >&5
11762   cat conftest.$ac_ext >&5
11763   rm -rf conftest*
11764   
11765         cat > conftest.$ac_ext <<EOF
11766 #line 11767 "configure"
11767 #include "confdefs.h"
11768
11769 #               include <pthread.h>
11770 #               ifdef PTHREAD_CREATE_UNDETACHED
11771                 draft7
11772 #               endif
11773         
11774 EOF
11775 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11776   egrep "draft7" >/dev/null 2>&1; then
11777   rm -rf conftest*
11778   ol_cv_pthread_version=7
11779 else
11780   rm -rf conftest*
11781   
11782         cat > conftest.$ac_ext <<EOF
11783 #line 11784 "configure"
11784 #include "confdefs.h"
11785 #include <pthread.h>
11786 EOF
11787 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11788   egrep "pthread_attr_init" >/dev/null 2>&1; then
11789   rm -rf conftest*
11790   ol_cv_pthread_version=6
11791 else
11792   rm -rf conftest*
11793   
11794         cat > conftest.$ac_ext <<EOF
11795 #line 11796 "configure"
11796 #include "confdefs.h"
11797
11798 #               include <pthread.h>
11799 #ifdef          PTHREAD_MUTEX_INITIALIZER
11800                 draft5
11801 #endif
11802         
11803 EOF
11804 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11805   egrep "draft5" >/dev/null 2>&1; then
11806   rm -rf conftest*
11807   ol_cv_pthread_version=5
11808 else
11809   rm -rf conftest*
11810   ol_cv_pthread_version=4
11811 fi
11812 rm -f conftest*
11813  
11814 fi
11815 rm -f conftest*
11816  
11817 fi
11818 rm -f conftest*
11819  
11820 fi
11821 rm -f conftest*
11822
11823 fi
11824
11825 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11826
11827
11828                 if test $ol_cv_pthread_version != 0 ; then
11829                         cat >> confdefs.h <<EOF
11830 #define HAVE_PTHREADS $ol_cv_pthread_version
11831 EOF
11832
11833                 else
11834                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11835                 fi
11836
11837                 # consider threads found
11838                 ol_with_threads=found
11839
11840                 
11841         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11842 echo "configure:11843: checking for LinuxThreads pthread.h" >&5
11843 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11844   echo $ac_n "(cached) $ac_c" 1>&6
11845 else
11846   cat > conftest.$ac_ext <<EOF
11847 #line 11848 "configure"
11848 #include "confdefs.h"
11849 #include <pthread.h>
11850 EOF
11851 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11852   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11853   rm -rf conftest*
11854   ol_cv_header_linux_threads=yes
11855 else
11856   rm -rf conftest*
11857   ol_cv_header_linux_threads=no
11858 fi
11859 rm -f conftest*
11860
11861                 
11862 fi
11863
11864 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11865         if test $ol_cv_header_linux_threads = yes; then
11866                 cat >> confdefs.h <<\EOF
11867 #define HAVE_LINUX_THREADS 1
11868 EOF
11869
11870         fi
11871
11872                 
11873         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11874 echo "configure:11875: checking for GNU Pth pthread.h" >&5
11875 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11876   echo $ac_n "(cached) $ac_c" 1>&6
11877 else
11878   cat > conftest.$ac_ext <<EOF
11879 #line 11880 "configure"
11880 #include "confdefs.h"
11881 #include <pthread.h>
11882 #ifdef _POSIX_THREAD_IS_GNU_PTH
11883         __gnu_pth__;
11884 #endif
11885
11886 EOF
11887 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11888   egrep "__gnu_pth__" >/dev/null 2>&1; then
11889   rm -rf conftest*
11890   ol_cv_header_gnu_pth_pthread_h=yes
11891 else
11892   rm -rf conftest*
11893   ol_cv_header_gnu_pth_pthread_h=no
11894 fi
11895 rm -f conftest*
11896
11897                 
11898 fi
11899
11900 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11901
11902
11903                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11904                         for ac_hdr in sched.h
11905 do
11906 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11907 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11908 echo "configure:11909: checking for $ac_hdr" >&5
11909 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11910   echo $ac_n "(cached) $ac_c" 1>&6
11911 else
11912   cat > conftest.$ac_ext <<EOF
11913 #line 11914 "configure"
11914 #include "confdefs.h"
11915 #include <$ac_hdr>
11916 EOF
11917 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11918 { (eval echo configure:11919: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11919 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11920 if test -z "$ac_err"; then
11921   rm -rf conftest*
11922   eval "ac_cv_header_$ac_safe=yes"
11923 else
11924   echo "$ac_err" >&5
11925   echo "configure: failed program was:" >&5
11926   cat conftest.$ac_ext >&5
11927   rm -rf conftest*
11928   eval "ac_cv_header_$ac_safe=no"
11929 fi
11930 rm -f conftest*
11931 fi
11932 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11933   echo "$ac_t""yes" 1>&6
11934     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11935   cat >> confdefs.h <<EOF
11936 #define $ac_tr_hdr 1
11937 EOF
11938  
11939 else
11940   echo "$ac_t""no" 1>&6
11941 fi
11942 done
11943
11944                 fi
11945
11946                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11947                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11948 echo "configure:11949: checking for pthread_create in default libraries" >&5
11949 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11950   echo $ac_n "(cached) $ac_c" 1>&6
11951 else
11952   
11953                 if test "$cross_compiling" = yes; then
11954   cat > conftest.$ac_ext <<EOF
11955 #line 11956 "configure"
11956 #include "confdefs.h"
11957 /* pthread test headers */
11958 #include <pthread.h>
11959 #if HAVE_PTHREADS < 7
11960 #include <errno.h>
11961 #endif
11962 #ifndef NULL
11963 #define NULL (void*)0
11964 #endif
11965
11966 static void *task(p)
11967         void *p;
11968 {
11969         return (void *) (p == NULL);
11970 }
11971
11972 int main() {
11973
11974         /* pthread test function */
11975 #ifndef PTHREAD_CREATE_DETACHED
11976 #define PTHREAD_CREATE_DETACHED 1
11977 #endif
11978         pthread_t t;
11979         int status;
11980         int detach = PTHREAD_CREATE_DETACHED;
11981
11982 #if HAVE_PTHREADS > 4
11983         /* Final pthreads */
11984         pthread_attr_t attr;
11985
11986         status = pthread_attr_init(&attr);
11987         if( status ) return status;
11988
11989 #if HAVE_PTHREADS < 7
11990         status = pthread_attr_setdetachstate(&attr, &detach);
11991         if( status < 0 ) status = errno;
11992 #else
11993         status = pthread_attr_setdetachstate(&attr, detach);
11994 #endif
11995         if( status ) return status;
11996         status = pthread_create( &t, &attr, task, NULL );
11997 #if HAVE_PTHREADS < 7
11998         if( status < 0 ) status = errno;
11999 #endif
12000         if( status ) return status;
12001 #else
12002         /* Draft 4 pthreads */
12003         status = pthread_create( &t, pthread_attr_default, task, NULL );
12004         if( status ) return errno;
12005
12006         /* give thread a chance to complete */
12007         /* it should remain joinable and hence detachable */
12008         sleep( 1 );
12009
12010         status = pthread_detach( &t );
12011         if( status ) return errno;
12012 #endif
12013
12014 #ifdef HAVE_LINUX_THREADS
12015         pthread_kill_other_threads_np();
12016 #endif
12017
12018         return 0;
12019
12020 ; return 0; }
12021 EOF
12022 if { (eval echo configure:12023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12023   rm -rf conftest*
12024   ol_cv_pthread_create=yes
12025 else
12026   echo "configure: failed program was:" >&5
12027   cat conftest.$ac_ext >&5
12028   rm -rf conftest*
12029   ol_cv_pthread_create=no
12030 fi
12031 rm -f conftest*
12032 else
12033   cat > conftest.$ac_ext <<EOF
12034 #line 12035 "configure"
12035 #include "confdefs.h"
12036 /* pthread test headers */
12037 #include <pthread.h>
12038 #if HAVE_PTHREADS < 7
12039 #include <errno.h>
12040 #endif
12041 #ifndef NULL
12042 #define NULL (void*)0
12043 #endif
12044
12045 static void *task(p)
12046         void *p;
12047 {
12048         return (void *) (p == NULL);
12049 }
12050
12051
12052 int main(argc, argv)
12053         int argc;
12054         char **argv;
12055 {
12056
12057         /* pthread test function */
12058 #ifndef PTHREAD_CREATE_DETACHED
12059 #define PTHREAD_CREATE_DETACHED 1
12060 #endif
12061         pthread_t t;
12062         int status;
12063         int detach = PTHREAD_CREATE_DETACHED;
12064
12065 #if HAVE_PTHREADS > 4
12066         /* Final pthreads */
12067         pthread_attr_t attr;
12068
12069         status = pthread_attr_init(&attr);
12070         if( status ) return status;
12071
12072 #if HAVE_PTHREADS < 7
12073         status = pthread_attr_setdetachstate(&attr, &detach);
12074         if( status < 0 ) status = errno;
12075 #else
12076         status = pthread_attr_setdetachstate(&attr, detach);
12077 #endif
12078         if( status ) return status;
12079         status = pthread_create( &t, &attr, task, NULL );
12080 #if HAVE_PTHREADS < 7
12081         if( status < 0 ) status = errno;
12082 #endif
12083         if( status ) return status;
12084 #else
12085         /* Draft 4 pthreads */
12086         status = pthread_create( &t, pthread_attr_default, task, NULL );
12087         if( status ) return errno;
12088
12089         /* give thread a chance to complete */
12090         /* it should remain joinable and hence detachable */
12091         sleep( 1 );
12092
12093         status = pthread_detach( &t );
12094         if( status ) return errno;
12095 #endif
12096
12097 #ifdef HAVE_LINUX_THREADS
12098         pthread_kill_other_threads_np();
12099 #endif
12100
12101         return 0;
12102
12103 }
12104
12105 EOF
12106 if { (eval echo configure:12107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12107 then
12108   ol_cv_pthread_create=yes
12109 else
12110   echo "configure: failed program was:" >&5
12111   cat conftest.$ac_ext >&5
12112   rm -fr conftest*
12113   ol_cv_pthread_create=no
12114 fi
12115 rm -fr conftest*
12116 fi
12117
12118 fi
12119
12120 echo "$ac_t""$ol_cv_pthread_create" 1>&6
12121
12122                 if test $ol_cv_pthread_create != no ; then
12123                         ol_link_threads=posix
12124                         ol_link_pthreads=""
12125                 fi
12126                 
12127                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
12128 if test "$ol_link_threads" = no ; then
12129         # try -kthread
12130         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
12131 echo "configure:12132: checking for pthread link with -kthread" >&5
12132 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
12133   echo $ac_n "(cached) $ac_c" 1>&6
12134 else
12135   
12136                 # save the flags
12137                 ol_LIBS="$LIBS"
12138                 LIBS="-kthread $LIBS"
12139
12140                 if test "$cross_compiling" = yes; then
12141   cat > conftest.$ac_ext <<EOF
12142 #line 12143 "configure"
12143 #include "confdefs.h"
12144 /* pthread test headers */
12145 #include <pthread.h>
12146 #if HAVE_PTHREADS < 7
12147 #include <errno.h>
12148 #endif
12149 #ifndef NULL
12150 #define NULL (void*)0
12151 #endif
12152
12153 static void *task(p)
12154         void *p;
12155 {
12156         return (void *) (p == NULL);
12157 }
12158
12159 int main() {
12160
12161         /* pthread test function */
12162 #ifndef PTHREAD_CREATE_DETACHED
12163 #define PTHREAD_CREATE_DETACHED 1
12164 #endif
12165         pthread_t t;
12166         int status;
12167         int detach = PTHREAD_CREATE_DETACHED;
12168
12169 #if HAVE_PTHREADS > 4
12170         /* Final pthreads */
12171         pthread_attr_t attr;
12172
12173         status = pthread_attr_init(&attr);
12174         if( status ) return status;
12175
12176 #if HAVE_PTHREADS < 7
12177         status = pthread_attr_setdetachstate(&attr, &detach);
12178         if( status < 0 ) status = errno;
12179 #else
12180         status = pthread_attr_setdetachstate(&attr, detach);
12181 #endif
12182         if( status ) return status;
12183         status = pthread_create( &t, &attr, task, NULL );
12184 #if HAVE_PTHREADS < 7
12185         if( status < 0 ) status = errno;
12186 #endif
12187         if( status ) return status;
12188 #else
12189         /* Draft 4 pthreads */
12190         status = pthread_create( &t, pthread_attr_default, task, NULL );
12191         if( status ) return errno;
12192
12193         /* give thread a chance to complete */
12194         /* it should remain joinable and hence detachable */
12195         sleep( 1 );
12196
12197         status = pthread_detach( &t );
12198         if( status ) return errno;
12199 #endif
12200
12201 #ifdef HAVE_LINUX_THREADS
12202         pthread_kill_other_threads_np();
12203 #endif
12204
12205         return 0;
12206
12207 ; return 0; }
12208 EOF
12209 if { (eval echo configure:12210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12210   rm -rf conftest*
12211   ol_cv_pthread_kthread=yes
12212 else
12213   echo "configure: failed program was:" >&5
12214   cat conftest.$ac_ext >&5
12215   rm -rf conftest*
12216   ol_cv_pthread_kthread=no
12217 fi
12218 rm -f conftest*
12219 else
12220   cat > conftest.$ac_ext <<EOF
12221 #line 12222 "configure"
12222 #include "confdefs.h"
12223 /* pthread test headers */
12224 #include <pthread.h>
12225 #if HAVE_PTHREADS < 7
12226 #include <errno.h>
12227 #endif
12228 #ifndef NULL
12229 #define NULL (void*)0
12230 #endif
12231
12232 static void *task(p)
12233         void *p;
12234 {
12235         return (void *) (p == NULL);
12236 }
12237
12238
12239 int main(argc, argv)
12240         int argc;
12241         char **argv;
12242 {
12243
12244         /* pthread test function */
12245 #ifndef PTHREAD_CREATE_DETACHED
12246 #define PTHREAD_CREATE_DETACHED 1
12247 #endif
12248         pthread_t t;
12249         int status;
12250         int detach = PTHREAD_CREATE_DETACHED;
12251
12252 #if HAVE_PTHREADS > 4
12253         /* Final pthreads */
12254         pthread_attr_t attr;
12255
12256         status = pthread_attr_init(&attr);
12257         if( status ) return status;
12258
12259 #if HAVE_PTHREADS < 7
12260         status = pthread_attr_setdetachstate(&attr, &detach);
12261         if( status < 0 ) status = errno;
12262 #else
12263         status = pthread_attr_setdetachstate(&attr, detach);
12264 #endif
12265         if( status ) return status;
12266         status = pthread_create( &t, &attr, task, NULL );
12267 #if HAVE_PTHREADS < 7
12268         if( status < 0 ) status = errno;
12269 #endif
12270         if( status ) return status;
12271 #else
12272         /* Draft 4 pthreads */
12273         status = pthread_create( &t, pthread_attr_default, task, NULL );
12274         if( status ) return errno;
12275
12276         /* give thread a chance to complete */
12277         /* it should remain joinable and hence detachable */
12278         sleep( 1 );
12279
12280         status = pthread_detach( &t );
12281         if( status ) return errno;
12282 #endif
12283
12284 #ifdef HAVE_LINUX_THREADS
12285         pthread_kill_other_threads_np();
12286 #endif
12287
12288         return 0;
12289
12290 }
12291
12292 EOF
12293 if { (eval echo configure:12294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12294 then
12295   ol_cv_pthread_kthread=yes
12296 else
12297   echo "configure: failed program was:" >&5
12298   cat conftest.$ac_ext >&5
12299   rm -fr conftest*
12300   ol_cv_pthread_kthread=no
12301 fi
12302 rm -fr conftest*
12303 fi
12304
12305
12306                 # restore the LIBS
12307                 LIBS="$ol_LIBS"
12308         
12309 fi
12310
12311 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12312
12313         if test $ol_cv_pthread_kthread = yes ; then
12314                 ol_link_pthreads="-kthread"
12315                 ol_link_threads=posix
12316         fi
12317 fi
12318
12319                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12320 if test "$ol_link_threads" = no ; then
12321         # try -pthread
12322         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12323 echo "configure:12324: checking for pthread link with -pthread" >&5
12324 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12325   echo $ac_n "(cached) $ac_c" 1>&6
12326 else
12327   
12328                 # save the flags
12329                 ol_LIBS="$LIBS"
12330                 LIBS="-pthread $LIBS"
12331
12332                 if test "$cross_compiling" = yes; then
12333   cat > conftest.$ac_ext <<EOF
12334 #line 12335 "configure"
12335 #include "confdefs.h"
12336 /* pthread test headers */
12337 #include <pthread.h>
12338 #if HAVE_PTHREADS < 7
12339 #include <errno.h>
12340 #endif
12341 #ifndef NULL
12342 #define NULL (void*)0
12343 #endif
12344
12345 static void *task(p)
12346         void *p;
12347 {
12348         return (void *) (p == NULL);
12349 }
12350
12351 int main() {
12352
12353         /* pthread test function */
12354 #ifndef PTHREAD_CREATE_DETACHED
12355 #define PTHREAD_CREATE_DETACHED 1
12356 #endif
12357         pthread_t t;
12358         int status;
12359         int detach = PTHREAD_CREATE_DETACHED;
12360
12361 #if HAVE_PTHREADS > 4
12362         /* Final pthreads */
12363         pthread_attr_t attr;
12364
12365         status = pthread_attr_init(&attr);
12366         if( status ) return status;
12367
12368 #if HAVE_PTHREADS < 7
12369         status = pthread_attr_setdetachstate(&attr, &detach);
12370         if( status < 0 ) status = errno;
12371 #else
12372         status = pthread_attr_setdetachstate(&attr, detach);
12373 #endif
12374         if( status ) return status;
12375         status = pthread_create( &t, &attr, task, NULL );
12376 #if HAVE_PTHREADS < 7
12377         if( status < 0 ) status = errno;
12378 #endif
12379         if( status ) return status;
12380 #else
12381         /* Draft 4 pthreads */
12382         status = pthread_create( &t, pthread_attr_default, task, NULL );
12383         if( status ) return errno;
12384
12385         /* give thread a chance to complete */
12386         /* it should remain joinable and hence detachable */
12387         sleep( 1 );
12388
12389         status = pthread_detach( &t );
12390         if( status ) return errno;
12391 #endif
12392
12393 #ifdef HAVE_LINUX_THREADS
12394         pthread_kill_other_threads_np();
12395 #endif
12396
12397         return 0;
12398
12399 ; return 0; }
12400 EOF
12401 if { (eval echo configure:12402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12402   rm -rf conftest*
12403   ol_cv_pthread_pthread=yes
12404 else
12405   echo "configure: failed program was:" >&5
12406   cat conftest.$ac_ext >&5
12407   rm -rf conftest*
12408   ol_cv_pthread_pthread=no
12409 fi
12410 rm -f conftest*
12411 else
12412   cat > conftest.$ac_ext <<EOF
12413 #line 12414 "configure"
12414 #include "confdefs.h"
12415 /* pthread test headers */
12416 #include <pthread.h>
12417 #if HAVE_PTHREADS < 7
12418 #include <errno.h>
12419 #endif
12420 #ifndef NULL
12421 #define NULL (void*)0
12422 #endif
12423
12424 static void *task(p)
12425         void *p;
12426 {
12427         return (void *) (p == NULL);
12428 }
12429
12430
12431 int main(argc, argv)
12432         int argc;
12433         char **argv;
12434 {
12435
12436         /* pthread test function */
12437 #ifndef PTHREAD_CREATE_DETACHED
12438 #define PTHREAD_CREATE_DETACHED 1
12439 #endif
12440         pthread_t t;
12441         int status;
12442         int detach = PTHREAD_CREATE_DETACHED;
12443
12444 #if HAVE_PTHREADS > 4
12445         /* Final pthreads */
12446         pthread_attr_t attr;
12447
12448         status = pthread_attr_init(&attr);
12449         if( status ) return status;
12450
12451 #if HAVE_PTHREADS < 7
12452         status = pthread_attr_setdetachstate(&attr, &detach);
12453         if( status < 0 ) status = errno;
12454 #else
12455         status = pthread_attr_setdetachstate(&attr, detach);
12456 #endif
12457         if( status ) return status;
12458         status = pthread_create( &t, &attr, task, NULL );
12459 #if HAVE_PTHREADS < 7
12460         if( status < 0 ) status = errno;
12461 #endif
12462         if( status ) return status;
12463 #else
12464         /* Draft 4 pthreads */
12465         status = pthread_create( &t, pthread_attr_default, task, NULL );
12466         if( status ) return errno;
12467
12468         /* give thread a chance to complete */
12469         /* it should remain joinable and hence detachable */
12470         sleep( 1 );
12471
12472         status = pthread_detach( &t );
12473         if( status ) return errno;
12474 #endif
12475
12476 #ifdef HAVE_LINUX_THREADS
12477         pthread_kill_other_threads_np();
12478 #endif
12479
12480         return 0;
12481
12482 }
12483
12484 EOF
12485 if { (eval echo configure:12486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12486 then
12487   ol_cv_pthread_pthread=yes
12488 else
12489   echo "configure: failed program was:" >&5
12490   cat conftest.$ac_ext >&5
12491   rm -fr conftest*
12492   ol_cv_pthread_pthread=no
12493 fi
12494 rm -fr conftest*
12495 fi
12496
12497
12498                 # restore the LIBS
12499                 LIBS="$ol_LIBS"
12500         
12501 fi
12502
12503 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12504
12505         if test $ol_cv_pthread_pthread = yes ; then
12506                 ol_link_pthreads="-pthread"
12507                 ol_link_threads=posix
12508         fi
12509 fi
12510
12511                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12512 if test "$ol_link_threads" = no ; then
12513         # try -pthreads
12514         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12515 echo "configure:12516: checking for pthread link with -pthreads" >&5
12516 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12517   echo $ac_n "(cached) $ac_c" 1>&6
12518 else
12519   
12520                 # save the flags
12521                 ol_LIBS="$LIBS"
12522                 LIBS="-pthreads $LIBS"
12523
12524                 if test "$cross_compiling" = yes; then
12525   cat > conftest.$ac_ext <<EOF
12526 #line 12527 "configure"
12527 #include "confdefs.h"
12528 /* pthread test headers */
12529 #include <pthread.h>
12530 #if HAVE_PTHREADS < 7
12531 #include <errno.h>
12532 #endif
12533 #ifndef NULL
12534 #define NULL (void*)0
12535 #endif
12536
12537 static void *task(p)
12538         void *p;
12539 {
12540         return (void *) (p == NULL);
12541 }
12542
12543 int main() {
12544
12545         /* pthread test function */
12546 #ifndef PTHREAD_CREATE_DETACHED
12547 #define PTHREAD_CREATE_DETACHED 1
12548 #endif
12549         pthread_t t;
12550         int status;
12551         int detach = PTHREAD_CREATE_DETACHED;
12552
12553 #if HAVE_PTHREADS > 4
12554         /* Final pthreads */
12555         pthread_attr_t attr;
12556
12557         status = pthread_attr_init(&attr);
12558         if( status ) return status;
12559
12560 #if HAVE_PTHREADS < 7
12561         status = pthread_attr_setdetachstate(&attr, &detach);
12562         if( status < 0 ) status = errno;
12563 #else
12564         status = pthread_attr_setdetachstate(&attr, detach);
12565 #endif
12566         if( status ) return status;
12567         status = pthread_create( &t, &attr, task, NULL );
12568 #if HAVE_PTHREADS < 7
12569         if( status < 0 ) status = errno;
12570 #endif
12571         if( status ) return status;
12572 #else
12573         /* Draft 4 pthreads */
12574         status = pthread_create( &t, pthread_attr_default, task, NULL );
12575         if( status ) return errno;
12576
12577         /* give thread a chance to complete */
12578         /* it should remain joinable and hence detachable */
12579         sleep( 1 );
12580
12581         status = pthread_detach( &t );
12582         if( status ) return errno;
12583 #endif
12584
12585 #ifdef HAVE_LINUX_THREADS
12586         pthread_kill_other_threads_np();
12587 #endif
12588
12589         return 0;
12590
12591 ; return 0; }
12592 EOF
12593 if { (eval echo configure:12594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12594   rm -rf conftest*
12595   ol_cv_pthread_pthreads=yes
12596 else
12597   echo "configure: failed program was:" >&5
12598   cat conftest.$ac_ext >&5
12599   rm -rf conftest*
12600   ol_cv_pthread_pthreads=no
12601 fi
12602 rm -f conftest*
12603 else
12604   cat > conftest.$ac_ext <<EOF
12605 #line 12606 "configure"
12606 #include "confdefs.h"
12607 /* pthread test headers */
12608 #include <pthread.h>
12609 #if HAVE_PTHREADS < 7
12610 #include <errno.h>
12611 #endif
12612 #ifndef NULL
12613 #define NULL (void*)0
12614 #endif
12615
12616 static void *task(p)
12617         void *p;
12618 {
12619         return (void *) (p == NULL);
12620 }
12621
12622
12623 int main(argc, argv)
12624         int argc;
12625         char **argv;
12626 {
12627
12628         /* pthread test function */
12629 #ifndef PTHREAD_CREATE_DETACHED
12630 #define PTHREAD_CREATE_DETACHED 1
12631 #endif
12632         pthread_t t;
12633         int status;
12634         int detach = PTHREAD_CREATE_DETACHED;
12635
12636 #if HAVE_PTHREADS > 4
12637         /* Final pthreads */
12638         pthread_attr_t attr;
12639
12640         status = pthread_attr_init(&attr);
12641         if( status ) return status;
12642
12643 #if HAVE_PTHREADS < 7
12644         status = pthread_attr_setdetachstate(&attr, &detach);
12645         if( status < 0 ) status = errno;
12646 #else
12647         status = pthread_attr_setdetachstate(&attr, detach);
12648 #endif
12649         if( status ) return status;
12650         status = pthread_create( &t, &attr, task, NULL );
12651 #if HAVE_PTHREADS < 7
12652         if( status < 0 ) status = errno;
12653 #endif
12654         if( status ) return status;
12655 #else
12656         /* Draft 4 pthreads */
12657         status = pthread_create( &t, pthread_attr_default, task, NULL );
12658         if( status ) return errno;
12659
12660         /* give thread a chance to complete */
12661         /* it should remain joinable and hence detachable */
12662         sleep( 1 );
12663
12664         status = pthread_detach( &t );
12665         if( status ) return errno;
12666 #endif
12667
12668 #ifdef HAVE_LINUX_THREADS
12669         pthread_kill_other_threads_np();
12670 #endif
12671
12672         return 0;
12673
12674 }
12675
12676 EOF
12677 if { (eval echo configure:12678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12678 then
12679   ol_cv_pthread_pthreads=yes
12680 else
12681   echo "configure: failed program was:" >&5
12682   cat conftest.$ac_ext >&5
12683   rm -fr conftest*
12684   ol_cv_pthread_pthreads=no
12685 fi
12686 rm -fr conftest*
12687 fi
12688
12689
12690                 # restore the LIBS
12691                 LIBS="$ol_LIBS"
12692         
12693 fi
12694
12695 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12696
12697         if test $ol_cv_pthread_pthreads = yes ; then
12698                 ol_link_pthreads="-pthreads"
12699                 ol_link_threads=posix
12700         fi
12701 fi
12702
12703                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12704 if test "$ol_link_threads" = no ; then
12705         # try -mthreads
12706         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12707 echo "configure:12708: checking for pthread link with -mthreads" >&5
12708 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12709   echo $ac_n "(cached) $ac_c" 1>&6
12710 else
12711   
12712                 # save the flags
12713                 ol_LIBS="$LIBS"
12714                 LIBS="-mthreads $LIBS"
12715
12716                 if test "$cross_compiling" = yes; then
12717   cat > conftest.$ac_ext <<EOF
12718 #line 12719 "configure"
12719 #include "confdefs.h"
12720 /* pthread test headers */
12721 #include <pthread.h>
12722 #if HAVE_PTHREADS < 7
12723 #include <errno.h>
12724 #endif
12725 #ifndef NULL
12726 #define NULL (void*)0
12727 #endif
12728
12729 static void *task(p)
12730         void *p;
12731 {
12732         return (void *) (p == NULL);
12733 }
12734
12735 int main() {
12736
12737         /* pthread test function */
12738 #ifndef PTHREAD_CREATE_DETACHED
12739 #define PTHREAD_CREATE_DETACHED 1
12740 #endif
12741         pthread_t t;
12742         int status;
12743         int detach = PTHREAD_CREATE_DETACHED;
12744
12745 #if HAVE_PTHREADS > 4
12746         /* Final pthreads */
12747         pthread_attr_t attr;
12748
12749         status = pthread_attr_init(&attr);
12750         if( status ) return status;
12751
12752 #if HAVE_PTHREADS < 7
12753         status = pthread_attr_setdetachstate(&attr, &detach);
12754         if( status < 0 ) status = errno;
12755 #else
12756         status = pthread_attr_setdetachstate(&attr, detach);
12757 #endif
12758         if( status ) return status;
12759         status = pthread_create( &t, &attr, task, NULL );
12760 #if HAVE_PTHREADS < 7
12761         if( status < 0 ) status = errno;
12762 #endif
12763         if( status ) return status;
12764 #else
12765         /* Draft 4 pthreads */
12766         status = pthread_create( &t, pthread_attr_default, task, NULL );
12767         if( status ) return errno;
12768
12769         /* give thread a chance to complete */
12770         /* it should remain joinable and hence detachable */
12771         sleep( 1 );
12772
12773         status = pthread_detach( &t );
12774         if( status ) return errno;
12775 #endif
12776
12777 #ifdef HAVE_LINUX_THREADS
12778         pthread_kill_other_threads_np();
12779 #endif
12780
12781         return 0;
12782
12783 ; return 0; }
12784 EOF
12785 if { (eval echo configure:12786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12786   rm -rf conftest*
12787   ol_cv_pthread_mthreads=yes
12788 else
12789   echo "configure: failed program was:" >&5
12790   cat conftest.$ac_ext >&5
12791   rm -rf conftest*
12792   ol_cv_pthread_mthreads=no
12793 fi
12794 rm -f conftest*
12795 else
12796   cat > conftest.$ac_ext <<EOF
12797 #line 12798 "configure"
12798 #include "confdefs.h"
12799 /* pthread test headers */
12800 #include <pthread.h>
12801 #if HAVE_PTHREADS < 7
12802 #include <errno.h>
12803 #endif
12804 #ifndef NULL
12805 #define NULL (void*)0
12806 #endif
12807
12808 static void *task(p)
12809         void *p;
12810 {
12811         return (void *) (p == NULL);
12812 }
12813
12814
12815 int main(argc, argv)
12816         int argc;
12817         char **argv;
12818 {
12819
12820         /* pthread test function */
12821 #ifndef PTHREAD_CREATE_DETACHED
12822 #define PTHREAD_CREATE_DETACHED 1
12823 #endif
12824         pthread_t t;
12825         int status;
12826         int detach = PTHREAD_CREATE_DETACHED;
12827
12828 #if HAVE_PTHREADS > 4
12829         /* Final pthreads */
12830         pthread_attr_t attr;
12831
12832         status = pthread_attr_init(&attr);
12833         if( status ) return status;
12834
12835 #if HAVE_PTHREADS < 7
12836         status = pthread_attr_setdetachstate(&attr, &detach);
12837         if( status < 0 ) status = errno;
12838 #else
12839         status = pthread_attr_setdetachstate(&attr, detach);
12840 #endif
12841         if( status ) return status;
12842         status = pthread_create( &t, &attr, task, NULL );
12843 #if HAVE_PTHREADS < 7
12844         if( status < 0 ) status = errno;
12845 #endif
12846         if( status ) return status;
12847 #else
12848         /* Draft 4 pthreads */
12849         status = pthread_create( &t, pthread_attr_default, task, NULL );
12850         if( status ) return errno;
12851
12852         /* give thread a chance to complete */
12853         /* it should remain joinable and hence detachable */
12854         sleep( 1 );
12855
12856         status = pthread_detach( &t );
12857         if( status ) return errno;
12858 #endif
12859
12860 #ifdef HAVE_LINUX_THREADS
12861         pthread_kill_other_threads_np();
12862 #endif
12863
12864         return 0;
12865
12866 }
12867
12868 EOF
12869 if { (eval echo configure:12870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12870 then
12871   ol_cv_pthread_mthreads=yes
12872 else
12873   echo "configure: failed program was:" >&5
12874   cat conftest.$ac_ext >&5
12875   rm -fr conftest*
12876   ol_cv_pthread_mthreads=no
12877 fi
12878 rm -fr conftest*
12879 fi
12880
12881
12882                 # restore the LIBS
12883                 LIBS="$ol_LIBS"
12884         
12885 fi
12886
12887 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12888
12889         if test $ol_cv_pthread_mthreads = yes ; then
12890                 ol_link_pthreads="-mthreads"
12891                 ol_link_threads=posix
12892         fi
12893 fi
12894
12895                 # Pthread try link: -thread (ol_cv_pthread_thread)
12896 if test "$ol_link_threads" = no ; then
12897         # try -thread
12898         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12899 echo "configure:12900: checking for pthread link with -thread" >&5
12900 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12901   echo $ac_n "(cached) $ac_c" 1>&6
12902 else
12903   
12904                 # save the flags
12905                 ol_LIBS="$LIBS"
12906                 LIBS="-thread $LIBS"
12907
12908                 if test "$cross_compiling" = yes; then
12909   cat > conftest.$ac_ext <<EOF
12910 #line 12911 "configure"
12911 #include "confdefs.h"
12912 /* pthread test headers */
12913 #include <pthread.h>
12914 #if HAVE_PTHREADS < 7
12915 #include <errno.h>
12916 #endif
12917 #ifndef NULL
12918 #define NULL (void*)0
12919 #endif
12920
12921 static void *task(p)
12922         void *p;
12923 {
12924         return (void *) (p == NULL);
12925 }
12926
12927 int main() {
12928
12929         /* pthread test function */
12930 #ifndef PTHREAD_CREATE_DETACHED
12931 #define PTHREAD_CREATE_DETACHED 1
12932 #endif
12933         pthread_t t;
12934         int status;
12935         int detach = PTHREAD_CREATE_DETACHED;
12936
12937 #if HAVE_PTHREADS > 4
12938         /* Final pthreads */
12939         pthread_attr_t attr;
12940
12941         status = pthread_attr_init(&attr);
12942         if( status ) return status;
12943
12944 #if HAVE_PTHREADS < 7
12945         status = pthread_attr_setdetachstate(&attr, &detach);
12946         if( status < 0 ) status = errno;
12947 #else
12948         status = pthread_attr_setdetachstate(&attr, detach);
12949 #endif
12950         if( status ) return status;
12951         status = pthread_create( &t, &attr, task, NULL );
12952 #if HAVE_PTHREADS < 7
12953         if( status < 0 ) status = errno;
12954 #endif
12955         if( status ) return status;
12956 #else
12957         /* Draft 4 pthreads */
12958         status = pthread_create( &t, pthread_attr_default, task, NULL );
12959         if( status ) return errno;
12960
12961         /* give thread a chance to complete */
12962         /* it should remain joinable and hence detachable */
12963         sleep( 1 );
12964
12965         status = pthread_detach( &t );
12966         if( status ) return errno;
12967 #endif
12968
12969 #ifdef HAVE_LINUX_THREADS
12970         pthread_kill_other_threads_np();
12971 #endif
12972
12973         return 0;
12974
12975 ; return 0; }
12976 EOF
12977 if { (eval echo configure:12978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12978   rm -rf conftest*
12979   ol_cv_pthread_thread=yes
12980 else
12981   echo "configure: failed program was:" >&5
12982   cat conftest.$ac_ext >&5
12983   rm -rf conftest*
12984   ol_cv_pthread_thread=no
12985 fi
12986 rm -f conftest*
12987 else
12988   cat > conftest.$ac_ext <<EOF
12989 #line 12990 "configure"
12990 #include "confdefs.h"
12991 /* pthread test headers */
12992 #include <pthread.h>
12993 #if HAVE_PTHREADS < 7
12994 #include <errno.h>
12995 #endif
12996 #ifndef NULL
12997 #define NULL (void*)0
12998 #endif
12999
13000 static void *task(p)
13001         void *p;
13002 {
13003         return (void *) (p == NULL);
13004 }
13005
13006
13007 int main(argc, argv)
13008         int argc;
13009         char **argv;
13010 {
13011
13012         /* pthread test function */
13013 #ifndef PTHREAD_CREATE_DETACHED
13014 #define PTHREAD_CREATE_DETACHED 1
13015 #endif
13016         pthread_t t;
13017         int status;
13018         int detach = PTHREAD_CREATE_DETACHED;
13019
13020 #if HAVE_PTHREADS > 4
13021         /* Final pthreads */
13022         pthread_attr_t attr;
13023
13024         status = pthread_attr_init(&attr);
13025         if( status ) return status;
13026
13027 #if HAVE_PTHREADS < 7
13028         status = pthread_attr_setdetachstate(&attr, &detach);
13029         if( status < 0 ) status = errno;
13030 #else
13031         status = pthread_attr_setdetachstate(&attr, detach);
13032 #endif
13033         if( status ) return status;
13034         status = pthread_create( &t, &attr, task, NULL );
13035 #if HAVE_PTHREADS < 7
13036         if( status < 0 ) status = errno;
13037 #endif
13038         if( status ) return status;
13039 #else
13040         /* Draft 4 pthreads */
13041         status = pthread_create( &t, pthread_attr_default, task, NULL );
13042         if( status ) return errno;
13043
13044         /* give thread a chance to complete */
13045         /* it should remain joinable and hence detachable */
13046         sleep( 1 );
13047
13048         status = pthread_detach( &t );
13049         if( status ) return errno;
13050 #endif
13051
13052 #ifdef HAVE_LINUX_THREADS
13053         pthread_kill_other_threads_np();
13054 #endif
13055
13056         return 0;
13057
13058 }
13059
13060 EOF
13061 if { (eval echo configure:13062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13062 then
13063   ol_cv_pthread_thread=yes
13064 else
13065   echo "configure: failed program was:" >&5
13066   cat conftest.$ac_ext >&5
13067   rm -fr conftest*
13068   ol_cv_pthread_thread=no
13069 fi
13070 rm -fr conftest*
13071 fi
13072
13073
13074                 # restore the LIBS
13075                 LIBS="$ol_LIBS"
13076         
13077 fi
13078
13079 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
13080
13081         if test $ol_cv_pthread_thread = yes ; then
13082                 ol_link_pthreads="-thread"
13083                 ol_link_threads=posix
13084         fi
13085 fi
13086
13087
13088                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
13089 if test "$ol_link_threads" = no ; then
13090         # try -lpthread -lmach -lexc -lc_r
13091         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
13092 echo "configure:13093: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
13093 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
13094   echo $ac_n "(cached) $ac_c" 1>&6
13095 else
13096   
13097                 # save the flags
13098                 ol_LIBS="$LIBS"
13099                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
13100
13101                 if test "$cross_compiling" = yes; then
13102   cat > conftest.$ac_ext <<EOF
13103 #line 13104 "configure"
13104 #include "confdefs.h"
13105 /* pthread test headers */
13106 #include <pthread.h>
13107 #if HAVE_PTHREADS < 7
13108 #include <errno.h>
13109 #endif
13110 #ifndef NULL
13111 #define NULL (void*)0
13112 #endif
13113
13114 static void *task(p)
13115         void *p;
13116 {
13117         return (void *) (p == NULL);
13118 }
13119
13120 int main() {
13121
13122         /* pthread test function */
13123 #ifndef PTHREAD_CREATE_DETACHED
13124 #define PTHREAD_CREATE_DETACHED 1
13125 #endif
13126         pthread_t t;
13127         int status;
13128         int detach = PTHREAD_CREATE_DETACHED;
13129
13130 #if HAVE_PTHREADS > 4
13131         /* Final pthreads */
13132         pthread_attr_t attr;
13133
13134         status = pthread_attr_init(&attr);
13135         if( status ) return status;
13136
13137 #if HAVE_PTHREADS < 7
13138         status = pthread_attr_setdetachstate(&attr, &detach);
13139         if( status < 0 ) status = errno;
13140 #else
13141         status = pthread_attr_setdetachstate(&attr, detach);
13142 #endif
13143         if( status ) return status;
13144         status = pthread_create( &t, &attr, task, NULL );
13145 #if HAVE_PTHREADS < 7
13146         if( status < 0 ) status = errno;
13147 #endif
13148         if( status ) return status;
13149 #else
13150         /* Draft 4 pthreads */
13151         status = pthread_create( &t, pthread_attr_default, task, NULL );
13152         if( status ) return errno;
13153
13154         /* give thread a chance to complete */
13155         /* it should remain joinable and hence detachable */
13156         sleep( 1 );
13157
13158         status = pthread_detach( &t );
13159         if( status ) return errno;
13160 #endif
13161
13162 #ifdef HAVE_LINUX_THREADS
13163         pthread_kill_other_threads_np();
13164 #endif
13165
13166         return 0;
13167
13168 ; return 0; }
13169 EOF
13170 if { (eval echo configure:13171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13171   rm -rf conftest*
13172   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13173 else
13174   echo "configure: failed program was:" >&5
13175   cat conftest.$ac_ext >&5
13176   rm -rf conftest*
13177   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13178 fi
13179 rm -f conftest*
13180 else
13181   cat > conftest.$ac_ext <<EOF
13182 #line 13183 "configure"
13183 #include "confdefs.h"
13184 /* pthread test headers */
13185 #include <pthread.h>
13186 #if HAVE_PTHREADS < 7
13187 #include <errno.h>
13188 #endif
13189 #ifndef NULL
13190 #define NULL (void*)0
13191 #endif
13192
13193 static void *task(p)
13194         void *p;
13195 {
13196         return (void *) (p == NULL);
13197 }
13198
13199
13200 int main(argc, argv)
13201         int argc;
13202         char **argv;
13203 {
13204
13205         /* pthread test function */
13206 #ifndef PTHREAD_CREATE_DETACHED
13207 #define PTHREAD_CREATE_DETACHED 1
13208 #endif
13209         pthread_t t;
13210         int status;
13211         int detach = PTHREAD_CREATE_DETACHED;
13212
13213 #if HAVE_PTHREADS > 4
13214         /* Final pthreads */
13215         pthread_attr_t attr;
13216
13217         status = pthread_attr_init(&attr);
13218         if( status ) return status;
13219
13220 #if HAVE_PTHREADS < 7
13221         status = pthread_attr_setdetachstate(&attr, &detach);
13222         if( status < 0 ) status = errno;
13223 #else
13224         status = pthread_attr_setdetachstate(&attr, detach);
13225 #endif
13226         if( status ) return status;
13227         status = pthread_create( &t, &attr, task, NULL );
13228 #if HAVE_PTHREADS < 7
13229         if( status < 0 ) status = errno;
13230 #endif
13231         if( status ) return status;
13232 #else
13233         /* Draft 4 pthreads */
13234         status = pthread_create( &t, pthread_attr_default, task, NULL );
13235         if( status ) return errno;
13236
13237         /* give thread a chance to complete */
13238         /* it should remain joinable and hence detachable */
13239         sleep( 1 );
13240
13241         status = pthread_detach( &t );
13242         if( status ) return errno;
13243 #endif
13244
13245 #ifdef HAVE_LINUX_THREADS
13246         pthread_kill_other_threads_np();
13247 #endif
13248
13249         return 0;
13250
13251 }
13252
13253 EOF
13254 if { (eval echo configure:13255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13255 then
13256   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13257 else
13258   echo "configure: failed program was:" >&5
13259   cat conftest.$ac_ext >&5
13260   rm -fr conftest*
13261   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13262 fi
13263 rm -fr conftest*
13264 fi
13265
13266
13267                 # restore the LIBS
13268                 LIBS="$ol_LIBS"
13269         
13270 fi
13271
13272 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13273
13274         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13275                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13276                 ol_link_threads=posix
13277         fi
13278 fi
13279
13280                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13281 if test "$ol_link_threads" = no ; then
13282         # try -lpthread -lmach -lexc
13283         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13284 echo "configure:13285: checking for pthread link with -lpthread -lmach -lexc" >&5
13285 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13286   echo $ac_n "(cached) $ac_c" 1>&6
13287 else
13288   
13289                 # save the flags
13290                 ol_LIBS="$LIBS"
13291                 LIBS="-lpthread -lmach -lexc $LIBS"
13292
13293                 if test "$cross_compiling" = yes; then
13294   cat > conftest.$ac_ext <<EOF
13295 #line 13296 "configure"
13296 #include "confdefs.h"
13297 /* pthread test headers */
13298 #include <pthread.h>
13299 #if HAVE_PTHREADS < 7
13300 #include <errno.h>
13301 #endif
13302 #ifndef NULL
13303 #define NULL (void*)0
13304 #endif
13305
13306 static void *task(p)
13307         void *p;
13308 {
13309         return (void *) (p == NULL);
13310 }
13311
13312 int main() {
13313
13314         /* pthread test function */
13315 #ifndef PTHREAD_CREATE_DETACHED
13316 #define PTHREAD_CREATE_DETACHED 1
13317 #endif
13318         pthread_t t;
13319         int status;
13320         int detach = PTHREAD_CREATE_DETACHED;
13321
13322 #if HAVE_PTHREADS > 4
13323         /* Final pthreads */
13324         pthread_attr_t attr;
13325
13326         status = pthread_attr_init(&attr);
13327         if( status ) return status;
13328
13329 #if HAVE_PTHREADS < 7
13330         status = pthread_attr_setdetachstate(&attr, &detach);
13331         if( status < 0 ) status = errno;
13332 #else
13333         status = pthread_attr_setdetachstate(&attr, detach);
13334 #endif
13335         if( status ) return status;
13336         status = pthread_create( &t, &attr, task, NULL );
13337 #if HAVE_PTHREADS < 7
13338         if( status < 0 ) status = errno;
13339 #endif
13340         if( status ) return status;
13341 #else
13342         /* Draft 4 pthreads */
13343         status = pthread_create( &t, pthread_attr_default, task, NULL );
13344         if( status ) return errno;
13345
13346         /* give thread a chance to complete */
13347         /* it should remain joinable and hence detachable */
13348         sleep( 1 );
13349
13350         status = pthread_detach( &t );
13351         if( status ) return errno;
13352 #endif
13353
13354 #ifdef HAVE_LINUX_THREADS
13355         pthread_kill_other_threads_np();
13356 #endif
13357
13358         return 0;
13359
13360 ; return 0; }
13361 EOF
13362 if { (eval echo configure:13363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13363   rm -rf conftest*
13364   ol_cv_pthread_lpthread_lmach_lexc=yes
13365 else
13366   echo "configure: failed program was:" >&5
13367   cat conftest.$ac_ext >&5
13368   rm -rf conftest*
13369   ol_cv_pthread_lpthread_lmach_lexc=no
13370 fi
13371 rm -f conftest*
13372 else
13373   cat > conftest.$ac_ext <<EOF
13374 #line 13375 "configure"
13375 #include "confdefs.h"
13376 /* pthread test headers */
13377 #include <pthread.h>
13378 #if HAVE_PTHREADS < 7
13379 #include <errno.h>
13380 #endif
13381 #ifndef NULL
13382 #define NULL (void*)0
13383 #endif
13384
13385 static void *task(p)
13386         void *p;
13387 {
13388         return (void *) (p == NULL);
13389 }
13390
13391
13392 int main(argc, argv)
13393         int argc;
13394         char **argv;
13395 {
13396
13397         /* pthread test function */
13398 #ifndef PTHREAD_CREATE_DETACHED
13399 #define PTHREAD_CREATE_DETACHED 1
13400 #endif
13401         pthread_t t;
13402         int status;
13403         int detach = PTHREAD_CREATE_DETACHED;
13404
13405 #if HAVE_PTHREADS > 4
13406         /* Final pthreads */
13407         pthread_attr_t attr;
13408
13409         status = pthread_attr_init(&attr);
13410         if( status ) return status;
13411
13412 #if HAVE_PTHREADS < 7
13413         status = pthread_attr_setdetachstate(&attr, &detach);
13414         if( status < 0 ) status = errno;
13415 #else
13416         status = pthread_attr_setdetachstate(&attr, detach);
13417 #endif
13418         if( status ) return status;
13419         status = pthread_create( &t, &attr, task, NULL );
13420 #if HAVE_PTHREADS < 7
13421         if( status < 0 ) status = errno;
13422 #endif
13423         if( status ) return status;
13424 #else
13425         /* Draft 4 pthreads */
13426         status = pthread_create( &t, pthread_attr_default, task, NULL );
13427         if( status ) return errno;
13428
13429         /* give thread a chance to complete */
13430         /* it should remain joinable and hence detachable */
13431         sleep( 1 );
13432
13433         status = pthread_detach( &t );
13434         if( status ) return errno;
13435 #endif
13436
13437 #ifdef HAVE_LINUX_THREADS
13438         pthread_kill_other_threads_np();
13439 #endif
13440
13441         return 0;
13442
13443 }
13444
13445 EOF
13446 if { (eval echo configure:13447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13447 then
13448   ol_cv_pthread_lpthread_lmach_lexc=yes
13449 else
13450   echo "configure: failed program was:" >&5
13451   cat conftest.$ac_ext >&5
13452   rm -fr conftest*
13453   ol_cv_pthread_lpthread_lmach_lexc=no
13454 fi
13455 rm -fr conftest*
13456 fi
13457
13458
13459                 # restore the LIBS
13460                 LIBS="$ol_LIBS"
13461         
13462 fi
13463
13464 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13465
13466         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13467                 ol_link_pthreads="-lpthread -lmach -lexc"
13468                 ol_link_threads=posix
13469         fi
13470 fi
13471
13472
13473                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13474 if test "$ol_link_threads" = no ; then
13475         # try -lpthread -Wl,-woff,85
13476         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13477 echo "configure:13478: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13478 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13479   echo $ac_n "(cached) $ac_c" 1>&6
13480 else
13481   
13482                 # save the flags
13483                 ol_LIBS="$LIBS"
13484                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13485
13486                 if test "$cross_compiling" = yes; then
13487   cat > conftest.$ac_ext <<EOF
13488 #line 13489 "configure"
13489 #include "confdefs.h"
13490 /* pthread test headers */
13491 #include <pthread.h>
13492 #if HAVE_PTHREADS < 7
13493 #include <errno.h>
13494 #endif
13495 #ifndef NULL
13496 #define NULL (void*)0
13497 #endif
13498
13499 static void *task(p)
13500         void *p;
13501 {
13502         return (void *) (p == NULL);
13503 }
13504
13505 int main() {
13506
13507         /* pthread test function */
13508 #ifndef PTHREAD_CREATE_DETACHED
13509 #define PTHREAD_CREATE_DETACHED 1
13510 #endif
13511         pthread_t t;
13512         int status;
13513         int detach = PTHREAD_CREATE_DETACHED;
13514
13515 #if HAVE_PTHREADS > 4
13516         /* Final pthreads */
13517         pthread_attr_t attr;
13518
13519         status = pthread_attr_init(&attr);
13520         if( status ) return status;
13521
13522 #if HAVE_PTHREADS < 7
13523         status = pthread_attr_setdetachstate(&attr, &detach);
13524         if( status < 0 ) status = errno;
13525 #else
13526         status = pthread_attr_setdetachstate(&attr, detach);
13527 #endif
13528         if( status ) return status;
13529         status = pthread_create( &t, &attr, task, NULL );
13530 #if HAVE_PTHREADS < 7
13531         if( status < 0 ) status = errno;
13532 #endif
13533         if( status ) return status;
13534 #else
13535         /* Draft 4 pthreads */
13536         status = pthread_create( &t, pthread_attr_default, task, NULL );
13537         if( status ) return errno;
13538
13539         /* give thread a chance to complete */
13540         /* it should remain joinable and hence detachable */
13541         sleep( 1 );
13542
13543         status = pthread_detach( &t );
13544         if( status ) return errno;
13545 #endif
13546
13547 #ifdef HAVE_LINUX_THREADS
13548         pthread_kill_other_threads_np();
13549 #endif
13550
13551         return 0;
13552
13553 ; return 0; }
13554 EOF
13555 if { (eval echo configure:13556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13556   rm -rf conftest*
13557   ol_cv_pthread_lib_lpthread_woff=yes
13558 else
13559   echo "configure: failed program was:" >&5
13560   cat conftest.$ac_ext >&5
13561   rm -rf conftest*
13562   ol_cv_pthread_lib_lpthread_woff=no
13563 fi
13564 rm -f conftest*
13565 else
13566   cat > conftest.$ac_ext <<EOF
13567 #line 13568 "configure"
13568 #include "confdefs.h"
13569 /* pthread test headers */
13570 #include <pthread.h>
13571 #if HAVE_PTHREADS < 7
13572 #include <errno.h>
13573 #endif
13574 #ifndef NULL
13575 #define NULL (void*)0
13576 #endif
13577
13578 static void *task(p)
13579         void *p;
13580 {
13581         return (void *) (p == NULL);
13582 }
13583
13584
13585 int main(argc, argv)
13586         int argc;
13587         char **argv;
13588 {
13589
13590         /* pthread test function */
13591 #ifndef PTHREAD_CREATE_DETACHED
13592 #define PTHREAD_CREATE_DETACHED 1
13593 #endif
13594         pthread_t t;
13595         int status;
13596         int detach = PTHREAD_CREATE_DETACHED;
13597
13598 #if HAVE_PTHREADS > 4
13599         /* Final pthreads */
13600         pthread_attr_t attr;
13601
13602         status = pthread_attr_init(&attr);
13603         if( status ) return status;
13604
13605 #if HAVE_PTHREADS < 7
13606         status = pthread_attr_setdetachstate(&attr, &detach);
13607         if( status < 0 ) status = errno;
13608 #else
13609         status = pthread_attr_setdetachstate(&attr, detach);
13610 #endif
13611         if( status ) return status;
13612         status = pthread_create( &t, &attr, task, NULL );
13613 #if HAVE_PTHREADS < 7
13614         if( status < 0 ) status = errno;
13615 #endif
13616         if( status ) return status;
13617 #else
13618         /* Draft 4 pthreads */
13619         status = pthread_create( &t, pthread_attr_default, task, NULL );
13620         if( status ) return errno;
13621
13622         /* give thread a chance to complete */
13623         /* it should remain joinable and hence detachable */
13624         sleep( 1 );
13625
13626         status = pthread_detach( &t );
13627         if( status ) return errno;
13628 #endif
13629
13630 #ifdef HAVE_LINUX_THREADS
13631         pthread_kill_other_threads_np();
13632 #endif
13633
13634         return 0;
13635
13636 }
13637
13638 EOF
13639 if { (eval echo configure:13640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13640 then
13641   ol_cv_pthread_lib_lpthread_woff=yes
13642 else
13643   echo "configure: failed program was:" >&5
13644   cat conftest.$ac_ext >&5
13645   rm -fr conftest*
13646   ol_cv_pthread_lib_lpthread_woff=no
13647 fi
13648 rm -fr conftest*
13649 fi
13650
13651
13652                 # restore the LIBS
13653                 LIBS="$ol_LIBS"
13654         
13655 fi
13656
13657 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13658
13659         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13660                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13661                 ol_link_threads=posix
13662         fi
13663 fi
13664
13665
13666                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13667 if test "$ol_link_threads" = no ; then
13668         # try -lpthread
13669         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13670 echo "configure:13671: checking for pthread link with -lpthread" >&5
13671 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13672   echo $ac_n "(cached) $ac_c" 1>&6
13673 else
13674   
13675                 # save the flags
13676                 ol_LIBS="$LIBS"
13677                 LIBS="-lpthread $LIBS"
13678
13679                 if test "$cross_compiling" = yes; then
13680   cat > conftest.$ac_ext <<EOF
13681 #line 13682 "configure"
13682 #include "confdefs.h"
13683 /* pthread test headers */
13684 #include <pthread.h>
13685 #if HAVE_PTHREADS < 7
13686 #include <errno.h>
13687 #endif
13688 #ifndef NULL
13689 #define NULL (void*)0
13690 #endif
13691
13692 static void *task(p)
13693         void *p;
13694 {
13695         return (void *) (p == NULL);
13696 }
13697
13698 int main() {
13699
13700         /* pthread test function */
13701 #ifndef PTHREAD_CREATE_DETACHED
13702 #define PTHREAD_CREATE_DETACHED 1
13703 #endif
13704         pthread_t t;
13705         int status;
13706         int detach = PTHREAD_CREATE_DETACHED;
13707
13708 #if HAVE_PTHREADS > 4
13709         /* Final pthreads */
13710         pthread_attr_t attr;
13711
13712         status = pthread_attr_init(&attr);
13713         if( status ) return status;
13714
13715 #if HAVE_PTHREADS < 7
13716         status = pthread_attr_setdetachstate(&attr, &detach);
13717         if( status < 0 ) status = errno;
13718 #else
13719         status = pthread_attr_setdetachstate(&attr, detach);
13720 #endif
13721         if( status ) return status;
13722         status = pthread_create( &t, &attr, task, NULL );
13723 #if HAVE_PTHREADS < 7
13724         if( status < 0 ) status = errno;
13725 #endif
13726         if( status ) return status;
13727 #else
13728         /* Draft 4 pthreads */
13729         status = pthread_create( &t, pthread_attr_default, task, NULL );
13730         if( status ) return errno;
13731
13732         /* give thread a chance to complete */
13733         /* it should remain joinable and hence detachable */
13734         sleep( 1 );
13735
13736         status = pthread_detach( &t );
13737         if( status ) return errno;
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_lpthread=yes
13751 else
13752   echo "configure: failed program was:" >&5
13753   cat conftest.$ac_ext >&5
13754   rm -rf conftest*
13755   ol_cv_pthread_lpthread=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 #if HAVE_PTHREADS < 7
13765 #include <errno.h>
13766 #endif
13767 #ifndef NULL
13768 #define NULL (void*)0
13769 #endif
13770
13771 static void *task(p)
13772         void *p;
13773 {
13774         return (void *) (p == NULL);
13775 }
13776
13777
13778 int main(argc, argv)
13779         int argc;
13780         char **argv;
13781 {
13782
13783         /* pthread test function */
13784 #ifndef PTHREAD_CREATE_DETACHED
13785 #define PTHREAD_CREATE_DETACHED 1
13786 #endif
13787         pthread_t t;
13788         int status;
13789         int detach = PTHREAD_CREATE_DETACHED;
13790
13791 #if HAVE_PTHREADS > 4
13792         /* Final pthreads */
13793         pthread_attr_t attr;
13794
13795         status = pthread_attr_init(&attr);
13796         if( status ) return status;
13797
13798 #if HAVE_PTHREADS < 7
13799         status = pthread_attr_setdetachstate(&attr, &detach);
13800         if( status < 0 ) status = errno;
13801 #else
13802         status = pthread_attr_setdetachstate(&attr, detach);
13803 #endif
13804         if( status ) return status;
13805         status = pthread_create( &t, &attr, task, NULL );
13806 #if HAVE_PTHREADS < 7
13807         if( status < 0 ) status = errno;
13808 #endif
13809         if( status ) return status;
13810 #else
13811         /* Draft 4 pthreads */
13812         status = pthread_create( &t, pthread_attr_default, task, NULL );
13813         if( status ) return errno;
13814
13815         /* give thread a chance to complete */
13816         /* it should remain joinable and hence detachable */
13817         sleep( 1 );
13818
13819         status = pthread_detach( &t );
13820         if( status ) return errno;
13821 #endif
13822
13823 #ifdef HAVE_LINUX_THREADS
13824         pthread_kill_other_threads_np();
13825 #endif
13826
13827         return 0;
13828
13829 }
13830
13831 EOF
13832 if { (eval echo configure:13833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13833 then
13834   ol_cv_pthread_lpthread=yes
13835 else
13836   echo "configure: failed program was:" >&5
13837   cat conftest.$ac_ext >&5
13838   rm -fr conftest*
13839   ol_cv_pthread_lpthread=no
13840 fi
13841 rm -fr conftest*
13842 fi
13843
13844
13845                 # restore the LIBS
13846                 LIBS="$ol_LIBS"
13847         
13848 fi
13849
13850 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13851
13852         if test $ol_cv_pthread_lpthread = yes ; then
13853                 ol_link_pthreads="-lpthread"
13854                 ol_link_threads=posix
13855         fi
13856 fi
13857
13858                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13859 if test "$ol_link_threads" = no ; then
13860         # try -lc_r
13861         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13862 echo "configure:13863: checking for pthread link with -lc_r" >&5
13863 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13864   echo $ac_n "(cached) $ac_c" 1>&6
13865 else
13866   
13867                 # save the flags
13868                 ol_LIBS="$LIBS"
13869                 LIBS="-lc_r $LIBS"
13870
13871                 if test "$cross_compiling" = yes; then
13872   cat > conftest.$ac_ext <<EOF
13873 #line 13874 "configure"
13874 #include "confdefs.h"
13875 /* pthread test headers */
13876 #include <pthread.h>
13877 #if HAVE_PTHREADS < 7
13878 #include <errno.h>
13879 #endif
13880 #ifndef NULL
13881 #define NULL (void*)0
13882 #endif
13883
13884 static void *task(p)
13885         void *p;
13886 {
13887         return (void *) (p == NULL);
13888 }
13889
13890 int main() {
13891
13892         /* pthread test function */
13893 #ifndef PTHREAD_CREATE_DETACHED
13894 #define PTHREAD_CREATE_DETACHED 1
13895 #endif
13896         pthread_t t;
13897         int status;
13898         int detach = PTHREAD_CREATE_DETACHED;
13899
13900 #if HAVE_PTHREADS > 4
13901         /* Final pthreads */
13902         pthread_attr_t attr;
13903
13904         status = pthread_attr_init(&attr);
13905         if( status ) return status;
13906
13907 #if HAVE_PTHREADS < 7
13908         status = pthread_attr_setdetachstate(&attr, &detach);
13909         if( status < 0 ) status = errno;
13910 #else
13911         status = pthread_attr_setdetachstate(&attr, detach);
13912 #endif
13913         if( status ) return status;
13914         status = pthread_create( &t, &attr, task, NULL );
13915 #if HAVE_PTHREADS < 7
13916         if( status < 0 ) status = errno;
13917 #endif
13918         if( status ) return status;
13919 #else
13920         /* Draft 4 pthreads */
13921         status = pthread_create( &t, pthread_attr_default, task, NULL );
13922         if( status ) return errno;
13923
13924         /* give thread a chance to complete */
13925         /* it should remain joinable and hence detachable */
13926         sleep( 1 );
13927
13928         status = pthread_detach( &t );
13929         if( status ) return errno;
13930 #endif
13931
13932 #ifdef HAVE_LINUX_THREADS
13933         pthread_kill_other_threads_np();
13934 #endif
13935
13936         return 0;
13937
13938 ; return 0; }
13939 EOF
13940 if { (eval echo configure:13941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13941   rm -rf conftest*
13942   ol_cv_pthread_lc_r=yes
13943 else
13944   echo "configure: failed program was:" >&5
13945   cat conftest.$ac_ext >&5
13946   rm -rf conftest*
13947   ol_cv_pthread_lc_r=no
13948 fi
13949 rm -f conftest*
13950 else
13951   cat > conftest.$ac_ext <<EOF
13952 #line 13953 "configure"
13953 #include "confdefs.h"
13954 /* pthread test headers */
13955 #include <pthread.h>
13956 #if HAVE_PTHREADS < 7
13957 #include <errno.h>
13958 #endif
13959 #ifndef NULL
13960 #define NULL (void*)0
13961 #endif
13962
13963 static void *task(p)
13964         void *p;
13965 {
13966         return (void *) (p == NULL);
13967 }
13968
13969
13970 int main(argc, argv)
13971         int argc;
13972         char **argv;
13973 {
13974
13975         /* pthread test function */
13976 #ifndef PTHREAD_CREATE_DETACHED
13977 #define PTHREAD_CREATE_DETACHED 1
13978 #endif
13979         pthread_t t;
13980         int status;
13981         int detach = PTHREAD_CREATE_DETACHED;
13982
13983 #if HAVE_PTHREADS > 4
13984         /* Final pthreads */
13985         pthread_attr_t attr;
13986
13987         status = pthread_attr_init(&attr);
13988         if( status ) return status;
13989
13990 #if HAVE_PTHREADS < 7
13991         status = pthread_attr_setdetachstate(&attr, &detach);
13992         if( status < 0 ) status = errno;
13993 #else
13994         status = pthread_attr_setdetachstate(&attr, detach);
13995 #endif
13996         if( status ) return status;
13997         status = pthread_create( &t, &attr, task, NULL );
13998 #if HAVE_PTHREADS < 7
13999         if( status < 0 ) status = errno;
14000 #endif
14001         if( status ) return status;
14002 #else
14003         /* Draft 4 pthreads */
14004         status = pthread_create( &t, pthread_attr_default, task, NULL );
14005         if( status ) return errno;
14006
14007         /* give thread a chance to complete */
14008         /* it should remain joinable and hence detachable */
14009         sleep( 1 );
14010
14011         status = pthread_detach( &t );
14012         if( status ) return errno;
14013 #endif
14014
14015 #ifdef HAVE_LINUX_THREADS
14016         pthread_kill_other_threads_np();
14017 #endif
14018
14019         return 0;
14020
14021 }
14022
14023 EOF
14024 if { (eval echo configure:14025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14025 then
14026   ol_cv_pthread_lc_r=yes
14027 else
14028   echo "configure: failed program was:" >&5
14029   cat conftest.$ac_ext >&5
14030   rm -fr conftest*
14031   ol_cv_pthread_lc_r=no
14032 fi
14033 rm -fr conftest*
14034 fi
14035
14036
14037                 # restore the LIBS
14038                 LIBS="$ol_LIBS"
14039         
14040 fi
14041
14042 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
14043
14044         if test $ol_cv_pthread_lc_r = yes ; then
14045                 ol_link_pthreads="-lc_r"
14046                 ol_link_threads=posix
14047         fi
14048 fi
14049
14050
14051                 # Pthread try link: -threads (ol_cv_pthread_threads)
14052 if test "$ol_link_threads" = no ; then
14053         # try -threads
14054         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
14055 echo "configure:14056: checking for pthread link with -threads" >&5
14056 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
14057   echo $ac_n "(cached) $ac_c" 1>&6
14058 else
14059   
14060                 # save the flags
14061                 ol_LIBS="$LIBS"
14062                 LIBS="-threads $LIBS"
14063
14064                 if test "$cross_compiling" = yes; then
14065   cat > conftest.$ac_ext <<EOF
14066 #line 14067 "configure"
14067 #include "confdefs.h"
14068 /* pthread test headers */
14069 #include <pthread.h>
14070 #if HAVE_PTHREADS < 7
14071 #include <errno.h>
14072 #endif
14073 #ifndef NULL
14074 #define NULL (void*)0
14075 #endif
14076
14077 static void *task(p)
14078         void *p;
14079 {
14080         return (void *) (p == NULL);
14081 }
14082
14083 int main() {
14084
14085         /* pthread test function */
14086 #ifndef PTHREAD_CREATE_DETACHED
14087 #define PTHREAD_CREATE_DETACHED 1
14088 #endif
14089         pthread_t t;
14090         int status;
14091         int detach = PTHREAD_CREATE_DETACHED;
14092
14093 #if HAVE_PTHREADS > 4
14094         /* Final pthreads */
14095         pthread_attr_t attr;
14096
14097         status = pthread_attr_init(&attr);
14098         if( status ) return status;
14099
14100 #if HAVE_PTHREADS < 7
14101         status = pthread_attr_setdetachstate(&attr, &detach);
14102         if( status < 0 ) status = errno;
14103 #else
14104         status = pthread_attr_setdetachstate(&attr, detach);
14105 #endif
14106         if( status ) return status;
14107         status = pthread_create( &t, &attr, task, NULL );
14108 #if HAVE_PTHREADS < 7
14109         if( status < 0 ) status = errno;
14110 #endif
14111         if( status ) return status;
14112 #else
14113         /* Draft 4 pthreads */
14114         status = pthread_create( &t, pthread_attr_default, task, NULL );
14115         if( status ) return errno;
14116
14117         /* give thread a chance to complete */
14118         /* it should remain joinable and hence detachable */
14119         sleep( 1 );
14120
14121         status = pthread_detach( &t );
14122         if( status ) return errno;
14123 #endif
14124
14125 #ifdef HAVE_LINUX_THREADS
14126         pthread_kill_other_threads_np();
14127 #endif
14128
14129         return 0;
14130
14131 ; return 0; }
14132 EOF
14133 if { (eval echo configure:14134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14134   rm -rf conftest*
14135   ol_cv_pthread_threads=yes
14136 else
14137   echo "configure: failed program was:" >&5
14138   cat conftest.$ac_ext >&5
14139   rm -rf conftest*
14140   ol_cv_pthread_threads=no
14141 fi
14142 rm -f conftest*
14143 else
14144   cat > conftest.$ac_ext <<EOF
14145 #line 14146 "configure"
14146 #include "confdefs.h"
14147 /* pthread test headers */
14148 #include <pthread.h>
14149 #if HAVE_PTHREADS < 7
14150 #include <errno.h>
14151 #endif
14152 #ifndef NULL
14153 #define NULL (void*)0
14154 #endif
14155
14156 static void *task(p)
14157         void *p;
14158 {
14159         return (void *) (p == NULL);
14160 }
14161
14162
14163 int main(argc, argv)
14164         int argc;
14165         char **argv;
14166 {
14167
14168         /* pthread test function */
14169 #ifndef PTHREAD_CREATE_DETACHED
14170 #define PTHREAD_CREATE_DETACHED 1
14171 #endif
14172         pthread_t t;
14173         int status;
14174         int detach = PTHREAD_CREATE_DETACHED;
14175
14176 #if HAVE_PTHREADS > 4
14177         /* Final pthreads */
14178         pthread_attr_t attr;
14179
14180         status = pthread_attr_init(&attr);
14181         if( status ) return status;
14182
14183 #if HAVE_PTHREADS < 7
14184         status = pthread_attr_setdetachstate(&attr, &detach);
14185         if( status < 0 ) status = errno;
14186 #else
14187         status = pthread_attr_setdetachstate(&attr, detach);
14188 #endif
14189         if( status ) return status;
14190         status = pthread_create( &t, &attr, task, NULL );
14191 #if HAVE_PTHREADS < 7
14192         if( status < 0 ) status = errno;
14193 #endif
14194         if( status ) return status;
14195 #else
14196         /* Draft 4 pthreads */
14197         status = pthread_create( &t, pthread_attr_default, task, NULL );
14198         if( status ) return errno;
14199
14200         /* give thread a chance to complete */
14201         /* it should remain joinable and hence detachable */
14202         sleep( 1 );
14203
14204         status = pthread_detach( &t );
14205         if( status ) return errno;
14206 #endif
14207
14208 #ifdef HAVE_LINUX_THREADS
14209         pthread_kill_other_threads_np();
14210 #endif
14211
14212         return 0;
14213
14214 }
14215
14216 EOF
14217 if { (eval echo configure:14218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14218 then
14219   ol_cv_pthread_threads=yes
14220 else
14221   echo "configure: failed program was:" >&5
14222   cat conftest.$ac_ext >&5
14223   rm -fr conftest*
14224   ol_cv_pthread_threads=no
14225 fi
14226 rm -fr conftest*
14227 fi
14228
14229
14230                 # restore the LIBS
14231                 LIBS="$ol_LIBS"
14232         
14233 fi
14234
14235 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14236
14237         if test $ol_cv_pthread_threads = yes ; then
14238                 ol_link_pthreads="-threads"
14239                 ol_link_threads=posix
14240         fi
14241 fi
14242
14243
14244                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14245 if test "$ol_link_threads" = no ; then
14246         # try -lpthreads -lmach -lexc -lc_r
14247         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14248 echo "configure:14249: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14249 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14250   echo $ac_n "(cached) $ac_c" 1>&6
14251 else
14252   
14253                 # save the flags
14254                 ol_LIBS="$LIBS"
14255                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14256
14257                 if test "$cross_compiling" = yes; then
14258   cat > conftest.$ac_ext <<EOF
14259 #line 14260 "configure"
14260 #include "confdefs.h"
14261 /* pthread test headers */
14262 #include <pthread.h>
14263 #if HAVE_PTHREADS < 7
14264 #include <errno.h>
14265 #endif
14266 #ifndef NULL
14267 #define NULL (void*)0
14268 #endif
14269
14270 static void *task(p)
14271         void *p;
14272 {
14273         return (void *) (p == NULL);
14274 }
14275
14276 int main() {
14277
14278         /* pthread test function */
14279 #ifndef PTHREAD_CREATE_DETACHED
14280 #define PTHREAD_CREATE_DETACHED 1
14281 #endif
14282         pthread_t t;
14283         int status;
14284         int detach = PTHREAD_CREATE_DETACHED;
14285
14286 #if HAVE_PTHREADS > 4
14287         /* Final pthreads */
14288         pthread_attr_t attr;
14289
14290         status = pthread_attr_init(&attr);
14291         if( status ) return status;
14292
14293 #if HAVE_PTHREADS < 7
14294         status = pthread_attr_setdetachstate(&attr, &detach);
14295         if( status < 0 ) status = errno;
14296 #else
14297         status = pthread_attr_setdetachstate(&attr, detach);
14298 #endif
14299         if( status ) return status;
14300         status = pthread_create( &t, &attr, task, NULL );
14301 #if HAVE_PTHREADS < 7
14302         if( status < 0 ) status = errno;
14303 #endif
14304         if( status ) return status;
14305 #else
14306         /* Draft 4 pthreads */
14307         status = pthread_create( &t, pthread_attr_default, task, NULL );
14308         if( status ) return errno;
14309
14310         /* give thread a chance to complete */
14311         /* it should remain joinable and hence detachable */
14312         sleep( 1 );
14313
14314         status = pthread_detach( &t );
14315         if( status ) return errno;
14316 #endif
14317
14318 #ifdef HAVE_LINUX_THREADS
14319         pthread_kill_other_threads_np();
14320 #endif
14321
14322         return 0;
14323
14324 ; return 0; }
14325 EOF
14326 if { (eval echo configure:14327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14327   rm -rf conftest*
14328   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14329 else
14330   echo "configure: failed program was:" >&5
14331   cat conftest.$ac_ext >&5
14332   rm -rf conftest*
14333   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14334 fi
14335 rm -f conftest*
14336 else
14337   cat > conftest.$ac_ext <<EOF
14338 #line 14339 "configure"
14339 #include "confdefs.h"
14340 /* pthread test headers */
14341 #include <pthread.h>
14342 #if HAVE_PTHREADS < 7
14343 #include <errno.h>
14344 #endif
14345 #ifndef NULL
14346 #define NULL (void*)0
14347 #endif
14348
14349 static void *task(p)
14350         void *p;
14351 {
14352         return (void *) (p == NULL);
14353 }
14354
14355
14356 int main(argc, argv)
14357         int argc;
14358         char **argv;
14359 {
14360
14361         /* pthread test function */
14362 #ifndef PTHREAD_CREATE_DETACHED
14363 #define PTHREAD_CREATE_DETACHED 1
14364 #endif
14365         pthread_t t;
14366         int status;
14367         int detach = PTHREAD_CREATE_DETACHED;
14368
14369 #if HAVE_PTHREADS > 4
14370         /* Final pthreads */
14371         pthread_attr_t attr;
14372
14373         status = pthread_attr_init(&attr);
14374         if( status ) return status;
14375
14376 #if HAVE_PTHREADS < 7
14377         status = pthread_attr_setdetachstate(&attr, &detach);
14378         if( status < 0 ) status = errno;
14379 #else
14380         status = pthread_attr_setdetachstate(&attr, detach);
14381 #endif
14382         if( status ) return status;
14383         status = pthread_create( &t, &attr, task, NULL );
14384 #if HAVE_PTHREADS < 7
14385         if( status < 0 ) status = errno;
14386 #endif
14387         if( status ) return status;
14388 #else
14389         /* Draft 4 pthreads */
14390         status = pthread_create( &t, pthread_attr_default, task, NULL );
14391         if( status ) return errno;
14392
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 errno;
14399 #endif
14400
14401 #ifdef HAVE_LINUX_THREADS
14402         pthread_kill_other_threads_np();
14403 #endif
14404
14405         return 0;
14406
14407 }
14408
14409 EOF
14410 if { (eval echo configure:14411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14411 then
14412   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14413 else
14414   echo "configure: failed program was:" >&5
14415   cat conftest.$ac_ext >&5
14416   rm -fr conftest*
14417   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14418 fi
14419 rm -fr conftest*
14420 fi
14421
14422
14423                 # restore the LIBS
14424                 LIBS="$ol_LIBS"
14425         
14426 fi
14427
14428 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14429
14430         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14431                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14432                 ol_link_threads=posix
14433         fi
14434 fi
14435
14436                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14437 if test "$ol_link_threads" = no ; then
14438         # try -lpthreads -lmach -lexc
14439         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14440 echo "configure:14441: checking for pthread link with -lpthreads -lmach -lexc" >&5
14441 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14442   echo $ac_n "(cached) $ac_c" 1>&6
14443 else
14444   
14445                 # save the flags
14446                 ol_LIBS="$LIBS"
14447                 LIBS="-lpthreads -lmach -lexc $LIBS"
14448
14449                 if test "$cross_compiling" = yes; then
14450   cat > conftest.$ac_ext <<EOF
14451 #line 14452 "configure"
14452 #include "confdefs.h"
14453 /* pthread test headers */
14454 #include <pthread.h>
14455 #if HAVE_PTHREADS < 7
14456 #include <errno.h>
14457 #endif
14458 #ifndef NULL
14459 #define NULL (void*)0
14460 #endif
14461
14462 static void *task(p)
14463         void *p;
14464 {
14465         return (void *) (p == NULL);
14466 }
14467
14468 int main() {
14469
14470         /* pthread test function */
14471 #ifndef PTHREAD_CREATE_DETACHED
14472 #define PTHREAD_CREATE_DETACHED 1
14473 #endif
14474         pthread_t t;
14475         int status;
14476         int detach = PTHREAD_CREATE_DETACHED;
14477
14478 #if HAVE_PTHREADS > 4
14479         /* Final pthreads */
14480         pthread_attr_t attr;
14481
14482         status = pthread_attr_init(&attr);
14483         if( status ) return status;
14484
14485 #if HAVE_PTHREADS < 7
14486         status = pthread_attr_setdetachstate(&attr, &detach);
14487         if( status < 0 ) status = errno;
14488 #else
14489         status = pthread_attr_setdetachstate(&attr, detach);
14490 #endif
14491         if( status ) return status;
14492         status = pthread_create( &t, &attr, task, NULL );
14493 #if HAVE_PTHREADS < 7
14494         if( status < 0 ) status = errno;
14495 #endif
14496         if( status ) return status;
14497 #else
14498         /* Draft 4 pthreads */
14499         status = pthread_create( &t, pthread_attr_default, task, NULL );
14500         if( status ) return errno;
14501
14502         /* give thread a chance to complete */
14503         /* it should remain joinable and hence detachable */
14504         sleep( 1 );
14505
14506         status = pthread_detach( &t );
14507         if( status ) return errno;
14508 #endif
14509
14510 #ifdef HAVE_LINUX_THREADS
14511         pthread_kill_other_threads_np();
14512 #endif
14513
14514         return 0;
14515
14516 ; return 0; }
14517 EOF
14518 if { (eval echo configure:14519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14519   rm -rf conftest*
14520   ol_cv_pthread_lpthreads_lmach_lexc=yes
14521 else
14522   echo "configure: failed program was:" >&5
14523   cat conftest.$ac_ext >&5
14524   rm -rf conftest*
14525   ol_cv_pthread_lpthreads_lmach_lexc=no
14526 fi
14527 rm -f conftest*
14528 else
14529   cat > conftest.$ac_ext <<EOF
14530 #line 14531 "configure"
14531 #include "confdefs.h"
14532 /* pthread test headers */
14533 #include <pthread.h>
14534 #if HAVE_PTHREADS < 7
14535 #include <errno.h>
14536 #endif
14537 #ifndef NULL
14538 #define NULL (void*)0
14539 #endif
14540
14541 static void *task(p)
14542         void *p;
14543 {
14544         return (void *) (p == NULL);
14545 }
14546
14547
14548 int main(argc, argv)
14549         int argc;
14550         char **argv;
14551 {
14552
14553         /* pthread test function */
14554 #ifndef PTHREAD_CREATE_DETACHED
14555 #define PTHREAD_CREATE_DETACHED 1
14556 #endif
14557         pthread_t t;
14558         int status;
14559         int detach = PTHREAD_CREATE_DETACHED;
14560
14561 #if HAVE_PTHREADS > 4
14562         /* Final pthreads */
14563         pthread_attr_t attr;
14564
14565         status = pthread_attr_init(&attr);
14566         if( status ) return status;
14567
14568 #if HAVE_PTHREADS < 7
14569         status = pthread_attr_setdetachstate(&attr, &detach);
14570         if( status < 0 ) status = errno;
14571 #else
14572         status = pthread_attr_setdetachstate(&attr, detach);
14573 #endif
14574         if( status ) return status;
14575         status = pthread_create( &t, &attr, task, NULL );
14576 #if HAVE_PTHREADS < 7
14577         if( status < 0 ) status = errno;
14578 #endif
14579         if( status ) return status;
14580 #else
14581         /* Draft 4 pthreads */
14582         status = pthread_create( &t, pthread_attr_default, task, NULL );
14583         if( status ) return errno;
14584
14585         /* give thread a chance to complete */
14586         /* it should remain joinable and hence detachable */
14587         sleep( 1 );
14588
14589         status = pthread_detach( &t );
14590         if( status ) return errno;
14591 #endif
14592
14593 #ifdef HAVE_LINUX_THREADS
14594         pthread_kill_other_threads_np();
14595 #endif
14596
14597         return 0;
14598
14599 }
14600
14601 EOF
14602 if { (eval echo configure:14603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14603 then
14604   ol_cv_pthread_lpthreads_lmach_lexc=yes
14605 else
14606   echo "configure: failed program was:" >&5
14607   cat conftest.$ac_ext >&5
14608   rm -fr conftest*
14609   ol_cv_pthread_lpthreads_lmach_lexc=no
14610 fi
14611 rm -fr conftest*
14612 fi
14613
14614
14615                 # restore the LIBS
14616                 LIBS="$ol_LIBS"
14617         
14618 fi
14619
14620 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14621
14622         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14623                 ol_link_pthreads="-lpthreads -lmach -lexc"
14624                 ol_link_threads=posix
14625         fi
14626 fi
14627
14628                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14629 if test "$ol_link_threads" = no ; then
14630         # try -lpthreads -lexc
14631         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14632 echo "configure:14633: checking for pthread link with -lpthreads -lexc" >&5
14633 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14634   echo $ac_n "(cached) $ac_c" 1>&6
14635 else
14636   
14637                 # save the flags
14638                 ol_LIBS="$LIBS"
14639                 LIBS="-lpthreads -lexc $LIBS"
14640
14641                 if test "$cross_compiling" = yes; then
14642   cat > conftest.$ac_ext <<EOF
14643 #line 14644 "configure"
14644 #include "confdefs.h"
14645 /* pthread test headers */
14646 #include <pthread.h>
14647 #if HAVE_PTHREADS < 7
14648 #include <errno.h>
14649 #endif
14650 #ifndef NULL
14651 #define NULL (void*)0
14652 #endif
14653
14654 static void *task(p)
14655         void *p;
14656 {
14657         return (void *) (p == NULL);
14658 }
14659
14660 int main() {
14661
14662         /* pthread test function */
14663 #ifndef PTHREAD_CREATE_DETACHED
14664 #define PTHREAD_CREATE_DETACHED 1
14665 #endif
14666         pthread_t t;
14667         int status;
14668         int detach = PTHREAD_CREATE_DETACHED;
14669
14670 #if HAVE_PTHREADS > 4
14671         /* Final pthreads */
14672         pthread_attr_t attr;
14673
14674         status = pthread_attr_init(&attr);
14675         if( status ) return status;
14676
14677 #if HAVE_PTHREADS < 7
14678         status = pthread_attr_setdetachstate(&attr, &detach);
14679         if( status < 0 ) status = errno;
14680 #else
14681         status = pthread_attr_setdetachstate(&attr, detach);
14682 #endif
14683         if( status ) return status;
14684         status = pthread_create( &t, &attr, task, NULL );
14685 #if HAVE_PTHREADS < 7
14686         if( status < 0 ) status = errno;
14687 #endif
14688         if( status ) return status;
14689 #else
14690         /* Draft 4 pthreads */
14691         status = pthread_create( &t, pthread_attr_default, task, NULL );
14692         if( status ) return errno;
14693
14694         /* give thread a chance to complete */
14695         /* it should remain joinable and hence detachable */
14696         sleep( 1 );
14697
14698         status = pthread_detach( &t );
14699         if( status ) return errno;
14700 #endif
14701
14702 #ifdef HAVE_LINUX_THREADS
14703         pthread_kill_other_threads_np();
14704 #endif
14705
14706         return 0;
14707
14708 ; return 0; }
14709 EOF
14710 if { (eval echo configure:14711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14711   rm -rf conftest*
14712   ol_cv_pthread_lpthreads_lexc=yes
14713 else
14714   echo "configure: failed program was:" >&5
14715   cat conftest.$ac_ext >&5
14716   rm -rf conftest*
14717   ol_cv_pthread_lpthreads_lexc=no
14718 fi
14719 rm -f conftest*
14720 else
14721   cat > conftest.$ac_ext <<EOF
14722 #line 14723 "configure"
14723 #include "confdefs.h"
14724 /* pthread test headers */
14725 #include <pthread.h>
14726 #if HAVE_PTHREADS < 7
14727 #include <errno.h>
14728 #endif
14729 #ifndef NULL
14730 #define NULL (void*)0
14731 #endif
14732
14733 static void *task(p)
14734         void *p;
14735 {
14736         return (void *) (p == NULL);
14737 }
14738
14739
14740 int main(argc, argv)
14741         int argc;
14742         char **argv;
14743 {
14744
14745         /* pthread test function */
14746 #ifndef PTHREAD_CREATE_DETACHED
14747 #define PTHREAD_CREATE_DETACHED 1
14748 #endif
14749         pthread_t t;
14750         int status;
14751         int detach = PTHREAD_CREATE_DETACHED;
14752
14753 #if HAVE_PTHREADS > 4
14754         /* Final pthreads */
14755         pthread_attr_t attr;
14756
14757         status = pthread_attr_init(&attr);
14758         if( status ) return status;
14759
14760 #if HAVE_PTHREADS < 7
14761         status = pthread_attr_setdetachstate(&attr, &detach);
14762         if( status < 0 ) status = errno;
14763 #else
14764         status = pthread_attr_setdetachstate(&attr, detach);
14765 #endif
14766         if( status ) return status;
14767         status = pthread_create( &t, &attr, task, NULL );
14768 #if HAVE_PTHREADS < 7
14769         if( status < 0 ) status = errno;
14770 #endif
14771         if( status ) return status;
14772 #else
14773         /* Draft 4 pthreads */
14774         status = pthread_create( &t, pthread_attr_default, task, NULL );
14775         if( status ) return errno;
14776
14777         /* give thread a chance to complete */
14778         /* it should remain joinable and hence detachable */
14779         sleep( 1 );
14780
14781         status = pthread_detach( &t );
14782         if( status ) return errno;
14783 #endif
14784
14785 #ifdef HAVE_LINUX_THREADS
14786         pthread_kill_other_threads_np();
14787 #endif
14788
14789         return 0;
14790
14791 }
14792
14793 EOF
14794 if { (eval echo configure:14795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14795 then
14796   ol_cv_pthread_lpthreads_lexc=yes
14797 else
14798   echo "configure: failed program was:" >&5
14799   cat conftest.$ac_ext >&5
14800   rm -fr conftest*
14801   ol_cv_pthread_lpthreads_lexc=no
14802 fi
14803 rm -fr conftest*
14804 fi
14805
14806
14807                 # restore the LIBS
14808                 LIBS="$ol_LIBS"
14809         
14810 fi
14811
14812 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14813
14814         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14815                 ol_link_pthreads="-lpthreads -lexc"
14816                 ol_link_threads=posix
14817         fi
14818 fi
14819
14820
14821                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14822 if test "$ol_link_threads" = no ; then
14823         # try -lpthreads
14824         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14825 echo "configure:14826: checking for pthread link with -lpthreads" >&5
14826 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14827   echo $ac_n "(cached) $ac_c" 1>&6
14828 else
14829   
14830                 # save the flags
14831                 ol_LIBS="$LIBS"
14832                 LIBS="-lpthreads $LIBS"
14833
14834                 if test "$cross_compiling" = yes; then
14835   cat > conftest.$ac_ext <<EOF
14836 #line 14837 "configure"
14837 #include "confdefs.h"
14838 /* pthread test headers */
14839 #include <pthread.h>
14840 #if HAVE_PTHREADS < 7
14841 #include <errno.h>
14842 #endif
14843 #ifndef NULL
14844 #define NULL (void*)0
14845 #endif
14846
14847 static void *task(p)
14848         void *p;
14849 {
14850         return (void *) (p == NULL);
14851 }
14852
14853 int main() {
14854
14855         /* pthread test function */
14856 #ifndef PTHREAD_CREATE_DETACHED
14857 #define PTHREAD_CREATE_DETACHED 1
14858 #endif
14859         pthread_t t;
14860         int status;
14861         int detach = PTHREAD_CREATE_DETACHED;
14862
14863 #if HAVE_PTHREADS > 4
14864         /* Final pthreads */
14865         pthread_attr_t attr;
14866
14867         status = pthread_attr_init(&attr);
14868         if( status ) return status;
14869
14870 #if HAVE_PTHREADS < 7
14871         status = pthread_attr_setdetachstate(&attr, &detach);
14872         if( status < 0 ) status = errno;
14873 #else
14874         status = pthread_attr_setdetachstate(&attr, detach);
14875 #endif
14876         if( status ) return status;
14877         status = pthread_create( &t, &attr, task, NULL );
14878 #if HAVE_PTHREADS < 7
14879         if( status < 0 ) status = errno;
14880 #endif
14881         if( status ) return status;
14882 #else
14883         /* Draft 4 pthreads */
14884         status = pthread_create( &t, pthread_attr_default, task, NULL );
14885         if( status ) return errno;
14886
14887         /* give thread a chance to complete */
14888         /* it should remain joinable and hence detachable */
14889         sleep( 1 );
14890
14891         status = pthread_detach( &t );
14892         if( status ) return errno;
14893 #endif
14894
14895 #ifdef HAVE_LINUX_THREADS
14896         pthread_kill_other_threads_np();
14897 #endif
14898
14899         return 0;
14900
14901 ; return 0; }
14902 EOF
14903 if { (eval echo configure:14904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14904   rm -rf conftest*
14905   ol_cv_pthread_lib_lpthreads=yes
14906 else
14907   echo "configure: failed program was:" >&5
14908   cat conftest.$ac_ext >&5
14909   rm -rf conftest*
14910   ol_cv_pthread_lib_lpthreads=no
14911 fi
14912 rm -f conftest*
14913 else
14914   cat > conftest.$ac_ext <<EOF
14915 #line 14916 "configure"
14916 #include "confdefs.h"
14917 /* pthread test headers */
14918 #include <pthread.h>
14919 #if HAVE_PTHREADS < 7
14920 #include <errno.h>
14921 #endif
14922 #ifndef NULL
14923 #define NULL (void*)0
14924 #endif
14925
14926 static void *task(p)
14927         void *p;
14928 {
14929         return (void *) (p == NULL);
14930 }
14931
14932
14933 int main(argc, argv)
14934         int argc;
14935         char **argv;
14936 {
14937
14938         /* pthread test function */
14939 #ifndef PTHREAD_CREATE_DETACHED
14940 #define PTHREAD_CREATE_DETACHED 1
14941 #endif
14942         pthread_t t;
14943         int status;
14944         int detach = PTHREAD_CREATE_DETACHED;
14945
14946 #if HAVE_PTHREADS > 4
14947         /* Final pthreads */
14948         pthread_attr_t attr;
14949
14950         status = pthread_attr_init(&attr);
14951         if( status ) return status;
14952
14953 #if HAVE_PTHREADS < 7
14954         status = pthread_attr_setdetachstate(&attr, &detach);
14955         if( status < 0 ) status = errno;
14956 #else
14957         status = pthread_attr_setdetachstate(&attr, detach);
14958 #endif
14959         if( status ) return status;
14960         status = pthread_create( &t, &attr, task, NULL );
14961 #if HAVE_PTHREADS < 7
14962         if( status < 0 ) status = errno;
14963 #endif
14964         if( status ) return status;
14965 #else
14966         /* Draft 4 pthreads */
14967         status = pthread_create( &t, pthread_attr_default, task, NULL );
14968         if( status ) return errno;
14969
14970         /* give thread a chance to complete */
14971         /* it should remain joinable and hence detachable */
14972         sleep( 1 );
14973
14974         status = pthread_detach( &t );
14975         if( status ) return errno;
14976 #endif
14977
14978 #ifdef HAVE_LINUX_THREADS
14979         pthread_kill_other_threads_np();
14980 #endif
14981
14982         return 0;
14983
14984 }
14985
14986 EOF
14987 if { (eval echo configure:14988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14988 then
14989   ol_cv_pthread_lib_lpthreads=yes
14990 else
14991   echo "configure: failed program was:" >&5
14992   cat conftest.$ac_ext >&5
14993   rm -fr conftest*
14994   ol_cv_pthread_lib_lpthreads=no
14995 fi
14996 rm -fr conftest*
14997 fi
14998
14999
15000                 # restore the LIBS
15001                 LIBS="$ol_LIBS"
15002         
15003 fi
15004
15005 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
15006
15007         if test $ol_cv_pthread_lib_lpthreads = yes ; then
15008                 ol_link_pthreads="-lpthreads"
15009                 ol_link_threads=posix
15010         fi
15011 fi
15012
15013
15014                 if test $ol_link_threads != no ; then
15015                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
15016
15017                                                 save_CPPFLAGS="$CPPFLAGS"
15018                         save_LIBS="$LIBS"
15019                         LIBS="$LTHREAD_LIBS $LIBS"
15020
15021                                                                                                 for ac_func in sched_yield pthread_yield
15022 do
15023 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15024 echo "configure:15025: checking for $ac_func" >&5
15025 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15026   echo $ac_n "(cached) $ac_c" 1>&6
15027 else
15028   cat > conftest.$ac_ext <<EOF
15029 #line 15030 "configure"
15030 #include "confdefs.h"
15031 /* System header to define __stub macros and hopefully few prototypes,
15032     which can conflict with char $ac_func(); below.  */
15033 #include <assert.h>
15034 /* Override any gcc2 internal prototype to avoid an error.  */
15035 /* We use char because int might match the return type of a gcc2
15036     builtin and then its argument prototype would still apply.  */
15037 char $ac_func();
15038 char (*f)();
15039
15040 int main() {
15041
15042 /* The GNU C library defines this for functions which it implements
15043     to always fail with ENOSYS.  Some functions are actually named
15044     something starting with __ and the normal name is an alias.  */
15045 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15046 choke me
15047 #else
15048 f = $ac_func;
15049 #endif
15050
15051 ; return 0; }
15052 EOF
15053 if { (eval echo configure:15054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15054   rm -rf conftest*
15055   eval "ac_cv_func_$ac_func=yes"
15056 else
15057   echo "configure: failed program was:" >&5
15058   cat conftest.$ac_ext >&5
15059   rm -rf conftest*
15060   eval "ac_cv_func_$ac_func=no"
15061 fi
15062 rm -f conftest*
15063 fi
15064
15065 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15066   echo "$ac_t""yes" 1>&6
15067     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15068   cat >> confdefs.h <<EOF
15069 #define $ac_tr_func 1
15070 EOF
15071  
15072 else
15073   echo "$ac_t""no" 1>&6
15074 fi
15075 done
15076
15077
15078                         if test $ac_cv_func_sched_yield = no -a \
15079                                 $ac_cv_func_pthread_yield = no ; then
15080                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
15081 echo "configure:15082: checking for sched_yield in -lrt" >&5
15082 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
15083 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15084   echo $ac_n "(cached) $ac_c" 1>&6
15085 else
15086   ac_save_LIBS="$LIBS"
15087 LIBS="-lrt  $LIBS"
15088 cat > conftest.$ac_ext <<EOF
15089 #line 15090 "configure"
15090 #include "confdefs.h"
15091 /* Override any gcc2 internal prototype to avoid an error.  */
15092 /* We use char because int might match the return type of a gcc2
15093     builtin and then its argument prototype would still apply.  */
15094 char sched_yield();
15095
15096 int main() {
15097 sched_yield()
15098 ; return 0; }
15099 EOF
15100 if { (eval echo configure:15101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15101   rm -rf conftest*
15102   eval "ac_cv_lib_$ac_lib_var=yes"
15103 else
15104   echo "configure: failed program was:" >&5
15105   cat conftest.$ac_ext >&5
15106   rm -rf conftest*
15107   eval "ac_cv_lib_$ac_lib_var=no"
15108 fi
15109 rm -f conftest*
15110 LIBS="$ac_save_LIBS"
15111
15112 fi
15113 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15114   echo "$ac_t""yes" 1>&6
15115   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
15116                                         cat >> confdefs.h <<\EOF
15117 #define HAVE_SCHED_YIELD 1
15118 EOF
15119
15120                                         ac_cv_func_sched_yield=yes
15121 else
15122   echo "$ac_t""no" 1>&6
15123 ac_cv_func_sched_yield=no
15124 fi
15125
15126                         fi
15127                         if test $ac_cv_func_sched_yield = no -a \
15128                                 $ac_cv_func_pthread_yield = no ; then
15129                                                                                                 for ac_func in thr_yield
15130 do
15131 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15132 echo "configure:15133: checking for $ac_func" >&5
15133 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15134   echo $ac_n "(cached) $ac_c" 1>&6
15135 else
15136   cat > conftest.$ac_ext <<EOF
15137 #line 15138 "configure"
15138 #include "confdefs.h"
15139 /* System header to define __stub macros and hopefully few prototypes,
15140     which can conflict with char $ac_func(); below.  */
15141 #include <assert.h>
15142 /* Override any gcc2 internal prototype to avoid an error.  */
15143 /* We use char because int might match the return type of a gcc2
15144     builtin and then its argument prototype would still apply.  */
15145 char $ac_func();
15146 char (*f)();
15147
15148 int main() {
15149
15150 /* The GNU C library defines this for functions which it implements
15151     to always fail with ENOSYS.  Some functions are actually named
15152     something starting with __ and the normal name is an alias.  */
15153 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15154 choke me
15155 #else
15156 f = $ac_func;
15157 #endif
15158
15159 ; return 0; }
15160 EOF
15161 if { (eval echo configure:15162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15162   rm -rf conftest*
15163   eval "ac_cv_func_$ac_func=yes"
15164 else
15165   echo "configure: failed program was:" >&5
15166   cat conftest.$ac_ext >&5
15167   rm -rf conftest*
15168   eval "ac_cv_func_$ac_func=no"
15169 fi
15170 rm -f conftest*
15171 fi
15172
15173 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15174   echo "$ac_t""yes" 1>&6
15175     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15176   cat >> confdefs.h <<EOF
15177 #define $ac_tr_func 1
15178 EOF
15179  
15180 else
15181   echo "$ac_t""no" 1>&6
15182 fi
15183 done
15184
15185                         fi
15186                         if test $ac_cv_func_sched_yield = no -a \
15187                                 $ac_cv_func_pthread_yield = no -a \
15188                                 "$ac_cv_func_thr_yield" = no ; then
15189                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
15190                         fi
15191
15192                                                 for ac_func in pthread_kill pthread_rwlock_destroy
15193 do
15194 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15195 echo "configure:15196: checking for $ac_func" >&5
15196 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15197   echo $ac_n "(cached) $ac_c" 1>&6
15198 else
15199   cat > conftest.$ac_ext <<EOF
15200 #line 15201 "configure"
15201 #include "confdefs.h"
15202 /* System header to define __stub macros and hopefully few prototypes,
15203     which can conflict with char $ac_func(); below.  */
15204 #include <assert.h>
15205 /* Override any gcc2 internal prototype to avoid an error.  */
15206 /* We use char because int might match the return type of a gcc2
15207     builtin and then its argument prototype would still apply.  */
15208 char $ac_func();
15209 char (*f)();
15210
15211 int main() {
15212
15213 /* The GNU C library defines this for functions which it implements
15214     to always fail with ENOSYS.  Some functions are actually named
15215     something starting with __ and the normal name is an alias.  */
15216 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15217 choke me
15218 #else
15219 f = $ac_func;
15220 #endif
15221
15222 ; return 0; }
15223 EOF
15224 if { (eval echo configure:15225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15225   rm -rf conftest*
15226   eval "ac_cv_func_$ac_func=yes"
15227 else
15228   echo "configure: failed program was:" >&5
15229   cat conftest.$ac_ext >&5
15230   rm -rf conftest*
15231   eval "ac_cv_func_$ac_func=no"
15232 fi
15233 rm -f conftest*
15234 fi
15235
15236 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15237   echo "$ac_t""yes" 1>&6
15238     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15239   cat >> confdefs.h <<EOF
15240 #define $ac_tr_func 1
15241 EOF
15242  
15243 else
15244   echo "$ac_t""no" 1>&6
15245 fi
15246 done
15247
15248
15249                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
15250 echo "configure:15251: checking for pthread_detach with <pthread.h>" >&5
15251 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
15252   echo $ac_n "(cached) $ac_c" 1>&6
15253 else
15254   
15255                                                                 cat > conftest.$ac_ext <<EOF
15256 #line 15257 "configure"
15257 #include "confdefs.h"
15258
15259 #include <pthread.h>
15260 #ifndef NULL
15261 #define NULL (void*)0
15262 #endif
15263
15264 int main() {
15265 pthread_detach(NULL);
15266 ; return 0; }
15267 EOF
15268 if { (eval echo configure:15269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15269   rm -rf conftest*
15270   ol_cv_func_pthread_detach=yes
15271 else
15272   echo "configure: failed program was:" >&5
15273   cat conftest.$ac_ext >&5
15274   rm -rf conftest*
15275   ol_cv_func_pthread_detach=no
15276 fi
15277 rm -f conftest*
15278                         
15279 fi
15280
15281 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15282
15283                         if test $ol_cv_func_pthread_detach = no ; then
15284                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15285                         fi
15286
15287                         cat >> confdefs.h <<\EOF
15288 #define HAVE_PTHREAD_DETACH 1
15289 EOF
15290
15291
15292                                                 for ac_func in \
15293                                 pthread_setconcurrency \
15294                                 pthread_getconcurrency \
15295                                 thr_setconcurrency \
15296                                 thr_getconcurrency \
15297                         
15298 do
15299 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15300 echo "configure:15301: checking for $ac_func" >&5
15301 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15302   echo $ac_n "(cached) $ac_c" 1>&6
15303 else
15304   cat > conftest.$ac_ext <<EOF
15305 #line 15306 "configure"
15306 #include "confdefs.h"
15307 /* System header to define __stub macros and hopefully few prototypes,
15308     which can conflict with char $ac_func(); below.  */
15309 #include <assert.h>
15310 /* Override any gcc2 internal prototype to avoid an error.  */
15311 /* We use char because int might match the return type of a gcc2
15312     builtin and then its argument prototype would still apply.  */
15313 char $ac_func();
15314 char (*f)();
15315
15316 int main() {
15317
15318 /* The GNU C library defines this for functions which it implements
15319     to always fail with ENOSYS.  Some functions are actually named
15320     something starting with __ and the normal name is an alias.  */
15321 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15322 choke me
15323 #else
15324 f = $ac_func;
15325 #endif
15326
15327 ; return 0; }
15328 EOF
15329 if { (eval echo configure:15330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15330   rm -rf conftest*
15331   eval "ac_cv_func_$ac_func=yes"
15332 else
15333   echo "configure: failed program was:" >&5
15334   cat conftest.$ac_ext >&5
15335   rm -rf conftest*
15336   eval "ac_cv_func_$ac_func=no"
15337 fi
15338 rm -f conftest*
15339 fi
15340
15341 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15342   echo "$ac_t""yes" 1>&6
15343     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15344   cat >> confdefs.h <<EOF
15345 #define $ac_tr_func 1
15346 EOF
15347  
15348 else
15349   echo "$ac_t""no" 1>&6
15350 fi
15351 done
15352
15353
15354                         
15355         for ac_func in pthread_kill_other_threads_np
15356 do
15357 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15358 echo "configure:15359: checking for $ac_func" >&5
15359 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15360   echo $ac_n "(cached) $ac_c" 1>&6
15361 else
15362   cat > conftest.$ac_ext <<EOF
15363 #line 15364 "configure"
15364 #include "confdefs.h"
15365 /* System header to define __stub macros and hopefully few prototypes,
15366     which can conflict with char $ac_func(); below.  */
15367 #include <assert.h>
15368 /* Override any gcc2 internal prototype to avoid an error.  */
15369 /* We use char because int might match the return type of a gcc2
15370     builtin and then its argument prototype would still apply.  */
15371 char $ac_func();
15372 char (*f)();
15373
15374 int main() {
15375
15376 /* The GNU C library defines this for functions which it implements
15377     to always fail with ENOSYS.  Some functions are actually named
15378     something starting with __ and the normal name is an alias.  */
15379 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15380 choke me
15381 #else
15382 f = $ac_func;
15383 #endif
15384
15385 ; return 0; }
15386 EOF
15387 if { (eval echo configure:15388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15388   rm -rf conftest*
15389   eval "ac_cv_func_$ac_func=yes"
15390 else
15391   echo "configure: failed program was:" >&5
15392   cat conftest.$ac_ext >&5
15393   rm -rf conftest*
15394   eval "ac_cv_func_$ac_func=no"
15395 fi
15396 rm -f conftest*
15397 fi
15398
15399 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15400   echo "$ac_t""yes" 1>&6
15401     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15402   cat >> confdefs.h <<EOF
15403 #define $ac_tr_func 1
15404 EOF
15405  
15406 else
15407   echo "$ac_t""no" 1>&6
15408 fi
15409 done
15410
15411         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15412 echo "configure:15413: checking for LinuxThreads implementation" >&5
15413 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15414   echo $ac_n "(cached) $ac_c" 1>&6
15415 else
15416   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15417 fi
15418
15419 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15420
15421                         
15422         
15423         
15424         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15425 echo "configure:15426: checking for LinuxThreads consistency" >&5
15426 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15427   echo $ac_n "(cached) $ac_c" 1>&6
15428 else
15429   
15430                 if test $ol_cv_header_linux_threads = yes -a \
15431                         $ol_cv_sys_linux_threads = yes; then
15432                         ol_cv_linux_threads=yes
15433                 elif test $ol_cv_header_linux_threads = no -a \
15434                         $ol_cv_sys_linux_threads = no; then
15435                         ol_cv_linux_threads=no
15436                 else
15437                         ol_cv_linux_threads=error
15438                 fi
15439         
15440 fi
15441
15442 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15443
15444
15445                         if test $ol_cv_linux_threads = error; then
15446                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15447                         fi
15448
15449                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15450 echo "configure:15451: checking if pthread_create() works" >&5
15451 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15452   echo $ac_n "(cached) $ac_c" 1>&6
15453 else
15454   
15455                         if test "$cross_compiling" = yes; then
15456                                 ol_cv_pthread_create_works=yes
15457 else
15458   cat > conftest.$ac_ext <<EOF
15459 #line 15460 "configure"
15460 #include "confdefs.h"
15461 /* pthread test headers */
15462 #include <pthread.h>
15463 #if HAVE_PTHREADS < 7
15464 #include <errno.h>
15465 #endif
15466 #ifndef NULL
15467 #define NULL (void*)0
15468 #endif
15469
15470 static void *task(p)
15471         void *p;
15472 {
15473         return (void *) (p == NULL);
15474 }
15475
15476
15477 int main(argc, argv)
15478         int argc;
15479         char **argv;
15480 {
15481
15482         /* pthread test function */
15483 #ifndef PTHREAD_CREATE_DETACHED
15484 #define PTHREAD_CREATE_DETACHED 1
15485 #endif
15486         pthread_t t;
15487         int status;
15488         int detach = PTHREAD_CREATE_DETACHED;
15489
15490 #if HAVE_PTHREADS > 4
15491         /* Final pthreads */
15492         pthread_attr_t attr;
15493
15494         status = pthread_attr_init(&attr);
15495         if( status ) return status;
15496
15497 #if HAVE_PTHREADS < 7
15498         status = pthread_attr_setdetachstate(&attr, &detach);
15499         if( status < 0 ) status = errno;
15500 #else
15501         status = pthread_attr_setdetachstate(&attr, detach);
15502 #endif
15503         if( status ) return status;
15504         status = pthread_create( &t, &attr, task, NULL );
15505 #if HAVE_PTHREADS < 7
15506         if( status < 0 ) status = errno;
15507 #endif
15508         if( status ) return status;
15509 #else
15510         /* Draft 4 pthreads */
15511         status = pthread_create( &t, pthread_attr_default, task, NULL );
15512         if( status ) return errno;
15513
15514         /* give thread a chance to complete */
15515         /* it should remain joinable and hence detachable */
15516         sleep( 1 );
15517
15518         status = pthread_detach( &t );
15519         if( status ) return errno;
15520 #endif
15521
15522 #ifdef HAVE_LINUX_THREADS
15523         pthread_kill_other_threads_np();
15524 #endif
15525
15526         return 0;
15527
15528 }
15529
15530 EOF
15531 if { (eval echo configure:15532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15532 then
15533   ol_cv_pthread_create_works=yes
15534 else
15535   echo "configure: failed program was:" >&5
15536   cat conftest.$ac_ext >&5
15537   rm -fr conftest*
15538   ol_cv_pthread_create_works=no
15539 fi
15540 rm -fr conftest*
15541 fi
15542
15543 fi
15544
15545 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15546
15547                         if test $ol_cv_pthread_create_works = no ; then
15548                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15549                         fi
15550
15551                                                 if test $ol_with_yielding_select = auto ; then
15552                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15553 echo "configure:15554: checking if select yields when using pthreads" >&5
15554 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15555   echo $ac_n "(cached) $ac_c" 1>&6
15556 else
15557   
15558                                 if test "$cross_compiling" = yes; then
15559   ol_cv_pthread_select_yields=cross
15560 else
15561   cat > conftest.$ac_ext <<EOF
15562 #line 15563 "configure"
15563 #include "confdefs.h"
15564
15565 #include <sys/types.h>
15566 #include <sys/time.h>
15567 #include <unistd.h>
15568 #include <pthread.h>
15569 #ifndef NULL
15570 #define NULL (void*) 0
15571 #endif
15572
15573 static int fildes[2];
15574
15575 static void *task(p)
15576         void *p;
15577 {
15578         int i;
15579         struct timeval tv;
15580
15581         fd_set rfds;
15582
15583         tv.tv_sec=10;
15584         tv.tv_usec=0;
15585
15586         FD_ZERO(&rfds);
15587         FD_SET(fildes[0], &rfds);
15588
15589         /* we're not interested in any fds */
15590         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15591
15592         if(i < 0) {
15593                 perror("select");
15594                 exit(10);
15595         }
15596
15597         exit(0); /* if we exit here, the select blocked the whole process */
15598 }
15599
15600 int main(argc, argv)
15601         int argc;
15602         char **argv;
15603 {
15604         pthread_t t;
15605
15606         /* create a pipe to select */
15607         if(pipe(&fildes[0])) {
15608                 perror("select");
15609                 exit(1);
15610         }
15611
15612 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15613         (void) pthread_setconcurrency(2);
15614 #else
15615 #ifdef HAVE_THR_SETCONCURRENCY
15616         /* Set Solaris LWP concurrency to 2 */
15617         thr_setconcurrency(2);
15618 #endif
15619 #endif
15620
15621 #if HAVE_PTHREADS < 6
15622         pthread_create(&t, pthread_attr_default, task, NULL);
15623 #else
15624         pthread_create(&t, NULL, task, NULL);
15625 #endif
15626
15627 #if HAVE_SCHED_YIELD
15628         sched_yield();  /* make sure task runs first */
15629 #else
15630 #ifdef HAVE_PTHREAD_YIELD
15631         pthread_yield();        /* make sure task runs first */
15632 #endif
15633 #endif
15634
15635         exit(2);
15636 }
15637 EOF
15638 if { (eval echo configure:15639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15639 then
15640   ol_cv_pthread_select_yields=no
15641 else
15642   echo "configure: failed program was:" >&5
15643   cat conftest.$ac_ext >&5
15644   rm -fr conftest*
15645   ol_cv_pthread_select_yields=yes
15646 fi
15647 rm -fr conftest*
15648 fi
15649
15650 fi
15651
15652 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15653
15654                                 if test $ol_cv_pthread_select_yields = cross ; then
15655                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15656                                 fi
15657
15658                                 if test $ol_cv_pthread_select_yields = yes ; then
15659                                         ol_with_yielding_select=yes
15660                                 fi
15661                         fi
15662
15663                                                 CPPFLAGS="$save_CPPFLAGS"
15664                         LIBS="$save_LIBS"
15665                 else
15666                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15667                 fi
15668         fi
15669
15670         if test $ol_with_threads = posix ; then
15671                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15672         fi
15673 fi
15674
15675 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15676         -o $ol_with_threads = mach ; then
15677
15678                 for ac_hdr in mach/cthreads.h cthreads.h
15679 do
15680 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15681 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15682 echo "configure:15683: checking for $ac_hdr" >&5
15683 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15684   echo $ac_n "(cached) $ac_c" 1>&6
15685 else
15686   cat > conftest.$ac_ext <<EOF
15687 #line 15688 "configure"
15688 #include "confdefs.h"
15689 #include <$ac_hdr>
15690 EOF
15691 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15692 { (eval echo configure:15693: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15693 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15694 if test -z "$ac_err"; then
15695   rm -rf conftest*
15696   eval "ac_cv_header_$ac_safe=yes"
15697 else
15698   echo "$ac_err" >&5
15699   echo "configure: failed program was:" >&5
15700   cat conftest.$ac_ext >&5
15701   rm -rf conftest*
15702   eval "ac_cv_header_$ac_safe=no"
15703 fi
15704 rm -f conftest*
15705 fi
15706 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15707   echo "$ac_t""yes" 1>&6
15708     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15709   cat >> confdefs.h <<EOF
15710 #define $ac_tr_hdr 1
15711 EOF
15712  
15713 else
15714   echo "$ac_t""no" 1>&6
15715 fi
15716 done
15717
15718         if test $ac_cv_header_mach_cthreads_h = yes ; then
15719                 ol_with_threads=found
15720
15721                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15722 echo "configure:15723: checking for cthread_fork" >&5
15723 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15724   echo $ac_n "(cached) $ac_c" 1>&6
15725 else
15726   cat > conftest.$ac_ext <<EOF
15727 #line 15728 "configure"
15728 #include "confdefs.h"
15729 /* System header to define __stub macros and hopefully few prototypes,
15730     which can conflict with char cthread_fork(); below.  */
15731 #include <assert.h>
15732 /* Override any gcc2 internal prototype to avoid an error.  */
15733 /* We use char because int might match the return type of a gcc2
15734     builtin and then its argument prototype would still apply.  */
15735 char cthread_fork();
15736 char (*f)();
15737
15738 int main() {
15739
15740 /* The GNU C library defines this for functions which it implements
15741     to always fail with ENOSYS.  Some functions are actually named
15742     something starting with __ and the normal name is an alias.  */
15743 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15744 choke me
15745 #else
15746 f = cthread_fork;
15747 #endif
15748
15749 ; return 0; }
15750 EOF
15751 if { (eval echo configure:15752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15752   rm -rf conftest*
15753   eval "ac_cv_func_cthread_fork=yes"
15754 else
15755   echo "configure: failed program was:" >&5
15756   cat conftest.$ac_ext >&5
15757   rm -rf conftest*
15758   eval "ac_cv_func_cthread_fork=no"
15759 fi
15760 rm -f conftest*
15761 fi
15762
15763 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15764   echo "$ac_t""yes" 1>&6
15765   ol_link_threads=yes
15766 else
15767   echo "$ac_t""no" 1>&6
15768 fi
15769
15770
15771                 if test $ol_link_threads = no ; then
15772                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15773 echo "configure:15774: checking for cthread_fork with -all_load" >&5
15774 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15775   echo $ac_n "(cached) $ac_c" 1>&6
15776 else
15777   
15778                                                                 save_LIBS="$LIBS"
15779                                 LIBS="-all_load $LIBS"
15780                                 cat > conftest.$ac_ext <<EOF
15781 #line 15782 "configure"
15782 #include "confdefs.h"
15783 #include <mach/cthreads.h>
15784 int main() {
15785
15786                                         cthread_fork((void *)0, (void *)0);
15787                                         
15788 ; return 0; }
15789 EOF
15790 if { (eval echo configure:15791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15791   rm -rf conftest*
15792   ol_cv_cthread_all_load=yes
15793 else
15794   echo "configure: failed program was:" >&5
15795   cat conftest.$ac_ext >&5
15796   rm -rf conftest*
15797   ol_cv_cthread_all_load=no
15798 fi
15799 rm -f conftest*
15800                                                                 LIBS="$save_LIBS"
15801                         
15802 fi
15803
15804 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15805
15806                         if test $ol_cv_cthread_all_load = yes ; then
15807                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15808                                 ol_link_threads=mach
15809                                 ol_with_threads=found
15810                         fi
15811                 fi
15812
15813         elif test $ac_cv_header_cthreads_h = yes ; then
15814                                 
15815                 ol_with_threads=found
15816  
15817                                 save_LIBS="$LIBS"
15818                 LIBS="$LIBS -lthreads"
15819                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15820 echo "configure:15821: checking for cthread_fork" >&5
15821 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15822   echo $ac_n "(cached) $ac_c" 1>&6
15823 else
15824   cat > conftest.$ac_ext <<EOF
15825 #line 15826 "configure"
15826 #include "confdefs.h"
15827 /* System header to define __stub macros and hopefully few prototypes,
15828     which can conflict with char cthread_fork(); below.  */
15829 #include <assert.h>
15830 /* Override any gcc2 internal prototype to avoid an error.  */
15831 /* We use char because int might match the return type of a gcc2
15832     builtin and then its argument prototype would still apply.  */
15833 char cthread_fork();
15834 char (*f)();
15835
15836 int main() {
15837
15838 /* The GNU C library defines this for functions which it implements
15839     to always fail with ENOSYS.  Some functions are actually named
15840     something starting with __ and the normal name is an alias.  */
15841 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15842 choke me
15843 #else
15844 f = cthread_fork;
15845 #endif
15846
15847 ; return 0; }
15848 EOF
15849 if { (eval echo configure:15850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15850   rm -rf conftest*
15851   eval "ac_cv_func_cthread_fork=yes"
15852 else
15853   echo "configure: failed program was:" >&5
15854   cat conftest.$ac_ext >&5
15855   rm -rf conftest*
15856   eval "ac_cv_func_cthread_fork=no"
15857 fi
15858 rm -f conftest*
15859 fi
15860
15861 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15862   echo "$ac_t""yes" 1>&6
15863   ol_link_threads=yes
15864 else
15865   echo "$ac_t""no" 1>&6
15866 fi
15867
15868                 LIBS="$save_LIBS"
15869
15870                 if test $ol_link_threads = yes ; then
15871                         LTHREAD_LIBS="-lthreads"
15872                         ol_link_threads=mach
15873                         ol_with_threads=found
15874                 else
15875                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15876                 fi
15877
15878         elif test $ol_with_threads = mach ; then
15879                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15880         fi
15881
15882         if test $ol_link_threads = mach ; then
15883                 cat >> confdefs.h <<\EOF
15884 #define HAVE_MACH_CTHREADS 1
15885 EOF
15886
15887         elif test $ol_with_threads = found ; then
15888                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15889         fi
15890 fi
15891
15892 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15893         -o $ol_with_threads = pth ; then
15894
15895         for ac_hdr in pth.h
15896 do
15897 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15898 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15899 echo "configure:15900: checking for $ac_hdr" >&5
15900 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15901   echo $ac_n "(cached) $ac_c" 1>&6
15902 else
15903   cat > conftest.$ac_ext <<EOF
15904 #line 15905 "configure"
15905 #include "confdefs.h"
15906 #include <$ac_hdr>
15907 EOF
15908 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15909 { (eval echo configure:15910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15910 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15911 if test -z "$ac_err"; then
15912   rm -rf conftest*
15913   eval "ac_cv_header_$ac_safe=yes"
15914 else
15915   echo "$ac_err" >&5
15916   echo "configure: failed program was:" >&5
15917   cat conftest.$ac_ext >&5
15918   rm -rf conftest*
15919   eval "ac_cv_header_$ac_safe=no"
15920 fi
15921 rm -f conftest*
15922 fi
15923 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15924   echo "$ac_t""yes" 1>&6
15925     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15926   cat >> confdefs.h <<EOF
15927 #define $ac_tr_hdr 1
15928 EOF
15929  
15930 else
15931   echo "$ac_t""no" 1>&6
15932 fi
15933 done
15934
15935
15936         if test $ac_cv_header_pth_h = yes ; then
15937                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15938 echo "configure:15939: checking for pth_version in -lpth" >&5
15939 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15940 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15941   echo $ac_n "(cached) $ac_c" 1>&6
15942 else
15943   ac_save_LIBS="$LIBS"
15944 LIBS="-lpth  $LIBS"
15945 cat > conftest.$ac_ext <<EOF
15946 #line 15947 "configure"
15947 #include "confdefs.h"
15948 /* Override any gcc2 internal prototype to avoid an error.  */
15949 /* We use char because int might match the return type of a gcc2
15950     builtin and then its argument prototype would still apply.  */
15951 char pth_version();
15952
15953 int main() {
15954 pth_version()
15955 ; return 0; }
15956 EOF
15957 if { (eval echo configure:15958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15958   rm -rf conftest*
15959   eval "ac_cv_lib_$ac_lib_var=yes"
15960 else
15961   echo "configure: failed program was:" >&5
15962   cat conftest.$ac_ext >&5
15963   rm -rf conftest*
15964   eval "ac_cv_lib_$ac_lib_var=no"
15965 fi
15966 rm -f conftest*
15967 LIBS="$ac_save_LIBS"
15968
15969 fi
15970 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15971   echo "$ac_t""yes" 1>&6
15972   have_pth=yes
15973 else
15974   echo "$ac_t""no" 1>&6
15975 have_pth=no
15976 fi
15977
15978
15979                 if test $have_pth = yes ; then
15980                         cat >> confdefs.h <<\EOF
15981 #define HAVE_GNU_PTH 1
15982 EOF
15983
15984                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15985                         ol_link_threads=pth
15986                         ol_with_threads=found
15987
15988                         if test $ol_with_yielding_select = auto ; then
15989                                 ol_with_yielding_select=yes
15990                         fi
15991                 fi
15992         fi
15993 fi
15994
15995 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15996         -o $ol_with_threads = lwp ; then
15997
15998                 for ac_hdr in thread.h synch.h
15999 do
16000 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16001 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16002 echo "configure:16003: checking for $ac_hdr" >&5
16003 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16004   echo $ac_n "(cached) $ac_c" 1>&6
16005 else
16006   cat > conftest.$ac_ext <<EOF
16007 #line 16008 "configure"
16008 #include "confdefs.h"
16009 #include <$ac_hdr>
16010 EOF
16011 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16012 { (eval echo configure:16013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16013 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16014 if test -z "$ac_err"; then
16015   rm -rf conftest*
16016   eval "ac_cv_header_$ac_safe=yes"
16017 else
16018   echo "$ac_err" >&5
16019   echo "configure: failed program was:" >&5
16020   cat conftest.$ac_ext >&5
16021   rm -rf conftest*
16022   eval "ac_cv_header_$ac_safe=no"
16023 fi
16024 rm -f conftest*
16025 fi
16026 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16027   echo "$ac_t""yes" 1>&6
16028     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16029   cat >> confdefs.h <<EOF
16030 #define $ac_tr_hdr 1
16031 EOF
16032  
16033 else
16034   echo "$ac_t""no" 1>&6
16035 fi
16036 done
16037
16038         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
16039                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
16040 echo "configure:16041: checking for thr_create in -lthread" >&5
16041 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
16042 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16043   echo $ac_n "(cached) $ac_c" 1>&6
16044 else
16045   ac_save_LIBS="$LIBS"
16046 LIBS="-lthread  $LIBS"
16047 cat > conftest.$ac_ext <<EOF
16048 #line 16049 "configure"
16049 #include "confdefs.h"
16050 /* Override any gcc2 internal prototype to avoid an error.  */
16051 /* We use char because int might match the return type of a gcc2
16052     builtin and then its argument prototype would still apply.  */
16053 char thr_create();
16054
16055 int main() {
16056 thr_create()
16057 ; return 0; }
16058 EOF
16059 if { (eval echo configure:16060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16060   rm -rf conftest*
16061   eval "ac_cv_lib_$ac_lib_var=yes"
16062 else
16063   echo "configure: failed program was:" >&5
16064   cat conftest.$ac_ext >&5
16065   rm -rf conftest*
16066   eval "ac_cv_lib_$ac_lib_var=no"
16067 fi
16068 rm -f conftest*
16069 LIBS="$ac_save_LIBS"
16070
16071 fi
16072 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16073   echo "$ac_t""yes" 1>&6
16074   have_thr=yes
16075 else
16076   echo "$ac_t""no" 1>&6
16077 have_thr=no
16078 fi
16079
16080
16081                 if test $have_thr = yes ; then
16082                         cat >> confdefs.h <<\EOF
16083 #define HAVE_THR 1
16084 EOF
16085
16086                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
16087                         ol_link_threads=thr
16088
16089                         if test $ol_with_yielding_select = auto ; then
16090                                 ol_with_yielding_select=yes
16091                         fi
16092
16093                                                 for ac_func in \
16094                                 thr_setconcurrency \
16095                                 thr_getconcurrency \
16096                         
16097 do
16098 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16099 echo "configure:16100: checking for $ac_func" >&5
16100 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16101   echo $ac_n "(cached) $ac_c" 1>&6
16102 else
16103   cat > conftest.$ac_ext <<EOF
16104 #line 16105 "configure"
16105 #include "confdefs.h"
16106 /* System header to define __stub macros and hopefully few prototypes,
16107     which can conflict with char $ac_func(); below.  */
16108 #include <assert.h>
16109 /* Override any gcc2 internal prototype to avoid an error.  */
16110 /* We use char because int might match the return type of a gcc2
16111     builtin and then its argument prototype would still apply.  */
16112 char $ac_func();
16113 char (*f)();
16114
16115 int main() {
16116
16117 /* The GNU C library defines this for functions which it implements
16118     to always fail with ENOSYS.  Some functions are actually named
16119     something starting with __ and the normal name is an alias.  */
16120 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16121 choke me
16122 #else
16123 f = $ac_func;
16124 #endif
16125
16126 ; return 0; }
16127 EOF
16128 if { (eval echo configure:16129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16129   rm -rf conftest*
16130   eval "ac_cv_func_$ac_func=yes"
16131 else
16132   echo "configure: failed program was:" >&5
16133   cat conftest.$ac_ext >&5
16134   rm -rf conftest*
16135   eval "ac_cv_func_$ac_func=no"
16136 fi
16137 rm -f conftest*
16138 fi
16139
16140 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16141   echo "$ac_t""yes" 1>&6
16142     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16143   cat >> confdefs.h <<EOF
16144 #define $ac_tr_func 1
16145 EOF
16146  
16147 else
16148   echo "$ac_t""no" 1>&6
16149 fi
16150 done
16151
16152                 fi
16153         fi
16154
16155                 for ac_hdr in lwp/lwp.h
16156 do
16157 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16158 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16159 echo "configure:16160: checking for $ac_hdr" >&5
16160 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16161   echo $ac_n "(cached) $ac_c" 1>&6
16162 else
16163   cat > conftest.$ac_ext <<EOF
16164 #line 16165 "configure"
16165 #include "confdefs.h"
16166 #include <$ac_hdr>
16167 EOF
16168 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16169 { (eval echo configure:16170: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16170 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16171 if test -z "$ac_err"; then
16172   rm -rf conftest*
16173   eval "ac_cv_header_$ac_safe=yes"
16174 else
16175   echo "$ac_err" >&5
16176   echo "configure: failed program was:" >&5
16177   cat conftest.$ac_ext >&5
16178   rm -rf conftest*
16179   eval "ac_cv_header_$ac_safe=no"
16180 fi
16181 rm -f conftest*
16182 fi
16183 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16184   echo "$ac_t""yes" 1>&6
16185     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16186   cat >> confdefs.h <<EOF
16187 #define $ac_tr_hdr 1
16188 EOF
16189  
16190 else
16191   echo "$ac_t""no" 1>&6
16192 fi
16193 done
16194
16195         if test $ac_cv_header_lwp_lwp_h = yes ; then
16196                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
16197 echo "configure:16198: checking for lwp_create in -llwp" >&5
16198 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
16199 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16200   echo $ac_n "(cached) $ac_c" 1>&6
16201 else
16202   ac_save_LIBS="$LIBS"
16203 LIBS="-llwp  $LIBS"
16204 cat > conftest.$ac_ext <<EOF
16205 #line 16206 "configure"
16206 #include "confdefs.h"
16207 /* Override any gcc2 internal prototype to avoid an error.  */
16208 /* We use char because int might match the return type of a gcc2
16209     builtin and then its argument prototype would still apply.  */
16210 char lwp_create();
16211
16212 int main() {
16213 lwp_create()
16214 ; return 0; }
16215 EOF
16216 if { (eval echo configure:16217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16217   rm -rf conftest*
16218   eval "ac_cv_lib_$ac_lib_var=yes"
16219 else
16220   echo "configure: failed program was:" >&5
16221   cat conftest.$ac_ext >&5
16222   rm -rf conftest*
16223   eval "ac_cv_lib_$ac_lib_var=no"
16224 fi
16225 rm -f conftest*
16226 LIBS="$ac_save_LIBS"
16227
16228 fi
16229 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16230   echo "$ac_t""yes" 1>&6
16231   have_lwp=yes
16232 else
16233   echo "$ac_t""no" 1>&6
16234 have_lwp=no
16235 fi
16236
16237
16238                 if test $have_lwp = yes ; then
16239                         cat >> confdefs.h <<\EOF
16240 #define HAVE_LWP 1
16241 EOF
16242
16243                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
16244                         ol_link_threads=lwp
16245
16246                         if test $ol_with_yielding_select = auto ; then
16247                                 ol_with_yielding_select=no
16248                         fi
16249                 fi
16250         fi
16251 fi
16252
16253 if test $ol_with_yielding_select = yes ; then
16254         cat >> confdefs.h <<\EOF
16255 #define HAVE_YIELDING_SELECT 1
16256 EOF
16257
16258 fi
16259
16260 if test $ol_with_threads = manual ; then
16261                 ol_link_threads=yes
16262
16263         echo "configure: warning: thread defines and link options must be set manually" 1>&2
16264
16265         for ac_hdr in pthread.h sched.h
16266 do
16267 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16268 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16269 echo "configure:16270: checking for $ac_hdr" >&5
16270 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16271   echo $ac_n "(cached) $ac_c" 1>&6
16272 else
16273   cat > conftest.$ac_ext <<EOF
16274 #line 16275 "configure"
16275 #include "confdefs.h"
16276 #include <$ac_hdr>
16277 EOF
16278 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16279 { (eval echo configure:16280: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16280 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16281 if test -z "$ac_err"; then
16282   rm -rf conftest*
16283   eval "ac_cv_header_$ac_safe=yes"
16284 else
16285   echo "$ac_err" >&5
16286   echo "configure: failed program was:" >&5
16287   cat conftest.$ac_ext >&5
16288   rm -rf conftest*
16289   eval "ac_cv_header_$ac_safe=no"
16290 fi
16291 rm -f conftest*
16292 fi
16293 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16294   echo "$ac_t""yes" 1>&6
16295     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16296   cat >> confdefs.h <<EOF
16297 #define $ac_tr_hdr 1
16298 EOF
16299  
16300 else
16301   echo "$ac_t""no" 1>&6
16302 fi
16303 done
16304
16305         for ac_func in sched_yield pthread_yield
16306 do
16307 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16308 echo "configure:16309: checking for $ac_func" >&5
16309 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16310   echo $ac_n "(cached) $ac_c" 1>&6
16311 else
16312   cat > conftest.$ac_ext <<EOF
16313 #line 16314 "configure"
16314 #include "confdefs.h"
16315 /* System header to define __stub macros and hopefully few prototypes,
16316     which can conflict with char $ac_func(); below.  */
16317 #include <assert.h>
16318 /* Override any gcc2 internal prototype to avoid an error.  */
16319 /* We use char because int might match the return type of a gcc2
16320     builtin and then its argument prototype would still apply.  */
16321 char $ac_func();
16322 char (*f)();
16323
16324 int main() {
16325
16326 /* The GNU C library defines this for functions which it implements
16327     to always fail with ENOSYS.  Some functions are actually named
16328     something starting with __ and the normal name is an alias.  */
16329 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16330 choke me
16331 #else
16332 f = $ac_func;
16333 #endif
16334
16335 ; return 0; }
16336 EOF
16337 if { (eval echo configure:16338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16338   rm -rf conftest*
16339   eval "ac_cv_func_$ac_func=yes"
16340 else
16341   echo "configure: failed program was:" >&5
16342   cat conftest.$ac_ext >&5
16343   rm -rf conftest*
16344   eval "ac_cv_func_$ac_func=no"
16345 fi
16346 rm -f conftest*
16347 fi
16348
16349 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16350   echo "$ac_t""yes" 1>&6
16351     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16352   cat >> confdefs.h <<EOF
16353 #define $ac_tr_func 1
16354 EOF
16355  
16356 else
16357   echo "$ac_t""no" 1>&6
16358 fi
16359 done
16360
16361         
16362         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16363 echo "configure:16364: checking for LinuxThreads pthread.h" >&5
16364 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16365   echo $ac_n "(cached) $ac_c" 1>&6
16366 else
16367   cat > conftest.$ac_ext <<EOF
16368 #line 16369 "configure"
16369 #include "confdefs.h"
16370 #include <pthread.h>
16371 EOF
16372 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16373   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16374   rm -rf conftest*
16375   ol_cv_header_linux_threads=yes
16376 else
16377   rm -rf conftest*
16378   ol_cv_header_linux_threads=no
16379 fi
16380 rm -f conftest*
16381
16382                 
16383 fi
16384
16385 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16386         if test $ol_cv_header_linux_threads = yes; then
16387                 cat >> confdefs.h <<\EOF
16388 #define HAVE_LINUX_THREADS 1
16389 EOF
16390
16391         fi
16392
16393
16394         for ac_hdr in mach/cthreads.h
16395 do
16396 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16397 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16398 echo "configure:16399: checking for $ac_hdr" >&5
16399 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16400   echo $ac_n "(cached) $ac_c" 1>&6
16401 else
16402   cat > conftest.$ac_ext <<EOF
16403 #line 16404 "configure"
16404 #include "confdefs.h"
16405 #include <$ac_hdr>
16406 EOF
16407 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16408 { (eval echo configure:16409: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16409 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16410 if test -z "$ac_err"; then
16411   rm -rf conftest*
16412   eval "ac_cv_header_$ac_safe=yes"
16413 else
16414   echo "$ac_err" >&5
16415   echo "configure: failed program was:" >&5
16416   cat conftest.$ac_ext >&5
16417   rm -rf conftest*
16418   eval "ac_cv_header_$ac_safe=no"
16419 fi
16420 rm -f conftest*
16421 fi
16422 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16423   echo "$ac_t""yes" 1>&6
16424     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16425   cat >> confdefs.h <<EOF
16426 #define $ac_tr_hdr 1
16427 EOF
16428  
16429 else
16430   echo "$ac_t""no" 1>&6
16431 fi
16432 done
16433
16434         for ac_hdr in lwp/lwp.h
16435 do
16436 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16437 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16438 echo "configure:16439: checking for $ac_hdr" >&5
16439 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16440   echo $ac_n "(cached) $ac_c" 1>&6
16441 else
16442   cat > conftest.$ac_ext <<EOF
16443 #line 16444 "configure"
16444 #include "confdefs.h"
16445 #include <$ac_hdr>
16446 EOF
16447 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16448 { (eval echo configure:16449: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16449 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16450 if test -z "$ac_err"; then
16451   rm -rf conftest*
16452   eval "ac_cv_header_$ac_safe=yes"
16453 else
16454   echo "$ac_err" >&5
16455   echo "configure: failed program was:" >&5
16456   cat conftest.$ac_ext >&5
16457   rm -rf conftest*
16458   eval "ac_cv_header_$ac_safe=no"
16459 fi
16460 rm -f conftest*
16461 fi
16462 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16463   echo "$ac_t""yes" 1>&6
16464     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16465   cat >> confdefs.h <<EOF
16466 #define $ac_tr_hdr 1
16467 EOF
16468  
16469 else
16470   echo "$ac_t""no" 1>&6
16471 fi
16472 done
16473
16474         for ac_hdr in thread.h synch.h
16475 do
16476 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16477 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16478 echo "configure:16479: checking for $ac_hdr" >&5
16479 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16480   echo $ac_n "(cached) $ac_c" 1>&6
16481 else
16482   cat > conftest.$ac_ext <<EOF
16483 #line 16484 "configure"
16484 #include "confdefs.h"
16485 #include <$ac_hdr>
16486 EOF
16487 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16488 { (eval echo configure:16489: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16489 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16490 if test -z "$ac_err"; then
16491   rm -rf conftest*
16492   eval "ac_cv_header_$ac_safe=yes"
16493 else
16494   echo "$ac_err" >&5
16495   echo "configure: failed program was:" >&5
16496   cat conftest.$ac_ext >&5
16497   rm -rf conftest*
16498   eval "ac_cv_header_$ac_safe=no"
16499 fi
16500 rm -f conftest*
16501 fi
16502 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16503   echo "$ac_t""yes" 1>&6
16504     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16505   cat >> confdefs.h <<EOF
16506 #define $ac_tr_hdr 1
16507 EOF
16508  
16509 else
16510   echo "$ac_t""no" 1>&6
16511 fi
16512 done
16513
16514 fi
16515
16516 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16517                         cat >> confdefs.h <<\EOF
16518 #define REENTRANT 1
16519 EOF
16520
16521         cat >> confdefs.h <<\EOF
16522 #define _REENTRANT 1
16523 EOF
16524
16525         cat >> confdefs.h <<\EOF
16526 #define THREAD_SAFE 1
16527 EOF
16528
16529         cat >> confdefs.h <<\EOF
16530 #define _THREAD_SAFE 1
16531 EOF
16532
16533         cat >> confdefs.h <<\EOF
16534 #define THREADSAFE 1
16535 EOF
16536
16537         cat >> confdefs.h <<\EOF
16538 #define _THREADSAFE 1
16539 EOF
16540
16541         cat >> confdefs.h <<\EOF
16542 #define _SGI_MP_SOURCE 1
16543 EOF
16544
16545
16546                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16547 echo "configure:16548: checking for thread specific errno" >&5
16548 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16549   echo $ac_n "(cached) $ac_c" 1>&6
16550 else
16551   
16552                 cat > conftest.$ac_ext <<EOF
16553 #line 16554 "configure"
16554 #include "confdefs.h"
16555 #include <errno.h>
16556 int main() {
16557 errno = 0;
16558 ; return 0; }
16559 EOF
16560 if { (eval echo configure:16561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16561   rm -rf conftest*
16562   ol_cv_errno_thread_specific=yes
16563 else
16564   echo "configure: failed program was:" >&5
16565   cat conftest.$ac_ext >&5
16566   rm -rf conftest*
16567   ol_cv_errno_thread_specific=no
16568 fi
16569 rm -f conftest*
16570         
16571 fi
16572
16573 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16574
16575                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16576 echo "configure:16577: checking for thread specific h_errno" >&5
16577 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16578   echo $ac_n "(cached) $ac_c" 1>&6
16579 else
16580   
16581                 cat > conftest.$ac_ext <<EOF
16582 #line 16583 "configure"
16583 #include "confdefs.h"
16584 #include <netdb.h>
16585 int main() {
16586 h_errno = 0;
16587 ; return 0; }
16588 EOF
16589 if { (eval echo configure:16590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16590   rm -rf conftest*
16591   ol_cv_h_errno_thread_specific=yes
16592 else
16593   echo "configure: failed program was:" >&5
16594   cat conftest.$ac_ext >&5
16595   rm -rf conftest*
16596   ol_cv_h_errno_thread_specific=no
16597 fi
16598 rm -f conftest*
16599         
16600 fi
16601
16602 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16603
16604         if test $ol_cv_errno_thread_specific != yes \
16605                 -o $ol_cv_h_errno_thread_specific != yes ; then
16606                 LIBS="$LTHREAD_LIBS $LIBS"
16607                 LTHREAD_LIBS=""
16608         fi
16609
16610 fi  
16611
16612 if test $ol_link_threads = no ; then
16613         if test $ol_with_threads = yes ; then
16614                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16615         fi
16616
16617         if test $ol_with_threads = auto ; then
16618                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16619                 ol_with_threads=no
16620         fi
16621
16622         cat >> confdefs.h <<\EOF
16623 #define NO_THREADS 1
16624 EOF
16625
16626         LTHREAD_LIBS=""
16627 fi
16628
16629 if test $ol_link_threads != no ; then
16630         cat >> confdefs.h <<\EOF
16631 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16632 EOF
16633
16634 fi
16635
16636 ol_link_ldbm=no 
16637
16638 if test $ol_with_ldbm_api = auto \
16639         -o $ol_with_ldbm_api = berkeley \
16640         -o $ol_with_ldbm_api = bcompat ; then
16641
16642         if test $ol_with_ldbm_api = bcompat; then \
16643                 for ac_hdr in db_185.h db.h
16644 do
16645 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16646 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16647 echo "configure:16648: checking for $ac_hdr" >&5
16648 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16649   echo $ac_n "(cached) $ac_c" 1>&6
16650 else
16651   cat > conftest.$ac_ext <<EOF
16652 #line 16653 "configure"
16653 #include "confdefs.h"
16654 #include <$ac_hdr>
16655 EOF
16656 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16657 { (eval echo configure:16658: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16658 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16659 if test -z "$ac_err"; then
16660   rm -rf conftest*
16661   eval "ac_cv_header_$ac_safe=yes"
16662 else
16663   echo "$ac_err" >&5
16664   echo "configure: failed program was:" >&5
16665   cat conftest.$ac_ext >&5
16666   rm -rf conftest*
16667   eval "ac_cv_header_$ac_safe=no"
16668 fi
16669 rm -f conftest*
16670 fi
16671 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16672   echo "$ac_t""yes" 1>&6
16673     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16674   cat >> confdefs.h <<EOF
16675 #define $ac_tr_hdr 1
16676 EOF
16677  
16678 else
16679   echo "$ac_t""no" 1>&6
16680 fi
16681 done
16682
16683 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16684         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16685 echo "configure:16686: checking if Berkeley DB header compatibility" >&5
16686 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16687   echo $ac_n "(cached) $ac_c" 1>&6
16688 else
16689   
16690                 cat > conftest.$ac_ext <<EOF
16691 #line 16692 "configure"
16692 #include "confdefs.h"
16693
16694 #if HAVE_DB_185_H
16695 #       include <db_185.h>
16696 #else
16697 #       include <db.h>
16698 #endif
16699
16700  /* this check could be improved */
16701 #ifndef DB_VERSION_MAJOR
16702 #       define DB_VERSION_MAJOR 1
16703 #endif
16704
16705 #if DB_VERSION_MAJOR == 1 
16706         __db_version_1
16707 #endif
16708
16709 EOF
16710 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16711   egrep "__db_version_1" >/dev/null 2>&1; then
16712   rm -rf conftest*
16713   ol_cv_header_db1=yes
16714 else
16715   rm -rf conftest*
16716   ol_cv_header_db1=no
16717 fi
16718 rm -f conftest*
16719
16720 fi
16721
16722 echo "$ac_t""$ol_cv_header_db1" 1>&6
16723
16724         if test $ol_cv_header_db1 = yes ; then
16725                 ol_cv_lib_db=no
16726 if test $ol_cv_lib_db = no ; then
16727         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16728 echo "configure:16729: checking for Berkeley DB link (default)" >&5
16729 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16730   echo $ac_n "(cached) $ac_c" 1>&6
16731 else
16732   
16733         ol_DB_LIB=
16734         ol_LIBS=$LIBS
16735         LIBS="$ol_DB_LIB $LIBS"
16736
16737         cat > conftest.$ac_ext <<EOF
16738 #line 16739 "configure"
16739 #include "confdefs.h"
16740
16741 #ifdef HAVE_DB_185_H
16742 # include <db_185.h>
16743 #else
16744 # include <db.h>
16745 #endif
16746
16747 #ifndef DB_VERSION_MAJOR
16748 # define DB_VERSION_MAJOR 1
16749 #endif
16750
16751 #ifndef NULL
16752 #define NULL ((void*)0)
16753 #endif
16754
16755 int main() {
16756
16757 #if DB_VERSION_MAJOR > 1
16758         {
16759                 char *version;
16760                 int major, minor, patch;
16761
16762                 version = db_version( &major, &minor, &patch );
16763
16764                 if( major != DB_VERSION_MAJOR ||
16765                         minor < DB_VERSION_MINOR )
16766                 {
16767                         printf("Berkeley DB version mismatch\n"
16768                                 "\texpected: %s\n\tgot: %s\n",
16769                                 DB_VERSION_STRING, version);
16770                         return 1;
16771                 }
16772         }
16773 #endif
16774
16775 #if DB_VERSION_MAJOR > 2
16776         db_env_create( NULL, 0 );
16777 #elif DB_VERSION_MAJOR > 1
16778         db_appexit( NULL );
16779 #else
16780         (void) dbopen( NULL, 0, 0, 0, NULL);
16781 #endif
16782
16783 ; return 0; }
16784 EOF
16785 if { (eval echo configure:16786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16786   rm -rf conftest*
16787   ol_cv_db_none=yes
16788 else
16789   echo "configure: failed program was:" >&5
16790   cat conftest.$ac_ext >&5
16791   rm -rf conftest*
16792   ol_cv_db_none=no
16793 fi
16794 rm -f conftest*
16795
16796         LIBS="$ol_LIBS"
16797
16798 fi
16799
16800 echo "$ac_t""$ol_cv_db_none" 1>&6
16801
16802         if test $ol_cv_db_none = yes ; then
16803                 ol_cv_lib_db=yes
16804         fi
16805 fi
16806
16807 if test $ol_cv_lib_db = no ; then
16808         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
16809 echo "configure:16810: checking for Berkeley DB link (-ldb4)" >&5
16810 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
16811   echo $ac_n "(cached) $ac_c" 1>&6
16812 else
16813   
16814         ol_DB_LIB=-ldb4
16815         ol_LIBS=$LIBS
16816         LIBS="$ol_DB_LIB $LIBS"
16817
16818         cat > conftest.$ac_ext <<EOF
16819 #line 16820 "configure"
16820 #include "confdefs.h"
16821
16822 #ifdef HAVE_DB_185_H
16823 # include <db_185.h>
16824 #else
16825 # include <db.h>
16826 #endif
16827
16828 #ifndef DB_VERSION_MAJOR
16829 # define DB_VERSION_MAJOR 1
16830 #endif
16831
16832 #ifndef NULL
16833 #define NULL ((void*)0)
16834 #endif
16835
16836 int main() {
16837
16838 #if DB_VERSION_MAJOR > 1
16839         {
16840                 char *version;
16841                 int major, minor, patch;
16842
16843                 version = db_version( &major, &minor, &patch );
16844
16845                 if( major != DB_VERSION_MAJOR ||
16846                         minor < DB_VERSION_MINOR )
16847                 {
16848                         printf("Berkeley DB version mismatch\n"
16849                                 "\texpected: %s\n\tgot: %s\n",
16850                                 DB_VERSION_STRING, version);
16851                         return 1;
16852                 }
16853         }
16854 #endif
16855
16856 #if DB_VERSION_MAJOR > 2
16857         db_env_create( NULL, 0 );
16858 #elif DB_VERSION_MAJOR > 1
16859         db_appexit( NULL );
16860 #else
16861         (void) dbopen( NULL, 0, 0, 0, NULL);
16862 #endif
16863
16864 ; return 0; }
16865 EOF
16866 if { (eval echo configure:16867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16867   rm -rf conftest*
16868   ol_cv_db_db4=yes
16869 else
16870   echo "configure: failed program was:" >&5
16871   cat conftest.$ac_ext >&5
16872   rm -rf conftest*
16873   ol_cv_db_db4=no
16874 fi
16875 rm -f conftest*
16876
16877         LIBS="$ol_LIBS"
16878
16879 fi
16880
16881 echo "$ac_t""$ol_cv_db_db4" 1>&6
16882
16883         if test $ol_cv_db_db4 = yes ; then
16884                 ol_cv_lib_db=-ldb4
16885         fi
16886 fi
16887
16888 if test $ol_cv_lib_db = no ; then
16889         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
16890 echo "configure:16891: checking for Berkeley DB link (-ldb-4)" >&5
16891 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
16892   echo $ac_n "(cached) $ac_c" 1>&6
16893 else
16894   
16895         ol_DB_LIB=-ldb-4
16896         ol_LIBS=$LIBS
16897         LIBS="$ol_DB_LIB $LIBS"
16898
16899         cat > conftest.$ac_ext <<EOF
16900 #line 16901 "configure"
16901 #include "confdefs.h"
16902
16903 #ifdef HAVE_DB_185_H
16904 # include <db_185.h>
16905 #else
16906 # include <db.h>
16907 #endif
16908
16909 #ifndef DB_VERSION_MAJOR
16910 # define DB_VERSION_MAJOR 1
16911 #endif
16912
16913 #ifndef NULL
16914 #define NULL ((void*)0)
16915 #endif
16916
16917 int main() {
16918
16919 #if DB_VERSION_MAJOR > 1
16920         {
16921                 char *version;
16922                 int major, minor, patch;
16923
16924                 version = db_version( &major, &minor, &patch );
16925
16926                 if( major != DB_VERSION_MAJOR ||
16927                         minor < DB_VERSION_MINOR )
16928                 {
16929                         printf("Berkeley DB version mismatch\n"
16930                                 "\texpected: %s\n\tgot: %s\n",
16931                                 DB_VERSION_STRING, version);
16932                         return 1;
16933                 }
16934         }
16935 #endif
16936
16937 #if DB_VERSION_MAJOR > 2
16938         db_env_create( NULL, 0 );
16939 #elif DB_VERSION_MAJOR > 1
16940         db_appexit( NULL );
16941 #else
16942         (void) dbopen( NULL, 0, 0, 0, NULL);
16943 #endif
16944
16945 ; return 0; }
16946 EOF
16947 if { (eval echo configure:16948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16948   rm -rf conftest*
16949   ol_cv_db_db_4=yes
16950 else
16951   echo "configure: failed program was:" >&5
16952   cat conftest.$ac_ext >&5
16953   rm -rf conftest*
16954   ol_cv_db_db_4=no
16955 fi
16956 rm -f conftest*
16957
16958         LIBS="$ol_LIBS"
16959
16960 fi
16961
16962 echo "$ac_t""$ol_cv_db_db_4" 1>&6
16963
16964         if test $ol_cv_db_db_4 = yes ; then
16965                 ol_cv_lib_db=-ldb-4
16966         fi
16967 fi
16968
16969 if test $ol_cv_lib_db = no ; then
16970         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
16971 echo "configure:16972: checking for Berkeley DB link (-ldb)" >&5
16972 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
16973   echo $ac_n "(cached) $ac_c" 1>&6
16974 else
16975   
16976         ol_DB_LIB=-ldb
16977         ol_LIBS=$LIBS
16978         LIBS="$ol_DB_LIB $LIBS"
16979
16980         cat > conftest.$ac_ext <<EOF
16981 #line 16982 "configure"
16982 #include "confdefs.h"
16983
16984 #ifdef HAVE_DB_185_H
16985 # include <db_185.h>
16986 #else
16987 # include <db.h>
16988 #endif
16989
16990 #ifndef DB_VERSION_MAJOR
16991 # define DB_VERSION_MAJOR 1
16992 #endif
16993
16994 #ifndef NULL
16995 #define NULL ((void*)0)
16996 #endif
16997
16998 int main() {
16999
17000 #if DB_VERSION_MAJOR > 1
17001         {
17002                 char *version;
17003                 int major, minor, patch;
17004
17005                 version = db_version( &major, &minor, &patch );
17006
17007                 if( major != DB_VERSION_MAJOR ||
17008                         minor < DB_VERSION_MINOR )
17009                 {
17010                         printf("Berkeley DB version mismatch\n"
17011                                 "\texpected: %s\n\tgot: %s\n",
17012                                 DB_VERSION_STRING, version);
17013                         return 1;
17014                 }
17015         }
17016 #endif
17017
17018 #if DB_VERSION_MAJOR > 2
17019         db_env_create( NULL, 0 );
17020 #elif DB_VERSION_MAJOR > 1
17021         db_appexit( NULL );
17022 #else
17023         (void) dbopen( NULL, 0, 0, 0, NULL);
17024 #endif
17025
17026 ; return 0; }
17027 EOF
17028 if { (eval echo configure:17029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17029   rm -rf conftest*
17030   ol_cv_db_db=yes
17031 else
17032   echo "configure: failed program was:" >&5
17033   cat conftest.$ac_ext >&5
17034   rm -rf conftest*
17035   ol_cv_db_db=no
17036 fi
17037 rm -f conftest*
17038
17039         LIBS="$ol_LIBS"
17040
17041 fi
17042
17043 echo "$ac_t""$ol_cv_db_db" 1>&6
17044
17045         if test $ol_cv_db_db = yes ; then
17046                 ol_cv_lib_db=-ldb
17047         fi
17048 fi
17049
17050 if test $ol_cv_lib_db = no ; then
17051         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17052 echo "configure:17053: checking for Berkeley DB link (-ldb3)" >&5
17053 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17054   echo $ac_n "(cached) $ac_c" 1>&6
17055 else
17056   
17057         ol_DB_LIB=-ldb3
17058         ol_LIBS=$LIBS
17059         LIBS="$ol_DB_LIB $LIBS"
17060
17061         cat > conftest.$ac_ext <<EOF
17062 #line 17063 "configure"
17063 #include "confdefs.h"
17064
17065 #ifdef HAVE_DB_185_H
17066 # include <db_185.h>
17067 #else
17068 # include <db.h>
17069 #endif
17070
17071 #ifndef DB_VERSION_MAJOR
17072 # define DB_VERSION_MAJOR 1
17073 #endif
17074
17075 #ifndef NULL
17076 #define NULL ((void*)0)
17077 #endif
17078
17079 int main() {
17080
17081 #if DB_VERSION_MAJOR > 1
17082         {
17083                 char *version;
17084                 int major, minor, patch;
17085
17086                 version = db_version( &major, &minor, &patch );
17087
17088                 if( major != DB_VERSION_MAJOR ||
17089                         minor < DB_VERSION_MINOR )
17090                 {
17091                         printf("Berkeley DB version mismatch\n"
17092                                 "\texpected: %s\n\tgot: %s\n",
17093                                 DB_VERSION_STRING, version);
17094                         return 1;
17095                 }
17096         }
17097 #endif
17098
17099 #if DB_VERSION_MAJOR > 2
17100         db_env_create( NULL, 0 );
17101 #elif DB_VERSION_MAJOR > 1
17102         db_appexit( NULL );
17103 #else
17104         (void) dbopen( NULL, 0, 0, 0, NULL);
17105 #endif
17106
17107 ; return 0; }
17108 EOF
17109 if { (eval echo configure:17110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17110   rm -rf conftest*
17111   ol_cv_db_db3=yes
17112 else
17113   echo "configure: failed program was:" >&5
17114   cat conftest.$ac_ext >&5
17115   rm -rf conftest*
17116   ol_cv_db_db3=no
17117 fi
17118 rm -f conftest*
17119
17120         LIBS="$ol_LIBS"
17121
17122 fi
17123
17124 echo "$ac_t""$ol_cv_db_db3" 1>&6
17125
17126         if test $ol_cv_db_db3 = yes ; then
17127                 ol_cv_lib_db=-ldb3
17128         fi
17129 fi
17130
17131 if test $ol_cv_lib_db = no ; then
17132         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17133 echo "configure:17134: checking for Berkeley DB link (-ldb-3)" >&5
17134 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17135   echo $ac_n "(cached) $ac_c" 1>&6
17136 else
17137   
17138         ol_DB_LIB=-ldb-3
17139         ol_LIBS=$LIBS
17140         LIBS="$ol_DB_LIB $LIBS"
17141
17142         cat > conftest.$ac_ext <<EOF
17143 #line 17144 "configure"
17144 #include "confdefs.h"
17145
17146 #ifdef HAVE_DB_185_H
17147 # include <db_185.h>
17148 #else
17149 # include <db.h>
17150 #endif
17151
17152 #ifndef DB_VERSION_MAJOR
17153 # define DB_VERSION_MAJOR 1
17154 #endif
17155
17156 #ifndef NULL
17157 #define NULL ((void*)0)
17158 #endif
17159
17160 int main() {
17161
17162 #if DB_VERSION_MAJOR > 1
17163         {
17164                 char *version;
17165                 int major, minor, patch;
17166
17167                 version = db_version( &major, &minor, &patch );
17168
17169                 if( major != DB_VERSION_MAJOR ||
17170                         minor < DB_VERSION_MINOR )
17171                 {
17172                         printf("Berkeley DB version mismatch\n"
17173                                 "\texpected: %s\n\tgot: %s\n",
17174                                 DB_VERSION_STRING, version);
17175                         return 1;
17176                 }
17177         }
17178 #endif
17179
17180 #if DB_VERSION_MAJOR > 2
17181         db_env_create( NULL, 0 );
17182 #elif DB_VERSION_MAJOR > 1
17183         db_appexit( NULL );
17184 #else
17185         (void) dbopen( NULL, 0, 0, 0, NULL);
17186 #endif
17187
17188 ; return 0; }
17189 EOF
17190 if { (eval echo configure:17191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17191   rm -rf conftest*
17192   ol_cv_db_db_3=yes
17193 else
17194   echo "configure: failed program was:" >&5
17195   cat conftest.$ac_ext >&5
17196   rm -rf conftest*
17197   ol_cv_db_db_3=no
17198 fi
17199 rm -f conftest*
17200
17201         LIBS="$ol_LIBS"
17202
17203 fi
17204
17205 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17206
17207         if test $ol_cv_db_db_3 = yes ; then
17208                 ol_cv_lib_db=-ldb-3
17209         fi
17210 fi
17211
17212 if test $ol_cv_lib_db = no ; then
17213         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17214 echo "configure:17215: checking for Berkeley DB link (-ldb2)" >&5
17215 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17216   echo $ac_n "(cached) $ac_c" 1>&6
17217 else
17218   
17219         ol_DB_LIB=-ldb2
17220         ol_LIBS=$LIBS
17221         LIBS="$ol_DB_LIB $LIBS"
17222
17223         cat > conftest.$ac_ext <<EOF
17224 #line 17225 "configure"
17225 #include "confdefs.h"
17226
17227 #ifdef HAVE_DB_185_H
17228 # include <db_185.h>
17229 #else
17230 # include <db.h>
17231 #endif
17232
17233 #ifndef DB_VERSION_MAJOR
17234 # define DB_VERSION_MAJOR 1
17235 #endif
17236
17237 #ifndef NULL
17238 #define NULL ((void*)0)
17239 #endif
17240
17241 int main() {
17242
17243 #if DB_VERSION_MAJOR > 1
17244         {
17245                 char *version;
17246                 int major, minor, patch;
17247
17248                 version = db_version( &major, &minor, &patch );
17249
17250                 if( major != DB_VERSION_MAJOR ||
17251                         minor < DB_VERSION_MINOR )
17252                 {
17253                         printf("Berkeley DB version mismatch\n"
17254                                 "\texpected: %s\n\tgot: %s\n",
17255                                 DB_VERSION_STRING, version);
17256                         return 1;
17257                 }
17258         }
17259 #endif
17260
17261 #if DB_VERSION_MAJOR > 2
17262         db_env_create( NULL, 0 );
17263 #elif DB_VERSION_MAJOR > 1
17264         db_appexit( NULL );
17265 #else
17266         (void) dbopen( NULL, 0, 0, 0, NULL);
17267 #endif
17268
17269 ; return 0; }
17270 EOF
17271 if { (eval echo configure:17272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17272   rm -rf conftest*
17273   ol_cv_db_db2=yes
17274 else
17275   echo "configure: failed program was:" >&5
17276   cat conftest.$ac_ext >&5
17277   rm -rf conftest*
17278   ol_cv_db_db2=no
17279 fi
17280 rm -f conftest*
17281
17282         LIBS="$ol_LIBS"
17283
17284 fi
17285
17286 echo "$ac_t""$ol_cv_db_db2" 1>&6
17287
17288         if test $ol_cv_db_db2 = yes ; then
17289                 ol_cv_lib_db=-ldb2
17290         fi
17291 fi
17292
17293 if test $ol_cv_lib_db = no ; then
17294         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17295 echo "configure:17296: checking for Berkeley DB link (-ldb-2)" >&5
17296 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17297   echo $ac_n "(cached) $ac_c" 1>&6
17298 else
17299   
17300         ol_DB_LIB=-ldb-2
17301         ol_LIBS=$LIBS
17302         LIBS="$ol_DB_LIB $LIBS"
17303
17304         cat > conftest.$ac_ext <<EOF
17305 #line 17306 "configure"
17306 #include "confdefs.h"
17307
17308 #ifdef HAVE_DB_185_H
17309 # include <db_185.h>
17310 #else
17311 # include <db.h>
17312 #endif
17313
17314 #ifndef DB_VERSION_MAJOR
17315 # define DB_VERSION_MAJOR 1
17316 #endif
17317
17318 #ifndef NULL
17319 #define NULL ((void*)0)
17320 #endif
17321
17322 int main() {
17323
17324 #if DB_VERSION_MAJOR > 1
17325         {
17326                 char *version;
17327                 int major, minor, patch;
17328
17329                 version = db_version( &major, &minor, &patch );
17330
17331                 if( major != DB_VERSION_MAJOR ||
17332                         minor < DB_VERSION_MINOR )
17333                 {
17334                         printf("Berkeley DB version mismatch\n"
17335                                 "\texpected: %s\n\tgot: %s\n",
17336                                 DB_VERSION_STRING, version);
17337                         return 1;
17338                 }
17339         }
17340 #endif
17341
17342 #if DB_VERSION_MAJOR > 2
17343         db_env_create( NULL, 0 );
17344 #elif DB_VERSION_MAJOR > 1
17345         db_appexit( NULL );
17346 #else
17347         (void) dbopen( NULL, 0, 0, 0, NULL);
17348 #endif
17349
17350 ; return 0; }
17351 EOF
17352 if { (eval echo configure:17353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17353   rm -rf conftest*
17354   ol_cv_db_db_2=yes
17355 else
17356   echo "configure: failed program was:" >&5
17357   cat conftest.$ac_ext >&5
17358   rm -rf conftest*
17359   ol_cv_db_db_2=no
17360 fi
17361 rm -f conftest*
17362
17363         LIBS="$ol_LIBS"
17364
17365 fi
17366
17367 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17368
17369         if test $ol_cv_db_db_2 = yes ; then
17370                 ol_cv_lib_db=-ldb-2
17371         fi
17372 fi
17373
17374 if test $ol_cv_lib_db = no ; then
17375         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17376 echo "configure:17377: checking for Berkeley DB link (-ldb1)" >&5
17377 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17378   echo $ac_n "(cached) $ac_c" 1>&6
17379 else
17380   
17381         ol_DB_LIB=-ldb1
17382         ol_LIBS=$LIBS
17383         LIBS="$ol_DB_LIB $LIBS"
17384
17385         cat > conftest.$ac_ext <<EOF
17386 #line 17387 "configure"
17387 #include "confdefs.h"
17388
17389 #ifdef HAVE_DB_185_H
17390 # include <db_185.h>
17391 #else
17392 # include <db.h>
17393 #endif
17394
17395 #ifndef DB_VERSION_MAJOR
17396 # define DB_VERSION_MAJOR 1
17397 #endif
17398
17399 #ifndef NULL
17400 #define NULL ((void*)0)
17401 #endif
17402
17403 int main() {
17404
17405 #if DB_VERSION_MAJOR > 1
17406         {
17407                 char *version;
17408                 int major, minor, patch;
17409
17410                 version = db_version( &major, &minor, &patch );
17411
17412                 if( major != DB_VERSION_MAJOR ||
17413                         minor < DB_VERSION_MINOR )
17414                 {
17415                         printf("Berkeley DB version mismatch\n"
17416                                 "\texpected: %s\n\tgot: %s\n",
17417                                 DB_VERSION_STRING, version);
17418                         return 1;
17419                 }
17420         }
17421 #endif
17422
17423 #if DB_VERSION_MAJOR > 2
17424         db_env_create( NULL, 0 );
17425 #elif DB_VERSION_MAJOR > 1
17426         db_appexit( NULL );
17427 #else
17428         (void) dbopen( NULL, 0, 0, 0, NULL);
17429 #endif
17430
17431 ; return 0; }
17432 EOF
17433 if { (eval echo configure:17434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17434   rm -rf conftest*
17435   ol_cv_db_db1=yes
17436 else
17437   echo "configure: failed program was:" >&5
17438   cat conftest.$ac_ext >&5
17439   rm -rf conftest*
17440   ol_cv_db_db1=no
17441 fi
17442 rm -f conftest*
17443
17444         LIBS="$ol_LIBS"
17445
17446 fi
17447
17448 echo "$ac_t""$ol_cv_db_db1" 1>&6
17449
17450         if test $ol_cv_db_db1 = yes ; then
17451                 ol_cv_lib_db=-ldb1
17452         fi
17453 fi
17454
17455 if test $ol_cv_lib_db = no ; then
17456         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
17457 echo "configure:17458: checking for Berkeley DB link (-ldb-1)" >&5
17458 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
17459   echo $ac_n "(cached) $ac_c" 1>&6
17460 else
17461   
17462         ol_DB_LIB=-ldb-1
17463         ol_LIBS=$LIBS
17464         LIBS="$ol_DB_LIB $LIBS"
17465
17466         cat > conftest.$ac_ext <<EOF
17467 #line 17468 "configure"
17468 #include "confdefs.h"
17469
17470 #ifdef HAVE_DB_185_H
17471 # include <db_185.h>
17472 #else
17473 # include <db.h>
17474 #endif
17475
17476 #ifndef DB_VERSION_MAJOR
17477 # define DB_VERSION_MAJOR 1
17478 #endif
17479
17480 #ifndef NULL
17481 #define NULL ((void*)0)
17482 #endif
17483
17484 int main() {
17485
17486 #if DB_VERSION_MAJOR > 1
17487         {
17488                 char *version;
17489                 int major, minor, patch;
17490
17491                 version = db_version( &major, &minor, &patch );
17492
17493                 if( major != DB_VERSION_MAJOR ||
17494                         minor < DB_VERSION_MINOR )
17495                 {
17496                         printf("Berkeley DB version mismatch\n"
17497                                 "\texpected: %s\n\tgot: %s\n",
17498                                 DB_VERSION_STRING, version);
17499                         return 1;
17500                 }
17501         }
17502 #endif
17503
17504 #if DB_VERSION_MAJOR > 2
17505         db_env_create( NULL, 0 );
17506 #elif DB_VERSION_MAJOR > 1
17507         db_appexit( NULL );
17508 #else
17509         (void) dbopen( NULL, 0, 0, 0, NULL);
17510 #endif
17511
17512 ; return 0; }
17513 EOF
17514 if { (eval echo configure:17515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17515   rm -rf conftest*
17516   ol_cv_db_db_1=yes
17517 else
17518   echo "configure: failed program was:" >&5
17519   cat conftest.$ac_ext >&5
17520   rm -rf conftest*
17521   ol_cv_db_db_1=no
17522 fi
17523 rm -f conftest*
17524
17525         LIBS="$ol_LIBS"
17526
17527 fi
17528
17529 echo "$ac_t""$ol_cv_db_db_1" 1>&6
17530
17531         if test $ol_cv_db_db_1 = yes ; then
17532                 ol_cv_lib_db=-ldb-1
17533         fi
17534 fi
17535
17536
17537                 if test "$ol_cv_lib_db" != no ; then
17538                         ol_cv_berkeley_db=yes
17539                 fi
17540         fi
17541 fi
17542
17543         else
17544                 ol_cv_berkeley_db=no
17545 for ac_hdr in db.h
17546 do
17547 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17548 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17549 echo "configure:17550: checking for $ac_hdr" >&5
17550 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17551   echo $ac_n "(cached) $ac_c" 1>&6
17552 else
17553   cat > conftest.$ac_ext <<EOF
17554 #line 17555 "configure"
17555 #include "confdefs.h"
17556 #include <$ac_hdr>
17557 EOF
17558 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17559 { (eval echo configure:17560: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17560 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17561 if test -z "$ac_err"; then
17562   rm -rf conftest*
17563   eval "ac_cv_header_$ac_safe=yes"
17564 else
17565   echo "$ac_err" >&5
17566   echo "configure: failed program was:" >&5
17567   cat conftest.$ac_ext >&5
17568   rm -rf conftest*
17569   eval "ac_cv_header_$ac_safe=no"
17570 fi
17571 rm -f conftest*
17572 fi
17573 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17574   echo "$ac_t""yes" 1>&6
17575     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17576   cat >> confdefs.h <<EOF
17577 #define $ac_tr_hdr 1
17578 EOF
17579  
17580 else
17581   echo "$ac_t""no" 1>&6
17582 fi
17583 done
17584
17585 if test $ac_cv_header_db_h = yes; then
17586         ol_cv_lib_db=no
17587 if test $ol_cv_lib_db = no ; then
17588         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17589 echo "configure:17590: checking for Berkeley DB link (default)" >&5
17590 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17591   echo $ac_n "(cached) $ac_c" 1>&6
17592 else
17593   
17594         ol_DB_LIB=
17595         ol_LIBS=$LIBS
17596         LIBS="$ol_DB_LIB $LIBS"
17597
17598         cat > conftest.$ac_ext <<EOF
17599 #line 17600 "configure"
17600 #include "confdefs.h"
17601
17602 #ifdef HAVE_DB_185_H
17603 # include <db_185.h>
17604 #else
17605 # include <db.h>
17606 #endif
17607
17608 #ifndef DB_VERSION_MAJOR
17609 # define DB_VERSION_MAJOR 1
17610 #endif
17611
17612 #ifndef NULL
17613 #define NULL ((void*)0)
17614 #endif
17615
17616 int main() {
17617
17618 #if DB_VERSION_MAJOR > 1
17619         {
17620                 char *version;
17621                 int major, minor, patch;
17622
17623                 version = db_version( &major, &minor, &patch );
17624
17625                 if( major != DB_VERSION_MAJOR ||
17626                         minor < DB_VERSION_MINOR )
17627                 {
17628                         printf("Berkeley DB version mismatch\n"
17629                                 "\texpected: %s\n\tgot: %s\n",
17630                                 DB_VERSION_STRING, version);
17631                         return 1;
17632                 }
17633         }
17634 #endif
17635
17636 #if DB_VERSION_MAJOR > 2
17637         db_env_create( NULL, 0 );
17638 #elif DB_VERSION_MAJOR > 1
17639         db_appexit( NULL );
17640 #else
17641         (void) dbopen( NULL, 0, 0, 0, NULL);
17642 #endif
17643
17644 ; return 0; }
17645 EOF
17646 if { (eval echo configure:17647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17647   rm -rf conftest*
17648   ol_cv_db_none=yes
17649 else
17650   echo "configure: failed program was:" >&5
17651   cat conftest.$ac_ext >&5
17652   rm -rf conftest*
17653   ol_cv_db_none=no
17654 fi
17655 rm -f conftest*
17656
17657         LIBS="$ol_LIBS"
17658
17659 fi
17660
17661 echo "$ac_t""$ol_cv_db_none" 1>&6
17662
17663         if test $ol_cv_db_none = yes ; then
17664                 ol_cv_lib_db=yes
17665         fi
17666 fi
17667
17668 if test $ol_cv_lib_db = no ; then
17669         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17670 echo "configure:17671: checking for Berkeley DB link (-ldb4)" >&5
17671 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17672   echo $ac_n "(cached) $ac_c" 1>&6
17673 else
17674   
17675         ol_DB_LIB=-ldb4
17676         ol_LIBS=$LIBS
17677         LIBS="$ol_DB_LIB $LIBS"
17678
17679         cat > conftest.$ac_ext <<EOF
17680 #line 17681 "configure"
17681 #include "confdefs.h"
17682
17683 #ifdef HAVE_DB_185_H
17684 # include <db_185.h>
17685 #else
17686 # include <db.h>
17687 #endif
17688
17689 #ifndef DB_VERSION_MAJOR
17690 # define DB_VERSION_MAJOR 1
17691 #endif
17692
17693 #ifndef NULL
17694 #define NULL ((void*)0)
17695 #endif
17696
17697 int main() {
17698
17699 #if DB_VERSION_MAJOR > 1
17700         {
17701                 char *version;
17702                 int major, minor, patch;
17703
17704                 version = db_version( &major, &minor, &patch );
17705
17706                 if( major != DB_VERSION_MAJOR ||
17707                         minor < DB_VERSION_MINOR )
17708                 {
17709                         printf("Berkeley DB version mismatch\n"
17710                                 "\texpected: %s\n\tgot: %s\n",
17711                                 DB_VERSION_STRING, version);
17712                         return 1;
17713                 }
17714         }
17715 #endif
17716
17717 #if DB_VERSION_MAJOR > 2
17718         db_env_create( NULL, 0 );
17719 #elif DB_VERSION_MAJOR > 1
17720         db_appexit( NULL );
17721 #else
17722         (void) dbopen( NULL, 0, 0, 0, NULL);
17723 #endif
17724
17725 ; return 0; }
17726 EOF
17727 if { (eval echo configure:17728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17728   rm -rf conftest*
17729   ol_cv_db_db4=yes
17730 else
17731   echo "configure: failed program was:" >&5
17732   cat conftest.$ac_ext >&5
17733   rm -rf conftest*
17734   ol_cv_db_db4=no
17735 fi
17736 rm -f conftest*
17737
17738         LIBS="$ol_LIBS"
17739
17740 fi
17741
17742 echo "$ac_t""$ol_cv_db_db4" 1>&6
17743
17744         if test $ol_cv_db_db4 = yes ; then
17745                 ol_cv_lib_db=-ldb4
17746         fi
17747 fi
17748
17749 if test $ol_cv_lib_db = no ; then
17750         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17751 echo "configure:17752: checking for Berkeley DB link (-ldb-4)" >&5
17752 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17753   echo $ac_n "(cached) $ac_c" 1>&6
17754 else
17755   
17756         ol_DB_LIB=-ldb-4
17757         ol_LIBS=$LIBS
17758         LIBS="$ol_DB_LIB $LIBS"
17759
17760         cat > conftest.$ac_ext <<EOF
17761 #line 17762 "configure"
17762 #include "confdefs.h"
17763
17764 #ifdef HAVE_DB_185_H
17765 # include <db_185.h>
17766 #else
17767 # include <db.h>
17768 #endif
17769
17770 #ifndef DB_VERSION_MAJOR
17771 # define DB_VERSION_MAJOR 1
17772 #endif
17773
17774 #ifndef NULL
17775 #define NULL ((void*)0)
17776 #endif
17777
17778 int main() {
17779
17780 #if DB_VERSION_MAJOR > 1
17781         {
17782                 char *version;
17783                 int major, minor, patch;
17784
17785                 version = db_version( &major, &minor, &patch );
17786
17787                 if( major != DB_VERSION_MAJOR ||
17788                         minor < DB_VERSION_MINOR )
17789                 {
17790                         printf("Berkeley DB version mismatch\n"
17791                                 "\texpected: %s\n\tgot: %s\n",
17792                                 DB_VERSION_STRING, version);
17793                         return 1;
17794                 }
17795         }
17796 #endif
17797
17798 #if DB_VERSION_MAJOR > 2
17799         db_env_create( NULL, 0 );
17800 #elif DB_VERSION_MAJOR > 1
17801         db_appexit( NULL );
17802 #else
17803         (void) dbopen( NULL, 0, 0, 0, NULL);
17804 #endif
17805
17806 ; return 0; }
17807 EOF
17808 if { (eval echo configure:17809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17809   rm -rf conftest*
17810   ol_cv_db_db_4=yes
17811 else
17812   echo "configure: failed program was:" >&5
17813   cat conftest.$ac_ext >&5
17814   rm -rf conftest*
17815   ol_cv_db_db_4=no
17816 fi
17817 rm -f conftest*
17818
17819         LIBS="$ol_LIBS"
17820
17821 fi
17822
17823 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17824
17825         if test $ol_cv_db_db_4 = yes ; then
17826                 ol_cv_lib_db=-ldb-4
17827         fi
17828 fi
17829
17830 if test $ol_cv_lib_db = no ; then
17831         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17832 echo "configure:17833: checking for Berkeley DB link (-ldb)" >&5
17833 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17834   echo $ac_n "(cached) $ac_c" 1>&6
17835 else
17836   
17837         ol_DB_LIB=-ldb
17838         ol_LIBS=$LIBS
17839         LIBS="$ol_DB_LIB $LIBS"
17840
17841         cat > conftest.$ac_ext <<EOF
17842 #line 17843 "configure"
17843 #include "confdefs.h"
17844
17845 #ifdef HAVE_DB_185_H
17846 # include <db_185.h>
17847 #else
17848 # include <db.h>
17849 #endif
17850
17851 #ifndef DB_VERSION_MAJOR
17852 # define DB_VERSION_MAJOR 1
17853 #endif
17854
17855 #ifndef NULL
17856 #define NULL ((void*)0)
17857 #endif
17858
17859 int main() {
17860
17861 #if DB_VERSION_MAJOR > 1
17862         {
17863                 char *version;
17864                 int major, minor, patch;
17865
17866                 version = db_version( &major, &minor, &patch );
17867
17868                 if( major != DB_VERSION_MAJOR ||
17869                         minor < DB_VERSION_MINOR )
17870                 {
17871                         printf("Berkeley DB version mismatch\n"
17872                                 "\texpected: %s\n\tgot: %s\n",
17873                                 DB_VERSION_STRING, version);
17874                         return 1;
17875                 }
17876         }
17877 #endif
17878
17879 #if DB_VERSION_MAJOR > 2
17880         db_env_create( NULL, 0 );
17881 #elif DB_VERSION_MAJOR > 1
17882         db_appexit( NULL );
17883 #else
17884         (void) dbopen( NULL, 0, 0, 0, NULL);
17885 #endif
17886
17887 ; return 0; }
17888 EOF
17889 if { (eval echo configure:17890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17890   rm -rf conftest*
17891   ol_cv_db_db=yes
17892 else
17893   echo "configure: failed program was:" >&5
17894   cat conftest.$ac_ext >&5
17895   rm -rf conftest*
17896   ol_cv_db_db=no
17897 fi
17898 rm -f conftest*
17899
17900         LIBS="$ol_LIBS"
17901
17902 fi
17903
17904 echo "$ac_t""$ol_cv_db_db" 1>&6
17905
17906         if test $ol_cv_db_db = yes ; then
17907                 ol_cv_lib_db=-ldb
17908         fi
17909 fi
17910
17911 if test $ol_cv_lib_db = no ; then
17912         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17913 echo "configure:17914: checking for Berkeley DB link (-ldb3)" >&5
17914 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17915   echo $ac_n "(cached) $ac_c" 1>&6
17916 else
17917   
17918         ol_DB_LIB=-ldb3
17919         ol_LIBS=$LIBS
17920         LIBS="$ol_DB_LIB $LIBS"
17921
17922         cat > conftest.$ac_ext <<EOF
17923 #line 17924 "configure"
17924 #include "confdefs.h"
17925
17926 #ifdef HAVE_DB_185_H
17927 # include <db_185.h>
17928 #else
17929 # include <db.h>
17930 #endif
17931
17932 #ifndef DB_VERSION_MAJOR
17933 # define DB_VERSION_MAJOR 1
17934 #endif
17935
17936 #ifndef NULL
17937 #define NULL ((void*)0)
17938 #endif
17939
17940 int main() {
17941
17942 #if DB_VERSION_MAJOR > 1
17943         {
17944                 char *version;
17945                 int major, minor, patch;
17946
17947                 version = db_version( &major, &minor, &patch );
17948
17949                 if( major != DB_VERSION_MAJOR ||
17950                         minor < DB_VERSION_MINOR )
17951                 {
17952                         printf("Berkeley DB version mismatch\n"
17953                                 "\texpected: %s\n\tgot: %s\n",
17954                                 DB_VERSION_STRING, version);
17955                         return 1;
17956                 }
17957         }
17958 #endif
17959
17960 #if DB_VERSION_MAJOR > 2
17961         db_env_create( NULL, 0 );
17962 #elif DB_VERSION_MAJOR > 1
17963         db_appexit( NULL );
17964 #else
17965         (void) dbopen( NULL, 0, 0, 0, NULL);
17966 #endif
17967
17968 ; return 0; }
17969 EOF
17970 if { (eval echo configure:17971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17971   rm -rf conftest*
17972   ol_cv_db_db3=yes
17973 else
17974   echo "configure: failed program was:" >&5
17975   cat conftest.$ac_ext >&5
17976   rm -rf conftest*
17977   ol_cv_db_db3=no
17978 fi
17979 rm -f conftest*
17980
17981         LIBS="$ol_LIBS"
17982
17983 fi
17984
17985 echo "$ac_t""$ol_cv_db_db3" 1>&6
17986
17987         if test $ol_cv_db_db3 = yes ; then
17988                 ol_cv_lib_db=-ldb3
17989         fi
17990 fi
17991
17992 if test $ol_cv_lib_db = no ; then
17993         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17994 echo "configure:17995: checking for Berkeley DB link (-ldb-3)" >&5
17995 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17996   echo $ac_n "(cached) $ac_c" 1>&6
17997 else
17998   
17999         ol_DB_LIB=-ldb-3
18000         ol_LIBS=$LIBS
18001         LIBS="$ol_DB_LIB $LIBS"
18002
18003         cat > conftest.$ac_ext <<EOF
18004 #line 18005 "configure"
18005 #include "confdefs.h"
18006
18007 #ifdef HAVE_DB_185_H
18008 # include <db_185.h>
18009 #else
18010 # include <db.h>
18011 #endif
18012
18013 #ifndef DB_VERSION_MAJOR
18014 # define DB_VERSION_MAJOR 1
18015 #endif
18016
18017 #ifndef NULL
18018 #define NULL ((void*)0)
18019 #endif
18020
18021 int main() {
18022
18023 #if DB_VERSION_MAJOR > 1
18024         {
18025                 char *version;
18026                 int major, minor, patch;
18027
18028                 version = db_version( &major, &minor, &patch );
18029
18030                 if( major != DB_VERSION_MAJOR ||
18031                         minor < DB_VERSION_MINOR )
18032                 {
18033                         printf("Berkeley DB version mismatch\n"
18034                                 "\texpected: %s\n\tgot: %s\n",
18035                                 DB_VERSION_STRING, version);
18036                         return 1;
18037                 }
18038         }
18039 #endif
18040
18041 #if DB_VERSION_MAJOR > 2
18042         db_env_create( NULL, 0 );
18043 #elif DB_VERSION_MAJOR > 1
18044         db_appexit( NULL );
18045 #else
18046         (void) dbopen( NULL, 0, 0, 0, NULL);
18047 #endif
18048
18049 ; return 0; }
18050 EOF
18051 if { (eval echo configure:18052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18052   rm -rf conftest*
18053   ol_cv_db_db_3=yes
18054 else
18055   echo "configure: failed program was:" >&5
18056   cat conftest.$ac_ext >&5
18057   rm -rf conftest*
18058   ol_cv_db_db_3=no
18059 fi
18060 rm -f conftest*
18061
18062         LIBS="$ol_LIBS"
18063
18064 fi
18065
18066 echo "$ac_t""$ol_cv_db_db_3" 1>&6
18067
18068         if test $ol_cv_db_db_3 = yes ; then
18069                 ol_cv_lib_db=-ldb-3
18070         fi
18071 fi
18072
18073 if test $ol_cv_lib_db = no ; then
18074         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
18075 echo "configure:18076: checking for Berkeley DB link (-ldb2)" >&5
18076 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
18077   echo $ac_n "(cached) $ac_c" 1>&6
18078 else
18079   
18080         ol_DB_LIB=-ldb2
18081         ol_LIBS=$LIBS
18082         LIBS="$ol_DB_LIB $LIBS"
18083
18084         cat > conftest.$ac_ext <<EOF
18085 #line 18086 "configure"
18086 #include "confdefs.h"
18087
18088 #ifdef HAVE_DB_185_H
18089 # include <db_185.h>
18090 #else
18091 # include <db.h>
18092 #endif
18093
18094 #ifndef DB_VERSION_MAJOR
18095 # define DB_VERSION_MAJOR 1
18096 #endif
18097
18098 #ifndef NULL
18099 #define NULL ((void*)0)
18100 #endif
18101
18102 int main() {
18103
18104 #if DB_VERSION_MAJOR > 1
18105         {
18106                 char *version;
18107                 int major, minor, patch;
18108
18109                 version = db_version( &major, &minor, &patch );
18110
18111                 if( major != DB_VERSION_MAJOR ||
18112                         minor < DB_VERSION_MINOR )
18113                 {
18114                         printf("Berkeley DB version mismatch\n"
18115                                 "\texpected: %s\n\tgot: %s\n",
18116                                 DB_VERSION_STRING, version);
18117                         return 1;
18118                 }
18119         }
18120 #endif
18121
18122 #if DB_VERSION_MAJOR > 2
18123         db_env_create( NULL, 0 );
18124 #elif DB_VERSION_MAJOR > 1
18125         db_appexit( NULL );
18126 #else
18127         (void) dbopen( NULL, 0, 0, 0, NULL);
18128 #endif
18129
18130 ; return 0; }
18131 EOF
18132 if { (eval echo configure:18133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18133   rm -rf conftest*
18134   ol_cv_db_db2=yes
18135 else
18136   echo "configure: failed program was:" >&5
18137   cat conftest.$ac_ext >&5
18138   rm -rf conftest*
18139   ol_cv_db_db2=no
18140 fi
18141 rm -f conftest*
18142
18143         LIBS="$ol_LIBS"
18144
18145 fi
18146
18147 echo "$ac_t""$ol_cv_db_db2" 1>&6
18148
18149         if test $ol_cv_db_db2 = yes ; then
18150                 ol_cv_lib_db=-ldb2
18151         fi
18152 fi
18153
18154 if test $ol_cv_lib_db = no ; then
18155         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18156 echo "configure:18157: checking for Berkeley DB link (-ldb-2)" >&5
18157 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18158   echo $ac_n "(cached) $ac_c" 1>&6
18159 else
18160   
18161         ol_DB_LIB=-ldb-2
18162         ol_LIBS=$LIBS
18163         LIBS="$ol_DB_LIB $LIBS"
18164
18165         cat > conftest.$ac_ext <<EOF
18166 #line 18167 "configure"
18167 #include "confdefs.h"
18168
18169 #ifdef HAVE_DB_185_H
18170 # include <db_185.h>
18171 #else
18172 # include <db.h>
18173 #endif
18174
18175 #ifndef DB_VERSION_MAJOR
18176 # define DB_VERSION_MAJOR 1
18177 #endif
18178
18179 #ifndef NULL
18180 #define NULL ((void*)0)
18181 #endif
18182
18183 int main() {
18184
18185 #if DB_VERSION_MAJOR > 1
18186         {
18187                 char *version;
18188                 int major, minor, patch;
18189
18190                 version = db_version( &major, &minor, &patch );
18191
18192                 if( major != DB_VERSION_MAJOR ||
18193                         minor < DB_VERSION_MINOR )
18194                 {
18195                         printf("Berkeley DB version mismatch\n"
18196                                 "\texpected: %s\n\tgot: %s\n",
18197                                 DB_VERSION_STRING, version);
18198                         return 1;
18199                 }
18200         }
18201 #endif
18202
18203 #if DB_VERSION_MAJOR > 2
18204         db_env_create( NULL, 0 );
18205 #elif DB_VERSION_MAJOR > 1
18206         db_appexit( NULL );
18207 #else
18208         (void) dbopen( NULL, 0, 0, 0, NULL);
18209 #endif
18210
18211 ; return 0; }
18212 EOF
18213 if { (eval echo configure:18214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18214   rm -rf conftest*
18215   ol_cv_db_db_2=yes
18216 else
18217   echo "configure: failed program was:" >&5
18218   cat conftest.$ac_ext >&5
18219   rm -rf conftest*
18220   ol_cv_db_db_2=no
18221 fi
18222 rm -f conftest*
18223
18224         LIBS="$ol_LIBS"
18225
18226 fi
18227
18228 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18229
18230         if test $ol_cv_db_db_2 = yes ; then
18231                 ol_cv_lib_db=-ldb-2
18232         fi
18233 fi
18234
18235 if test $ol_cv_lib_db = no ; then
18236         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18237 echo "configure:18238: checking for Berkeley DB link (-ldb1)" >&5
18238 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18239   echo $ac_n "(cached) $ac_c" 1>&6
18240 else
18241   
18242         ol_DB_LIB=-ldb1
18243         ol_LIBS=$LIBS
18244         LIBS="$ol_DB_LIB $LIBS"
18245
18246         cat > conftest.$ac_ext <<EOF
18247 #line 18248 "configure"
18248 #include "confdefs.h"
18249
18250 #ifdef HAVE_DB_185_H
18251 # include <db_185.h>
18252 #else
18253 # include <db.h>
18254 #endif
18255
18256 #ifndef DB_VERSION_MAJOR
18257 # define DB_VERSION_MAJOR 1
18258 #endif
18259
18260 #ifndef NULL
18261 #define NULL ((void*)0)
18262 #endif
18263
18264 int main() {
18265
18266 #if DB_VERSION_MAJOR > 1
18267         {
18268                 char *version;
18269                 int major, minor, patch;
18270
18271                 version = db_version( &major, &minor, &patch );
18272
18273                 if( major != DB_VERSION_MAJOR ||
18274                         minor < DB_VERSION_MINOR )
18275                 {
18276                         printf("Berkeley DB version mismatch\n"
18277                                 "\texpected: %s\n\tgot: %s\n",
18278                                 DB_VERSION_STRING, version);
18279                         return 1;
18280                 }
18281         }
18282 #endif
18283
18284 #if DB_VERSION_MAJOR > 2
18285         db_env_create( NULL, 0 );
18286 #elif DB_VERSION_MAJOR > 1
18287         db_appexit( NULL );
18288 #else
18289         (void) dbopen( NULL, 0, 0, 0, NULL);
18290 #endif
18291
18292 ; return 0; }
18293 EOF
18294 if { (eval echo configure:18295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18295   rm -rf conftest*
18296   ol_cv_db_db1=yes
18297 else
18298   echo "configure: failed program was:" >&5
18299   cat conftest.$ac_ext >&5
18300   rm -rf conftest*
18301   ol_cv_db_db1=no
18302 fi
18303 rm -f conftest*
18304
18305         LIBS="$ol_LIBS"
18306
18307 fi
18308
18309 echo "$ac_t""$ol_cv_db_db1" 1>&6
18310
18311         if test $ol_cv_db_db1 = yes ; then
18312                 ol_cv_lib_db=-ldb1
18313         fi
18314 fi
18315
18316 if test $ol_cv_lib_db = no ; then
18317         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18318 echo "configure:18319: checking for Berkeley DB link (-ldb-1)" >&5
18319 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18320   echo $ac_n "(cached) $ac_c" 1>&6
18321 else
18322   
18323         ol_DB_LIB=-ldb-1
18324         ol_LIBS=$LIBS
18325         LIBS="$ol_DB_LIB $LIBS"
18326
18327         cat > conftest.$ac_ext <<EOF
18328 #line 18329 "configure"
18329 #include "confdefs.h"
18330
18331 #ifdef HAVE_DB_185_H
18332 # include <db_185.h>
18333 #else
18334 # include <db.h>
18335 #endif
18336
18337 #ifndef DB_VERSION_MAJOR
18338 # define DB_VERSION_MAJOR 1
18339 #endif
18340
18341 #ifndef NULL
18342 #define NULL ((void*)0)
18343 #endif
18344
18345 int main() {
18346
18347 #if DB_VERSION_MAJOR > 1
18348         {
18349                 char *version;
18350                 int major, minor, patch;
18351
18352                 version = db_version( &major, &minor, &patch );
18353
18354                 if( major != DB_VERSION_MAJOR ||
18355                         minor < DB_VERSION_MINOR )
18356                 {
18357                         printf("Berkeley DB version mismatch\n"
18358                                 "\texpected: %s\n\tgot: %s\n",
18359                                 DB_VERSION_STRING, version);
18360                         return 1;
18361                 }
18362         }
18363 #endif
18364
18365 #if DB_VERSION_MAJOR > 2
18366         db_env_create( NULL, 0 );
18367 #elif DB_VERSION_MAJOR > 1
18368         db_appexit( NULL );
18369 #else
18370         (void) dbopen( NULL, 0, 0, 0, NULL);
18371 #endif
18372
18373 ; return 0; }
18374 EOF
18375 if { (eval echo configure:18376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18376   rm -rf conftest*
18377   ol_cv_db_db_1=yes
18378 else
18379   echo "configure: failed program was:" >&5
18380   cat conftest.$ac_ext >&5
18381   rm -rf conftest*
18382   ol_cv_db_db_1=no
18383 fi
18384 rm -f conftest*
18385
18386         LIBS="$ol_LIBS"
18387
18388 fi
18389
18390 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18391
18392         if test $ol_cv_db_db_1 = yes ; then
18393                 ol_cv_lib_db=-ldb-1
18394         fi
18395 fi
18396
18397
18398         if test "$ol_cv_lib_db" != no ; then
18399                 ol_cv_berkeley_db=yes
18400                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
18401 echo "configure:18402: checking for Berkeley DB thread support" >&5
18402 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
18403   echo $ac_n "(cached) $ac_c" 1>&6
18404 else
18405   
18406         ol_LIBS="$LIBS"
18407         if test $ol_cv_lib_db != yes ; then
18408                 LIBS="$ol_cv_lib_db"
18409         fi
18410
18411         if test "$cross_compiling" = yes; then
18412   ol_cv_berkeley_db_thread=cross
18413 else
18414   cat > conftest.$ac_ext <<EOF
18415 #line 18416 "configure"
18416 #include "confdefs.h"
18417
18418 #ifdef HAVE_DB_185_H
18419         choke me;
18420 #else
18421 #include <db.h>
18422 #endif
18423 #ifndef NULL
18424 #define NULL ((void *)0)
18425 #endif
18426 main()
18427 {
18428         int rc;
18429         u_int32_t flags = DB_CREATE |
18430 #ifdef DB_PRIVATE
18431                 DB_PRIVATE |
18432 #endif
18433                 DB_THREAD;
18434
18435 #if DB_VERSION_MAJOR > 2
18436         DB_ENV *env = NULL;
18437
18438         rc = db_env_create( &env, 0 );
18439
18440         flags |= DB_INIT_MPOOL;
18441 #ifdef DB_MPOOL_PRIVATE
18442         flags |= DB_MPOOL_PRIVATE;
18443 #endif
18444
18445         if( rc ) {
18446                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18447                 return rc;
18448         }
18449
18450 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
18451         rc = env->open( env, NULL, flags, 0 );
18452 #else
18453         rc = env->open( env, NULL, NULL, flags, 0 );
18454 #endif
18455
18456         if ( rc == 0 ) {
18457                 rc = env->close( env, 0 );
18458         }
18459
18460         if( rc ) {
18461                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18462                 return rc;
18463         }
18464
18465 #else
18466         DB_ENV env;
18467         memset( &env, '\0', sizeof(env) );
18468
18469         rc = db_appinit( NULL, NULL, &env, flags );
18470
18471         if( rc == 0 ) {
18472                 db_appexit( &env );
18473         }
18474
18475         unlink("__db_mpool.share");
18476         unlink("__db_lock.share");
18477 #endif
18478
18479         return rc;
18480 }
18481 EOF
18482 if { (eval echo configure:18483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
18483 then
18484   ol_cv_berkeley_db_thread=yes
18485 else
18486   echo "configure: failed program was:" >&5
18487   cat conftest.$ac_ext >&5
18488   rm -fr conftest*
18489   ol_cv_berkeley_db_thread=no
18490 fi
18491 rm -fr conftest*
18492 fi
18493
18494
18495         LIBS="$ol_LIBS"
18496
18497 fi
18498
18499 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
18500
18501         if test $ol_cv_berkeley_db_thread != no ; then
18502                 cat >> confdefs.h <<\EOF
18503 #define HAVE_BERKELEY_DB_THREAD 1
18504 EOF
18505
18506         fi
18507
18508         fi
18509 fi
18510
18511         fi
18512
18513         if test $ol_cv_berkeley_db != no ; then
18514                 cat >> confdefs.h <<\EOF
18515 #define HAVE_BERKELEY_DB 1
18516 EOF
18517
18518
18519                 ol_link_ldbm=berkeley
18520                 ol_with_ldbm_api=berkeley
18521
18522                 if test $ol_with_ldbm_type = hash ; then
18523                         cat >> confdefs.h <<\EOF
18524 #define LDBM_USE_DBHASH 1
18525 EOF
18526
18527                 else
18528                         cat >> confdefs.h <<\EOF
18529 #define LDBM_USE_DBBTREE 1
18530 EOF
18531
18532                 fi
18533
18534                                                 if test $ol_cv_lib_db != yes ; then
18535                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
18536                 fi
18537         fi
18538 fi
18539
18540 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
18541         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
18542 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
18543         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
18544 echo "configure:18545: checking Berkeley DB version for BDB backend" >&5
18545 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
18546   echo $ac_n "(cached) $ac_c" 1>&6
18547 else
18548   
18549         cat > conftest.$ac_ext <<EOF
18550 #line 18551 "configure"
18551 #include "confdefs.h"
18552
18553 #include <db.h>
18554
18555  /* this check could be improved */
18556 #ifndef DB_VERSION_MAJOR
18557 #       define DB_VERSION_MAJOR 1
18558 #endif
18559
18560 /* require 4.0 or later */
18561 #if DB_VERSION_MAJOR >= 4 
18562         __db_version_compat
18563 #endif
18564         
18565 EOF
18566 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18567   egrep "__db_version_compat" >/dev/null 2>&1; then
18568   rm -rf conftest*
18569   ol_cv_bdb_compat=yes
18570 else
18571   rm -rf conftest*
18572   ol_cv_bdb_compat=no
18573 fi
18574 rm -f conftest*
18575
18576 fi
18577
18578 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
18579
18580
18581         if test $ol_cv_bdb_compat = yes ; then
18582                 ol_enable_bdb=yes
18583         elif test $ol_enable_bdb = yes ; then
18584                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
18585         else
18586                 ol_enable_bdb=no
18587         fi
18588 fi
18589
18590 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
18591         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
18592         ol_with_ldbm_api=none
18593 fi
18594
18595 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
18596         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
18597 echo "configure:18598: checking for MDBM library" >&5
18598 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
18599   echo $ac_n "(cached) $ac_c" 1>&6
18600 else
18601         ol_LIBS="$LIBS"
18602         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
18603 echo "configure:18604: checking for mdbm_set_chain" >&5
18604 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
18605   echo $ac_n "(cached) $ac_c" 1>&6
18606 else
18607   cat > conftest.$ac_ext <<EOF
18608 #line 18609 "configure"
18609 #include "confdefs.h"
18610 /* System header to define __stub macros and hopefully few prototypes,
18611     which can conflict with char mdbm_set_chain(); below.  */
18612 #include <assert.h>
18613 /* Override any gcc2 internal prototype to avoid an error.  */
18614 /* We use char because int might match the return type of a gcc2
18615     builtin and then its argument prototype would still apply.  */
18616 char mdbm_set_chain();
18617 char (*f)();
18618
18619 int main() {
18620
18621 /* The GNU C library defines this for functions which it implements
18622     to always fail with ENOSYS.  Some functions are actually named
18623     something starting with __ and the normal name is an alias.  */
18624 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
18625 choke me
18626 #else
18627 f = mdbm_set_chain;
18628 #endif
18629
18630 ; return 0; }
18631 EOF
18632 if { (eval echo configure:18633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18633   rm -rf conftest*
18634   eval "ac_cv_func_mdbm_set_chain=yes"
18635 else
18636   echo "configure: failed program was:" >&5
18637   cat conftest.$ac_ext >&5
18638   rm -rf conftest*
18639   eval "ac_cv_func_mdbm_set_chain=no"
18640 fi
18641 rm -f conftest*
18642 fi
18643
18644 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
18645   echo "$ac_t""yes" 1>&6
18646   ol_cv_lib_mdbm=yes
18647 else
18648   echo "$ac_t""no" 1>&6
18649
18650                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
18651 echo "configure:18652: checking for mdbm_set_chain in -lmdbm" >&5
18652 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
18653 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18654   echo $ac_n "(cached) $ac_c" 1>&6
18655 else
18656   ac_save_LIBS="$LIBS"
18657 LIBS="-lmdbm  $LIBS"
18658 cat > conftest.$ac_ext <<EOF
18659 #line 18660 "configure"
18660 #include "confdefs.h"
18661 /* Override any gcc2 internal prototype to avoid an error.  */
18662 /* We use char because int might match the return type of a gcc2
18663     builtin and then its argument prototype would still apply.  */
18664 char mdbm_set_chain();
18665
18666 int main() {
18667 mdbm_set_chain()
18668 ; return 0; }
18669 EOF
18670 if { (eval echo configure:18671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18671   rm -rf conftest*
18672   eval "ac_cv_lib_$ac_lib_var=yes"
18673 else
18674   echo "configure: failed program was:" >&5
18675   cat conftest.$ac_ext >&5
18676   rm -rf conftest*
18677   eval "ac_cv_lib_$ac_lib_var=no"
18678 fi
18679 rm -f conftest*
18680 LIBS="$ac_save_LIBS"
18681
18682 fi
18683 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18684   echo "$ac_t""yes" 1>&6
18685   ol_cv_lib_mdbm=-lmdbm
18686 else
18687   echo "$ac_t""no" 1>&6
18688 ol_cv_lib_mdbm=no
18689 fi
18690
18691         
18692 fi
18693
18694         LIBS="$ol_LIBS"
18695
18696 fi
18697
18698 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
18699
18700
18701  for ac_hdr in mdbm.h
18702 do
18703 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18704 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18705 echo "configure:18706: checking for $ac_hdr" >&5
18706 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18707   echo $ac_n "(cached) $ac_c" 1>&6
18708 else
18709   cat > conftest.$ac_ext <<EOF
18710 #line 18711 "configure"
18711 #include "confdefs.h"
18712 #include <$ac_hdr>
18713 EOF
18714 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18715 { (eval echo configure:18716: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18716 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18717 if test -z "$ac_err"; then
18718   rm -rf conftest*
18719   eval "ac_cv_header_$ac_safe=yes"
18720 else
18721   echo "$ac_err" >&5
18722   echo "configure: failed program was:" >&5
18723   cat conftest.$ac_ext >&5
18724   rm -rf conftest*
18725   eval "ac_cv_header_$ac_safe=no"
18726 fi
18727 rm -f conftest*
18728 fi
18729 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18730   echo "$ac_t""yes" 1>&6
18731     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18732   cat >> confdefs.h <<EOF
18733 #define $ac_tr_hdr 1
18734 EOF
18735  
18736 else
18737   echo "$ac_t""no" 1>&6
18738 fi
18739 done
18740
18741  echo $ac_n "checking for db""... $ac_c" 1>&6
18742 echo "configure:18743: checking for db" >&5
18743 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
18744   echo $ac_n "(cached) $ac_c" 1>&6
18745 else
18746   
18747         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
18748                 ol_cv_mdbm=no
18749         else
18750                 ol_cv_mdbm=yes
18751         fi
18752
18753 fi
18754
18755 echo "$ac_t""$ol_cv_mdbm" 1>&6
18756  if test $ol_cv_mdbm = yes ; then
18757         cat >> confdefs.h <<\EOF
18758 #define HAVE_MDBM 1
18759 EOF
18760
18761  fi
18762
18763
18764         if test $ol_cv_mdbm = yes ; then
18765                 ol_link_ldbm=mdbm
18766                 ol_with_ldbm_api=mdbm
18767                 if test $ol_cv_lib_mdbm != yes ; then
18768                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
18769                 fi
18770         fi
18771 fi
18772
18773 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
18774         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
18775 echo "configure:18776: checking for GDBM library" >&5
18776 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
18777   echo $ac_n "(cached) $ac_c" 1>&6
18778 else
18779         ol_LIBS="$LIBS"
18780         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
18781 echo "configure:18782: checking for gdbm_open" >&5
18782 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
18783   echo $ac_n "(cached) $ac_c" 1>&6
18784 else
18785   cat > conftest.$ac_ext <<EOF
18786 #line 18787 "configure"
18787 #include "confdefs.h"
18788 /* System header to define __stub macros and hopefully few prototypes,
18789     which can conflict with char gdbm_open(); below.  */
18790 #include <assert.h>
18791 /* Override any gcc2 internal prototype to avoid an error.  */
18792 /* We use char because int might match the return type of a gcc2
18793     builtin and then its argument prototype would still apply.  */
18794 char gdbm_open();
18795 char (*f)();
18796
18797 int main() {
18798
18799 /* The GNU C library defines this for functions which it implements
18800     to always fail with ENOSYS.  Some functions are actually named
18801     something starting with __ and the normal name is an alias.  */
18802 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
18803 choke me
18804 #else
18805 f = gdbm_open;
18806 #endif
18807
18808 ; return 0; }
18809 EOF
18810 if { (eval echo configure:18811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18811   rm -rf conftest*
18812   eval "ac_cv_func_gdbm_open=yes"
18813 else
18814   echo "configure: failed program was:" >&5
18815   cat conftest.$ac_ext >&5
18816   rm -rf conftest*
18817   eval "ac_cv_func_gdbm_open=no"
18818 fi
18819 rm -f conftest*
18820 fi
18821
18822 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
18823   echo "$ac_t""yes" 1>&6
18824   ol_cv_lib_gdbm=yes
18825 else
18826   echo "$ac_t""no" 1>&6
18827
18828                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
18829 echo "configure:18830: checking for gdbm_open in -lgdbm" >&5
18830 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
18831 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18832   echo $ac_n "(cached) $ac_c" 1>&6
18833 else
18834   ac_save_LIBS="$LIBS"
18835 LIBS="-lgdbm  $LIBS"
18836 cat > conftest.$ac_ext <<EOF
18837 #line 18838 "configure"
18838 #include "confdefs.h"
18839 /* Override any gcc2 internal prototype to avoid an error.  */
18840 /* We use char because int might match the return type of a gcc2
18841     builtin and then its argument prototype would still apply.  */
18842 char gdbm_open();
18843
18844 int main() {
18845 gdbm_open()
18846 ; return 0; }
18847 EOF
18848 if { (eval echo configure:18849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18849   rm -rf conftest*
18850   eval "ac_cv_lib_$ac_lib_var=yes"
18851 else
18852   echo "configure: failed program was:" >&5
18853   cat conftest.$ac_ext >&5
18854   rm -rf conftest*
18855   eval "ac_cv_lib_$ac_lib_var=no"
18856 fi
18857 rm -f conftest*
18858 LIBS="$ac_save_LIBS"
18859
18860 fi
18861 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18862   echo "$ac_t""yes" 1>&6
18863   ol_cv_lib_gdbm=-lgdbm
18864 else
18865   echo "$ac_t""no" 1>&6
18866 ol_cv_lib_gdbm=no
18867 fi
18868
18869         
18870 fi
18871
18872         LIBS="$ol_LIBS"
18873
18874 fi
18875
18876 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
18877
18878
18879  for ac_hdr in gdbm.h
18880 do
18881 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18882 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18883 echo "configure:18884: checking for $ac_hdr" >&5
18884 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18885   echo $ac_n "(cached) $ac_c" 1>&6
18886 else
18887   cat > conftest.$ac_ext <<EOF
18888 #line 18889 "configure"
18889 #include "confdefs.h"
18890 #include <$ac_hdr>
18891 EOF
18892 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18893 { (eval echo configure:18894: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18894 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18895 if test -z "$ac_err"; then
18896   rm -rf conftest*
18897   eval "ac_cv_header_$ac_safe=yes"
18898 else
18899   echo "$ac_err" >&5
18900   echo "configure: failed program was:" >&5
18901   cat conftest.$ac_ext >&5
18902   rm -rf conftest*
18903   eval "ac_cv_header_$ac_safe=no"
18904 fi
18905 rm -f conftest*
18906 fi
18907 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18908   echo "$ac_t""yes" 1>&6
18909     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18910   cat >> confdefs.h <<EOF
18911 #define $ac_tr_hdr 1
18912 EOF
18913  
18914 else
18915   echo "$ac_t""no" 1>&6
18916 fi
18917 done
18918
18919  echo $ac_n "checking for db""... $ac_c" 1>&6
18920 echo "configure:18921: checking for db" >&5
18921 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
18922   echo $ac_n "(cached) $ac_c" 1>&6
18923 else
18924   
18925         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
18926                 ol_cv_gdbm=no
18927         else
18928                 ol_cv_gdbm=yes
18929         fi
18930
18931 fi
18932
18933 echo "$ac_t""$ol_cv_gdbm" 1>&6
18934  if test $ol_cv_gdbm = yes ; then
18935         cat >> confdefs.h <<\EOF
18936 #define HAVE_GDBM 1
18937 EOF
18938
18939  fi
18940
18941
18942         if test $ol_cv_gdbm = yes ; then
18943                 ol_link_ldbm=gdbm
18944                 ol_with_ldbm_api=gdbm
18945
18946                 if test $ol_cv_lib_gdbm != yes ; then
18947                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
18948                 fi
18949         fi
18950 fi
18951
18952 if test $ol_with_ldbm_api = ndbm ; then
18953         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
18954 echo "configure:18955: checking for NDBM library" >&5
18955 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
18956   echo $ac_n "(cached) $ac_c" 1>&6
18957 else
18958         ol_LIBS="$LIBS"
18959         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
18960 echo "configure:18961: checking for dbm_open" >&5
18961 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
18962   echo $ac_n "(cached) $ac_c" 1>&6
18963 else
18964   cat > conftest.$ac_ext <<EOF
18965 #line 18966 "configure"
18966 #include "confdefs.h"
18967 /* System header to define __stub macros and hopefully few prototypes,
18968     which can conflict with char dbm_open(); below.  */
18969 #include <assert.h>
18970 /* Override any gcc2 internal prototype to avoid an error.  */
18971 /* We use char because int might match the return type of a gcc2
18972     builtin and then its argument prototype would still apply.  */
18973 char dbm_open();
18974 char (*f)();
18975
18976 int main() {
18977
18978 /* The GNU C library defines this for functions which it implements
18979     to always fail with ENOSYS.  Some functions are actually named
18980     something starting with __ and the normal name is an alias.  */
18981 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
18982 choke me
18983 #else
18984 f = dbm_open;
18985 #endif
18986
18987 ; return 0; }
18988 EOF
18989 if { (eval echo configure:18990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18990   rm -rf conftest*
18991   eval "ac_cv_func_dbm_open=yes"
18992 else
18993   echo "configure: failed program was:" >&5
18994   cat conftest.$ac_ext >&5
18995   rm -rf conftest*
18996   eval "ac_cv_func_dbm_open=no"
18997 fi
18998 rm -f conftest*
18999 fi
19000
19001 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
19002   echo "$ac_t""yes" 1>&6
19003   ol_cv_lib_ndbm=yes
19004 else
19005   echo "$ac_t""no" 1>&6
19006
19007                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
19008 echo "configure:19009: checking for dbm_open in -lndbm" >&5
19009 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19010 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19011   echo $ac_n "(cached) $ac_c" 1>&6
19012 else
19013   ac_save_LIBS="$LIBS"
19014 LIBS="-lndbm  $LIBS"
19015 cat > conftest.$ac_ext <<EOF
19016 #line 19017 "configure"
19017 #include "confdefs.h"
19018 /* Override any gcc2 internal prototype to avoid an error.  */
19019 /* We use char because int might match the return type of a gcc2
19020     builtin and then its argument prototype would still apply.  */
19021 char dbm_open();
19022
19023 int main() {
19024 dbm_open()
19025 ; return 0; }
19026 EOF
19027 if { (eval echo configure:19028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19028   rm -rf conftest*
19029   eval "ac_cv_lib_$ac_lib_var=yes"
19030 else
19031   echo "configure: failed program was:" >&5
19032   cat conftest.$ac_ext >&5
19033   rm -rf conftest*
19034   eval "ac_cv_lib_$ac_lib_var=no"
19035 fi
19036 rm -f conftest*
19037 LIBS="$ac_save_LIBS"
19038
19039 fi
19040 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19041   echo "$ac_t""yes" 1>&6
19042   ol_cv_lib_ndbm=-lndbm
19043 else
19044   echo "$ac_t""no" 1>&6
19045
19046                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
19047 echo "configure:19048: checking for dbm_open in -ldbm" >&5
19048 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19049 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19050   echo $ac_n "(cached) $ac_c" 1>&6
19051 else
19052   ac_save_LIBS="$LIBS"
19053 LIBS="-ldbm  $LIBS"
19054 cat > conftest.$ac_ext <<EOF
19055 #line 19056 "configure"
19056 #include "confdefs.h"
19057 /* Override any gcc2 internal prototype to avoid an error.  */
19058 /* We use char because int might match the return type of a gcc2
19059     builtin and then its argument prototype would still apply.  */
19060 char dbm_open();
19061
19062 int main() {
19063 dbm_open()
19064 ; return 0; }
19065 EOF
19066 if { (eval echo configure:19067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19067   rm -rf conftest*
19068   eval "ac_cv_lib_$ac_lib_var=yes"
19069 else
19070   echo "configure: failed program was:" >&5
19071   cat conftest.$ac_ext >&5
19072   rm -rf conftest*
19073   eval "ac_cv_lib_$ac_lib_var=no"
19074 fi
19075 rm -f conftest*
19076 LIBS="$ac_save_LIBS"
19077
19078 fi
19079 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19080   echo "$ac_t""yes" 1>&6
19081   ol_cv_lib_ndbm=-ldbm
19082 else
19083   echo "$ac_t""no" 1>&6
19084 ol_cv_lib_ndbm=no
19085 fi
19086                 
19087 fi
19088
19089         
19090 fi
19091
19092         LIBS="$ol_LIBS"
19093
19094 fi
19095
19096 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
19097
19098
19099  for ac_hdr in ndbm.h
19100 do
19101 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19102 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19103 echo "configure:19104: checking for $ac_hdr" >&5
19104 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19105   echo $ac_n "(cached) $ac_c" 1>&6
19106 else
19107   cat > conftest.$ac_ext <<EOF
19108 #line 19109 "configure"
19109 #include "confdefs.h"
19110 #include <$ac_hdr>
19111 EOF
19112 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19113 { (eval echo configure:19114: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19114 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19115 if test -z "$ac_err"; then
19116   rm -rf conftest*
19117   eval "ac_cv_header_$ac_safe=yes"
19118 else
19119   echo "$ac_err" >&5
19120   echo "configure: failed program was:" >&5
19121   cat conftest.$ac_ext >&5
19122   rm -rf conftest*
19123   eval "ac_cv_header_$ac_safe=no"
19124 fi
19125 rm -f conftest*
19126 fi
19127 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19128   echo "$ac_t""yes" 1>&6
19129     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19130   cat >> confdefs.h <<EOF
19131 #define $ac_tr_hdr 1
19132 EOF
19133  
19134 else
19135   echo "$ac_t""no" 1>&6
19136 fi
19137 done
19138
19139  echo $ac_n "checking for db""... $ac_c" 1>&6
19140 echo "configure:19141: checking for db" >&5
19141 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
19142   echo $ac_n "(cached) $ac_c" 1>&6
19143 else
19144   
19145         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
19146                 ol_cv_ndbm=no
19147         else
19148                 ol_cv_ndbm=yes
19149         fi
19150
19151 fi
19152
19153 echo "$ac_t""$ol_cv_ndbm" 1>&6
19154  if test $ol_cv_ndbm = yes ; then
19155         cat >> confdefs.h <<\EOF
19156 #define HAVE_NDBM 1
19157 EOF
19158
19159  fi
19160
19161
19162         if test $ol_cv_ndbm = yes ; then
19163                 ol_link_ldbm=ndbm
19164                 ol_with_ldbm_api=ndbm
19165
19166                 if test $ol_cv_lib_ndbm != yes ; then
19167                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
19168                 fi
19169         fi
19170 fi
19171
19172 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
19173         echo "configure: warning: could not find suitable LDBM backend" 1>&2
19174         if test $ol_enable_ldbm = yes ; then
19175                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
19176         fi
19177
19178         echo "configure: warning: disabling LDBM" 1>&2
19179         ol_enable_ldbm=no
19180 fi
19181
19182 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
19183         BUILD_LIBS_DYNAMIC=shared
19184         cat >> confdefs.h <<\EOF
19185 #define LDAP_LIBS_DYNAMIC 1
19186 EOF
19187
19188 else
19189         BUILD_LIBS_DYNAMIC=static
19190 fi
19191
19192 if test $ol_enable_wrappers != no ; then
19193         for ac_hdr in tcpd.h
19194 do
19195 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19196 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19197 echo "configure:19198: checking for $ac_hdr" >&5
19198 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19199   echo $ac_n "(cached) $ac_c" 1>&6
19200 else
19201   cat > conftest.$ac_ext <<EOF
19202 #line 19203 "configure"
19203 #include "confdefs.h"
19204 #include <$ac_hdr>
19205 EOF
19206 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19207 { (eval echo configure:19208: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19208 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19209 if test -z "$ac_err"; then
19210   rm -rf conftest*
19211   eval "ac_cv_header_$ac_safe=yes"
19212 else
19213   echo "$ac_err" >&5
19214   echo "configure: failed program was:" >&5
19215   cat conftest.$ac_ext >&5
19216   rm -rf conftest*
19217   eval "ac_cv_header_$ac_safe=no"
19218 fi
19219 rm -f conftest*
19220 fi
19221 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19222   echo "$ac_t""yes" 1>&6
19223     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19224   cat >> confdefs.h <<EOF
19225 #define $ac_tr_hdr 1
19226 EOF
19227  
19228                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
19229 echo "configure:19230: checking for TCP wrappers library" >&5
19230                 save_LIBS="$LIBS"
19231                 LIBS="$LIBS -lwrap"
19232                 cat > conftest.$ac_ext <<EOF
19233 #line 19234 "configure"
19234 #include "confdefs.h"
19235
19236 #include <tcpd.h>
19237 int allow_severity = 0;
19238 int deny_severity  = 0;
19239
19240 struct request_info *req;
19241                 
19242 int main() {
19243
19244 hosts_access(req)
19245                 
19246 ; return 0; }
19247 EOF
19248 if { (eval echo configure:19249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19249   rm -rf conftest*
19250   echo "$ac_t""-lwrap" 1>&6
19251                 have_wrappers=yes
19252                 LIBS="$save_LIBS"
19253 else
19254   echo "configure: failed program was:" >&5
19255   cat conftest.$ac_ext >&5
19256   rm -rf conftest*
19257   
19258                                 LIBS="$LIBS -lnsl"
19259                 cat > conftest.$ac_ext <<EOF
19260 #line 19261 "configure"
19261 #include "confdefs.h"
19262
19263 #include <tcpd.h>
19264 int allow_severity = 0;
19265 int deny_severity  = 0;
19266
19267 struct request_info *req;
19268                 
19269 int main() {
19270
19271 hosts_access(req)
19272                 
19273 ; return 0; }
19274 EOF
19275 if { (eval echo configure:19276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19276   rm -rf conftest*
19277   echo "$ac_t""-lwrap -lnsl" 1>&6
19278                 have_wrappers=yes
19279                 LIBS="$save_LIBS -lnsl"
19280 else
19281   echo "configure: failed program was:" >&5
19282   cat conftest.$ac_ext >&5
19283   rm -rf conftest*
19284   
19285                 echo "$ac_t""no" 1>&6
19286                 have_wrappers=no
19287                 LIBS=$save_LIBS
19288 fi
19289 rm -f conftest*
19290 fi
19291 rm -f conftest*
19292 else
19293   echo "$ac_t""no" 1>&6
19294 have_wrappers=no
19295 fi
19296 done
19297
19298
19299         if test $have_wrappers = yes ; then
19300                 cat >> confdefs.h <<\EOF
19301 #define HAVE_TCPD 1
19302 EOF
19303
19304                 WRAP_LIBS="-lwrap"
19305         elif test $ol_enable_wrappers = yes ; then
19306                 { echo "configure: error: could not find TCP wrappers, select apppropriate options ore disable" 1>&2; exit 1; }
19307         else
19308                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
19309                 WRAP_LIBS=""
19310         fi
19311 fi
19312
19313 if test $ol_enable_syslog != no ; then
19314         echo $ac_n "checking for openlog""... $ac_c" 1>&6
19315 echo "configure:19316: checking for openlog" >&5
19316 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
19317   echo $ac_n "(cached) $ac_c" 1>&6
19318 else
19319   cat > conftest.$ac_ext <<EOF
19320 #line 19321 "configure"
19321 #include "confdefs.h"
19322 /* System header to define __stub macros and hopefully few prototypes,
19323     which can conflict with char openlog(); below.  */
19324 #include <assert.h>
19325 /* Override any gcc2 internal prototype to avoid an error.  */
19326 /* We use char because int might match the return type of a gcc2
19327     builtin and then its argument prototype would still apply.  */
19328 char openlog();
19329 char (*f)();
19330
19331 int main() {
19332
19333 /* The GNU C library defines this for functions which it implements
19334     to always fail with ENOSYS.  Some functions are actually named
19335     something starting with __ and the normal name is an alias.  */
19336 #if defined (__stub_openlog) || defined (__stub___openlog)
19337 choke me
19338 #else
19339 f = openlog;
19340 #endif
19341
19342 ; return 0; }
19343 EOF
19344 if { (eval echo configure:19345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19345   rm -rf conftest*
19346   eval "ac_cv_func_openlog=yes"
19347 else
19348   echo "configure: failed program was:" >&5
19349   cat conftest.$ac_ext >&5
19350   rm -rf conftest*
19351   eval "ac_cv_func_openlog=no"
19352 fi
19353 rm -f conftest*
19354 fi
19355
19356 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
19357   echo "$ac_t""yes" 1>&6
19358   :
19359 else
19360   echo "$ac_t""no" 1>&6
19361 fi
19362
19363         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
19364                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
19365         fi
19366         ol_enable_syslog=$ac_cv_func_openlog
19367 fi
19368
19369
19370 ol_link_sql=no
19371 if test $ol_enable_sql != no ; then
19372         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
19373 echo "configure:19374: checking for SQLDriverConnect in -liodbc" >&5
19374 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19375 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19376   echo $ac_n "(cached) $ac_c" 1>&6
19377 else
19378   ac_save_LIBS="$LIBS"
19379 LIBS="-liodbc  $LIBS"
19380 cat > conftest.$ac_ext <<EOF
19381 #line 19382 "configure"
19382 #include "confdefs.h"
19383 /* Override any gcc2 internal prototype to avoid an error.  */
19384 /* We use char because int might match the return type of a gcc2
19385     builtin and then its argument prototype would still apply.  */
19386 char SQLDriverConnect();
19387
19388 int main() {
19389 SQLDriverConnect()
19390 ; return 0; }
19391 EOF
19392 if { (eval echo configure:19393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19393   rm -rf conftest*
19394   eval "ac_cv_lib_$ac_lib_var=yes"
19395 else
19396   echo "configure: failed program was:" >&5
19397   cat conftest.$ac_ext >&5
19398   rm -rf conftest*
19399   eval "ac_cv_lib_$ac_lib_var=no"
19400 fi
19401 rm -f conftest*
19402 LIBS="$ac_save_LIBS"
19403
19404 fi
19405 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19406   echo "$ac_t""yes" 1>&6
19407   have_iodbc=yes
19408 else
19409   echo "$ac_t""no" 1>&6
19410 have_iodbc=no
19411 fi
19412
19413         if test $have_iodbc = yes ; then
19414                 ol_link_sql="-liodbc"
19415         else
19416                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
19417 echo "configure:19418: checking for SQLDriverConnect in -lodbc" >&5
19418 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19419 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19420   echo $ac_n "(cached) $ac_c" 1>&6
19421 else
19422   ac_save_LIBS="$LIBS"
19423 LIBS="-lodbc  $LIBS"
19424 cat > conftest.$ac_ext <<EOF
19425 #line 19426 "configure"
19426 #include "confdefs.h"
19427 /* Override any gcc2 internal prototype to avoid an error.  */
19428 /* We use char because int might match the return type of a gcc2
19429     builtin and then its argument prototype would still apply.  */
19430 char SQLDriverConnect();
19431
19432 int main() {
19433 SQLDriverConnect()
19434 ; return 0; }
19435 EOF
19436 if { (eval echo configure:19437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19437   rm -rf conftest*
19438   eval "ac_cv_lib_$ac_lib_var=yes"
19439 else
19440   echo "configure: failed program was:" >&5
19441   cat conftest.$ac_ext >&5
19442   rm -rf conftest*
19443   eval "ac_cv_lib_$ac_lib_var=no"
19444 fi
19445 rm -f conftest*
19446 LIBS="$ac_save_LIBS"
19447
19448 fi
19449 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19450   echo "$ac_t""yes" 1>&6
19451   have_odbc=yes
19452 else
19453   echo "$ac_t""no" 1>&6
19454 have_odbc=no
19455 fi
19456
19457                 if test $have_odbc = yes ; then
19458                         ol_link_sql="-lodbc"
19459                 fi
19460         fi
19461
19462         if test $ol_link_sql != no ; then
19463                 SLAPD_SQL_LIBS="$ol_link_sql"
19464
19465         elif test $ol_enable_sql != auto ; then
19466                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
19467         fi
19468 fi
19469
19470 if test $ol_enable_tcl != no ; then
19471         for ac_hdr in tcl.h
19472 do
19473 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19474 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19475 echo "configure:19476: checking for $ac_hdr" >&5
19476 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19477   echo $ac_n "(cached) $ac_c" 1>&6
19478 else
19479   cat > conftest.$ac_ext <<EOF
19480 #line 19481 "configure"
19481 #include "confdefs.h"
19482 #include <$ac_hdr>
19483 EOF
19484 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19485 { (eval echo configure:19486: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19486 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19487 if test -z "$ac_err"; then
19488   rm -rf conftest*
19489   eval "ac_cv_header_$ac_safe=yes"
19490 else
19491   echo "$ac_err" >&5
19492   echo "configure: failed program was:" >&5
19493   cat conftest.$ac_ext >&5
19494   rm -rf conftest*
19495   eval "ac_cv_header_$ac_safe=no"
19496 fi
19497 rm -f conftest*
19498 fi
19499 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19500   echo "$ac_t""yes" 1>&6
19501     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19502   cat >> confdefs.h <<EOF
19503 #define $ac_tr_hdr 1
19504 EOF
19505  
19506 else
19507   echo "$ac_t""no" 1>&6
19508 fi
19509 done
19510
19511
19512         if test $ac_cv_header_tcl_h != yes ; then
19513                 have_tcl=no
19514         else
19515                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
19516                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
19517 echo "configure:19518: checking for main in -l$lib" >&5
19518 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
19519 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19520   echo $ac_n "(cached) $ac_c" 1>&6
19521 else
19522   ac_save_LIBS="$LIBS"
19523 LIBS="-l$lib  $LIBS"
19524 cat > conftest.$ac_ext <<EOF
19525 #line 19526 "configure"
19526 #include "confdefs.h"
19527
19528 int main() {
19529 main()
19530 ; return 0; }
19531 EOF
19532 if { (eval echo configure:19533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19533   rm -rf conftest*
19534   eval "ac_cv_lib_$ac_lib_var=yes"
19535 else
19536   echo "configure: failed program was:" >&5
19537   cat conftest.$ac_ext >&5
19538   rm -rf conftest*
19539   eval "ac_cv_lib_$ac_lib_var=no"
19540 fi
19541 rm -f conftest*
19542 LIBS="$ac_save_LIBS"
19543
19544 fi
19545 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19546   echo "$ac_t""yes" 1>&6
19547   have_tcl=yes
19548                            if test x"$ol_with_tcl_module" = "xstatic" ; then
19549                                         SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
19550                            else
19551                                         MOD_TCL_LIB="-l${lib}"
19552                            fi;break
19553 else
19554   echo "$ac_t""no" 1>&6
19555 have_tcl=no
19556 fi
19557
19558                 done
19559         fi
19560
19561         if test $have_tcl != yes ; then
19562                 echo "configure: warning: could not find -ltcl" 1>&2
19563                 if test $ol_enable_tcl = yes ; then
19564                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
19565                 fi
19566
19567                 ol_enable_tcl=no
19568         fi
19569 fi
19570
19571 ol_link_termcap=no
19572 for ac_hdr in termcap.h ncurses.h
19573 do
19574 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19575 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19576 echo "configure:19577: checking for $ac_hdr" >&5
19577 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19578   echo $ac_n "(cached) $ac_c" 1>&6
19579 else
19580   cat > conftest.$ac_ext <<EOF
19581 #line 19582 "configure"
19582 #include "confdefs.h"
19583 #include <$ac_hdr>
19584 EOF
19585 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19586 { (eval echo configure:19587: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19587 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19588 if test -z "$ac_err"; then
19589   rm -rf conftest*
19590   eval "ac_cv_header_$ac_safe=yes"
19591 else
19592   echo "$ac_err" >&5
19593   echo "configure: failed program was:" >&5
19594   cat conftest.$ac_ext >&5
19595   rm -rf conftest*
19596   eval "ac_cv_header_$ac_safe=no"
19597 fi
19598 rm -f conftest*
19599 fi
19600 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19601   echo "$ac_t""yes" 1>&6
19602     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19603   cat >> confdefs.h <<EOF
19604 #define $ac_tr_hdr 1
19605 EOF
19606  
19607 else
19608   echo "$ac_t""no" 1>&6
19609 fi
19610 done
19611
19612
19613 if test $ol_link_termcap = no ; then
19614         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
19615 echo "configure:19616: checking for tputs in -ltermcap" >&5
19616 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
19617 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19618   echo $ac_n "(cached) $ac_c" 1>&6
19619 else
19620   ac_save_LIBS="$LIBS"
19621 LIBS="-ltermcap  $LIBS"
19622 cat > conftest.$ac_ext <<EOF
19623 #line 19624 "configure"
19624 #include "confdefs.h"
19625 /* Override any gcc2 internal prototype to avoid an error.  */
19626 /* We use char because int might match the return type of a gcc2
19627     builtin and then its argument prototype would still apply.  */
19628 char tputs();
19629
19630 int main() {
19631 tputs()
19632 ; return 0; }
19633 EOF
19634 if { (eval echo configure:19635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19635   rm -rf conftest*
19636   eval "ac_cv_lib_$ac_lib_var=yes"
19637 else
19638   echo "configure: failed program was:" >&5
19639   cat conftest.$ac_ext >&5
19640   rm -rf conftest*
19641   eval "ac_cv_lib_$ac_lib_var=no"
19642 fi
19643 rm -f conftest*
19644 LIBS="$ac_save_LIBS"
19645
19646 fi
19647 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19648   echo "$ac_t""yes" 1>&6
19649   have_termcap=yes
19650 else
19651   echo "$ac_t""no" 1>&6
19652 have_termcap=no
19653 fi
19654
19655         if test $have_termcap = yes ; then
19656                 cat >> confdefs.h <<\EOF
19657 #define HAVE_TERMCAP 1
19658 EOF
19659
19660                 ol_link_termcap=yes
19661                 TERMCAP_LIBS=-ltermcap
19662         fi
19663 fi
19664
19665 if test $ol_link_termcap = no ; then
19666         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
19667 echo "configure:19668: checking for initscr in -lncurses" >&5
19668 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
19669 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19670   echo $ac_n "(cached) $ac_c" 1>&6
19671 else
19672   ac_save_LIBS="$LIBS"
19673 LIBS="-lncurses  $LIBS"
19674 cat > conftest.$ac_ext <<EOF
19675 #line 19676 "configure"
19676 #include "confdefs.h"
19677 /* Override any gcc2 internal prototype to avoid an error.  */
19678 /* We use char because int might match the return type of a gcc2
19679     builtin and then its argument prototype would still apply.  */
19680 char initscr();
19681
19682 int main() {
19683 initscr()
19684 ; return 0; }
19685 EOF
19686 if { (eval echo configure:19687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19687   rm -rf conftest*
19688   eval "ac_cv_lib_$ac_lib_var=yes"
19689 else
19690   echo "configure: failed program was:" >&5
19691   cat conftest.$ac_ext >&5
19692   rm -rf conftest*
19693   eval "ac_cv_lib_$ac_lib_var=no"
19694 fi
19695 rm -f conftest*
19696 LIBS="$ac_save_LIBS"
19697
19698 fi
19699 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19700   echo "$ac_t""yes" 1>&6
19701   have_ncurses=yes
19702 else
19703   echo "$ac_t""no" 1>&6
19704 have_ncurses=no
19705 fi
19706
19707         if test $have_ncurses = yes ; then
19708                 cat >> confdefs.h <<\EOF
19709 #define HAVE_NCURSES 1
19710 EOF
19711
19712                 ol_link_termcap=yes
19713                 TERMCAP_LIBS=-lncurses
19714         fi
19715 fi
19716
19717 if test $ol_link_termcap = no ; then
19718         cat >> confdefs.h <<\EOF
19719 #define NO_TERMCAP 1
19720 EOF
19721
19722         TERMCAP_LIBS=
19723 fi
19724
19725 ol_link_sasl=no
19726 ol_link_spasswd=no
19727 if test $ol_with_cyrus_sasl != no ; then
19728         for ac_hdr in sasl/sasl.h sasl.h
19729 do
19730 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19731 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19732 echo "configure:19733: checking for $ac_hdr" >&5
19733 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19734   echo $ac_n "(cached) $ac_c" 1>&6
19735 else
19736   cat > conftest.$ac_ext <<EOF
19737 #line 19738 "configure"
19738 #include "confdefs.h"
19739 #include <$ac_hdr>
19740 EOF
19741 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19742 { (eval echo configure:19743: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19743 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19744 if test -z "$ac_err"; then
19745   rm -rf conftest*
19746   eval "ac_cv_header_$ac_safe=yes"
19747 else
19748   echo "$ac_err" >&5
19749   echo "configure: failed program was:" >&5
19750   cat conftest.$ac_ext >&5
19751   rm -rf conftest*
19752   eval "ac_cv_header_$ac_safe=no"
19753 fi
19754 rm -f conftest*
19755 fi
19756 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19757   echo "$ac_t""yes" 1>&6
19758     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19759   cat >> confdefs.h <<EOF
19760 #define $ac_tr_hdr 1
19761 EOF
19762  
19763 else
19764   echo "$ac_t""no" 1>&6
19765 fi
19766 done
19767
19768
19769         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
19770                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
19771 echo "configure:19772: checking for sasl_client_init in -lsasl2" >&5
19772 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
19773 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19774   echo $ac_n "(cached) $ac_c" 1>&6
19775 else
19776   ac_save_LIBS="$LIBS"
19777 LIBS="-lsasl2  $LIBS"
19778 cat > conftest.$ac_ext <<EOF
19779 #line 19780 "configure"
19780 #include "confdefs.h"
19781 /* Override any gcc2 internal prototype to avoid an error.  */
19782 /* We use char because int might match the return type of a gcc2
19783     builtin and then its argument prototype would still apply.  */
19784 char sasl_client_init();
19785
19786 int main() {
19787 sasl_client_init()
19788 ; return 0; }
19789 EOF
19790 if { (eval echo configure:19791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19791   rm -rf conftest*
19792   eval "ac_cv_lib_$ac_lib_var=yes"
19793 else
19794   echo "configure: failed program was:" >&5
19795   cat conftest.$ac_ext >&5
19796   rm -rf conftest*
19797   eval "ac_cv_lib_$ac_lib_var=no"
19798 fi
19799 rm -f conftest*
19800 LIBS="$ac_save_LIBS"
19801
19802 fi
19803 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19804   echo "$ac_t""yes" 1>&6
19805   ol_link_sasl="-lsasl2"
19806 else
19807   echo "$ac_t""no" 1>&6
19808 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
19809 echo "configure:19810: checking for sasl_client_init in -lsasl" >&5
19810 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
19811 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19812   echo $ac_n "(cached) $ac_c" 1>&6
19813 else
19814   ac_save_LIBS="$LIBS"
19815 LIBS="-lsasl  $LIBS"
19816 cat > conftest.$ac_ext <<EOF
19817 #line 19818 "configure"
19818 #include "confdefs.h"
19819 /* Override any gcc2 internal prototype to avoid an error.  */
19820 /* We use char because int might match the return type of a gcc2
19821     builtin and then its argument prototype would still apply.  */
19822 char sasl_client_init();
19823
19824 int main() {
19825 sasl_client_init()
19826 ; return 0; }
19827 EOF
19828 if { (eval echo configure:19829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19829   rm -rf conftest*
19830   eval "ac_cv_lib_$ac_lib_var=yes"
19831 else
19832   echo "configure: failed program was:" >&5
19833   cat conftest.$ac_ext >&5
19834   rm -rf conftest*
19835   eval "ac_cv_lib_$ac_lib_var=no"
19836 fi
19837 rm -f conftest*
19838 LIBS="$ac_save_LIBS"
19839
19840 fi
19841 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19842   echo "$ac_t""yes" 1>&6
19843   ol_link_sasl="-lsasl"
19844 else
19845   echo "$ac_t""no" 1>&6
19846 fi
19847
19848 fi
19849
19850         fi
19851
19852         if test $ol_link_sasl = no ; then
19853                 if test $ol_with_cyrus_sasl != auto ; then
19854                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
19855                 else
19856                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
19857                         echo "configure: warning: SASL authentication not supported!" 1>&2
19858                         if test $ol_link_tls = no ; then
19859                                 echo "configure: warning: Strong authentication not supported!" 1>&2
19860                         fi
19861                 fi
19862         else
19863                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
19864 echo "configure:19865: checking Cyrus SASL library version" >&5
19865 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
19866   echo $ac_n "(cached) $ac_c" 1>&6
19867 else
19868   
19869         cat > conftest.$ac_ext <<EOF
19870 #line 19871 "configure"
19871 #include "confdefs.h"
19872
19873 #ifdef HAVE_SASL_SASL_H
19874 #include <sasl/sasl.h>
19875 #else
19876 #include <sasl.h>
19877 #endif
19878
19879 /* require 2.1.3 or later */
19880 #if SASL_VERSION_MAJOR == 1  && SASL_VERSION_MINOR >= 5
19881         char *__sasl_compat = "1.5.x okay";
19882 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
19883         __sasl_compat "2.2+ or better okay (we guess)";
19884 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
19885         && SASL_VERSION_STEP >=3
19886         __sasl_compat = "2.1.3+ or better okay";
19887 #endif
19888         
19889 EOF
19890 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19891   egrep "__sasl_compat" >/dev/null 2>&1; then
19892   rm -rf conftest*
19893   ol_cv_sasl_compat=yes
19894 else
19895   rm -rf conftest*
19896   ol_cv_sasl_compat=no
19897 fi
19898 rm -f conftest*
19899
19900 fi
19901
19902 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
19903
19904                 if test $ol_cv_sasl_compat = no ; then
19905                         ol_link_sasl=no
19906                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
19907                 fi
19908
19909                 cat >> confdefs.h <<\EOF
19910 #define HAVE_CYRUS_SASL 1
19911 EOF
19912
19913                 SASL_LIBS="$ol_link_sasl"
19914                 if test $ol_enable_spasswd != no ; then
19915                         ol_link_spasswd=yes
19916                 fi
19917
19918                 ac_save_LIBS="$LIBS"
19919                 LIBS="$LIBS $ol_link_sasl"
19920                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
19921 echo "configure:19922: checking for sasl_version" >&5
19922 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
19923   echo $ac_n "(cached) $ac_c" 1>&6
19924 else
19925   cat > conftest.$ac_ext <<EOF
19926 #line 19927 "configure"
19927 #include "confdefs.h"
19928 /* System header to define __stub macros and hopefully few prototypes,
19929     which can conflict with char sasl_version(); below.  */
19930 #include <assert.h>
19931 /* Override any gcc2 internal prototype to avoid an error.  */
19932 /* We use char because int might match the return type of a gcc2
19933     builtin and then its argument prototype would still apply.  */
19934 char sasl_version();
19935 char (*f)();
19936
19937 int main() {
19938
19939 /* The GNU C library defines this for functions which it implements
19940     to always fail with ENOSYS.  Some functions are actually named
19941     something starting with __ and the normal name is an alias.  */
19942 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
19943 choke me
19944 #else
19945 f = sasl_version;
19946 #endif
19947
19948 ; return 0; }
19949 EOF
19950 if { (eval echo configure:19951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19951   rm -rf conftest*
19952   eval "ac_cv_func_sasl_version=yes"
19953 else
19954   echo "configure: failed program was:" >&5
19955   cat conftest.$ac_ext >&5
19956   rm -rf conftest*
19957   eval "ac_cv_func_sasl_version=no"
19958 fi
19959 rm -f conftest*
19960 fi
19961
19962 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
19963   echo "$ac_t""yes" 1>&6
19964   cat >> confdefs.h <<\EOF
19965 #define HAVE_SASL_VERSION 1
19966 EOF
19967
19968 else
19969   echo "$ac_t""no" 1>&6
19970 fi
19971
19972                 LIBS="$ac_save_LIBS"
19973         fi
19974
19975 else
19976         echo "configure: warning: SASL authentication not supported!" 1>&2
19977         if test $ol_link_tls = no ; then
19978                 echo "configure: warning: Strong authentication not supported!" 1>&2
19979         fi
19980 fi
19981
19982 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
19983         dev=no
19984         if test -r /dev/urandom ; then
19985                 dev="/dev/urandom";
19986         elif test -r /idev/urandom ; then
19987                 dev="/idev/urandom";
19988         elif test -r /dev/srandom ; then
19989                 dev="/dev/srandom";
19990         elif test -r /dev/random ; then
19991                 dev="/dev/random";
19992         elif test -r /idev/random ; then
19993                 dev="/idev/random";
19994         fi
19995
19996         if test $dev != no ; then
19997                 cat >> confdefs.h <<EOF
19998 #define URANDOM_DEVICE "$dev"
19999 EOF
20000
20001         fi
20002 fi
20003
20004 ol_link_fetch=no
20005 if test $ol_with_fetch != no ; then
20006         ol_LIBS=$LIBS
20007 LIBS="-lfetch -lcom_err $LIBS"
20008 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
20009 echo "configure:20010: checking fetch(3) library" >&5
20010 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
20011   echo $ac_n "(cached) $ac_c" 1>&6
20012 else
20013   
20014         cat > conftest.$ac_ext <<EOF
20015 #line 20016 "configure"
20016 #include "confdefs.h"
20017
20018 #include <sys/param.h>
20019 #include <stdio.h>
20020 #include <fetch.h>
20021 int main() {
20022 struct url *u = fetchParseURL("file:///"); 
20023 ; return 0; }
20024 EOF
20025 if { (eval echo configure:20026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20026   rm -rf conftest*
20027   ol_cv_lib_fetch=yes
20028 else
20029   echo "configure: failed program was:" >&5
20030   cat conftest.$ac_ext >&5
20031   rm -rf conftest*
20032   ol_cv_lib_fetch=no
20033 fi
20034 rm -f conftest*
20035 fi
20036
20037 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
20038 LIBS=$ol_LIBS
20039 if test $ol_cv_lib_fetch != no ; then
20040         ol_link_fetch="-lfetch -lcom_err"
20041         cat >> confdefs.h <<\EOF
20042 #define HAVE_FETCH 1
20043 EOF
20044
20045 fi
20046
20047
20048         if test $ol_cv_lib_fetch != no ; then
20049                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
20050                 ol_link_fetch=freebsd
20051
20052         elif test $ol_with_fetch != auto ; then
20053                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
20054         fi 
20055 fi
20056
20057 ol_link_readline=no
20058 if test $ol_with_readline != no ; then
20059         for ac_hdr in readline/readline.h readline/history.h
20060 do
20061 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20062 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20063 echo "configure:20064: checking for $ac_hdr" >&5
20064 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20065   echo $ac_n "(cached) $ac_c" 1>&6
20066 else
20067   cat > conftest.$ac_ext <<EOF
20068 #line 20069 "configure"
20069 #include "confdefs.h"
20070 #include <$ac_hdr>
20071 EOF
20072 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20073 { (eval echo configure:20074: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20074 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20075 if test -z "$ac_err"; then
20076   rm -rf conftest*
20077   eval "ac_cv_header_$ac_safe=yes"
20078 else
20079   echo "$ac_err" >&5
20080   echo "configure: failed program was:" >&5
20081   cat conftest.$ac_ext >&5
20082   rm -rf conftest*
20083   eval "ac_cv_header_$ac_safe=no"
20084 fi
20085 rm -f conftest*
20086 fi
20087 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20088   echo "$ac_t""yes" 1>&6
20089     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20090   cat >> confdefs.h <<EOF
20091 #define $ac_tr_hdr 1
20092 EOF
20093  
20094 else
20095   echo "$ac_t""no" 1>&6
20096 fi
20097 done
20098
20099
20100         if test $ac_cv_header_readline_readline_h = yes ; then
20101                 save_LIBS="$LIBS"
20102                 LIBS="$TERMCAP_LIBS $LIBS"
20103                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
20104 echo "configure:20105: checking for readline in -lreadline" >&5
20105 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
20106 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20107   echo $ac_n "(cached) $ac_c" 1>&6
20108 else
20109   ac_save_LIBS="$LIBS"
20110 LIBS="-lreadline  $LIBS"
20111 cat > conftest.$ac_ext <<EOF
20112 #line 20113 "configure"
20113 #include "confdefs.h"
20114 /* Override any gcc2 internal prototype to avoid an error.  */
20115 /* We use char because int might match the return type of a gcc2
20116     builtin and then its argument prototype would still apply.  */
20117 char readline();
20118
20119 int main() {
20120 readline()
20121 ; return 0; }
20122 EOF
20123 if { (eval echo configure:20124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20124   rm -rf conftest*
20125   eval "ac_cv_lib_$ac_lib_var=yes"
20126 else
20127   echo "configure: failed program was:" >&5
20128   cat conftest.$ac_ext >&5
20129   rm -rf conftest*
20130   eval "ac_cv_lib_$ac_lib_var=no"
20131 fi
20132 rm -f conftest*
20133 LIBS="$ac_save_LIBS"
20134
20135 fi
20136 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20137   echo "$ac_t""yes" 1>&6
20138   have_readline=yes
20139 else
20140   echo "$ac_t""no" 1>&6
20141 have_readline=no
20142 fi
20143
20144                 LIBS="$save_LIBS"
20145                         
20146                 if test $have_readline = yes ; then
20147                         ol_with_readline=found
20148                         ol_link_readline=yes
20149
20150                         READLINE_LIBS="-lreadline"
20151                 fi
20152         fi
20153 fi
20154
20155 if test $ol_link_readline = yes ; then
20156         cat >> confdefs.h <<\EOF
20157 #define HAVE_READLINE 1
20158 EOF
20159
20160 fi
20161
20162
20163 if test $ol_enable_crypt != no ; then
20164         save_LIBS="$LIBS"
20165         LIBS="$TLS_LIBS $LIBS"
20166
20167         echo $ac_n "checking for crypt""... $ac_c" 1>&6
20168 echo "configure:20169: checking for crypt" >&5
20169 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
20170   echo $ac_n "(cached) $ac_c" 1>&6
20171 else
20172   cat > conftest.$ac_ext <<EOF
20173 #line 20174 "configure"
20174 #include "confdefs.h"
20175 /* System header to define __stub macros and hopefully few prototypes,
20176     which can conflict with char crypt(); below.  */
20177 #include <assert.h>
20178 /* Override any gcc2 internal prototype to avoid an error.  */
20179 /* We use char because int might match the return type of a gcc2
20180     builtin and then its argument prototype would still apply.  */
20181 char crypt();
20182 char (*f)();
20183
20184 int main() {
20185
20186 /* The GNU C library defines this for functions which it implements
20187     to always fail with ENOSYS.  Some functions are actually named
20188     something starting with __ and the normal name is an alias.  */
20189 #if defined (__stub_crypt) || defined (__stub___crypt)
20190 choke me
20191 #else
20192 f = crypt;
20193 #endif
20194
20195 ; return 0; }
20196 EOF
20197 if { (eval echo configure:20198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20198   rm -rf conftest*
20199   eval "ac_cv_func_crypt=yes"
20200 else
20201   echo "configure: failed program was:" >&5
20202   cat conftest.$ac_ext >&5
20203   rm -rf conftest*
20204   eval "ac_cv_func_crypt=no"
20205 fi
20206 rm -f conftest*
20207 fi
20208
20209 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
20210   echo "$ac_t""yes" 1>&6
20211   have_crypt=yes
20212 else
20213   echo "$ac_t""no" 1>&6
20214
20215                 LIBS="$save_LIBS"
20216                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
20217 echo "configure:20218: checking for crypt in -lcrypt" >&5
20218 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
20219 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20220   echo $ac_n "(cached) $ac_c" 1>&6
20221 else
20222   ac_save_LIBS="$LIBS"
20223 LIBS="-lcrypt  $LIBS"
20224 cat > conftest.$ac_ext <<EOF
20225 #line 20226 "configure"
20226 #include "confdefs.h"
20227 /* Override any gcc2 internal prototype to avoid an error.  */
20228 /* We use char because int might match the return type of a gcc2
20229     builtin and then its argument prototype would still apply.  */
20230 char crypt();
20231
20232 int main() {
20233 crypt()
20234 ; return 0; }
20235 EOF
20236 if { (eval echo configure:20237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20237   rm -rf conftest*
20238   eval "ac_cv_lib_$ac_lib_var=yes"
20239 else
20240   echo "configure: failed program was:" >&5
20241   cat conftest.$ac_ext >&5
20242   rm -rf conftest*
20243   eval "ac_cv_lib_$ac_lib_var=no"
20244 fi
20245 rm -f conftest*
20246 LIBS="$ac_save_LIBS"
20247
20248 fi
20249 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20250   echo "$ac_t""yes" 1>&6
20251   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
20252                         have_crypt=yes
20253 else
20254   echo "$ac_t""no" 1>&6
20255 have_crypt=no
20256 fi
20257
20258 fi
20259
20260
20261         LIBS="$save_LIBS"
20262
20263         if test $have_crypt = yes ; then
20264                 cat >> confdefs.h <<\EOF
20265 #define HAVE_CRYPT 1
20266 EOF
20267
20268         else
20269                 echo "configure: warning: could not find crypt" 1>&2
20270                 if test $ol_enable_crypt = yes ; then
20271                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
20272                 fi
20273
20274                 echo "configure: warning: disabling crypt support" 1>&2
20275                 ol_enable_crypt=no
20276         fi
20277 fi
20278
20279 if test $ol_enable_proctitle != no ; then
20280         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
20281 echo "configure:20282: checking for setproctitle" >&5
20282 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
20283   echo $ac_n "(cached) $ac_c" 1>&6
20284 else
20285   cat > conftest.$ac_ext <<EOF
20286 #line 20287 "configure"
20287 #include "confdefs.h"
20288 /* System header to define __stub macros and hopefully few prototypes,
20289     which can conflict with char setproctitle(); below.  */
20290 #include <assert.h>
20291 /* Override any gcc2 internal prototype to avoid an error.  */
20292 /* We use char because int might match the return type of a gcc2
20293     builtin and then its argument prototype would still apply.  */
20294 char setproctitle();
20295 char (*f)();
20296
20297 int main() {
20298
20299 /* The GNU C library defines this for functions which it implements
20300     to always fail with ENOSYS.  Some functions are actually named
20301     something starting with __ and the normal name is an alias.  */
20302 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
20303 choke me
20304 #else
20305 f = setproctitle;
20306 #endif
20307
20308 ; return 0; }
20309 EOF
20310 if { (eval echo configure:20311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20311   rm -rf conftest*
20312   eval "ac_cv_func_setproctitle=yes"
20313 else
20314   echo "configure: failed program was:" >&5
20315   cat conftest.$ac_ext >&5
20316   rm -rf conftest*
20317   eval "ac_cv_func_setproctitle=no"
20318 fi
20319 rm -f conftest*
20320 fi
20321
20322 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
20323   echo "$ac_t""yes" 1>&6
20324   have_setproctitle=yes
20325 else
20326   echo "$ac_t""no" 1>&6
20327
20328                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
20329 echo "configure:20330: checking for setproctitle in -lutil" >&5
20330 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
20331 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20332   echo $ac_n "(cached) $ac_c" 1>&6
20333 else
20334   ac_save_LIBS="$LIBS"
20335 LIBS="-lutil  $LIBS"
20336 cat > conftest.$ac_ext <<EOF
20337 #line 20338 "configure"
20338 #include "confdefs.h"
20339 /* Override any gcc2 internal prototype to avoid an error.  */
20340 /* We use char because int might match the return type of a gcc2
20341     builtin and then its argument prototype would still apply.  */
20342 char setproctitle();
20343
20344 int main() {
20345 setproctitle()
20346 ; return 0; }
20347 EOF
20348 if { (eval echo configure:20349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20349   rm -rf conftest*
20350   eval "ac_cv_lib_$ac_lib_var=yes"
20351 else
20352   echo "configure: failed program was:" >&5
20353   cat conftest.$ac_ext >&5
20354   rm -rf conftest*
20355   eval "ac_cv_lib_$ac_lib_var=no"
20356 fi
20357 rm -f conftest*
20358 LIBS="$ac_save_LIBS"
20359
20360 fi
20361 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20362   echo "$ac_t""yes" 1>&6
20363   have_setproctitle=yes
20364                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
20365 else
20366   echo "$ac_t""no" 1>&6
20367 have_setproctitle=no
20368                         LIBOBJS="$LIBOBJS setproctitle.o"
20369                         LIBSRCS="$LIBSRCS setproctitle.c"
20370 fi
20371
20372 fi
20373
20374
20375         if test $have_setproctitle = yes ; then
20376                 cat >> confdefs.h <<\EOF
20377 #define HAVE_SETPROCTITLE 1
20378 EOF
20379
20380         fi
20381 fi
20382
20383 if test $ol_enable_slp != no ; then
20384         for ac_hdr in slp.h 
20385 do
20386 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20387 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20388 echo "configure:20389: checking for $ac_hdr" >&5
20389 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20390   echo $ac_n "(cached) $ac_c" 1>&6
20391 else
20392   cat > conftest.$ac_ext <<EOF
20393 #line 20394 "configure"
20394 #include "confdefs.h"
20395 #include <$ac_hdr>
20396 EOF
20397 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20398 { (eval echo configure:20399: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20399 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20400 if test -z "$ac_err"; then
20401   rm -rf conftest*
20402   eval "ac_cv_header_$ac_safe=yes"
20403 else
20404   echo "$ac_err" >&5
20405   echo "configure: failed program was:" >&5
20406   cat conftest.$ac_ext >&5
20407   rm -rf conftest*
20408   eval "ac_cv_header_$ac_safe=no"
20409 fi
20410 rm -f conftest*
20411 fi
20412 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20413   echo "$ac_t""yes" 1>&6
20414     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20415   cat >> confdefs.h <<EOF
20416 #define $ac_tr_hdr 1
20417 EOF
20418  
20419 else
20420   echo "$ac_t""no" 1>&6
20421 fi
20422 done
20423
20424
20425         if test $ac_cv_header_slp_h = yes ; then
20426                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
20427 echo "configure:20428: checking for SLPOpen in -lslp" >&5
20428 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
20429 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20430   echo $ac_n "(cached) $ac_c" 1>&6
20431 else
20432   ac_save_LIBS="$LIBS"
20433 LIBS="-lslp  $LIBS"
20434 cat > conftest.$ac_ext <<EOF
20435 #line 20436 "configure"
20436 #include "confdefs.h"
20437 /* Override any gcc2 internal prototype to avoid an error.  */
20438 /* We use char because int might match the return type of a gcc2
20439     builtin and then its argument prototype would still apply.  */
20440 char SLPOpen();
20441
20442 int main() {
20443 SLPOpen()
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   eval "ac_cv_lib_$ac_lib_var=yes"
20449 else
20450   echo "configure: failed program was:" >&5
20451   cat conftest.$ac_ext >&5
20452   rm -rf conftest*
20453   eval "ac_cv_lib_$ac_lib_var=no"
20454 fi
20455 rm -f conftest*
20456 LIBS="$ac_save_LIBS"
20457
20458 fi
20459 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20460   echo "$ac_t""yes" 1>&6
20461   have_slp=yes
20462 else
20463   echo "$ac_t""no" 1>&6
20464 have_slp=no
20465 fi
20466
20467                 if test $have_slp = yes ; then
20468                         cat >> confdefs.h <<\EOF
20469 #define HAVE_SLP 1
20470 EOF
20471
20472                         SLAPD_SLP_LIBS=-lslp
20473                 fi
20474
20475         elif test $ol_enable_slp = yes ; then
20476                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
20477         fi
20478 fi
20479
20480 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
20481 echo "configure:20482: checking for ANSI C header files" >&5
20482 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
20483   echo $ac_n "(cached) $ac_c" 1>&6
20484 else
20485   cat > conftest.$ac_ext <<EOF
20486 #line 20487 "configure"
20487 #include "confdefs.h"
20488 #include <stdlib.h>
20489 #include <stdarg.h>
20490 #include <string.h>
20491 #include <float.h>
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   ac_cv_header_stdc=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   ac_cv_header_stdc=no
20505 fi
20506 rm -f conftest*
20507
20508 if test $ac_cv_header_stdc = yes; then
20509   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
20510 cat > conftest.$ac_ext <<EOF
20511 #line 20512 "configure"
20512 #include "confdefs.h"
20513 #include <string.h>
20514 EOF
20515 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20516   egrep "memchr" >/dev/null 2>&1; then
20517   :
20518 else
20519   rm -rf conftest*
20520   ac_cv_header_stdc=no
20521 fi
20522 rm -f conftest*
20523
20524 fi
20525
20526 if test $ac_cv_header_stdc = yes; then
20527   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
20528 cat > conftest.$ac_ext <<EOF
20529 #line 20530 "configure"
20530 #include "confdefs.h"
20531 #include <stdlib.h>
20532 EOF
20533 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20534   egrep "free" >/dev/null 2>&1; then
20535   :
20536 else
20537   rm -rf conftest*
20538   ac_cv_header_stdc=no
20539 fi
20540 rm -f conftest*
20541
20542 fi
20543
20544 if test $ac_cv_header_stdc = yes; then
20545   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
20546 if test "$cross_compiling" = yes; then
20547   :
20548 else
20549   cat > conftest.$ac_ext <<EOF
20550 #line 20551 "configure"
20551 #include "confdefs.h"
20552 #include <ctype.h>
20553 #if ((' ' & 0x0FF) == 0x020)
20554 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
20555 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
20556 #else
20557 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
20558  || ('j' <= (c) && (c) <= 'r') \
20559  || ('s' <= (c) && (c) <= 'z'))
20560 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
20561 #endif
20562 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
20563 int main () { int i; for (i = 0; i < 256; i++)
20564 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
20565 exit (0); }
20566
20567 EOF
20568 if { (eval echo configure:20569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20569 then
20570   :
20571 else
20572   echo "configure: failed program was:" >&5
20573   cat conftest.$ac_ext >&5
20574   rm -fr conftest*
20575   ac_cv_header_stdc=no
20576 fi
20577 rm -fr conftest*
20578 fi
20579
20580 fi
20581 fi
20582
20583 echo "$ac_t""$ac_cv_header_stdc" 1>&6
20584 if test $ac_cv_header_stdc = yes; then
20585   cat >> confdefs.h <<\EOF
20586 #define STDC_HEADERS 1
20587 EOF
20588
20589 fi
20590
20591 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
20592 echo "configure:20593: checking for mode_t" >&5
20593 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
20594   echo $ac_n "(cached) $ac_c" 1>&6
20595 else
20596   cat > conftest.$ac_ext <<EOF
20597 #line 20598 "configure"
20598 #include "confdefs.h"
20599 #include <sys/types.h>
20600 #if STDC_HEADERS
20601 #include <stdlib.h>
20602 #include <stddef.h>
20603 #endif
20604
20605 EOF
20606 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20607   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20608   rm -rf conftest*
20609   eval "ac_cv_type_mode_t=yes"
20610 else
20611   rm -rf conftest*
20612   eval "ac_cv_type_mode_t=no"
20613 fi
20614 rm -f conftest*
20615
20616 fi
20617 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
20618   echo "$ac_t""yes" 1>&6
20619 else
20620   echo "$ac_t""no" 1>&6
20621   cat >> confdefs.h <<EOF
20622 #define mode_t int
20623 EOF
20624
20625 fi
20626
20627 echo $ac_n "checking for off_t""... $ac_c" 1>&6
20628 echo "configure:20629: checking for off_t" >&5
20629 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
20630   echo $ac_n "(cached) $ac_c" 1>&6
20631 else
20632   cat > conftest.$ac_ext <<EOF
20633 #line 20634 "configure"
20634 #include "confdefs.h"
20635 #include <sys/types.h>
20636 #if STDC_HEADERS
20637 #include <stdlib.h>
20638 #include <stddef.h>
20639 #endif
20640
20641 EOF
20642 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20643   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20644   rm -rf conftest*
20645   eval "ac_cv_type_off_t=yes"
20646 else
20647   rm -rf conftest*
20648   eval "ac_cv_type_off_t=no"
20649 fi
20650 rm -f conftest*
20651
20652 fi
20653 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
20654   echo "$ac_t""yes" 1>&6
20655 else
20656   echo "$ac_t""no" 1>&6
20657   cat >> confdefs.h <<EOF
20658 #define off_t long
20659 EOF
20660
20661 fi
20662
20663 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
20664 echo "configure:20665: checking for pid_t" >&5
20665 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
20666   echo $ac_n "(cached) $ac_c" 1>&6
20667 else
20668   cat > conftest.$ac_ext <<EOF
20669 #line 20670 "configure"
20670 #include "confdefs.h"
20671 #include <sys/types.h>
20672 #if STDC_HEADERS
20673 #include <stdlib.h>
20674 #include <stddef.h>
20675 #endif
20676
20677 EOF
20678 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20679   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20680   rm -rf conftest*
20681   eval "ac_cv_type_pid_t=yes"
20682 else
20683   rm -rf conftest*
20684   eval "ac_cv_type_pid_t=no"
20685 fi
20686 rm -f conftest*
20687
20688 fi
20689 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
20690   echo "$ac_t""yes" 1>&6
20691 else
20692   echo "$ac_t""no" 1>&6
20693   cat >> confdefs.h <<EOF
20694 #define pid_t int
20695 EOF
20696
20697 fi
20698
20699 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
20700 echo "configure:20701: checking for ptrdiff_t" >&5
20701 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
20702   echo $ac_n "(cached) $ac_c" 1>&6
20703 else
20704   cat > conftest.$ac_ext <<EOF
20705 #line 20706 "configure"
20706 #include "confdefs.h"
20707 #include <stddef.h>
20708 int main() {
20709 ptrdiff_t p
20710 ; return 0; }
20711 EOF
20712 if { (eval echo configure:20713: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20713   rm -rf conftest*
20714   am_cv_type_ptrdiff_t=yes
20715 else
20716   echo "configure: failed program was:" >&5
20717   cat conftest.$ac_ext >&5
20718   rm -rf conftest*
20719   am_cv_type_ptrdiff_t=no
20720 fi
20721 rm -f conftest*
20722 fi
20723
20724 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
20725    if test $am_cv_type_ptrdiff_t = yes; then
20726      cat >> confdefs.h <<\EOF
20727 #define HAVE_PTRDIFF_T 1
20728 EOF
20729
20730    fi
20731
20732 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
20733 echo "configure:20734: checking return type of signal handlers" >&5
20734 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
20735   echo $ac_n "(cached) $ac_c" 1>&6
20736 else
20737   cat > conftest.$ac_ext <<EOF
20738 #line 20739 "configure"
20739 #include "confdefs.h"
20740 #include <sys/types.h>
20741 #include <signal.h>
20742 #ifdef signal
20743 #undef signal
20744 #endif
20745 #ifdef __cplusplus
20746 extern "C" void (*signal (int, void (*)(int)))(int);
20747 #else
20748 void (*signal ()) ();
20749 #endif
20750
20751 int main() {
20752 int i;
20753 ; return 0; }
20754 EOF
20755 if { (eval echo configure:20756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20756   rm -rf conftest*
20757   ac_cv_type_signal=void
20758 else
20759   echo "configure: failed program was:" >&5
20760   cat conftest.$ac_ext >&5
20761   rm -rf conftest*
20762   ac_cv_type_signal=int
20763 fi
20764 rm -f conftest*
20765 fi
20766
20767 echo "$ac_t""$ac_cv_type_signal" 1>&6
20768 cat >> confdefs.h <<EOF
20769 #define RETSIGTYPE $ac_cv_type_signal
20770 EOF
20771
20772
20773 echo $ac_n "checking for size_t""... $ac_c" 1>&6
20774 echo "configure:20775: checking for size_t" >&5
20775 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
20776   echo $ac_n "(cached) $ac_c" 1>&6
20777 else
20778   cat > conftest.$ac_ext <<EOF
20779 #line 20780 "configure"
20780 #include "confdefs.h"
20781 #include <sys/types.h>
20782 #if STDC_HEADERS
20783 #include <stdlib.h>
20784 #include <stddef.h>
20785 #endif
20786
20787 EOF
20788 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20789   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20790   rm -rf conftest*
20791   eval "ac_cv_type_size_t=yes"
20792 else
20793   rm -rf conftest*
20794   eval "ac_cv_type_size_t=no"
20795 fi
20796 rm -f conftest*
20797
20798 fi
20799 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
20800   echo "$ac_t""yes" 1>&6
20801 else
20802   echo "$ac_t""no" 1>&6
20803   cat >> confdefs.h <<EOF
20804 #define size_t unsigned
20805 EOF
20806
20807 fi
20808
20809
20810 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
20811 echo "configure:20812: checking for ssize_t" >&5
20812 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
20813   echo $ac_n "(cached) $ac_c" 1>&6
20814 else
20815   cat > conftest.$ac_ext <<EOF
20816 #line 20817 "configure"
20817 #include "confdefs.h"
20818 #include <sys/types.h>
20819 #if STDC_HEADERS
20820 #include <stdlib.h>
20821 #include <stddef.h>
20822 #endif
20823
20824 EOF
20825 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20826   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20827   rm -rf conftest*
20828   eval "ac_cv_type_ssize_t=yes"
20829 else
20830   rm -rf conftest*
20831   eval "ac_cv_type_ssize_t=no"
20832 fi
20833 rm -f conftest*
20834
20835 fi
20836 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
20837   echo "$ac_t""yes" 1>&6
20838 else
20839   echo "$ac_t""no" 1>&6
20840   cat >> confdefs.h <<EOF
20841 #define ssize_t signed int
20842 EOF
20843
20844 fi
20845
20846 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
20847 echo "configure:20848: checking for caddr_t" >&5
20848 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
20849   echo $ac_n "(cached) $ac_c" 1>&6
20850 else
20851   cat > conftest.$ac_ext <<EOF
20852 #line 20853 "configure"
20853 #include "confdefs.h"
20854 #include <sys/types.h>
20855 #if STDC_HEADERS
20856 #include <stdlib.h>
20857 #include <stddef.h>
20858 #endif
20859
20860 EOF
20861 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20862   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20863   rm -rf conftest*
20864   eval "ac_cv_type_caddr_t=yes"
20865 else
20866   rm -rf conftest*
20867   eval "ac_cv_type_caddr_t=no"
20868 fi
20869 rm -f conftest*
20870
20871 fi
20872 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
20873   echo "$ac_t""yes" 1>&6
20874 else
20875   echo "$ac_t""no" 1>&6
20876   cat >> confdefs.h <<EOF
20877 #define caddr_t char *
20878 EOF
20879
20880 fi
20881
20882
20883 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
20884 echo "configure:20885: checking for socklen_t" >&5
20885 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
20886   echo $ac_n "(cached) $ac_c" 1>&6
20887 else
20888   cat > conftest.$ac_ext <<EOF
20889 #line 20890 "configure"
20890 #include "confdefs.h"
20891
20892 #ifdef HAVE_SYS_TYPES_H
20893 #include <sys/types.h>
20894 #endif
20895 #ifdef HAVE_SYS_SOCKET_H
20896 #include <sys/socket.h>
20897 #endif
20898
20899 int main() {
20900 socklen_t len;
20901 ; return 0; }
20902 EOF
20903 if { (eval echo configure:20904: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20904   rm -rf conftest*
20905   ol_cv_type_socklen_t=yes
20906 else
20907   echo "configure: failed program was:" >&5
20908   cat conftest.$ac_ext >&5
20909   rm -rf conftest*
20910   ol_cv_type_socklen_t=no
20911 fi
20912 rm -f conftest*
20913 fi
20914
20915 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
20916   if test $ol_cv_type_socklen_t = no; then
20917     cat >> confdefs.h <<\EOF
20918 #define socklen_t int
20919 EOF
20920
20921   fi
20922  
20923 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
20924 echo "configure:20925: checking for member st_blksize in aggregate type struct stat" >&5
20925 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
20926   echo $ac_n "(cached) $ac_c" 1>&6
20927 else
20928   cat > conftest.$ac_ext <<EOF
20929 #line 20930 "configure"
20930 #include "confdefs.h"
20931 #include <sys/types.h>
20932 #include <sys/stat.h>
20933 int main() {
20934 struct stat foo; foo.st_blksize;
20935 ; return 0; }
20936 EOF
20937 if { (eval echo configure:20938: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20938   rm -rf conftest*
20939   ac_cv_c_struct_member_st_blksize=yes
20940 else
20941   echo "configure: failed program was:" >&5
20942   cat conftest.$ac_ext >&5
20943   rm -rf conftest*
20944   ac_cv_c_struct_member_st_blksize=no
20945 fi
20946 rm -f conftest*
20947 fi
20948
20949 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
20950 st_blksize="$ac_cv_c_struct_member_st_blksize"
20951 if test $ac_cv_c_struct_member_st_blksize = yes; then
20952   cat >> confdefs.h <<\EOF
20953 #define HAVE_ST_BLKSIZE 1
20954 EOF
20955
20956 fi
20957
20958 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
20959 echo "configure:20960: checking whether time.h and sys/time.h may both be included" >&5
20960 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
20961   echo $ac_n "(cached) $ac_c" 1>&6
20962 else
20963   cat > conftest.$ac_ext <<EOF
20964 #line 20965 "configure"
20965 #include "confdefs.h"
20966 #include <sys/types.h>
20967 #include <sys/time.h>
20968 #include <time.h>
20969 int main() {
20970 struct tm *tp;
20971 ; return 0; }
20972 EOF
20973 if { (eval echo configure:20974: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20974   rm -rf conftest*
20975   ac_cv_header_time=yes
20976 else
20977   echo "configure: failed program was:" >&5
20978   cat conftest.$ac_ext >&5
20979   rm -rf conftest*
20980   ac_cv_header_time=no
20981 fi
20982 rm -f conftest*
20983 fi
20984
20985 echo "$ac_t""$ac_cv_header_time" 1>&6
20986 if test $ac_cv_header_time = yes; then
20987   cat >> confdefs.h <<\EOF
20988 #define TIME_WITH_SYS_TIME 1
20989 EOF
20990
20991 fi
20992
20993 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
20994 echo "configure:20995: checking whether struct tm is in sys/time.h or time.h" >&5
20995 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
20996   echo $ac_n "(cached) $ac_c" 1>&6
20997 else
20998   cat > conftest.$ac_ext <<EOF
20999 #line 21000 "configure"
21000 #include "confdefs.h"
21001 #include <sys/types.h>
21002 #include <time.h>
21003 int main() {
21004 struct tm *tp; tp->tm_sec;
21005 ; return 0; }
21006 EOF
21007 if { (eval echo configure:21008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21008   rm -rf conftest*
21009   ac_cv_struct_tm=time.h
21010 else
21011   echo "configure: failed program was:" >&5
21012   cat conftest.$ac_ext >&5
21013   rm -rf conftest*
21014   ac_cv_struct_tm=sys/time.h
21015 fi
21016 rm -f conftest*
21017 fi
21018
21019 echo "$ac_t""$ac_cv_struct_tm" 1>&6
21020 if test $ac_cv_struct_tm = sys/time.h; then
21021   cat >> confdefs.h <<\EOF
21022 #define TM_IN_SYS_TIME 1
21023 EOF
21024
21025 fi
21026
21027 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
21028 echo "configure:21029: checking for uid_t in sys/types.h" >&5
21029 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
21030   echo $ac_n "(cached) $ac_c" 1>&6
21031 else
21032   cat > conftest.$ac_ext <<EOF
21033 #line 21034 "configure"
21034 #include "confdefs.h"
21035 #include <sys/types.h>
21036 EOF
21037 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21038   egrep "uid_t" >/dev/null 2>&1; then
21039   rm -rf conftest*
21040   ac_cv_type_uid_t=yes
21041 else
21042   rm -rf conftest*
21043   ac_cv_type_uid_t=no
21044 fi
21045 rm -f conftest*
21046
21047 fi
21048
21049 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
21050 if test $ac_cv_type_uid_t = no; then
21051   cat >> confdefs.h <<\EOF
21052 #define uid_t int
21053 EOF
21054
21055   cat >> confdefs.h <<\EOF
21056 #define gid_t int
21057 EOF
21058
21059 fi
21060
21061 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
21062 echo "configure:21063: checking for sig_atomic_t" >&5
21063 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
21064   echo $ac_n "(cached) $ac_c" 1>&6
21065 else
21066   cat > conftest.$ac_ext <<EOF
21067 #line 21068 "configure"
21068 #include "confdefs.h"
21069 #include <signal.h>
21070 int main() {
21071 sig_atomic_t atomic;
21072 ; return 0; }
21073 EOF
21074 if { (eval echo configure:21075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21075   rm -rf conftest*
21076   ol_cv_type_sig_atomic_t=yes
21077 else
21078   echo "configure: failed program was:" >&5
21079   cat conftest.$ac_ext >&5
21080   rm -rf conftest*
21081   ol_cv_type_sig_atomic_t=no
21082 fi
21083 rm -f conftest*
21084 fi
21085
21086 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
21087   if test $ol_cv_type_sig_atomic_t = no; then
21088     cat >> confdefs.h <<\EOF
21089 #define sig_atomic_t int
21090 EOF
21091
21092   fi
21093  
21094
21095
21096 # test for pw_gecos in struct passwd
21097 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
21098 echo "configure:21099: checking struct passwd for pw_gecos" >&5
21099 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
21100   echo $ac_n "(cached) $ac_c" 1>&6
21101 else
21102   
21103         cat > conftest.$ac_ext <<EOF
21104 #line 21105 "configure"
21105 #include "confdefs.h"
21106 #include <pwd.h>
21107 int main() {
21108
21109         struct passwd pwd;
21110         pwd.pw_gecos = pwd.pw_name;
21111
21112 ; return 0; }
21113 EOF
21114 if { (eval echo configure:21115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21115   rm -rf conftest*
21116   ol_cv_struct_passwd_pw_gecos=yes
21117 else
21118   echo "configure: failed program was:" >&5
21119   cat conftest.$ac_ext >&5
21120   rm -rf conftest*
21121   ol_cv_struct_passwd_pw_gecos=no
21122 fi
21123 rm -f conftest*
21124 fi
21125
21126 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
21127 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
21128         cat >> confdefs.h <<\EOF
21129 #define HAVE_PW_GECOS 1
21130 EOF
21131
21132 fi
21133
21134 # test for pw_passwd in struct passwd
21135 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
21136 echo "configure:21137: checking struct passwd for pw_passwd" >&5
21137 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
21138   echo $ac_n "(cached) $ac_c" 1>&6
21139 else
21140   
21141         cat > conftest.$ac_ext <<EOF
21142 #line 21143 "configure"
21143 #include "confdefs.h"
21144 #include <pwd.h>
21145 int main() {
21146
21147         struct passwd pwd;
21148         pwd.pw_passwd = pwd.pw_name;
21149
21150 ; return 0; }
21151 EOF
21152 if { (eval echo configure:21153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21153   rm -rf conftest*
21154   ol_cv_struct_passwd_pw_passwd=yes
21155 else
21156   echo "configure: failed program was:" >&5
21157   cat conftest.$ac_ext >&5
21158   rm -rf conftest*
21159   ol_cv_struct_passwd_pw_passwd=no
21160 fi
21161 rm -f conftest*
21162 fi
21163
21164 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
21165 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
21166         cat >> confdefs.h <<\EOF
21167 #define HAVE_PW_PASSWD 1
21168 EOF
21169
21170 fi
21171
21172
21173 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
21174 echo "configure:21175: checking if toupper() requires islower()" >&5
21175 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
21176   echo $ac_n "(cached) $ac_c" 1>&6
21177 else
21178   
21179         if test "$cross_compiling" = yes; then
21180   ol_cv_c_upper_lower=safe
21181 else
21182   cat > conftest.$ac_ext <<EOF
21183 #line 21184 "configure"
21184 #include "confdefs.h"
21185
21186 #include <ctype.h>
21187 main()
21188 {
21189         if ('C' == toupper('C'))
21190                 exit(0);
21191         else
21192                 exit(1);
21193 }
21194 EOF
21195 if { (eval echo configure:21196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21196 then
21197   ol_cv_c_upper_lower=no
21198 else
21199   echo "configure: failed program was:" >&5
21200   cat conftest.$ac_ext >&5
21201   rm -fr conftest*
21202   ol_cv_c_upper_lower=yes
21203 fi
21204 rm -fr conftest*
21205 fi
21206
21207 fi
21208
21209 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
21210 if test $ol_cv_c_upper_lower != no ; then
21211         cat >> confdefs.h <<\EOF
21212 #define C_UPPER_LOWER 1
21213 EOF
21214
21215 fi
21216
21217 echo $ac_n "checking for working const""... $ac_c" 1>&6
21218 echo "configure:21219: checking for working const" >&5
21219 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
21220   echo $ac_n "(cached) $ac_c" 1>&6
21221 else
21222   cat > conftest.$ac_ext <<EOF
21223 #line 21224 "configure"
21224 #include "confdefs.h"
21225
21226 int main() {
21227
21228 /* Ultrix mips cc rejects this.  */
21229 typedef int charset[2]; const charset x;
21230 /* SunOS 4.1.1 cc rejects this.  */
21231 char const *const *ccp;
21232 char **p;
21233 /* NEC SVR4.0.2 mips cc rejects this.  */
21234 struct point {int x, y;};
21235 static struct point const zero = {0,0};
21236 /* AIX XL C 1.02.0.0 rejects this.
21237    It does not let you subtract one const X* pointer from another in an arm
21238    of an if-expression whose if-part is not a constant expression */
21239 const char *g = "string";
21240 ccp = &g + (g ? g-g : 0);
21241 /* HPUX 7.0 cc rejects these. */
21242 ++ccp;
21243 p = (char**) ccp;
21244 ccp = (char const *const *) p;
21245 { /* SCO 3.2v4 cc rejects this.  */
21246   char *t;
21247   char const *s = 0 ? (char *) 0 : (char const *) 0;
21248
21249   *t++ = 0;
21250 }
21251 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
21252   int x[] = {25, 17};
21253   const int *foo = &x[0];
21254   ++foo;
21255 }
21256 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21257   typedef const int *iptr;
21258   iptr p = 0;
21259   ++p;
21260 }
21261 { /* AIX XL C 1.02.0.0 rejects this saying
21262      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21263   struct s { int j; const int *ap[3]; };
21264   struct s *b; b->j = 5;
21265 }
21266 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21267   const int foo = 10;
21268 }
21269
21270 ; return 0; }
21271 EOF
21272 if { (eval echo configure:21273: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21273   rm -rf conftest*
21274   ac_cv_c_const=yes
21275 else
21276   echo "configure: failed program was:" >&5
21277   cat conftest.$ac_ext >&5
21278   rm -rf conftest*
21279   ac_cv_c_const=no
21280 fi
21281 rm -f conftest*
21282 fi
21283
21284 echo "$ac_t""$ac_cv_c_const" 1>&6
21285 if test $ac_cv_c_const = no; then
21286   cat >> confdefs.h <<\EOF
21287 #define const 
21288 EOF
21289
21290 fi
21291
21292 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
21293 echo "configure:21294: checking if compiler understands volatile" >&5
21294 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
21295   echo $ac_n "(cached) $ac_c" 1>&6
21296 else
21297   cat > conftest.$ac_ext <<EOF
21298 #line 21299 "configure"
21299 #include "confdefs.h"
21300 int x, y, z;
21301 int main() {
21302 volatile int a; int * volatile b = x ? &y : &z;
21303       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
21304       *b = 0;
21305 ; return 0; }
21306 EOF
21307 if { (eval echo configure:21308: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21308   rm -rf conftest*
21309   ol_cv_c_volatile=yes
21310 else
21311   echo "configure: failed program was:" >&5
21312   cat conftest.$ac_ext >&5
21313   rm -rf conftest*
21314   ol_cv_c_volatile=no
21315 fi
21316 rm -f conftest*
21317 fi
21318
21319 echo "$ac_t""$ol_cv_c_volatile" 1>&6
21320   if test $ol_cv_c_volatile = yes; then
21321     : 
21322   else
21323     cat >> confdefs.h <<\EOF
21324 #define volatile 
21325 EOF
21326
21327   fi
21328  
21329
21330 if test $cross_compiling = yes ; then
21331         cat >> confdefs.h <<\EOF
21332 #define CROSS_COMPILING 1
21333 EOF
21334
21335 else
21336         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
21337 echo "configure:21338: checking whether byte ordering is bigendian" >&5
21338 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
21339   echo $ac_n "(cached) $ac_c" 1>&6
21340 else
21341   ac_cv_c_bigendian=unknown
21342 # See if sys/param.h defines the BYTE_ORDER macro.
21343 cat > conftest.$ac_ext <<EOF
21344 #line 21345 "configure"
21345 #include "confdefs.h"
21346 #include <sys/types.h>
21347 #include <sys/param.h>
21348 int main() {
21349
21350 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
21351  bogus endian macros
21352 #endif
21353 ; return 0; }
21354 EOF
21355 if { (eval echo configure:21356: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21356   rm -rf conftest*
21357   # It does; now see whether it defined to BIG_ENDIAN or not.
21358 cat > conftest.$ac_ext <<EOF
21359 #line 21360 "configure"
21360 #include "confdefs.h"
21361 #include <sys/types.h>
21362 #include <sys/param.h>
21363 int main() {
21364
21365 #if BYTE_ORDER != BIG_ENDIAN
21366  not big endian
21367 #endif
21368 ; return 0; }
21369 EOF
21370 if { (eval echo configure:21371: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21371   rm -rf conftest*
21372   ac_cv_c_bigendian=yes
21373 else
21374   echo "configure: failed program was:" >&5
21375   cat conftest.$ac_ext >&5
21376   rm -rf conftest*
21377   ac_cv_c_bigendian=no
21378 fi
21379 rm -f conftest*
21380 else
21381   echo "configure: failed program was:" >&5
21382   cat conftest.$ac_ext >&5
21383 fi
21384 rm -f conftest*
21385 if test $ac_cv_c_bigendian = unknown; then
21386 if test "$cross_compiling" = yes; then
21387     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
21388 else
21389   cat > conftest.$ac_ext <<EOF
21390 #line 21391 "configure"
21391 #include "confdefs.h"
21392 main () {
21393   /* Are we little or big endian?  From Harbison&Steele.  */
21394   union
21395   {
21396     long l;
21397     char c[sizeof (long)];
21398   } u;
21399   u.l = 1;
21400   exit (u.c[sizeof (long) - 1] == 1);
21401 }
21402 EOF
21403 if { (eval echo configure:21404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21404 then
21405   ac_cv_c_bigendian=no
21406 else
21407   echo "configure: failed program was:" >&5
21408   cat conftest.$ac_ext >&5
21409   rm -fr conftest*
21410   ac_cv_c_bigendian=yes
21411 fi
21412 rm -fr conftest*
21413 fi
21414
21415 fi
21416 fi
21417
21418 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
21419 if test $ac_cv_c_bigendian = yes; then
21420   cat >> confdefs.h <<\EOF
21421 #define WORDS_BIGENDIAN 1
21422 EOF
21423
21424 fi
21425
21426 fi
21427
21428 echo $ac_n "checking size of short""... $ac_c" 1>&6
21429 echo "configure:21430: checking size of short" >&5 
21430 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
21431   echo $ac_n "(cached) $ac_c" 1>&6
21432 else
21433   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21434   cat > conftest.$ac_ext <<EOF
21435 #line 21436 "configure"
21436 #include "confdefs.h"
21437 #include "confdefs.h" 
21438 #include <sys/types.h> 
21439  
21440
21441 int main() {
21442 switch (0) case 0: case (sizeof (short) == $ac_size):;
21443 ; return 0; }
21444 EOF
21445 if { (eval echo configure:21446: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21446   rm -rf conftest*
21447   ac_cv_sizeof_short=$ac_size
21448 else
21449   echo "configure: failed program was:" >&5
21450   cat conftest.$ac_ext >&5
21451 fi
21452 rm -f conftest* 
21453   if test x$ac_cv_sizeof_short != x ; then break; fi 
21454 done 
21455
21456 fi
21457  
21458 if test x$ac_cv_sizeof_short = x ; then 
21459   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
21460 fi 
21461 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
21462 cat >> confdefs.h <<EOF
21463 #define SIZEOF_SHORT $ac_cv_sizeof_short
21464 EOF
21465  
21466  
21467 echo $ac_n "checking size of int""... $ac_c" 1>&6
21468 echo "configure:21469: checking size of int" >&5 
21469 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
21470   echo $ac_n "(cached) $ac_c" 1>&6
21471 else
21472   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21473   cat > conftest.$ac_ext <<EOF
21474 #line 21475 "configure"
21475 #include "confdefs.h"
21476 #include "confdefs.h" 
21477 #include <sys/types.h> 
21478  
21479
21480 int main() {
21481 switch (0) case 0: case (sizeof (int) == $ac_size):;
21482 ; return 0; }
21483 EOF
21484 if { (eval echo configure:21485: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21485   rm -rf conftest*
21486   ac_cv_sizeof_int=$ac_size
21487 else
21488   echo "configure: failed program was:" >&5
21489   cat conftest.$ac_ext >&5
21490 fi
21491 rm -f conftest* 
21492   if test x$ac_cv_sizeof_int != x ; then break; fi 
21493 done 
21494
21495 fi
21496  
21497 if test x$ac_cv_sizeof_int = x ; then 
21498   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
21499 fi 
21500 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
21501 cat >> confdefs.h <<EOF
21502 #define SIZEOF_INT $ac_cv_sizeof_int
21503 EOF
21504  
21505  
21506 echo $ac_n "checking size of long""... $ac_c" 1>&6
21507 echo "configure:21508: checking size of long" >&5 
21508 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
21509   echo $ac_n "(cached) $ac_c" 1>&6
21510 else
21511   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21512   cat > conftest.$ac_ext <<EOF
21513 #line 21514 "configure"
21514 #include "confdefs.h"
21515 #include "confdefs.h" 
21516 #include <sys/types.h> 
21517  
21518
21519 int main() {
21520 switch (0) case 0: case (sizeof (long) == $ac_size):;
21521 ; return 0; }
21522 EOF
21523 if { (eval echo configure:21524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21524   rm -rf conftest*
21525   ac_cv_sizeof_long=$ac_size
21526 else
21527   echo "configure: failed program was:" >&5
21528   cat conftest.$ac_ext >&5
21529 fi
21530 rm -f conftest* 
21531   if test x$ac_cv_sizeof_long != x ; then break; fi 
21532 done 
21533
21534 fi
21535  
21536 if test x$ac_cv_sizeof_long = x ; then 
21537   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
21538 fi 
21539 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
21540 cat >> confdefs.h <<EOF
21541 #define SIZEOF_LONG $ac_cv_sizeof_long
21542 EOF
21543  
21544
21545
21546 if test "$ac_cv_sizeof_int" -lt 4 ; then
21547         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
21548
21549         cat >> confdefs.h <<\EOF
21550 #define LBER_INT_T long
21551 EOF
21552
21553 else
21554         cat >> confdefs.h <<\EOF
21555 #define LBER_INT_T int
21556 EOF
21557
21558 fi
21559
21560 cat >> confdefs.h <<\EOF
21561 #define LBER_LEN_T long
21562 EOF
21563
21564 cat >> confdefs.h <<\EOF
21565 #define LBER_SOCKET_T int
21566 EOF
21567
21568 cat >> confdefs.h <<\EOF
21569 #define LBER_TAG_T long
21570 EOF
21571
21572
21573 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
21574 echo "configure:21575: checking for 8-bit clean memcmp" >&5
21575 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
21576   echo $ac_n "(cached) $ac_c" 1>&6
21577 else
21578   if test "$cross_compiling" = yes; then
21579   ac_cv_func_memcmp_clean=no
21580 else
21581   cat > conftest.$ac_ext <<EOF
21582 #line 21583 "configure"
21583 #include "confdefs.h"
21584
21585 main()
21586 {
21587   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
21588   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
21589 }
21590
21591 EOF
21592 if { (eval echo configure:21593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21593 then
21594   ac_cv_func_memcmp_clean=yes
21595 else
21596   echo "configure: failed program was:" >&5
21597   cat conftest.$ac_ext >&5
21598   rm -fr conftest*
21599   ac_cv_func_memcmp_clean=no
21600 fi
21601 rm -fr conftest*
21602 fi
21603
21604 fi
21605
21606 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
21607 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
21608
21609 echo $ac_n "checking for strftime""... $ac_c" 1>&6
21610 echo "configure:21611: checking for strftime" >&5
21611 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
21612   echo $ac_n "(cached) $ac_c" 1>&6
21613 else
21614   cat > conftest.$ac_ext <<EOF
21615 #line 21616 "configure"
21616 #include "confdefs.h"
21617 /* System header to define __stub macros and hopefully few prototypes,
21618     which can conflict with char strftime(); below.  */
21619 #include <assert.h>
21620 /* Override any gcc2 internal prototype to avoid an error.  */
21621 /* We use char because int might match the return type of a gcc2
21622     builtin and then its argument prototype would still apply.  */
21623 char strftime();
21624 char (*f)();
21625
21626 int main() {
21627
21628 /* The GNU C library defines this for functions which it implements
21629     to always fail with ENOSYS.  Some functions are actually named
21630     something starting with __ and the normal name is an alias.  */
21631 #if defined (__stub_strftime) || defined (__stub___strftime)
21632 choke me
21633 #else
21634 f = strftime;
21635 #endif
21636
21637 ; return 0; }
21638 EOF
21639 if { (eval echo configure:21640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21640   rm -rf conftest*
21641   eval "ac_cv_func_strftime=yes"
21642 else
21643   echo "configure: failed program was:" >&5
21644   cat conftest.$ac_ext >&5
21645   rm -rf conftest*
21646   eval "ac_cv_func_strftime=no"
21647 fi
21648 rm -f conftest*
21649 fi
21650
21651 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
21652   echo "$ac_t""yes" 1>&6
21653   cat >> confdefs.h <<\EOF
21654 #define HAVE_STRFTIME 1
21655 EOF
21656
21657 else
21658   echo "$ac_t""no" 1>&6
21659 # strftime is in -lintl on SCO UNIX.
21660 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
21661 echo "configure:21662: checking for strftime in -lintl" >&5
21662 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
21663 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21664   echo $ac_n "(cached) $ac_c" 1>&6
21665 else
21666   ac_save_LIBS="$LIBS"
21667 LIBS="-lintl  $LIBS"
21668 cat > conftest.$ac_ext <<EOF
21669 #line 21670 "configure"
21670 #include "confdefs.h"
21671 /* Override any gcc2 internal prototype to avoid an error.  */
21672 /* We use char because int might match the return type of a gcc2
21673     builtin and then its argument prototype would still apply.  */
21674 char strftime();
21675
21676 int main() {
21677 strftime()
21678 ; return 0; }
21679 EOF
21680 if { (eval echo configure:21681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21681   rm -rf conftest*
21682   eval "ac_cv_lib_$ac_lib_var=yes"
21683 else
21684   echo "configure: failed program was:" >&5
21685   cat conftest.$ac_ext >&5
21686   rm -rf conftest*
21687   eval "ac_cv_lib_$ac_lib_var=no"
21688 fi
21689 rm -f conftest*
21690 LIBS="$ac_save_LIBS"
21691
21692 fi
21693 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21694   echo "$ac_t""yes" 1>&6
21695   cat >> confdefs.h <<\EOF
21696 #define HAVE_STRFTIME 1
21697 EOF
21698
21699 LIBS="-lintl $LIBS"
21700 else
21701   echo "$ac_t""no" 1>&6
21702 fi
21703
21704 fi
21705
21706
21707 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
21708 echo "configure:21709: checking for inet_aton()" >&5
21709 if eval "test \"\${ol_cv_func_inet_aton+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
21716 #ifdef HAVE_SYS_TYPES_H
21717 #       include <sys/types.h>
21718 #endif
21719 #ifdef HAVE_SYS_SOCKET_H
21720 #       include <sys/socket.h>
21721 #       ifdef HAVE_SYS_SELECT_H
21722 #               include <sys/select.h>
21723 #       endif
21724 #       include <netinet/in.h>
21725 #       ifdef HAVE_ARPA_INET_H
21726 #               include <arpa/inet.h>
21727 #       endif
21728 #endif
21729
21730 int main() {
21731 struct in_addr in;
21732 int rc = inet_aton( "255.255.255.255", &in );
21733 ; return 0; }
21734 EOF
21735 if { (eval echo configure:21736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21736   rm -rf conftest*
21737   ol_cv_func_inet_aton=yes
21738 else
21739   echo "configure: failed program was:" >&5
21740   cat conftest.$ac_ext >&5
21741   rm -rf conftest*
21742   ol_cv_func_inet_aton=no
21743 fi
21744 rm -f conftest*
21745 fi
21746
21747 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
21748   if test $ol_cv_func_inet_aton != no; then
21749     cat >> confdefs.h <<\EOF
21750 #define HAVE_INET_ATON 1
21751 EOF
21752
21753   fi
21754  
21755
21756 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
21757 echo "configure:21758: checking for _spawnlp" >&5
21758 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
21759   echo $ac_n "(cached) $ac_c" 1>&6
21760 else
21761   cat > conftest.$ac_ext <<EOF
21762 #line 21763 "configure"
21763 #include "confdefs.h"
21764 /* System header to define __stub macros and hopefully few prototypes,
21765     which can conflict with char _spawnlp(); below.  */
21766 #include <assert.h>
21767 /* Override any gcc2 internal prototype to avoid an error.  */
21768 /* We use char because int might match the return type of a gcc2
21769     builtin and then its argument prototype would still apply.  */
21770 char _spawnlp();
21771 char (*f)();
21772
21773 int main() {
21774
21775 /* The GNU C library defines this for functions which it implements
21776     to always fail with ENOSYS.  Some functions are actually named
21777     something starting with __ and the normal name is an alias.  */
21778 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
21779 choke me
21780 #else
21781 f = _spawnlp;
21782 #endif
21783
21784 ; return 0; }
21785 EOF
21786 if { (eval echo configure:21787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21787   rm -rf conftest*
21788   eval "ac_cv_func__spawnlp=yes"
21789 else
21790   echo "configure: failed program was:" >&5
21791   cat conftest.$ac_ext >&5
21792   rm -rf conftest*
21793   eval "ac_cv_func__spawnlp=no"
21794 fi
21795 rm -f conftest*
21796 fi
21797
21798 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
21799   echo "$ac_t""yes" 1>&6
21800   cat >> confdefs.h <<\EOF
21801 #define HAVE_SPAWNLP 1
21802 EOF
21803
21804 else
21805   echo "$ac_t""no" 1>&6
21806 fi
21807
21808
21809 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
21810 echo "configure:21811: checking for _snprintf" >&5
21811 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
21812   echo $ac_n "(cached) $ac_c" 1>&6
21813 else
21814   cat > conftest.$ac_ext <<EOF
21815 #line 21816 "configure"
21816 #include "confdefs.h"
21817 /* System header to define __stub macros and hopefully few prototypes,
21818     which can conflict with char _snprintf(); below.  */
21819 #include <assert.h>
21820 /* Override any gcc2 internal prototype to avoid an error.  */
21821 /* We use char because int might match the return type of a gcc2
21822     builtin and then its argument prototype would still apply.  */
21823 char _snprintf();
21824 char (*f)();
21825
21826 int main() {
21827
21828 /* The GNU C library defines this for functions which it implements
21829     to always fail with ENOSYS.  Some functions are actually named
21830     something starting with __ and the normal name is an alias.  */
21831 #if defined (__stub__snprintf) || defined (__stub____snprintf)
21832 choke me
21833 #else
21834 f = _snprintf;
21835 #endif
21836
21837 ; return 0; }
21838 EOF
21839 if { (eval echo configure:21840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21840   rm -rf conftest*
21841   eval "ac_cv_func__snprintf=yes"
21842 else
21843   echo "configure: failed program was:" >&5
21844   cat conftest.$ac_ext >&5
21845   rm -rf conftest*
21846   eval "ac_cv_func__snprintf=no"
21847 fi
21848 rm -f conftest*
21849 fi
21850
21851 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
21852   echo "$ac_t""yes" 1>&6
21853   ac_cv_func_snprintf=yes
21854         cat >> confdefs.h <<\EOF
21855 #define snprintf _snprintf
21856 EOF
21857
21858
21859 else
21860   echo "$ac_t""no" 1>&6
21861 fi
21862
21863
21864 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
21865 echo "configure:21866: checking for _vsnprintf" >&5
21866 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
21867   echo $ac_n "(cached) $ac_c" 1>&6
21868 else
21869   cat > conftest.$ac_ext <<EOF
21870 #line 21871 "configure"
21871 #include "confdefs.h"
21872 /* System header to define __stub macros and hopefully few prototypes,
21873     which can conflict with char _vsnprintf(); below.  */
21874 #include <assert.h>
21875 /* Override any gcc2 internal prototype to avoid an error.  */
21876 /* We use char because int might match the return type of a gcc2
21877     builtin and then its argument prototype would still apply.  */
21878 char _vsnprintf();
21879 char (*f)();
21880
21881 int main() {
21882
21883 /* The GNU C library defines this for functions which it implements
21884     to always fail with ENOSYS.  Some functions are actually named
21885     something starting with __ and the normal name is an alias.  */
21886 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
21887 choke me
21888 #else
21889 f = _vsnprintf;
21890 #endif
21891
21892 ; return 0; }
21893 EOF
21894 if { (eval echo configure:21895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21895   rm -rf conftest*
21896   eval "ac_cv_func__vsnprintf=yes"
21897 else
21898   echo "configure: failed program was:" >&5
21899   cat conftest.$ac_ext >&5
21900   rm -rf conftest*
21901   eval "ac_cv_func__vsnprintf=no"
21902 fi
21903 rm -f conftest*
21904 fi
21905
21906 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
21907   echo "$ac_t""yes" 1>&6
21908   ac_cv_func_vsnprintf=yes
21909         cat >> confdefs.h <<\EOF
21910 #define vsnprintf _vsnprintf
21911 EOF
21912
21913
21914 else
21915   echo "$ac_t""no" 1>&6
21916 fi
21917
21918
21919 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
21920 echo "configure:21921: checking for vprintf" >&5
21921 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
21922   echo $ac_n "(cached) $ac_c" 1>&6
21923 else
21924   cat > conftest.$ac_ext <<EOF
21925 #line 21926 "configure"
21926 #include "confdefs.h"
21927 /* System header to define __stub macros and hopefully few prototypes,
21928     which can conflict with char vprintf(); below.  */
21929 #include <assert.h>
21930 /* Override any gcc2 internal prototype to avoid an error.  */
21931 /* We use char because int might match the return type of a gcc2
21932     builtin and then its argument prototype would still apply.  */
21933 char vprintf();
21934 char (*f)();
21935
21936 int main() {
21937
21938 /* The GNU C library defines this for functions which it implements
21939     to always fail with ENOSYS.  Some functions are actually named
21940     something starting with __ and the normal name is an alias.  */
21941 #if defined (__stub_vprintf) || defined (__stub___vprintf)
21942 choke me
21943 #else
21944 f = vprintf;
21945 #endif
21946
21947 ; return 0; }
21948 EOF
21949 if { (eval echo configure:21950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21950   rm -rf conftest*
21951   eval "ac_cv_func_vprintf=yes"
21952 else
21953   echo "configure: failed program was:" >&5
21954   cat conftest.$ac_ext >&5
21955   rm -rf conftest*
21956   eval "ac_cv_func_vprintf=no"
21957 fi
21958 rm -f conftest*
21959 fi
21960
21961 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
21962   echo "$ac_t""yes" 1>&6
21963   cat >> confdefs.h <<\EOF
21964 #define HAVE_VPRINTF 1
21965 EOF
21966
21967 else
21968   echo "$ac_t""no" 1>&6
21969 fi
21970
21971 if test "$ac_cv_func_vprintf" != yes; then
21972 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
21973 echo "configure:21974: checking for _doprnt" >&5
21974 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
21975   echo $ac_n "(cached) $ac_c" 1>&6
21976 else
21977   cat > conftest.$ac_ext <<EOF
21978 #line 21979 "configure"
21979 #include "confdefs.h"
21980 /* System header to define __stub macros and hopefully few prototypes,
21981     which can conflict with char _doprnt(); below.  */
21982 #include <assert.h>
21983 /* Override any gcc2 internal prototype to avoid an error.  */
21984 /* We use char because int might match the return type of a gcc2
21985     builtin and then its argument prototype would still apply.  */
21986 char _doprnt();
21987 char (*f)();
21988
21989 int main() {
21990
21991 /* The GNU C library defines this for functions which it implements
21992     to always fail with ENOSYS.  Some functions are actually named
21993     something starting with __ and the normal name is an alias.  */
21994 #if defined (__stub__doprnt) || defined (__stub____doprnt)
21995 choke me
21996 #else
21997 f = _doprnt;
21998 #endif
21999
22000 ; return 0; }
22001 EOF
22002 if { (eval echo configure:22003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22003   rm -rf conftest*
22004   eval "ac_cv_func__doprnt=yes"
22005 else
22006   echo "configure: failed program was:" >&5
22007   cat conftest.$ac_ext >&5
22008   rm -rf conftest*
22009   eval "ac_cv_func__doprnt=no"
22010 fi
22011 rm -f conftest*
22012 fi
22013
22014 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
22015   echo "$ac_t""yes" 1>&6
22016   cat >> confdefs.h <<\EOF
22017 #define HAVE_DOPRNT 1
22018 EOF
22019
22020 else
22021   echo "$ac_t""no" 1>&6
22022 fi
22023
22024 fi
22025
22026
22027 if test $ac_cv_func_vprintf = yes ; then
22028                 for ac_func in snprintf vsnprintf
22029 do
22030 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22031 echo "configure:22032: checking for $ac_func" >&5
22032 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22033   echo $ac_n "(cached) $ac_c" 1>&6
22034 else
22035   cat > conftest.$ac_ext <<EOF
22036 #line 22037 "configure"
22037 #include "confdefs.h"
22038 /* System header to define __stub macros and hopefully few prototypes,
22039     which can conflict with char $ac_func(); below.  */
22040 #include <assert.h>
22041 /* Override any gcc2 internal prototype to avoid an error.  */
22042 /* We use char because int might match the return type of a gcc2
22043     builtin and then its argument prototype would still apply.  */
22044 char $ac_func();
22045 char (*f)();
22046
22047 int main() {
22048
22049 /* The GNU C library defines this for functions which it implements
22050     to always fail with ENOSYS.  Some functions are actually named
22051     something starting with __ and the normal name is an alias.  */
22052 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22053 choke me
22054 #else
22055 f = $ac_func;
22056 #endif
22057
22058 ; return 0; }
22059 EOF
22060 if { (eval echo configure:22061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22061   rm -rf conftest*
22062   eval "ac_cv_func_$ac_func=yes"
22063 else
22064   echo "configure: failed program was:" >&5
22065   cat conftest.$ac_ext >&5
22066   rm -rf conftest*
22067   eval "ac_cv_func_$ac_func=no"
22068 fi
22069 rm -f conftest*
22070 fi
22071
22072 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22073   echo "$ac_t""yes" 1>&6
22074     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22075   cat >> confdefs.h <<EOF
22076 #define $ac_tr_func 1
22077 EOF
22078  
22079 else
22080   echo "$ac_t""no" 1>&6
22081 fi
22082 done
22083
22084 fi
22085
22086 for ac_func in \
22087         bcopy                   \
22088         closesocket             \
22089         chroot                  \
22090         endgrent                \
22091         endpwent                \
22092         fcntl                   \
22093         flock                   \
22094         fstat                   \
22095         getdtablesize   \
22096         getgrgid                \
22097         gethostname             \
22098         getpass                 \
22099         getpassphrase   \
22100         getpwuid                \
22101         getpwnam                \
22102         getspnam                \
22103         gettimeofday    \
22104         initgroups              \
22105         lockf                   \
22106         memcpy                  \
22107         memmove                 \
22108         mkstemp                 \
22109         mktemp                  \
22110         pipe                    \
22111         read                    \
22112         recv                    \
22113         recvfrom                \
22114         recvmsg                 \
22115         setpwfile               \
22116         setgid                  \
22117         setegid                 \
22118         setsid                  \
22119         setuid                  \
22120         seteuid                 \
22121         sigaction               \
22122         signal                  \
22123         sigset                  \
22124         strdup                  \
22125         strerror                \
22126         strpbrk                 \
22127         strrchr                 \
22128         strsep                  \
22129         strstr                  \
22130         strtol                  \
22131         strtoul                 \
22132         strspn                  \
22133         sysconf                 \
22134         usleep                  \
22135         waitpid                 \
22136         wait4                   \
22137         write                   \
22138         send                    \
22139         sendto                  \
22140
22141 do
22142 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22143 echo "configure:22144: checking for $ac_func" >&5
22144 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22145   echo $ac_n "(cached) $ac_c" 1>&6
22146 else
22147   cat > conftest.$ac_ext <<EOF
22148 #line 22149 "configure"
22149 #include "confdefs.h"
22150 /* System header to define __stub macros and hopefully few prototypes,
22151     which can conflict with char $ac_func(); below.  */
22152 #include <assert.h>
22153 /* Override any gcc2 internal prototype to avoid an error.  */
22154 /* We use char because int might match the return type of a gcc2
22155     builtin and then its argument prototype would still apply.  */
22156 char $ac_func();
22157 char (*f)();
22158
22159 int main() {
22160
22161 /* The GNU C library defines this for functions which it implements
22162     to always fail with ENOSYS.  Some functions are actually named
22163     something starting with __ and the normal name is an alias.  */
22164 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22165 choke me
22166 #else
22167 f = $ac_func;
22168 #endif
22169
22170 ; return 0; }
22171 EOF
22172 if { (eval echo configure:22173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22173   rm -rf conftest*
22174   eval "ac_cv_func_$ac_func=yes"
22175 else
22176   echo "configure: failed program was:" >&5
22177   cat conftest.$ac_ext >&5
22178   rm -rf conftest*
22179   eval "ac_cv_func_$ac_func=no"
22180 fi
22181 rm -f conftest*
22182 fi
22183
22184 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22185   echo "$ac_t""yes" 1>&6
22186     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22187   cat >> confdefs.h <<EOF
22188 #define $ac_tr_func 1
22189 EOF
22190  
22191 else
22192   echo "$ac_t""no" 1>&6
22193 fi
22194 done
22195
22196
22197 for ac_func in getopt
22198 do
22199 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22200 echo "configure:22201: checking for $ac_func" >&5
22201 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22202   echo $ac_n "(cached) $ac_c" 1>&6
22203 else
22204   cat > conftest.$ac_ext <<EOF
22205 #line 22206 "configure"
22206 #include "confdefs.h"
22207 /* System header to define __stub macros and hopefully few prototypes,
22208     which can conflict with char $ac_func(); below.  */
22209 #include <assert.h>
22210 /* Override any gcc2 internal prototype to avoid an error.  */
22211 /* We use char because int might match the return type of a gcc2
22212     builtin and then its argument prototype would still apply.  */
22213 char $ac_func();
22214 char (*f)();
22215
22216 int main() {
22217
22218 /* The GNU C library defines this for functions which it implements
22219     to always fail with ENOSYS.  Some functions are actually named
22220     something starting with __ and the normal name is an alias.  */
22221 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22222 choke me
22223 #else
22224 f = $ac_func;
22225 #endif
22226
22227 ; return 0; }
22228 EOF
22229 if { (eval echo configure:22230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22230   rm -rf conftest*
22231   eval "ac_cv_func_$ac_func=yes"
22232 else
22233   echo "configure: failed program was:" >&5
22234   cat conftest.$ac_ext >&5
22235   rm -rf conftest*
22236   eval "ac_cv_func_$ac_func=no"
22237 fi
22238 rm -f conftest*
22239 fi
22240
22241 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22242   echo "$ac_t""yes" 1>&6
22243     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22244   cat >> confdefs.h <<EOF
22245 #define $ac_tr_func 1
22246 EOF
22247  
22248 else
22249   echo "$ac_t""no" 1>&6
22250 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
22251 fi
22252 done
22253
22254
22255
22256 if test "$ac_cv_func_getopt" != yes; then
22257         LIBSRCS="$LIBSRCS getopt.c"
22258 fi
22259 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
22260         if test "$ac_cv_func_snprintf" != yes; then
22261                 cat >> confdefs.h <<\EOF
22262 #define snprintf ber_pvt_snprintf
22263 EOF
22264
22265         fi
22266         if test "$ac_cv_func_vsnprintf" != yes; then
22267                 cat >> confdefs.h <<\EOF
22268 #define vsnprintf ber_pvt_vsnprintf
22269 EOF
22270
22271         fi
22272 fi
22273
22274 # Check Configuration
22275 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
22276 echo "configure:22277: checking declaration of sys_errlist" >&5
22277 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
22278   echo $ac_n "(cached) $ac_c" 1>&6
22279 else
22280   
22281         cat > conftest.$ac_ext <<EOF
22282 #line 22283 "configure"
22283 #include "confdefs.h"
22284
22285 #include <stdio.h>
22286 #include <sys/types.h>
22287 #include <errno.h>
22288 #ifdef WINNT
22289 #include <stdlib.h>
22290 #endif 
22291 int main() {
22292 char *c = (char *) *sys_errlist
22293 ; return 0; }
22294 EOF
22295 if { (eval echo configure:22296: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22296   rm -rf conftest*
22297   ol_cv_dcl_sys_errlist=yes
22298         ol_cv_have_sys_errlist=yes
22299 else
22300   echo "configure: failed program was:" >&5
22301   cat conftest.$ac_ext >&5
22302   rm -rf conftest*
22303   ol_cv_dcl_sys_errlist=no
22304 fi
22305 rm -f conftest*
22306 fi
22307
22308 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
22309 #
22310 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
22311 if test $ol_cv_dcl_sys_errlist = no ; then
22312         cat >> confdefs.h <<\EOF
22313 #define DECL_SYS_ERRLIST 1
22314 EOF
22315
22316
22317         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
22318 echo "configure:22319: checking existence of sys_errlist" >&5
22319 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
22320   echo $ac_n "(cached) $ac_c" 1>&6
22321 else
22322   
22323                 cat > conftest.$ac_ext <<EOF
22324 #line 22325 "configure"
22325 #include "confdefs.h"
22326 #include <errno.h>
22327 int main() {
22328 char *c = (char *) *sys_errlist
22329 ; return 0; }
22330 EOF
22331 if { (eval echo configure:22332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22332   rm -rf conftest*
22333   ol_cv_have_sys_errlist=yes
22334 else
22335   echo "configure: failed program was:" >&5
22336   cat conftest.$ac_ext >&5
22337   rm -rf conftest*
22338   ol_cv_have_sys_errlist=no
22339 fi
22340 rm -f conftest*
22341 fi
22342
22343 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
22344 fi
22345 if test $ol_cv_have_sys_errlist = yes ; then
22346         cat >> confdefs.h <<\EOF
22347 #define HAVE_SYS_ERRLIST 1
22348 EOF
22349
22350 fi
22351
22352
22353
22354 if test "$ol_enable_debug" != no ; then
22355         cat >> confdefs.h <<\EOF
22356 #define LDAP_DEBUG 1
22357 EOF
22358
22359 fi
22360 if test "$ol_enable_syslog" = yes ; then
22361         cat >> confdefs.h <<\EOF
22362 #define LDAP_SYSLOG 1
22363 EOF
22364
22365 fi
22366 if test "$ol_enable_cache" = no ; then
22367         cat >> confdefs.h <<\EOF
22368 #define LDAP_NOCACHE 1
22369 EOF
22370
22371 fi
22372 if test "$ol_link_kbind" != no ; then
22373         cat >> confdefs.h <<\EOF
22374 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
22375 EOF
22376
22377 fi
22378 if test "$ol_enable_proctitle" != no ; then
22379         cat >> confdefs.h <<\EOF
22380 #define LDAP_PROCTITLE 1
22381 EOF
22382
22383 fi
22384 if test "$ol_enable_referrals" != no ; then
22385         cat >> confdefs.h <<\EOF
22386 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
22387 EOF
22388
22389 fi
22390 if test "$ol_enable_local" != no; then
22391         cat >> confdefs.h <<\EOF
22392 #define LDAP_PF_LOCAL 1
22393 EOF
22394
22395 fi
22396 if test "$ol_link_ipv6" != no; then
22397         cat >> confdefs.h <<\EOF
22398 #define LDAP_PF_INET6 1
22399 EOF
22400
22401 fi
22402 if test "$ol_enable_cleartext" != no ; then
22403         cat >> confdefs.h <<\EOF
22404 #define SLAPD_CLEARTEXT 1
22405 EOF
22406
22407 fi
22408 if test "$ol_enable_crypt" != no ; then
22409         cat >> confdefs.h <<\EOF
22410 #define SLAPD_CRYPT 1
22411 EOF
22412
22413 fi
22414 if test "$ol_link_kpasswd" != no ; then
22415         cat >> confdefs.h <<\EOF
22416 #define SLAPD_KPASSWD 1
22417 EOF
22418
22419 fi
22420 if test "$ol_link_spasswd" != no ; then
22421         cat >> confdefs.h <<\EOF
22422 #define SLAPD_SPASSWD 1
22423 EOF
22424
22425 fi
22426 if test "$ol_enable_multimaster" != no ; then
22427         cat >> confdefs.h <<\EOF
22428 #define SLAPD_MULTIMASTER 1
22429 EOF
22430
22431 fi
22432 if test "$ol_enable_phonetic" != no ; then
22433         cat >> confdefs.h <<\EOF
22434 #define SLAPD_PHONETIC 1
22435 EOF
22436
22437 fi
22438 if test "$ol_enable_rlookups" != no ; then
22439         cat >> confdefs.h <<\EOF
22440 #define SLAPD_RLOOKUPS 1
22441 EOF
22442
22443 fi
22444 if test "$ol_enable_aci" != no ; then
22445         cat >> confdefs.h <<\EOF
22446 #define SLAPD_ACI_ENABLED 1
22447 EOF
22448
22449 fi
22450
22451 if test "$ol_link_modules" != no ; then
22452         cat >> confdefs.h <<\EOF
22453 #define SLAPD_MODULES 1
22454 EOF
22455
22456         BUILD_SLAPD=yes
22457         SLAPD_MODULES_LDFLAGS="-dlopen self"
22458 fi
22459
22460 if test "$ol_enable_bdb" != no ; then
22461         cat >> confdefs.h <<\EOF
22462 #define SLAPD_BDB 1
22463 EOF
22464
22465         BUILD_SLAPD=yes
22466         BUILD_BDB=yes
22467         if test "$ol_with_bdb_module" != static ; then
22468                 cat >> confdefs.h <<\EOF
22469 #define SLAPD_BDB_DYNAMIC 1
22470 EOF
22471
22472                 BUILD_BDB=mod
22473                 BUILD_BDB_DYNAMIC=shared
22474                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
22475         else
22476                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
22477         fi
22478 fi
22479
22480 if test "$ol_link_dnssrv" != no ; then
22481         cat >> confdefs.h <<\EOF
22482 #define SLAPD_DNSSRV 1
22483 EOF
22484
22485         BUILD_SLAPD=yes
22486         BUILD_DNSSRV=yes
22487         if test "$ol_with_dnssrv_module" != static ; then
22488                 cat >> confdefs.h <<\EOF
22489 #define SLAPD_DNSSRV_DYNAMIC 1
22490 EOF
22491
22492                 BUILD_DNSSRV=mod
22493                 BUILD_DNSSRV_DYNAMIC=shared
22494                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
22495         else
22496                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
22497         fi
22498 fi
22499
22500 if test "$ol_enable_ldap" != no ; then
22501         cat >> confdefs.h <<\EOF
22502 #define SLAPD_LDAP 1
22503 EOF
22504
22505         BUILD_SLAPD=yes
22506         BUILD_LDAP=yes
22507         if test "$ol_with_ldap_module" != static ; then
22508                 cat >> confdefs.h <<\EOF
22509 #define SLAPD_LDAP_DYNAMIC 1
22510 EOF
22511
22512                 BUILD_LDAP=mod
22513                 BUILD_LDAP_DYNAMIC=shared
22514                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
22515         else
22516                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
22517         fi
22518 fi
22519
22520 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
22521         cat >> confdefs.h <<\EOF
22522 #define SLAPD_LDBM 1
22523 EOF
22524
22525         BUILD_SLAPD=yes
22526         BUILD_LDBM=yes
22527         if test "$ol_with_ldbm_module" != static ; then
22528                 cat >> confdefs.h <<\EOF
22529 #define SLAPD_LDBM_DYNAMIC 1
22530 EOF
22531
22532                 BUILD_LDBM=mod
22533                 BUILD_LDBM_DYNAMIC=shared
22534                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
22535         else
22536                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
22537         fi
22538 fi
22539
22540 if test "$ol_enable_meta" != no ; then
22541         if test "$ol_enable_ldap" = no ; then
22542                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
22543         fi
22544         if test "$ol_enable_rewrite" = no ; then
22545                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
22546         fi
22547         cat >> confdefs.h <<\EOF
22548 #define SLAPD_META 1
22549 EOF
22550
22551         BUILD_SLAPD=yes
22552         BUILD_META=yes
22553         BUILD_LDAP=yes
22554         BUILD_REWRITE=yes
22555         if test "$ol_with_meta_module" != static ; then
22556                 cat >> confdefs.h <<\EOF
22557 #define SLAPD_META_DYNAMIC 1
22558 EOF
22559
22560                 BUILD_META=mod
22561                 BUILD_META_DYNAMIC=shared
22562                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
22563         else
22564                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
22565         fi
22566 fi
22567
22568 if test "$ol_enable_monitor" != no ; then
22569         cat >> confdefs.h <<\EOF
22570 #define SLAPD_MONITOR 1
22571 EOF
22572
22573         BUILD_SLAPD=yes
22574         BUILD_MONITOR=yes
22575         if test "$ol_with_monitor_module" != static ; then
22576                 cat >> confdefs.h <<\EOF
22577 #define SLAPD_MONITOR_DYNAMIC 1
22578 EOF
22579
22580                 BUILD_MONITOR=mod
22581                 BUILD_MONITOR_DYNAMIC=shared
22582                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
22583         else
22584                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
22585         fi
22586 fi
22587
22588 if test "$ol_enable_null" != no ; then
22589         cat >> confdefs.h <<\EOF
22590 #define SLAPD_NULL 1
22591 EOF
22592
22593         BUILD_SLAPD=yes
22594         BUILD_NULL=yes
22595         if test "$ol_with_null_module" != static ; then
22596                 cat >> confdefs.h <<\EOF
22597 #define SLAPD_NULL_DYNAMIC 1
22598 EOF
22599
22600                 BUILD_NULL=mod
22601                 BUILD_NULL_DYNAMIC=shared
22602                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
22603         else
22604                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
22605         fi
22606 fi
22607
22608 if test "$ol_enable_passwd" != no ; then
22609         cat >> confdefs.h <<\EOF
22610 #define SLAPD_PASSWD 1
22611 EOF
22612
22613         BUILD_SLAPD=yes
22614         BUILD_PASSWD=yes
22615         if test "$ol_with_passwd_module" != static ; then
22616                 cat >> confdefs.h <<\EOF
22617 #define SLAPD_PASSWD_DYNAMIC 1
22618 EOF
22619
22620                 BUILD_PASSWD=mod
22621                 BUILD_PASSWD_DYNAMIC=shared
22622                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
22623         else
22624                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
22625         fi
22626 fi
22627
22628 if test "$ol_link_perl" != no ; then
22629         cat >> confdefs.h <<\EOF
22630 #define SLAPD_PERL 1
22631 EOF
22632
22633         BUILD_SLAPD=yes
22634         BUILD_PERL=yes
22635         if test "$ol_with_perl_module" != static ; then
22636                 cat >> confdefs.h <<\EOF
22637 #define SLAPD_PERL_DYNAMIC 1
22638 EOF
22639
22640                 BUILD_PERL=mod
22641                 BUILD_PERL_DYNAMIC=shared
22642                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
22643         else
22644                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
22645         fi
22646 fi
22647
22648 if test "$ol_enable_shell" != no ; then
22649         cat >> confdefs.h <<\EOF
22650 #define SLAPD_SHELL 1
22651 EOF
22652
22653         BUILD_SLAPD=yes
22654         BUILD_SHELL=yes
22655         if test "$ol_with_shell_module" != static ; then
22656                 cat >> confdefs.h <<\EOF
22657 #define SLAPD_SHELL_DYNAMIC 1
22658 EOF
22659
22660                 BUILD_SHELL=mod
22661                 BUILD_SHELL_DYNAMIC=shared
22662                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
22663         else
22664                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
22665         fi
22666 fi
22667
22668 if test "$ol_enable_tcl" != no ; then
22669         cat >> confdefs.h <<\EOF
22670 #define SLAPD_TCL 1
22671 EOF
22672
22673         BUILD_SLAPD=yes
22674         BUILD_TCL=yes
22675         if test "$ol_with_tcl_module" != static; then
22676                 cat >> confdefs.h <<\EOF
22677 #define SLAPD_TCL_DYNAMIC 1
22678 EOF
22679
22680                 BUILD_TCL=mod
22681                 BUILD_TCL_DYNAMIC=shared
22682                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-tcl"
22683         else
22684                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-tcl"
22685         fi
22686 fi
22687
22688 if test "$ol_link_sql" != no ; then
22689         cat >> confdefs.h <<\EOF
22690 #define SLAPD_SQL 1
22691 EOF
22692
22693         BUILD_SLAPD=yes
22694         BUILD_SQL=yes
22695         if test "$ol_with_sql_module" != static; then
22696                 cat >> confdefs.h <<\EOF
22697 #define SLAPD_SQL_DYNAMIC 1
22698 EOF
22699
22700                 BUILD_SQL=mod
22701                 BUILD_SQL_DYNAMIC=shared
22702                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
22703         else
22704                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
22705         fi
22706 fi
22707
22708 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
22709         $BUILD_SLAPD = yes ; then
22710         BUILD_SLURPD=yes
22711 fi
22712
22713 if test "$ol_enable_rewrite" != no ; then
22714         cat >> confdefs.h <<\EOF
22715 #define ENABLE_REWRITE 1
22716 EOF
22717
22718         BUILD_REWRITE=yes
22719 fi
22720
22721
22722
22723 if test "$ac_cv_mingw32" = yes ; then
22724         PLAT=NT
22725         SLAPD_MODULES_LDFLAGS=
22726 else
22727         PLAT=UNIX
22728 fi
22729
22730 if test -z "$SLAPD_STATIC_BACKENDS"; then
22731         SLAPD_NO_STATIC='#'
22732 else
22733         SLAPD_NO_STATIC=
22734 fi
22735
22736
22737
22738
22739
22740
22741   
22742   
22743   
22744   
22745   
22746   
22747   
22748   
22749   
22750   
22751   
22752   
22753   
22754   
22755   
22756   
22757   
22758   
22759   
22760   
22761   
22762   
22763   
22764   
22765
22766
22767
22768
22769
22770
22771
22772
22773
22774
22775
22776
22777
22778
22779
22780
22781
22782
22783
22784
22785
22786
22787
22788
22789
22790
22791
22792
22793
22794
22795
22796
22797
22798
22799
22800
22801
22802
22803 # Check whether --with-xxinstall or --without-xxinstall was given.
22804 if test "${with_xxinstall+set}" = set; then
22805   withval="$with_xxinstall"
22806   :
22807 fi
22808
22809
22810
22811 trap '' 1 2 15
22812
22813 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
22814
22815 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22816 # Let make expand exec_prefix.
22817 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22818
22819 # Any assignment to VPATH causes Sun make to only execute
22820 # the first set of double-colon rules, so remove it if not needed.
22821 # If there is a colon in the path, we need to keep it.
22822 if test "x$srcdir" = x.; then
22823   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
22824 fi
22825
22826 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
22827
22828 DEFS=-DHAVE_CONFIG_H
22829
22830 # Without the "./", some shells look in PATH for config.status.
22831 : ${CONFIG_STATUS=./config.status}
22832
22833 echo creating $CONFIG_STATUS
22834 rm -f $CONFIG_STATUS
22835 cat > $CONFIG_STATUS <<EOF
22836 #! /bin/sh
22837 # Generated automatically by configure.
22838 # Run this file to recreate the current configuration.
22839 # This directory was configured as follows,
22840 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
22841 #
22842 # $0 $ac_configure_args
22843 #
22844 # Compiler output produced by configure, useful for debugging
22845 # configure, is in ./config.log if it exists.
22846
22847 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
22848 for ac_option
22849 do
22850   case "\$ac_option" in
22851   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22852     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
22853     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
22854   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
22855     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
22856     exit 0 ;;
22857   -help | --help | --hel | --he | --h)
22858     echo "\$ac_cs_usage"; exit 0 ;;
22859   *) echo "\$ac_cs_usage"; exit 1 ;;
22860   esac
22861 done
22862
22863 ac_given_srcdir=$srcdir
22864 ac_given_INSTALL="$INSTALL"
22865
22866 trap 'rm -fr `echo "\
22867 Makefile:build/top.mk:Makefile.in:build/dir.mk \
22868 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
22869 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
22870 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
22871 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
22872 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
22873 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
22874 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
22875 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
22876 include/Makefile:build/top.mk:include/Makefile.in \
22877 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
22878 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
22879 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22880 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22881 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
22882 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
22883 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
22884 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
22885 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
22886 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
22887 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
22888 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
22889 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
22890 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
22891 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
22892 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
22893 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
22894 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
22895 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
22896 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
22897 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
22898 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
22899 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
22900 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
22901 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
22902 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
22903 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
22904 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
22905 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
22906  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
22907 EOF
22908 cat >> $CONFIG_STATUS <<EOF
22909
22910 # Protect against being on the right side of a sed subst in config.status.
22911 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
22912  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
22913 $ac_vpsub
22914 $extrasub
22915 s%@SHELL@%$SHELL%g
22916 s%@CFLAGS@%$CFLAGS%g
22917 s%@CPPFLAGS@%$CPPFLAGS%g
22918 s%@CXXFLAGS@%$CXXFLAGS%g
22919 s%@FFLAGS@%$FFLAGS%g
22920 s%@DEFS@%$DEFS%g
22921 s%@LDFLAGS@%$LDFLAGS%g
22922 s%@LIBS@%$LIBS%g
22923 s%@exec_prefix@%$exec_prefix%g
22924 s%@prefix@%$prefix%g
22925 s%@program_transform_name@%$program_transform_name%g
22926 s%@bindir@%$bindir%g
22927 s%@sbindir@%$sbindir%g
22928 s%@libexecdir@%$libexecdir%g
22929 s%@datadir@%$datadir%g
22930 s%@sysconfdir@%$sysconfdir%g
22931 s%@sharedstatedir@%$sharedstatedir%g
22932 s%@localstatedir@%$localstatedir%g
22933 s%@libdir@%$libdir%g
22934 s%@includedir@%$includedir%g
22935 s%@oldincludedir@%$oldincludedir%g
22936 s%@infodir@%$infodir%g
22937 s%@mandir@%$mandir%g
22938 s%@host@%$host%g
22939 s%@host_alias@%$host_alias%g
22940 s%@host_cpu@%$host_cpu%g
22941 s%@host_vendor@%$host_vendor%g
22942 s%@host_os@%$host_os%g
22943 s%@target@%$target%g
22944 s%@target_alias@%$target_alias%g
22945 s%@target_cpu@%$target_cpu%g
22946 s%@target_vendor@%$target_vendor%g
22947 s%@target_os@%$target_os%g
22948 s%@build@%$build%g
22949 s%@build_alias@%$build_alias%g
22950 s%@build_cpu@%$build_cpu%g
22951 s%@build_vendor@%$build_vendor%g
22952 s%@build_os@%$build_os%g
22953 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
22954 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
22955 s%@INSTALL_DATA@%$INSTALL_DATA%g
22956 s%@PACKAGE@%$PACKAGE%g
22957 s%@VERSION@%$VERSION%g
22958 s%@ACLOCAL@%$ACLOCAL%g
22959 s%@AUTOCONF@%$AUTOCONF%g
22960 s%@AUTOMAKE@%$AUTOMAKE%g
22961 s%@AUTOHEADER@%$AUTOHEADER%g
22962 s%@MAKEINFO@%$MAKEINFO%g
22963 s%@install_sh@%$install_sh%g
22964 s%@AMTAR@%$AMTAR%g
22965 s%@AWK@%$AWK%g
22966 s%@AMTARFLAGS@%$AMTARFLAGS%g
22967 s%@SET_MAKE@%$SET_MAKE%g
22968 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
22969 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
22970 s%@top_builddir@%$top_builddir%g
22971 s%@ldap_subdir@%$ldap_subdir%g
22972 s%@CC@%$CC%g
22973 s%@AR@%$AR%g
22974 s%@LN_S@%$LN_S%g
22975 s%@OBJEXT@%$OBJEXT%g
22976 s%@EXEEXT@%$EXEEXT%g
22977 s%@ECHO@%$ECHO%g
22978 s%@RANLIB@%$RANLIB%g
22979 s%@STRIP@%$STRIP%g
22980 s%@DLLTOOL@%$DLLTOOL%g
22981 s%@AS@%$AS%g
22982 s%@OBJDUMP@%$OBJDUMP%g
22983 s%@CPP@%$CPP%g
22984 s%@LIBTOOL@%$LIBTOOL%g
22985 s%@LN_H@%$LN_H%g
22986 s%@SENDMAIL@%$SENDMAIL%g
22987 s%@EDITOR@%$EDITOR%g
22988 s%@PERLBIN@%$PERLBIN%g
22989 s%@OL_MKDEP@%$OL_MKDEP%g
22990 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
22991 s%@LIBOBJS@%$LIBOBJS%g
22992 s%@LIBSRCS@%$LIBSRCS%g
22993 s%@PLAT@%$PLAT%g
22994 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
22995 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
22996 s%@BUILD_BDB@%$BUILD_BDB%g
22997 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
22998 s%@BUILD_LDAP@%$BUILD_LDAP%g
22999 s%@BUILD_LDBM@%$BUILD_LDBM%g
23000 s%@BUILD_META@%$BUILD_META%g
23001 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
23002 s%@BUILD_NULL@%$BUILD_NULL%g
23003 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
23004 s%@BUILD_PERL@%$BUILD_PERL%g
23005 s%@BUILD_SHELL@%$BUILD_SHELL%g
23006 s%@BUILD_SQL@%$BUILD_SQL%g
23007 s%@BUILD_TCL@%$BUILD_TCL%g
23008 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
23009 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
23010 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
23011 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
23012 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
23013 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
23014 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
23015 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
23016 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
23017 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
23018 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
23019 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
23020 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
23021 s%@LDAP_LIBS@%$LDAP_LIBS%g
23022 s%@LDIF_LIBS@%$LDIF_LIBS%g
23023 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
23024 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
23025 s%@LDBM_LIBS@%$LDBM_LIBS%g
23026 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
23027 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
23028 s%@WRAP_LIBS@%$WRAP_LIBS%g
23029 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
23030 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
23031 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
23032 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
23033 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
23034 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
23035 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
23036 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
23037 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
23038 s%@KRB4_LIBS@%$KRB4_LIBS%g
23039 s%@KRB5_LIBS@%$KRB5_LIBS%g
23040 s%@READLINE_LIBS@%$READLINE_LIBS%g
23041 s%@SASL_LIBS@%$SASL_LIBS%g
23042 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
23043 s%@TLS_LIBS@%$TLS_LIBS%g
23044 s%@MODULES_LIBS@%$MODULES_LIBS%g
23045 s%@AUTH_LIBS@%$AUTH_LIBS%g
23046 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
23047 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
23048 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
23049 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
23050
23051 CEOF
23052 EOF
23053
23054 cat >> $CONFIG_STATUS <<\EOF
23055
23056 # Split the substitutions into bite-sized pieces for seds with
23057 # small command number limits, like on Digital OSF/1 and HP-UX.
23058 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
23059 ac_file=1 # Number of current file.
23060 ac_beg=1 # First line for current file.
23061 ac_end=$ac_max_sed_cmds # Line after last line for current file.
23062 ac_more_lines=:
23063 ac_sed_cmds=""
23064 while $ac_more_lines; do
23065   if test $ac_beg -gt 1; then
23066     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
23067   else
23068     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
23069   fi
23070   if test ! -s conftest.s$ac_file; then
23071     ac_more_lines=false
23072     rm -f conftest.s$ac_file
23073   else
23074     if test -z "$ac_sed_cmds"; then
23075       ac_sed_cmds="sed -f conftest.s$ac_file"
23076     else
23077       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
23078     fi
23079     ac_file=`expr $ac_file + 1`
23080     ac_beg=$ac_end
23081     ac_end=`expr $ac_end + $ac_max_sed_cmds`
23082   fi
23083 done
23084 if test -z "$ac_sed_cmds"; then
23085   ac_sed_cmds=cat
23086 fi
23087 EOF
23088
23089 cat >> $CONFIG_STATUS <<EOF
23090
23091 CONFIG_FILES=\${CONFIG_FILES-"\
23092 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23093 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23094 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23095 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23096 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23097 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23098 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23099 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23100 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23101 include/Makefile:build/top.mk:include/Makefile.in \
23102 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23103 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
23104 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23105 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23106 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23107 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
23108 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
23109 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23110 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23111 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23112 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23113 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23114 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23115 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23116 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23117 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23118 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23119 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23120 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23121 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23122 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23123 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23124 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23125 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
23126 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23127 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
23128 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23129 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23130 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23131 "}
23132 EOF
23133 cat >> $CONFIG_STATUS <<\EOF
23134 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
23135   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23136   case "$ac_file" in
23137   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23138        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23139   *) ac_file_in="${ac_file}.in" ;;
23140   esac
23141
23142   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
23143
23144   # Remove last slash and all that follows it.  Not all systems have dirname.
23145   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23146   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23147     # The file is in a subdirectory.
23148     test ! -d "$ac_dir" && mkdir "$ac_dir"
23149     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
23150     # A "../" for each directory in $ac_dir_suffix.
23151     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
23152   else
23153     ac_dir_suffix= ac_dots=
23154   fi
23155
23156   case "$ac_given_srcdir" in
23157   .)  srcdir=.
23158       if test -z "$ac_dots"; then top_srcdir=.
23159       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
23160   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
23161   *) # Relative path.
23162     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
23163     top_srcdir="$ac_dots$ac_given_srcdir" ;;
23164   esac
23165
23166   case "$ac_given_INSTALL" in
23167   [/$]*) INSTALL="$ac_given_INSTALL" ;;
23168   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
23169   esac
23170
23171   echo creating "$ac_file"
23172   rm -f "$ac_file"
23173   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
23174   case "$ac_file" in
23175   *[Mm]akefile*) ac_comsub="1i\\
23176 # $configure_input" ;;
23177   *) ac_comsub= ;;
23178   esac
23179
23180   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23181   sed -e "$ac_comsub
23182 s%@configure_input@%$configure_input%g
23183 s%@srcdir@%$srcdir%g
23184 s%@top_srcdir@%$top_srcdir%g
23185 s%@INSTALL@%$INSTALL%g
23186 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
23187 fi; done
23188 rm -f conftest.s*
23189
23190 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23191 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23192 #
23193 # ac_d sets the value in "#define NAME VALUE" lines.
23194 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23195 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
23196 ac_dC='\3'
23197 ac_dD='%g'
23198 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23199 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23200 ac_uB='\([      ]\)%\1#\2define\3'
23201 ac_uC=' '
23202 ac_uD='\4%g'
23203 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23204 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23205 ac_eB='$%\1#\2define\3'
23206 ac_eC=' '
23207 ac_eD='%g'
23208
23209 if test "${CONFIG_HEADERS+set}" != set; then
23210 EOF
23211 cat >> $CONFIG_STATUS <<EOF
23212   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
23213 EOF
23214 cat >> $CONFIG_STATUS <<\EOF
23215 fi
23216 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
23217   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23218   case "$ac_file" in
23219   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23220        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23221   *) ac_file_in="${ac_file}.in" ;;
23222   esac
23223
23224   echo creating $ac_file
23225
23226   rm -f conftest.frag conftest.in conftest.out
23227   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23228   cat $ac_file_inputs > conftest.in
23229
23230 EOF
23231
23232 # Transform confdefs.h into a sed script conftest.vals that substitutes
23233 # the proper values into config.h.in to produce config.h.  And first:
23234 # Protect against being on the right side of a sed subst in config.status.
23235 # Protect against being in an unquoted here document in config.status.
23236 rm -f conftest.vals
23237 cat > conftest.hdr <<\EOF
23238 s/[\\&%]/\\&/g
23239 s%[\\$`]%\\&%g
23240 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
23241 s%ac_d%ac_u%gp
23242 s%ac_u%ac_e%gp
23243 EOF
23244 sed -n -f conftest.hdr confdefs.h > conftest.vals
23245 rm -f conftest.hdr
23246
23247 # This sed command replaces #undef with comments.  This is necessary, for
23248 # example, in the case of _POSIX_SOURCE, which is predefined and required
23249 # on some systems where configure will not decide to define it.
23250 cat >> conftest.vals <<\EOF
23251 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
23252 EOF
23253
23254 # Break up conftest.vals because some shells have a limit on
23255 # the size of here documents, and old seds have small limits too.
23256
23257 rm -f conftest.tail
23258 while :
23259 do
23260   ac_lines=`grep -c . conftest.vals`
23261   # grep -c gives empty output for an empty file on some AIX systems.
23262   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
23263   # Write a limited-size here document to conftest.frag.
23264   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
23265   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
23266   echo 'CEOF
23267   sed -f conftest.frag conftest.in > conftest.out
23268   rm -f conftest.in
23269   mv conftest.out conftest.in
23270 ' >> $CONFIG_STATUS
23271   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23272   rm -f conftest.vals
23273   mv conftest.tail conftest.vals
23274 done
23275 rm -f conftest.vals
23276
23277 cat >> $CONFIG_STATUS <<\EOF
23278   rm -f conftest.frag conftest.h
23279   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
23280   cat conftest.in >> conftest.h
23281   rm -f conftest.in
23282   if cmp -s $ac_file conftest.h 2>/dev/null; then
23283     echo "$ac_file is unchanged"
23284     rm -f conftest.h
23285   else
23286     # Remove last slash and all that follows it.  Not all systems have dirname.
23287       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23288       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23289       # The file is in a subdirectory.
23290       test ! -d "$ac_dir" && mkdir "$ac_dir"
23291     fi
23292     rm -f $ac_file
23293     mv conftest.h $ac_file
23294   fi
23295 fi; done
23296
23297 EOF
23298 cat >> $CONFIG_STATUS <<EOF
23299
23300 EOF
23301 cat >> $CONFIG_STATUS <<\EOF
23302
23303 date > stamp-h
23304 echo Please run \"make depend\" to build dependencies
23305
23306 exit 0
23307 EOF
23308 chmod +x $CONFIG_STATUS
23309 rm -fr confdefs* $ac_clean_files
23310 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
23311