]> git.sur5r.net Git - openldap/blob - configure
Clean up examples
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.444 2002/11/09 16:03:07 ando 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' 2>/dev/null`"
874 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
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 # test for ln hardlink support
7679 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7680 echo "configure:7681: checking whether ln works" >&5
7681 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7682   echo $ac_n "(cached) $ac_c" 1>&6
7683 else
7684   rm -f conftest.src conftest.dst
7685 echo "conftest" > conftest.src
7686 if ln conftest.src conftest.dst 2>/dev/null
7687 then
7688   ol_cv_prog_LN_H="ln"
7689 else
7690   ol_cv_prog_LN_H="cp"
7691 fi
7692 rm -f conftest.src conftest.dst
7693
7694 fi
7695 LN_H="$ol_cv_prog_LN_H"
7696 if test "$ol_cv_prog_LN_H" = "ln"; then
7697         echo "$ac_t""yes" 1>&6
7698 else
7699         echo "$ac_t""no" 1>&6
7700 fi
7701
7702 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7703 echo "configure:7704: checking whether ln -s works" >&5
7704 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7705   echo $ac_n "(cached) $ac_c" 1>&6
7706 else
7707   rm -f conftestdata
7708 if ln -s X conftestdata 2>/dev/null
7709 then
7710   rm -f conftestdata
7711   ac_cv_prog_LN_S="ln -s"
7712 else
7713   ac_cv_prog_LN_S=ln
7714 fi
7715 fi
7716 LN_S="$ac_cv_prog_LN_S"
7717 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7718   echo "$ac_t""yes" 1>&6
7719 else
7720   echo "$ac_t""no" 1>&6
7721 fi
7722
7723
7724 ol_link_perl=no
7725 if test $ol_enable_perl != no ; then
7726         # Extract the first word of "perl", so it can be a program name with args.
7727 set dummy perl; ac_word=$2
7728 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7729 echo "configure:7730: checking for $ac_word" >&5
7730 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7731   echo $ac_n "(cached) $ac_c" 1>&6
7732 else
7733   case "$PERLBIN" in
7734   /*)
7735   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7736   ;;
7737   ?:/*)
7738   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7739   ;;
7740   *)
7741   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7742   ac_dummy="$PATH"
7743   for ac_dir in $ac_dummy; do 
7744     test -z "$ac_dir" && ac_dir=.
7745     if test -f $ac_dir/$ac_word; then
7746       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7747       break
7748     fi
7749   done
7750   IFS="$ac_save_ifs"
7751   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7752   ;;
7753 esac
7754 fi
7755 PERLBIN="$ac_cv_path_PERLBIN"
7756 if test -n "$PERLBIN"; then
7757   echo "$ac_t""$PERLBIN" 1>&6
7758 else
7759   echo "$ac_t""no" 1>&6
7760 fi
7761
7762
7763         if test "no$PERLBIN" = "no" ; then
7764                 if test $ol_enable_perl = yes ; then
7765                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7766                 fi
7767
7768         else
7769                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7770                 if test x"$ol_with_perl_module" = "xstatic" ; then
7771                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7772                 else
7773                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7774                 fi
7775                                 ol_link_perl=yes
7776         fi
7777 fi
7778
7779 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7780 echo "configure:7781: checking how to run the C preprocessor" >&5
7781 # On Suns, sometimes $CPP names a directory.
7782 if test -n "$CPP" && test -d "$CPP"; then
7783   CPP=
7784 fi
7785 if test -z "$CPP"; then
7786 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7787   echo $ac_n "(cached) $ac_c" 1>&6
7788 else
7789     # This must be in double quotes, not single quotes, because CPP may get
7790   # substituted into the Makefile and "${CC-cc}" will confuse make.
7791   CPP="${CC-cc} -E"
7792   # On the NeXT, cc -E runs the code through the compiler's parser,
7793   # not just through cpp.
7794   cat > conftest.$ac_ext <<EOF
7795 #line 7796 "configure"
7796 #include "confdefs.h"
7797 #include <assert.h>
7798 Syntax Error
7799 EOF
7800 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7801 { (eval echo configure:7802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7802 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7803 if test -z "$ac_err"; then
7804   :
7805 else
7806   echo "$ac_err" >&5
7807   echo "configure: failed program was:" >&5
7808   cat conftest.$ac_ext >&5
7809   rm -rf conftest*
7810   CPP="${CC-cc} -E -traditional-cpp"
7811   cat > conftest.$ac_ext <<EOF
7812 #line 7813 "configure"
7813 #include "confdefs.h"
7814 #include <assert.h>
7815 Syntax Error
7816 EOF
7817 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7818 { (eval echo configure:7819: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7819 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7820 if test -z "$ac_err"; then
7821   :
7822 else
7823   echo "$ac_err" >&5
7824   echo "configure: failed program was:" >&5
7825   cat conftest.$ac_ext >&5
7826   rm -rf conftest*
7827   CPP="${CC-cc} -nologo -E"
7828   cat > conftest.$ac_ext <<EOF
7829 #line 7830 "configure"
7830 #include "confdefs.h"
7831 #include <assert.h>
7832 Syntax Error
7833 EOF
7834 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7835 { (eval echo configure:7836: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7836 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7837 if test -z "$ac_err"; then
7838   :
7839 else
7840   echo "$ac_err" >&5
7841   echo "configure: failed program was:" >&5
7842   cat conftest.$ac_ext >&5
7843   rm -rf conftest*
7844   CPP=/lib/cpp
7845 fi
7846 rm -f conftest*
7847 fi
7848 rm -f conftest*
7849 fi
7850 rm -f conftest*
7851   ac_cv_prog_CPP="$CPP"
7852 fi
7853   CPP="$ac_cv_prog_CPP"
7854 else
7855   ac_cv_prog_CPP="$CPP"
7856 fi
7857 echo "$ac_t""$CPP" 1>&6
7858
7859
7860 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
7861         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
7862
7863 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
7864         echo "configure: warning: programs compiled here do run here..." 1>&2
7865         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
7866
7867 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
7868         echo "configure: warning: programs compiled here do not run here..." 1>&2
7869         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
7870 fi
7871
7872
7873 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7874 echo "configure:7875: checking for Cygwin environment" >&5
7875 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7876   echo $ac_n "(cached) $ac_c" 1>&6
7877 else
7878   cat > conftest.$ac_ext <<EOF
7879 #line 7880 "configure"
7880 #include "confdefs.h"
7881
7882 int main() {
7883
7884 #ifndef __CYGWIN__
7885 #define __CYGWIN__ __CYGWIN32__
7886 #endif
7887 return __CYGWIN__;
7888 ; return 0; }
7889 EOF
7890 if { (eval echo configure:7891: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7891   rm -rf conftest*
7892   ac_cv_cygwin=yes
7893 else
7894   echo "configure: failed program was:" >&5
7895   cat conftest.$ac_ext >&5
7896   rm -rf conftest*
7897   ac_cv_cygwin=no
7898 fi
7899 rm -f conftest*
7900 fi
7901
7902 echo "$ac_t""$ac_cv_cygwin" 1>&6
7903 CYGWIN=
7904 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7905 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7906 echo "configure:7907: checking for mingw32 environment" >&5
7907 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7908   echo $ac_n "(cached) $ac_c" 1>&6
7909 else
7910   cat > conftest.$ac_ext <<EOF
7911 #line 7912 "configure"
7912 #include "confdefs.h"
7913
7914 int main() {
7915 return __MINGW32__;
7916 ; return 0; }
7917 EOF
7918 if { (eval echo configure:7919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7919   rm -rf conftest*
7920   ac_cv_mingw32=yes
7921 else
7922   echo "configure: failed program was:" >&5
7923   cat conftest.$ac_ext >&5
7924   rm -rf conftest*
7925   ac_cv_mingw32=no
7926 fi
7927 rm -f conftest*
7928 fi
7929
7930 echo "$ac_t""$ac_cv_mingw32" 1>&6
7931 MINGW32=
7932 test "$ac_cv_mingw32" = yes && MINGW32=yes
7933
7934
7935
7936 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
7937 echo "configure:7938: checking for executable suffix" >&5
7938 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
7939   echo $ac_n "(cached) $ac_c" 1>&6
7940 else
7941   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
7942   ac_cv_exeext=.exe
7943 else
7944   rm -f conftest*
7945   echo 'int main () { return 0; }' > conftest.$ac_ext
7946   ac_cv_exeext=
7947   if { (eval echo configure:7948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
7948     for file in conftest.*; do
7949       case $file in
7950       *.c | *.C | *.o | *.obj | *.xcoff) ;;
7951       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
7952       esac
7953     done
7954   else
7955     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
7956   fi
7957   rm -f conftest*
7958   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
7959 fi
7960 fi
7961
7962 EXEEXT=""
7963 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
7964 echo "$ac_t""${ac_cv_exeext}" 1>&6
7965 ac_exeext=$EXEEXT
7966
7967 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
7968 echo "configure:7969: checking for object suffix" >&5
7969 if eval "test \"\${ac_cv_objext+set}\" = set"; then
7970   echo $ac_n "(cached) $ac_c" 1>&6
7971 else
7972   rm -f conftest*
7973 echo 'int i = 1;' > conftest.$ac_ext
7974 if { (eval echo configure:7975: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7975   for ac_file in conftest.*; do
7976     case $ac_file in
7977     *.c) ;;
7978     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
7979     esac
7980   done
7981 else
7982   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
7983 fi
7984 rm -f conftest*
7985 fi
7986
7987 echo "$ac_t""$ac_cv_objext" 1>&6
7988 OBJEXT=$ac_cv_objext
7989 ac_objext=$ac_cv_objext
7990
7991
7992 cat >> confdefs.h <<EOF
7993 #define EXEEXT "${EXEEXT}"
7994 EOF
7995
7996
7997 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
7998 echo "configure:7999: checking for be_app in -lbe" >&5
7999 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8000 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8001   echo $ac_n "(cached) $ac_c" 1>&6
8002 else
8003   ac_save_LIBS="$LIBS"
8004 LIBS="-lbe -lroot -lnet $LIBS"
8005 cat > conftest.$ac_ext <<EOF
8006 #line 8007 "configure"
8007 #include "confdefs.h"
8008 /* Override any gcc2 internal prototype to avoid an error.  */
8009 /* We use char because int might match the return type of a gcc2
8010     builtin and then its argument prototype would still apply.  */
8011 char be_app();
8012
8013 int main() {
8014 be_app()
8015 ; return 0; }
8016 EOF
8017 if { (eval echo configure:8018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8018   rm -rf conftest*
8019   eval "ac_cv_lib_$ac_lib_var=yes"
8020 else
8021   echo "configure: failed program was:" >&5
8022   cat conftest.$ac_ext >&5
8023   rm -rf conftest*
8024   eval "ac_cv_lib_$ac_lib_var=no"
8025 fi
8026 rm -f conftest*
8027 LIBS="$ac_save_LIBS"
8028
8029 fi
8030 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8031   echo "$ac_t""yes" 1>&6
8032   LIBS="$LIBS -lbe -lroot -lnet"
8033 else
8034   echo "$ac_t""no" 1>&6
8035 :
8036 fi
8037
8038
8039
8040
8041
8042 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8043 echo "configure:8044: checking for ${CC-cc} option to accept ANSI C" >&5
8044 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8045   echo $ac_n "(cached) $ac_c" 1>&6
8046 else
8047   am_cv_prog_cc_stdc=no
8048 ac_save_CC="$CC"
8049 # Don't try gcc -ansi; that turns off useful extensions and
8050 # breaks some systems' header files.
8051 # AIX                   -qlanglvl=ansi
8052 # Ultrix and OSF/1      -std1
8053 # HP-UX 10.20 and later -Ae
8054 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8055 # SVR4                  -Xc -D__EXTENSIONS__
8056 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8057 do
8058   CC="$ac_save_CC $ac_arg"
8059   cat > conftest.$ac_ext <<EOF
8060 #line 8061 "configure"
8061 #include "confdefs.h"
8062 #include <stdarg.h>
8063 #include <stdio.h>
8064 #include <sys/types.h>
8065 #include <sys/stat.h>
8066 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8067 struct buf { int x; };
8068 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8069 static char *e (p, i)
8070      char **p;
8071      int i;
8072 {
8073   return p[i];
8074 }
8075 static char *f (char * (*g) (char **, int), char **p, ...)
8076 {
8077   char *s;
8078   va_list v;
8079   va_start (v,p);
8080   s = g (p, va_arg (v,int));
8081   va_end (v);
8082   return s;
8083 }
8084 int test (int i, double x);
8085 struct s1 {int (*f) (int a);};
8086 struct s2 {int (*f) (double a);};
8087 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8088 int argc;
8089 char **argv;
8090
8091 int main() {
8092
8093 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8094
8095 ; return 0; }
8096 EOF
8097 if { (eval echo configure:8098: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8098   rm -rf conftest*
8099   am_cv_prog_cc_stdc="$ac_arg"; break
8100 else
8101   echo "configure: failed program was:" >&5
8102   cat conftest.$ac_ext >&5
8103 fi
8104 rm -f conftest*
8105 done
8106 CC="$ac_save_CC"
8107
8108 fi
8109
8110 if test -z "$am_cv_prog_cc_stdc"; then
8111   echo "$ac_t""none needed" 1>&6
8112 else
8113   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8114 fi
8115 case "x$am_cv_prog_cc_stdc" in
8116   x|xno) ;;
8117   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8118 esac
8119
8120 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8121         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8122 fi
8123
8124 # test for make depend flag
8125 OL_MKDEP=
8126 OL_MKDEP_FLAGS=
8127 if test -z "${MKDEP}"; then
8128         OL_MKDEP="${CC-cc}"
8129         if test -z "${MKDEP_FLAGS}"; then
8130                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8131 echo "configure:8132: checking for ${OL_MKDEP} depend flag" >&5
8132 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8133   echo $ac_n "(cached) $ac_c" 1>&6
8134 else
8135   
8136                         ol_cv_mkdep=no
8137                         for flag in "-M" "-xM"; do
8138                                 cat > conftest.c <<EOF
8139  noCode;
8140 EOF
8141                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8142: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8142                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8143                                 then
8144                                         if test ! -f conftest."${ac_object}" ; then
8145                                                 ol_cv_mkdep=$flag
8146                                                 OL_MKDEP_FLAGS="$flag"
8147                                                 break
8148                                         fi
8149                                 fi
8150                         done
8151                         rm -f conftest*
8152                 
8153 fi
8154
8155 echo "$ac_t""$ol_cv_mkdep" 1>&6
8156         else
8157                 cc_cv_mkdep=yes
8158                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8159         fi
8160 else
8161         cc_cv_mkdep=yes
8162         OL_MKDEP="${MKDEP}"
8163         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8164 fi
8165
8166
8167
8168 if test "${ol_cv_mkdep}" = no ; then
8169         # this will soon become an error
8170         echo "configure: warning: do not know how to generate dependencies" 1>&2
8171 fi
8172
8173 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8174 echo "configure:8175: checking for afopen in -ls" >&5
8175 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8176 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8177   echo $ac_n "(cached) $ac_c" 1>&6
8178 else
8179   ac_save_LIBS="$LIBS"
8180 LIBS="-ls  $LIBS"
8181 cat > conftest.$ac_ext <<EOF
8182 #line 8183 "configure"
8183 #include "confdefs.h"
8184 /* Override any gcc2 internal prototype to avoid an error.  */
8185 /* We use char because int might match the return type of a gcc2
8186     builtin and then its argument prototype would still apply.  */
8187 char afopen();
8188
8189 int main() {
8190 afopen()
8191 ; return 0; }
8192 EOF
8193 if { (eval echo configure:8194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8194   rm -rf conftest*
8195   eval "ac_cv_lib_$ac_lib_var=yes"
8196 else
8197   echo "configure: failed program was:" >&5
8198   cat conftest.$ac_ext >&5
8199   rm -rf conftest*
8200   eval "ac_cv_lib_$ac_lib_var=no"
8201 fi
8202 rm -f conftest*
8203 LIBS="$ac_save_LIBS"
8204
8205 fi
8206 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8207   echo "$ac_t""yes" 1>&6
8208   
8209         AUTH_LIBS=-ls
8210         cat >> confdefs.h <<\EOF
8211 #define HAVE_AIX_SECURITY 1
8212 EOF
8213
8214
8215 else
8216   echo "$ac_t""no" 1>&6
8217 fi
8218
8219
8220 case "$target" in
8221 *-ibm-openedition)
8222         ac_cv_func_getopt=no
8223         cat >> confdefs.h <<\EOF
8224 #define BOTH_STRINGS_H 1
8225 EOF
8226
8227         ;;
8228 esac
8229
8230 ol_link_modules=no
8231 if test $ol_enable_modules != no ; then
8232         for ac_hdr in ltdl.h
8233 do
8234 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8235 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8236 echo "configure:8237: checking for $ac_hdr" >&5
8237 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8238   echo $ac_n "(cached) $ac_c" 1>&6
8239 else
8240   cat > conftest.$ac_ext <<EOF
8241 #line 8242 "configure"
8242 #include "confdefs.h"
8243 #include <$ac_hdr>
8244 EOF
8245 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8246 { (eval echo configure:8247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8247 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8248 if test -z "$ac_err"; then
8249   rm -rf conftest*
8250   eval "ac_cv_header_$ac_safe=yes"
8251 else
8252   echo "$ac_err" >&5
8253   echo "configure: failed program was:" >&5
8254   cat conftest.$ac_ext >&5
8255   rm -rf conftest*
8256   eval "ac_cv_header_$ac_safe=no"
8257 fi
8258 rm -f conftest*
8259 fi
8260 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8261   echo "$ac_t""yes" 1>&6
8262     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8263   cat >> confdefs.h <<EOF
8264 #define $ac_tr_hdr 1
8265 EOF
8266  
8267 else
8268   echo "$ac_t""no" 1>&6
8269 fi
8270 done
8271
8272
8273         if test $ac_cv_header_ltdl_h = no ; then
8274                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8275         fi
8276
8277         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8278 echo "configure:8279: checking for lt_dlinit in -lltdl" >&5
8279 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8280 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8281   echo $ac_n "(cached) $ac_c" 1>&6
8282 else
8283   ac_save_LIBS="$LIBS"
8284 LIBS="-lltdl  $LIBS"
8285 cat > conftest.$ac_ext <<EOF
8286 #line 8287 "configure"
8287 #include "confdefs.h"
8288 /* Override any gcc2 internal prototype to avoid an error.  */
8289 /* We use char because int might match the return type of a gcc2
8290     builtin and then its argument prototype would still apply.  */
8291 char lt_dlinit();
8292
8293 int main() {
8294 lt_dlinit()
8295 ; return 0; }
8296 EOF
8297 if { (eval echo configure:8298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8298   rm -rf conftest*
8299   eval "ac_cv_lib_$ac_lib_var=yes"
8300 else
8301   echo "configure: failed program was:" >&5
8302   cat conftest.$ac_ext >&5
8303   rm -rf conftest*
8304   eval "ac_cv_lib_$ac_lib_var=no"
8305 fi
8306 rm -f conftest*
8307 LIBS="$ac_save_LIBS"
8308
8309 fi
8310 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8311   echo "$ac_t""yes" 1>&6
8312   
8313                 MODULES_LIBS=-lltdl
8314                 cat >> confdefs.h <<\EOF
8315 #define HAVE_LIBLTDL 1
8316 EOF
8317
8318         
8319 else
8320   echo "$ac_t""no" 1>&6
8321 fi
8322
8323
8324         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8325                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8326         fi
8327         ol_link_modules=yes
8328 else
8329         ol_with_bdb_module=static
8330         ol_with_dnssrv_module=static
8331         ol_with_ldap_module=static
8332         ol_with_ldbm_module=static
8333         ol_with_meta_module=static
8334         ol_with_monitor_module=static
8335         ol_with_null_module=static
8336         ol_with_passwd_module=static
8337         ol_with_perl_module=static
8338         ol_with_shell_module=static
8339         ol_with_tcl_module=static
8340         ol_with_sql_module=static
8341 fi
8342
8343 # test for EBCDIC
8344 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8345 echo "configure:8346: checking for EBCDIC" >&5
8346 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8347   echo $ac_n "(cached) $ac_c" 1>&6
8348 else
8349   
8350         cat > conftest.$ac_ext <<EOF
8351 #line 8352 "configure"
8352 #include "confdefs.h"
8353
8354 #if !('M' == 0xd4)
8355 #include <__ASCII__/generate_error.h>
8356 #endif
8357
8358 EOF
8359 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8360 { (eval echo configure:8361: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8361 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8362 if test -z "$ac_err"; then
8363   rm -rf conftest*
8364   ol_cv_cpp_ebcdic=yes
8365 else
8366   echo "$ac_err" >&5
8367   echo "configure: failed program was:" >&5
8368   cat conftest.$ac_ext >&5
8369   rm -rf conftest*
8370   ol_cv_cpp_ebcdic=no
8371 fi
8372 rm -f conftest*
8373 fi
8374
8375 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8376 if test $ol_cv_cpp_ebcdic = yes ; then
8377         cat >> confdefs.h <<\EOF
8378 #define HAVE_EBCDIC 1
8379 EOF
8380
8381 fi
8382
8383 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8384 echo "configure:8385: checking for ANSI C header files" >&5
8385 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8386   echo $ac_n "(cached) $ac_c" 1>&6
8387 else
8388   cat > conftest.$ac_ext <<EOF
8389 #line 8390 "configure"
8390 #include "confdefs.h"
8391 #include <stdlib.h>
8392 #include <stdarg.h>
8393 #include <string.h>
8394 #include <float.h>
8395 EOF
8396 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8397 { (eval echo configure:8398: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8398 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8399 if test -z "$ac_err"; then
8400   rm -rf conftest*
8401   ol_cv_header_stdc=yes
8402 else
8403   echo "$ac_err" >&5
8404   echo "configure: failed program was:" >&5
8405   cat conftest.$ac_ext >&5
8406   rm -rf conftest*
8407   ol_cv_header_stdc=no
8408 fi
8409 rm -f conftest*
8410
8411 if test $ol_cv_header_stdc = yes; then
8412   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8413 cat > conftest.$ac_ext <<EOF
8414 #line 8415 "configure"
8415 #include "confdefs.h"
8416 #include <string.h>
8417 EOF
8418 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8419   egrep "memchr" >/dev/null 2>&1; then
8420   :
8421 else
8422   rm -rf conftest*
8423   ol_cv_header_stdc=no
8424 fi
8425 rm -f conftest*
8426
8427 fi
8428
8429 if test $ol_cv_header_stdc = yes; then
8430   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8431 cat > conftest.$ac_ext <<EOF
8432 #line 8433 "configure"
8433 #include "confdefs.h"
8434 #include <stdlib.h>
8435 EOF
8436 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8437   egrep "free" >/dev/null 2>&1; then
8438   :
8439 else
8440   rm -rf conftest*
8441   ol_cv_header_stdc=no
8442 fi
8443 rm -f conftest*
8444
8445 fi
8446
8447 if test $ol_cv_header_stdc = yes; then
8448   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8449 if test "$cross_compiling" = yes; then
8450   :
8451 else
8452   cat > conftest.$ac_ext <<EOF
8453 #line 8454 "configure"
8454 #include "confdefs.h"
8455 #include <ctype.h>
8456 #ifndef HAVE_EBCDIC
8457 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8458 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8459 #else
8460 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8461                 || ('j' <= (c) && (c) <= 'r') \
8462                 || ('s' <= (c) && (c) <= 'z'))
8463 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8464 #endif
8465 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8466 int main () { int i; for (i = 0; i < 256; i++)
8467 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8468 exit (0); }
8469
8470 EOF
8471 if { (eval echo configure:8472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8472 then
8473   :
8474 else
8475   echo "configure: failed program was:" >&5
8476   cat conftest.$ac_ext >&5
8477   rm -fr conftest*
8478   ol_cv_header_stdc=no
8479 fi
8480 rm -fr conftest*
8481 fi
8482
8483 fi
8484 fi
8485
8486 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8487 if test $ol_cv_header_stdc = yes; then
8488   cat >> confdefs.h <<\EOF
8489 #define STDC_HEADERS 1
8490 EOF
8491
8492 fi
8493 ac_cv_header_stdc=disable
8494
8495
8496 if test $ol_cv_header_stdc != yes; then
8497         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8498 fi
8499
8500 ac_header_dirent=no
8501 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8502 do
8503 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8504 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8505 echo "configure:8506: checking for $ac_hdr that defines DIR" >&5
8506 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8507   echo $ac_n "(cached) $ac_c" 1>&6
8508 else
8509   cat > conftest.$ac_ext <<EOF
8510 #line 8511 "configure"
8511 #include "confdefs.h"
8512 #include <sys/types.h>
8513 #include <$ac_hdr>
8514 int main() {
8515 DIR *dirp = 0;
8516 ; return 0; }
8517 EOF
8518 if { (eval echo configure:8519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8519   rm -rf conftest*
8520   eval "ac_cv_header_dirent_$ac_safe=yes"
8521 else
8522   echo "configure: failed program was:" >&5
8523   cat conftest.$ac_ext >&5
8524   rm -rf conftest*
8525   eval "ac_cv_header_dirent_$ac_safe=no"
8526 fi
8527 rm -f conftest*
8528 fi
8529 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8530   echo "$ac_t""yes" 1>&6
8531     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8532   cat >> confdefs.h <<EOF
8533 #define $ac_tr_hdr 1
8534 EOF
8535  ac_header_dirent=$ac_hdr; break
8536 else
8537   echo "$ac_t""no" 1>&6
8538 fi
8539 done
8540 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8541 if test $ac_header_dirent = dirent.h; then
8542 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8543 echo "configure:8544: checking for opendir in -ldir" >&5
8544 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8545 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8546   echo $ac_n "(cached) $ac_c" 1>&6
8547 else
8548   ac_save_LIBS="$LIBS"
8549 LIBS="-ldir  $LIBS"
8550 cat > conftest.$ac_ext <<EOF
8551 #line 8552 "configure"
8552 #include "confdefs.h"
8553 /* Override any gcc2 internal prototype to avoid an error.  */
8554 /* We use char because int might match the return type of a gcc2
8555     builtin and then its argument prototype would still apply.  */
8556 char opendir();
8557
8558 int main() {
8559 opendir()
8560 ; return 0; }
8561 EOF
8562 if { (eval echo configure:8563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8563   rm -rf conftest*
8564   eval "ac_cv_lib_$ac_lib_var=yes"
8565 else
8566   echo "configure: failed program was:" >&5
8567   cat conftest.$ac_ext >&5
8568   rm -rf conftest*
8569   eval "ac_cv_lib_$ac_lib_var=no"
8570 fi
8571 rm -f conftest*
8572 LIBS="$ac_save_LIBS"
8573
8574 fi
8575 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8576   echo "$ac_t""yes" 1>&6
8577   LIBS="$LIBS -ldir"
8578 else
8579   echo "$ac_t""no" 1>&6
8580 fi
8581
8582 else
8583 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8584 echo "configure:8585: checking for opendir in -lx" >&5
8585 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8586 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8587   echo $ac_n "(cached) $ac_c" 1>&6
8588 else
8589   ac_save_LIBS="$LIBS"
8590 LIBS="-lx  $LIBS"
8591 cat > conftest.$ac_ext <<EOF
8592 #line 8593 "configure"
8593 #include "confdefs.h"
8594 /* Override any gcc2 internal prototype to avoid an error.  */
8595 /* We use char because int might match the return type of a gcc2
8596     builtin and then its argument prototype would still apply.  */
8597 char opendir();
8598
8599 int main() {
8600 opendir()
8601 ; return 0; }
8602 EOF
8603 if { (eval echo configure:8604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8604   rm -rf conftest*
8605   eval "ac_cv_lib_$ac_lib_var=yes"
8606 else
8607   echo "configure: failed program was:" >&5
8608   cat conftest.$ac_ext >&5
8609   rm -rf conftest*
8610   eval "ac_cv_lib_$ac_lib_var=no"
8611 fi
8612 rm -f conftest*
8613 LIBS="$ac_save_LIBS"
8614
8615 fi
8616 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8617   echo "$ac_t""yes" 1>&6
8618   LIBS="$LIBS -lx"
8619 else
8620   echo "$ac_t""no" 1>&6
8621 fi
8622
8623 fi
8624
8625 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8626 echo "configure:8627: checking for sys/wait.h that is POSIX.1 compatible" >&5
8627 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8628   echo $ac_n "(cached) $ac_c" 1>&6
8629 else
8630   cat > conftest.$ac_ext <<EOF
8631 #line 8632 "configure"
8632 #include "confdefs.h"
8633 #include <sys/types.h>
8634 #include <sys/wait.h>
8635 #ifndef WEXITSTATUS
8636 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8637 #endif
8638 #ifndef WIFEXITED
8639 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8640 #endif
8641 int main() {
8642 int s;
8643 wait (&s);
8644 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8645 ; return 0; }
8646 EOF
8647 if { (eval echo configure:8648: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8648   rm -rf conftest*
8649   ac_cv_header_sys_wait_h=yes
8650 else
8651   echo "configure: failed program was:" >&5
8652   cat conftest.$ac_ext >&5
8653   rm -rf conftest*
8654   ac_cv_header_sys_wait_h=no
8655 fi
8656 rm -f conftest*
8657 fi
8658
8659 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8660 if test $ac_cv_header_sys_wait_h = yes; then
8661   cat >> confdefs.h <<\EOF
8662 #define HAVE_SYS_WAIT_H 1
8663 EOF
8664
8665 fi
8666
8667 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8668 echo "configure:8669: checking POSIX termios" >&5
8669 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8670   echo $ac_n "(cached) $ac_c" 1>&6
8671 else
8672   cat > conftest.$ac_ext <<EOF
8673 #line 8674 "configure"
8674 #include "confdefs.h"
8675 #include <sys/types.h>
8676 #include <unistd.h>
8677 #include <termios.h>
8678 int main() {
8679 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8680    tcgetattr(0, 0);
8681 ; return 0; }
8682 EOF
8683 if { (eval echo configure:8684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8684   rm -rf conftest*
8685   am_cv_sys_posix_termios=yes
8686 else
8687   echo "configure: failed program was:" >&5
8688   cat conftest.$ac_ext >&5
8689   rm -rf conftest*
8690   am_cv_sys_posix_termios=no
8691 fi
8692 rm -f conftest*
8693 fi
8694
8695 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8696
8697
8698  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8699 echo "configure:8700: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8700 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8701   echo $ac_n "(cached) $ac_c" 1>&6
8702 else
8703   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8704
8705   gwinsz_in_termios_h=no
8706   if test $am_cv_sys_posix_termios = yes; then
8707     cat > conftest.$ac_ext <<EOF
8708 #line 8709 "configure"
8709 #include "confdefs.h"
8710 #include <sys/types.h>
8711 #     include <termios.h>
8712 #     ifdef TIOCGWINSZ
8713         yes
8714 #     endif
8715     
8716 EOF
8717 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8718   egrep "yes" >/dev/null 2>&1; then
8719   rm -rf conftest*
8720   gwinsz_in_termios_h=yes
8721 fi
8722 rm -f conftest*
8723
8724   fi
8725
8726   if test $gwinsz_in_termios_h = no; then
8727     cat > conftest.$ac_ext <<EOF
8728 #line 8729 "configure"
8729 #include "confdefs.h"
8730 #include <sys/types.h>
8731 #     include <sys/ioctl.h>
8732 #     ifdef TIOCGWINSZ
8733         yes
8734 #     endif
8735     
8736 EOF
8737 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8738   egrep "yes" >/dev/null 2>&1; then
8739   rm -rf conftest*
8740   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8741 fi
8742 rm -f conftest*
8743
8744   fi
8745   
8746 fi
8747
8748 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8749   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8750     cat >> confdefs.h <<\EOF
8751 #define GWINSZ_IN_SYS_IOCTL 1
8752 EOF
8753
8754   fi
8755
8756 if test $am_cv_sys_posix_termios = yes ; then
8757         cat >> confdefs.h <<\EOF
8758 #define HAVE_POSIX_TERMIOS 1
8759 EOF
8760
8761 fi
8762
8763 for ac_hdr in \
8764         arpa/inet.h             \
8765         arpa/nameser.h  \
8766         assert.h                \
8767         conio.h                 \
8768         crypt.h                 \
8769         direct.h                \
8770         errno.h                 \
8771         fcntl.h                 \
8772         filio.h                 \
8773         getopt.h                \
8774         grp.h                   \
8775         io.h                    \
8776         libutil.h               \
8777         limits.h                \
8778         locale.h                \
8779         netinet/tcp.h   \
8780         malloc.h                \
8781         memory.h                \
8782         psap.h                  \
8783         pwd.h                   \
8784         process.h               \
8785         resolv.h                \
8786         sgtty.h                 \
8787         shadow.h                \
8788         stddef.h                \
8789         string.h                \
8790         strings.h               \
8791         sysexits.h              \
8792         sys/file.h              \
8793         sys/filio.h             \
8794         sys/errno.h             \
8795         sys/ioctl.h             \
8796         sys/param.h             \
8797         sys/resource.h  \
8798         sys/select.h    \
8799         sys/socket.h    \
8800         sys/syslog.h    \
8801         sys/time.h              \
8802         sys/types.h             \
8803         syslog.h                \
8804         termios.h               \
8805         unistd.h                \
8806         winsock.h               \
8807         winsock2.h              \
8808
8809 do
8810 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8811 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8812 echo "configure:8813: checking for $ac_hdr" >&5
8813 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8814   echo $ac_n "(cached) $ac_c" 1>&6
8815 else
8816   cat > conftest.$ac_ext <<EOF
8817 #line 8818 "configure"
8818 #include "confdefs.h"
8819 #include <$ac_hdr>
8820 EOF
8821 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8822 { (eval echo configure:8823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8823 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8824 if test -z "$ac_err"; then
8825   rm -rf conftest*
8826   eval "ac_cv_header_$ac_safe=yes"
8827 else
8828   echo "$ac_err" >&5
8829   echo "configure: failed program was:" >&5
8830   cat conftest.$ac_ext >&5
8831   rm -rf conftest*
8832   eval "ac_cv_header_$ac_safe=no"
8833 fi
8834 rm -f conftest*
8835 fi
8836 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8837   echo "$ac_t""yes" 1>&6
8838     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8839   cat >> confdefs.h <<EOF
8840 #define $ac_tr_hdr 1
8841 EOF
8842  
8843 else
8844   echo "$ac_t""no" 1>&6
8845 fi
8846 done
8847
8848
8849
8850
8851 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
8852 echo "configure:8853: checking for dlopen" >&5
8853 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
8854   echo $ac_n "(cached) $ac_c" 1>&6
8855 else
8856   cat > conftest.$ac_ext <<EOF
8857 #line 8858 "configure"
8858 #include "confdefs.h"
8859 /* System header to define __stub macros and hopefully few prototypes,
8860     which can conflict with char dlopen(); below.  */
8861 #include <assert.h>
8862 /* Override any gcc2 internal prototype to avoid an error.  */
8863 /* We use char because int might match the return type of a gcc2
8864     builtin and then its argument prototype would still apply.  */
8865 char dlopen();
8866 char (*f)();
8867
8868 int main() {
8869
8870 /* The GNU C library defines this for functions which it implements
8871     to always fail with ENOSYS.  Some functions are actually named
8872     something starting with __ and the normal name is an alias.  */
8873 #if defined (__stub_dlopen) || defined (__stub___dlopen)
8874 choke me
8875 #else
8876 f = dlopen;
8877 #endif
8878
8879 ; return 0; }
8880 EOF
8881 if { (eval echo configure:8882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8882   rm -rf conftest*
8883   eval "ac_cv_func_dlopen=yes"
8884 else
8885   echo "configure: failed program was:" >&5
8886   cat conftest.$ac_ext >&5
8887   rm -rf conftest*
8888   eval "ac_cv_func_dlopen=no"
8889 fi
8890 rm -f conftest*
8891 fi
8892
8893 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
8894   echo "$ac_t""yes" 1>&6
8895   :
8896 else
8897   echo "$ac_t""no" 1>&6
8898 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
8899 echo "configure:8900: checking for dlopen in -ldl" >&5
8900 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
8901 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8902   echo $ac_n "(cached) $ac_c" 1>&6
8903 else
8904   ac_save_LIBS="$LIBS"
8905 LIBS="-ldl  $LIBS"
8906 cat > conftest.$ac_ext <<EOF
8907 #line 8908 "configure"
8908 #include "confdefs.h"
8909 /* Override any gcc2 internal prototype to avoid an error.  */
8910 /* We use char because int might match the return type of a gcc2
8911     builtin and then its argument prototype would still apply.  */
8912 char dlopen();
8913
8914 int main() {
8915 dlopen()
8916 ; return 0; }
8917 EOF
8918 if { (eval echo configure:8919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8919   rm -rf conftest*
8920   eval "ac_cv_lib_$ac_lib_var=yes"
8921 else
8922   echo "configure: failed program was:" >&5
8923   cat conftest.$ac_ext >&5
8924   rm -rf conftest*
8925   eval "ac_cv_lib_$ac_lib_var=no"
8926 fi
8927 rm -f conftest*
8928 LIBS="$ac_save_LIBS"
8929
8930 fi
8931 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8932   echo "$ac_t""yes" 1>&6
8933     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8934     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8935   cat >> confdefs.h <<EOF
8936 #define $ac_tr_lib 1
8937 EOF
8938
8939   LIBS="-ldl $LIBS"
8940
8941 else
8942   echo "$ac_t""no" 1>&6
8943 fi
8944
8945 fi
8946
8947
8948 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
8949 echo "configure:8950: checking for sigset in -lV3" >&5
8950 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
8951 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8952   echo $ac_n "(cached) $ac_c" 1>&6
8953 else
8954   ac_save_LIBS="$LIBS"
8955 LIBS="-lV3  $LIBS"
8956 cat > conftest.$ac_ext <<EOF
8957 #line 8958 "configure"
8958 #include "confdefs.h"
8959 /* Override any gcc2 internal prototype to avoid an error.  */
8960 /* We use char because int might match the return type of a gcc2
8961     builtin and then its argument prototype would still apply.  */
8962 char sigset();
8963
8964 int main() {
8965 sigset()
8966 ; return 0; }
8967 EOF
8968 if { (eval echo configure:8969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8969   rm -rf conftest*
8970   eval "ac_cv_lib_$ac_lib_var=yes"
8971 else
8972   echo "configure: failed program was:" >&5
8973   cat conftest.$ac_ext >&5
8974   rm -rf conftest*
8975   eval "ac_cv_lib_$ac_lib_var=no"
8976 fi
8977 rm -f conftest*
8978 LIBS="$ac_save_LIBS"
8979
8980 fi
8981 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8982   echo "$ac_t""yes" 1>&6
8983     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8984     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8985   cat >> confdefs.h <<EOF
8986 #define $ac_tr_lib 1
8987 EOF
8988
8989   LIBS="-lV3 $LIBS"
8990
8991 else
8992   echo "$ac_t""no" 1>&6
8993 fi
8994
8995
8996 echo $ac_n "checking for winsock""... $ac_c" 1>&6
8997 echo "configure:8998: checking for winsock" >&5
8998 save_LIBS="$LIBS"
8999 for curlib in ws2_32 wsock32; do
9000         LIBS="$LIBS -l$curlib"
9001         cat > conftest.$ac_ext <<EOF
9002 #line 9003 "configure"
9003 #include "confdefs.h"
9004
9005                         char socket@12();
9006                         char select@20();
9007                         char closesocket@4();
9008                         char gethostname@8();
9009                         
9010 int main() {
9011
9012                         socket@12();
9013                         select@20();
9014                         closesocket@4();
9015                         gethostname@8();
9016                         
9017 ; return 0; }
9018 EOF
9019 if { (eval echo configure:9020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9020   rm -rf conftest*
9021   have_winsock=yes
9022 else
9023   echo "configure: failed program was:" >&5
9024   cat conftest.$ac_ext >&5
9025   rm -rf conftest*
9026   have_winsock=no
9027 fi
9028 rm -f conftest*
9029
9030         if test $have_winsock = yes; then
9031                 cat >> confdefs.h <<\EOF
9032 #define HAVE_WINSOCK 1
9033 EOF
9034
9035                 ac_cv_func_socket=yes
9036                 ac_cv_func_select=yes
9037                 ac_cv_func_closesocket=yes
9038                 ac_cv_func_gethostname=yes
9039                 if test $curlib = ws2_32; then
9040                         have_winsock=winsock2
9041                         cat >> confdefs.h <<\EOF
9042 #define HAVE_WINSOCK2 1
9043 EOF
9044
9045                 fi
9046                 break
9047         fi
9048         LIBS="$save_LIBS"
9049 done
9050 echo "$ac_t""$have_winsock" 1>&6
9051
9052
9053 echo $ac_n "checking for socket""... $ac_c" 1>&6
9054 echo "configure:9055: checking for socket" >&5
9055 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9056   echo $ac_n "(cached) $ac_c" 1>&6
9057 else
9058   cat > conftest.$ac_ext <<EOF
9059 #line 9060 "configure"
9060 #include "confdefs.h"
9061 /* System header to define __stub macros and hopefully few prototypes,
9062     which can conflict with char socket(); below.  */
9063 #include <assert.h>
9064 /* Override any gcc2 internal prototype to avoid an error.  */
9065 /* We use char because int might match the return type of a gcc2
9066     builtin and then its argument prototype would still apply.  */
9067 char socket();
9068 char (*f)();
9069
9070 int main() {
9071
9072 /* The GNU C library defines this for functions which it implements
9073     to always fail with ENOSYS.  Some functions are actually named
9074     something starting with __ and the normal name is an alias.  */
9075 #if defined (__stub_socket) || defined (__stub___socket)
9076 choke me
9077 #else
9078 f = socket;
9079 #endif
9080
9081 ; return 0; }
9082 EOF
9083 if { (eval echo configure:9084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9084   rm -rf conftest*
9085   eval "ac_cv_func_socket=yes"
9086 else
9087   echo "configure: failed program was:" >&5
9088   cat conftest.$ac_ext >&5
9089   rm -rf conftest*
9090   eval "ac_cv_func_socket=no"
9091 fi
9092 rm -f conftest*
9093 fi
9094
9095 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9096   echo "$ac_t""yes" 1>&6
9097   :
9098 else
9099   echo "$ac_t""no" 1>&6
9100         
9101         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9102 echo "configure:9103: checking for main in -lsocket" >&5
9103 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9104 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9105   echo $ac_n "(cached) $ac_c" 1>&6
9106 else
9107   ac_save_LIBS="$LIBS"
9108 LIBS="-lsocket  $LIBS"
9109 cat > conftest.$ac_ext <<EOF
9110 #line 9111 "configure"
9111 #include "confdefs.h"
9112
9113 int main() {
9114 main()
9115 ; return 0; }
9116 EOF
9117 if { (eval echo configure:9118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9118   rm -rf conftest*
9119   eval "ac_cv_lib_$ac_lib_var=yes"
9120 else
9121   echo "configure: failed program was:" >&5
9122   cat conftest.$ac_ext >&5
9123   rm -rf conftest*
9124   eval "ac_cv_lib_$ac_lib_var=no"
9125 fi
9126 rm -f conftest*
9127 LIBS="$ac_save_LIBS"
9128
9129 fi
9130 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9131   echo "$ac_t""yes" 1>&6
9132     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9133     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9134   cat >> confdefs.h <<EOF
9135 #define $ac_tr_lib 1
9136 EOF
9137
9138   LIBS="-lsocket $LIBS"
9139
9140 else
9141   echo "$ac_t""no" 1>&6
9142 fi
9143
9144         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9145 echo "configure:9146: checking for main in -lnet" >&5
9146 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9147 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9148   echo $ac_n "(cached) $ac_c" 1>&6
9149 else
9150   ac_save_LIBS="$LIBS"
9151 LIBS="-lnet  $LIBS"
9152 cat > conftest.$ac_ext <<EOF
9153 #line 9154 "configure"
9154 #include "confdefs.h"
9155
9156 int main() {
9157 main()
9158 ; return 0; }
9159 EOF
9160 if { (eval echo configure:9161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9161   rm -rf conftest*
9162   eval "ac_cv_lib_$ac_lib_var=yes"
9163 else
9164   echo "configure: failed program was:" >&5
9165   cat conftest.$ac_ext >&5
9166   rm -rf conftest*
9167   eval "ac_cv_lib_$ac_lib_var=no"
9168 fi
9169 rm -f conftest*
9170 LIBS="$ac_save_LIBS"
9171
9172 fi
9173 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9174   echo "$ac_t""yes" 1>&6
9175     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9176     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9177   cat >> confdefs.h <<EOF
9178 #define $ac_tr_lib 1
9179 EOF
9180
9181   LIBS="-lnet $LIBS"
9182
9183 else
9184   echo "$ac_t""no" 1>&6
9185 fi
9186
9187         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9188 echo "configure:9189: checking for main in -lnsl_s" >&5
9189 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9190 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9191   echo $ac_n "(cached) $ac_c" 1>&6
9192 else
9193   ac_save_LIBS="$LIBS"
9194 LIBS="-lnsl_s  $LIBS"
9195 cat > conftest.$ac_ext <<EOF
9196 #line 9197 "configure"
9197 #include "confdefs.h"
9198
9199 int main() {
9200 main()
9201 ; return 0; }
9202 EOF
9203 if { (eval echo configure:9204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9204   rm -rf conftest*
9205   eval "ac_cv_lib_$ac_lib_var=yes"
9206 else
9207   echo "configure: failed program was:" >&5
9208   cat conftest.$ac_ext >&5
9209   rm -rf conftest*
9210   eval "ac_cv_lib_$ac_lib_var=no"
9211 fi
9212 rm -f conftest*
9213 LIBS="$ac_save_LIBS"
9214
9215 fi
9216 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9217   echo "$ac_t""yes" 1>&6
9218     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9219     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9220   cat >> confdefs.h <<EOF
9221 #define $ac_tr_lib 1
9222 EOF
9223
9224   LIBS="-lnsl_s $LIBS"
9225
9226 else
9227   echo "$ac_t""no" 1>&6
9228 fi
9229
9230         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9231 echo "configure:9232: checking for main in -lnsl" >&5
9232 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9233 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9234   echo $ac_n "(cached) $ac_c" 1>&6
9235 else
9236   ac_save_LIBS="$LIBS"
9237 LIBS="-lnsl  $LIBS"
9238 cat > conftest.$ac_ext <<EOF
9239 #line 9240 "configure"
9240 #include "confdefs.h"
9241
9242 int main() {
9243 main()
9244 ; return 0; }
9245 EOF
9246 if { (eval echo configure:9247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9247   rm -rf conftest*
9248   eval "ac_cv_lib_$ac_lib_var=yes"
9249 else
9250   echo "configure: failed program was:" >&5
9251   cat conftest.$ac_ext >&5
9252   rm -rf conftest*
9253   eval "ac_cv_lib_$ac_lib_var=no"
9254 fi
9255 rm -f conftest*
9256 LIBS="$ac_save_LIBS"
9257
9258 fi
9259 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9260   echo "$ac_t""yes" 1>&6
9261     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9262     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9263   cat >> confdefs.h <<EOF
9264 #define $ac_tr_lib 1
9265 EOF
9266
9267   LIBS="-lnsl $LIBS"
9268
9269 else
9270   echo "$ac_t""no" 1>&6
9271 fi
9272
9273         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9274 echo "configure:9275: checking for socket in -linet" >&5
9275 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9276 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9277   echo $ac_n "(cached) $ac_c" 1>&6
9278 else
9279   ac_save_LIBS="$LIBS"
9280 LIBS="-linet  $LIBS"
9281 cat > conftest.$ac_ext <<EOF
9282 #line 9283 "configure"
9283 #include "confdefs.h"
9284 /* Override any gcc2 internal prototype to avoid an error.  */
9285 /* We use char because int might match the return type of a gcc2
9286     builtin and then its argument prototype would still apply.  */
9287 char socket();
9288
9289 int main() {
9290 socket()
9291 ; return 0; }
9292 EOF
9293 if { (eval echo configure:9294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9294   rm -rf conftest*
9295   eval "ac_cv_lib_$ac_lib_var=yes"
9296 else
9297   echo "configure: failed program was:" >&5
9298   cat conftest.$ac_ext >&5
9299   rm -rf conftest*
9300   eval "ac_cv_lib_$ac_lib_var=no"
9301 fi
9302 rm -f conftest*
9303 LIBS="$ac_save_LIBS"
9304
9305 fi
9306 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9307   echo "$ac_t""yes" 1>&6
9308     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9309     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9310   cat >> confdefs.h <<EOF
9311 #define $ac_tr_lib 1
9312 EOF
9313
9314   LIBS="-linet $LIBS"
9315
9316 else
9317   echo "$ac_t""no" 1>&6
9318 fi
9319
9320         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9321 echo "configure:9322: checking for main in -lgen" >&5
9322 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9323 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9324   echo $ac_n "(cached) $ac_c" 1>&6
9325 else
9326   ac_save_LIBS="$LIBS"
9327 LIBS="-lgen  $LIBS"
9328 cat > conftest.$ac_ext <<EOF
9329 #line 9330 "configure"
9330 #include "confdefs.h"
9331
9332 int main() {
9333 main()
9334 ; return 0; }
9335 EOF
9336 if { (eval echo configure:9337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9337   rm -rf conftest*
9338   eval "ac_cv_lib_$ac_lib_var=yes"
9339 else
9340   echo "configure: failed program was:" >&5
9341   cat conftest.$ac_ext >&5
9342   rm -rf conftest*
9343   eval "ac_cv_lib_$ac_lib_var=no"
9344 fi
9345 rm -f conftest*
9346 LIBS="$ac_save_LIBS"
9347
9348 fi
9349 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9350   echo "$ac_t""yes" 1>&6
9351     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9352     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9353   cat >> confdefs.h <<EOF
9354 #define $ac_tr_lib 1
9355 EOF
9356
9357   LIBS="-lgen $LIBS"
9358
9359 else
9360   echo "$ac_t""no" 1>&6
9361 fi
9362
9363
9364 fi
9365
9366
9367 echo $ac_n "checking for select""... $ac_c" 1>&6
9368 echo "configure:9369: checking for select" >&5
9369 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9370   echo $ac_n "(cached) $ac_c" 1>&6
9371 else
9372   cat > conftest.$ac_ext <<EOF
9373 #line 9374 "configure"
9374 #include "confdefs.h"
9375 /* System header to define __stub macros and hopefully few prototypes,
9376     which can conflict with char select(); below.  */
9377 #include <assert.h>
9378 /* Override any gcc2 internal prototype to avoid an error.  */
9379 /* We use char because int might match the return type of a gcc2
9380     builtin and then its argument prototype would still apply.  */
9381 char select();
9382 char (*f)();
9383
9384 int main() {
9385
9386 /* The GNU C library defines this for functions which it implements
9387     to always fail with ENOSYS.  Some functions are actually named
9388     something starting with __ and the normal name is an alias.  */
9389 #if defined (__stub_select) || defined (__stub___select)
9390 choke me
9391 #else
9392 f = select;
9393 #endif
9394
9395 ; return 0; }
9396 EOF
9397 if { (eval echo configure:9398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9398   rm -rf conftest*
9399   eval "ac_cv_func_select=yes"
9400 else
9401   echo "configure: failed program was:" >&5
9402   cat conftest.$ac_ext >&5
9403   rm -rf conftest*
9404   eval "ac_cv_func_select=no"
9405 fi
9406 rm -f conftest*
9407 fi
9408
9409 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9410   echo "$ac_t""yes" 1>&6
9411   :
9412 else
9413   echo "$ac_t""no" 1>&6
9414 { echo "configure: error: select() required." 1>&2; exit 1; }
9415 fi
9416
9417
9418 if test "${ac_cv_header_winsock_h}" != yes; then
9419                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9420 echo "configure:9421: checking types of arguments for select()" >&5
9421  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9422   echo $ac_n "(cached) $ac_c" 1>&6
9423 else
9424    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9425   echo $ac_n "(cached) $ac_c" 1>&6
9426 else
9427     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9428   echo $ac_n "(cached) $ac_c" 1>&6
9429 else
9430      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9431      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9432       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9433        cat > conftest.$ac_ext <<EOF
9434 #line 9435 "configure"
9435 #include "confdefs.h"
9436 #ifdef HAVE_SYS_TYPES_H
9437 #include <sys/types.h>
9438 #endif
9439 #ifdef HAVE_SYS_TIME_H
9440 #include <sys/time.h>
9441 #endif
9442 #ifdef HAVE_SYS_SELECT_H
9443 #include <sys/select.h>
9444 #endif
9445 #ifdef HAVE_SYS_SOCKET_H
9446 #include <sys/socket.h>
9447 #endif
9448 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);
9449 int main() {
9450
9451 ; return 0; }
9452 EOF
9453 if { (eval echo configure:9454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9454   rm -rf conftest*
9455           ac_not_found=no ; break 3
9456 else
9457   echo "configure: failed program was:" >&5
9458   cat conftest.$ac_ext >&5
9459   rm -rf conftest*
9460   ac_not_found=yes
9461 fi
9462 rm -f conftest*
9463       done
9464      done
9465     done
9466    
9467 fi
9468   
9469 fi
9470  
9471 fi
9472  if test "$ac_not_found" = yes; then
9473   ac_cv_func_select_arg1=int 
9474   ac_cv_func_select_arg234='int *' 
9475   ac_cv_func_select_arg5='struct timeval *'
9476  fi
9477  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9478  cat >> confdefs.h <<EOF
9479 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9480 EOF
9481
9482  cat >> confdefs.h <<EOF
9483 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9484 EOF
9485
9486  cat >> confdefs.h <<EOF
9487 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9488 EOF
9489
9490
9491 fi
9492
9493
9494 for ac_hdr in regex.h 
9495 do
9496 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9497 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9498 echo "configure:9499: checking for $ac_hdr" >&5
9499 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9500   echo $ac_n "(cached) $ac_c" 1>&6
9501 else
9502   cat > conftest.$ac_ext <<EOF
9503 #line 9504 "configure"
9504 #include "confdefs.h"
9505 #include <$ac_hdr>
9506 EOF
9507 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9508 { (eval echo configure:9509: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9509 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9510 if test -z "$ac_err"; then
9511   rm -rf conftest*
9512   eval "ac_cv_header_$ac_safe=yes"
9513 else
9514   echo "$ac_err" >&5
9515   echo "configure: failed program was:" >&5
9516   cat conftest.$ac_ext >&5
9517   rm -rf conftest*
9518   eval "ac_cv_header_$ac_safe=no"
9519 fi
9520 rm -f conftest*
9521 fi
9522 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9523   echo "$ac_t""yes" 1>&6
9524     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9525   cat >> confdefs.h <<EOF
9526 #define $ac_tr_hdr 1
9527 EOF
9528  
9529 else
9530   echo "$ac_t""no" 1>&6
9531 fi
9532 done
9533
9534 if test "$ac_cv_header_regex_h" != yes ; then
9535         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9536 fi
9537
9538 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9539 echo "configure:9540: checking for library containing regfree" >&5
9540 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9541   echo $ac_n "(cached) $ac_c" 1>&6
9542 else
9543   ac_func_search_save_LIBS="$LIBS"
9544 ac_cv_search_regfree="no"
9545 cat > conftest.$ac_ext <<EOF
9546 #line 9547 "configure"
9547 #include "confdefs.h"
9548 /* Override any gcc2 internal prototype to avoid an error.  */
9549 /* We use char because int might match the return type of a gcc2
9550     builtin and then its argument prototype would still apply.  */
9551 char regfree();
9552
9553 int main() {
9554 regfree()
9555 ; return 0; }
9556 EOF
9557 if { (eval echo configure:9558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9558   rm -rf conftest*
9559   ac_cv_search_regfree="none required"
9560 else
9561   echo "configure: failed program was:" >&5
9562   cat conftest.$ac_ext >&5
9563 fi
9564 rm -f conftest*
9565 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9566 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9567 cat > conftest.$ac_ext <<EOF
9568 #line 9569 "configure"
9569 #include "confdefs.h"
9570 /* Override any gcc2 internal prototype to avoid an error.  */
9571 /* We use char because int might match the return type of a gcc2
9572     builtin and then its argument prototype would still apply.  */
9573 char regfree();
9574
9575 int main() {
9576 regfree()
9577 ; return 0; }
9578 EOF
9579 if { (eval echo configure:9580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9580   rm -rf conftest*
9581   ac_cv_search_regfree="-l$ac_lib"
9582 break
9583 else
9584   echo "configure: failed program was:" >&5
9585   cat conftest.$ac_ext >&5
9586 fi
9587 rm -f conftest*
9588 done
9589 LIBS="$ac_func_search_save_LIBS"
9590 fi
9591
9592 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9593 if test "$ac_cv_search_regfree" != "no"; then
9594   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9595   :
9596 else :
9597   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9598 fi
9599
9600
9601 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9602 echo "configure:9603: checking for compatible POSIX regex" >&5
9603 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9604   echo $ac_n "(cached) $ac_c" 1>&6
9605 else
9606   
9607         if test "$cross_compiling" = yes; then
9608   ol_cv_c_posix_regex=cross
9609 else
9610   cat > conftest.$ac_ext <<EOF
9611 #line 9612 "configure"
9612 #include "confdefs.h"
9613
9614 #include <sys/types.h>
9615 #include <regex.h>
9616 static char *pattern, *string;
9617 main()
9618 {
9619         int rc;
9620         regex_t re;
9621
9622         pattern = "^A";
9623
9624         if(regcomp(&re, pattern, 0)) {
9625                 return -1;
9626         }
9627         
9628         string = "ALL MATCH";
9629         
9630         rc = regexec(&re, string, 0, (void*)0, 0);
9631
9632         regfree(&re);
9633
9634         return rc;
9635 }
9636 EOF
9637 if { (eval echo configure:9638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9638 then
9639   ol_cv_c_posix_regex=yes
9640 else
9641   echo "configure: failed program was:" >&5
9642   cat conftest.$ac_ext >&5
9643   rm -fr conftest*
9644   ol_cv_c_posix_regex=no
9645 fi
9646 rm -fr conftest*
9647 fi
9648
9649 fi
9650
9651 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9652
9653 if test "$ol_cv_c_posix_regex" = no ; then
9654         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9655 fi
9656
9657
9658 have_uuid=no
9659 for ac_hdr in sys/uuid.h
9660 do
9661 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9662 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9663 echo "configure:9664: checking for $ac_hdr" >&5
9664 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9665   echo $ac_n "(cached) $ac_c" 1>&6
9666 else
9667   cat > conftest.$ac_ext <<EOF
9668 #line 9669 "configure"
9669 #include "confdefs.h"
9670 #include <$ac_hdr>
9671 EOF
9672 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9673 { (eval echo configure:9674: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9674 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9675 if test -z "$ac_err"; then
9676   rm -rf conftest*
9677   eval "ac_cv_header_$ac_safe=yes"
9678 else
9679   echo "$ac_err" >&5
9680   echo "configure: failed program was:" >&5
9681   cat conftest.$ac_ext >&5
9682   rm -rf conftest*
9683   eval "ac_cv_header_$ac_safe=no"
9684 fi
9685 rm -f conftest*
9686 fi
9687 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9688   echo "$ac_t""yes" 1>&6
9689     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9690   cat >> confdefs.h <<EOF
9691 #define $ac_tr_hdr 1
9692 EOF
9693  
9694 else
9695   echo "$ac_t""no" 1>&6
9696 fi
9697 done
9698
9699 if test $ac_cv_header_sys_uuid_h = yes ; then
9700         save_LIBS="$LIBS"
9701         
9702 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9703 echo "configure:9704: checking for library containing uuid_to_str" >&5
9704 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9705   echo $ac_n "(cached) $ac_c" 1>&6
9706 else
9707   ac_func_search_save_LIBS="$LIBS"
9708 ac_cv_search_uuid_to_str="no"
9709 cat > conftest.$ac_ext <<EOF
9710 #line 9711 "configure"
9711 #include "confdefs.h"
9712 /* Override any gcc2 internal prototype to avoid an error.  */
9713 /* We use char because int might match the return type of a gcc2
9714     builtin and then its argument prototype would still apply.  */
9715 char uuid_to_str();
9716
9717 int main() {
9718 uuid_to_str()
9719 ; return 0; }
9720 EOF
9721 if { (eval echo configure:9722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9722   rm -rf conftest*
9723   ac_cv_search_uuid_to_str="none required"
9724 else
9725   echo "configure: failed program was:" >&5
9726   cat conftest.$ac_ext >&5
9727 fi
9728 rm -f conftest*
9729 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9730 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9731 cat > conftest.$ac_ext <<EOF
9732 #line 9733 "configure"
9733 #include "confdefs.h"
9734 /* Override any gcc2 internal prototype to avoid an error.  */
9735 /* We use char because int might match the return type of a gcc2
9736     builtin and then its argument prototype would still apply.  */
9737 char uuid_to_str();
9738
9739 int main() {
9740 uuid_to_str()
9741 ; return 0; }
9742 EOF
9743 if { (eval echo configure:9744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9744   rm -rf conftest*
9745   ac_cv_search_uuid_to_str="-l$ac_lib"
9746 break
9747 else
9748   echo "configure: failed program was:" >&5
9749   cat conftest.$ac_ext >&5
9750 fi
9751 rm -f conftest*
9752 done
9753 LIBS="$ac_func_search_save_LIBS"
9754 fi
9755
9756 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9757 if test "$ac_cv_search_uuid_to_str" != "no"; then
9758   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9759   have_uuid=yes
9760 else :
9761   :
9762 fi
9763         LIBS="$save_LIBS"
9764
9765         if test have_uuid = yes ; then
9766                 cat >> confdefs.h <<\EOF
9767 #define HAVE_UUID_TO_STR 1
9768 EOF
9769
9770
9771                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9772                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9773         fi
9774 fi
9775
9776 if test $have_uuid = no ; then
9777         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9778 echo "configure:9779: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9779         save_LIBS="$LIBS"
9780         LIBS="$LIBS -lrpcrt4"
9781         cat > conftest.$ac_ext <<EOF
9782 #line 9783 "configure"
9783 #include "confdefs.h"
9784
9785                 char UuidCreate@4();
9786                 char UuidToStringA@8();
9787                 
9788 int main() {
9789
9790                 UuidCreate@4();
9791                 UuidToStringA@8();
9792                 
9793 ; return 0; }
9794 EOF
9795 if { (eval echo configure:9796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9796   rm -rf conftest*
9797   need_rpcrt=yes
9798 else
9799   echo "configure: failed program was:" >&5
9800   cat conftest.$ac_ext >&5
9801   rm -rf conftest*
9802   need_rpcrt=no
9803 fi
9804 rm -f conftest*
9805         if test $need_rpcrt = yes; then
9806                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9807         fi
9808         LIBS="$save_LIBS"
9809         echo "$ac_t""$need_rpcrt" 1>&6
9810 fi
9811
9812 ol_link_dnssrv=no
9813 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9814 echo "configure:9815: checking for res_query" >&5
9815 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9816   echo $ac_n "(cached) $ac_c" 1>&6
9817 else
9818   cat > conftest.$ac_ext <<EOF
9819 #line 9820 "configure"
9820 #include "confdefs.h"
9821 /* System header to define __stub macros and hopefully few prototypes,
9822     which can conflict with char res_query(); below.  */
9823 #include <assert.h>
9824 /* Override any gcc2 internal prototype to avoid an error.  */
9825 /* We use char because int might match the return type of a gcc2
9826     builtin and then its argument prototype would still apply.  */
9827 char res_query();
9828 char (*f)();
9829
9830 int main() {
9831
9832 /* The GNU C library defines this for functions which it implements
9833     to always fail with ENOSYS.  Some functions are actually named
9834     something starting with __ and the normal name is an alias.  */
9835 #if defined (__stub_res_query) || defined (__stub___res_query)
9836 choke me
9837 #else
9838 f = res_query;
9839 #endif
9840
9841 ; return 0; }
9842 EOF
9843 if { (eval echo configure:9844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9844   rm -rf conftest*
9845   eval "ac_cv_func_res_query=yes"
9846 else
9847   echo "configure: failed program was:" >&5
9848   cat conftest.$ac_ext >&5
9849   rm -rf conftest*
9850   eval "ac_cv_func_res_query=no"
9851 fi
9852 rm -f conftest*
9853 fi
9854
9855 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9856   echo "$ac_t""yes" 1>&6
9857   :
9858 else
9859   echo "$ac_t""no" 1>&6
9860 fi
9861
9862 if test $ac_cv_func_res_query = no ; then 
9863         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9864 echo "configure:9865: checking for __res_query" >&5
9865 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9866   echo $ac_n "(cached) $ac_c" 1>&6
9867 else
9868   cat > conftest.$ac_ext <<EOF
9869 #line 9870 "configure"
9870 #include "confdefs.h"
9871 /* System header to define __stub macros and hopefully few prototypes,
9872     which can conflict with char __res_query(); below.  */
9873 #include <assert.h>
9874 /* Override any gcc2 internal prototype to avoid an error.  */
9875 /* We use char because int might match the return type of a gcc2
9876     builtin and then its argument prototype would still apply.  */
9877 char __res_query();
9878 char (*f)();
9879
9880 int main() {
9881
9882 /* The GNU C library defines this for functions which it implements
9883     to always fail with ENOSYS.  Some functions are actually named
9884     something starting with __ and the normal name is an alias.  */
9885 #if defined (__stub___res_query) || defined (__stub_____res_query)
9886 choke me
9887 #else
9888 f = __res_query;
9889 #endif
9890
9891 ; return 0; }
9892 EOF
9893 if { (eval echo configure:9894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9894   rm -rf conftest*
9895   eval "ac_cv_func___res_query=yes"
9896 else
9897   echo "configure: failed program was:" >&5
9898   cat conftest.$ac_ext >&5
9899   rm -rf conftest*
9900   eval "ac_cv_func___res_query=no"
9901 fi
9902 rm -f conftest*
9903 fi
9904
9905 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
9906   echo "$ac_t""yes" 1>&6
9907   :
9908 else
9909   echo "$ac_t""no" 1>&6
9910 fi
9911
9912         ac_cv_func_res_query=$ac_cv_func___res_query
9913 fi
9914
9915 if test $ac_cv_func_res_query = no ; then 
9916         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
9917 echo "configure:9918: checking for res_query in -lbind" >&5
9918 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
9919 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9920   echo $ac_n "(cached) $ac_c" 1>&6
9921 else
9922   ac_save_LIBS="$LIBS"
9923 LIBS="-lbind  $LIBS"
9924 cat > conftest.$ac_ext <<EOF
9925 #line 9926 "configure"
9926 #include "confdefs.h"
9927 /* Override any gcc2 internal prototype to avoid an error.  */
9928 /* We use char because int might match the return type of a gcc2
9929     builtin and then its argument prototype would still apply.  */
9930 char res_query();
9931
9932 int main() {
9933 res_query()
9934 ; return 0; }
9935 EOF
9936 if { (eval echo configure:9937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9937   rm -rf conftest*
9938   eval "ac_cv_lib_$ac_lib_var=yes"
9939 else
9940   echo "configure: failed program was:" >&5
9941   cat conftest.$ac_ext >&5
9942   rm -rf conftest*
9943   eval "ac_cv_lib_$ac_lib_var=no"
9944 fi
9945 rm -f conftest*
9946 LIBS="$ac_save_LIBS"
9947
9948 fi
9949 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9950   echo "$ac_t""yes" 1>&6
9951     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9952     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9953   cat >> confdefs.h <<EOF
9954 #define $ac_tr_lib 1
9955 EOF
9956
9957   LIBS="-lbind $LIBS"
9958
9959 else
9960   echo "$ac_t""no" 1>&6
9961 fi
9962
9963         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
9964 fi
9965
9966 if test $ac_cv_func_res_query = no ; then 
9967         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
9968 echo "configure:9969: checking for __res_query in -lbind" >&5
9969 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
9970 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9971   echo $ac_n "(cached) $ac_c" 1>&6
9972 else
9973   ac_save_LIBS="$LIBS"
9974 LIBS="-lbind  $LIBS"
9975 cat > conftest.$ac_ext <<EOF
9976 #line 9977 "configure"
9977 #include "confdefs.h"
9978 /* Override any gcc2 internal prototype to avoid an error.  */
9979 /* We use char because int might match the return type of a gcc2
9980     builtin and then its argument prototype would still apply.  */
9981 char __res_query();
9982
9983 int main() {
9984 __res_query()
9985 ; return 0; }
9986 EOF
9987 if { (eval echo configure:9988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9988   rm -rf conftest*
9989   eval "ac_cv_lib_$ac_lib_var=yes"
9990 else
9991   echo "configure: failed program was:" >&5
9992   cat conftest.$ac_ext >&5
9993   rm -rf conftest*
9994   eval "ac_cv_lib_$ac_lib_var=no"
9995 fi
9996 rm -f conftest*
9997 LIBS="$ac_save_LIBS"
9998
9999 fi
10000 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10001   echo "$ac_t""yes" 1>&6
10002     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10003     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10004   cat >> confdefs.h <<EOF
10005 #define $ac_tr_lib 1
10006 EOF
10007
10008   LIBS="-lbind $LIBS"
10009
10010 else
10011   echo "$ac_t""no" 1>&6
10012 fi
10013
10014         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10015 fi
10016
10017 if test $ac_cv_func_res_query = no ; then 
10018         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10019 echo "configure:10020: checking for res_query in -lresolv" >&5
10020 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10021 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10022   echo $ac_n "(cached) $ac_c" 1>&6
10023 else
10024   ac_save_LIBS="$LIBS"
10025 LIBS="-lresolv  $LIBS"
10026 cat > conftest.$ac_ext <<EOF
10027 #line 10028 "configure"
10028 #include "confdefs.h"
10029 /* Override any gcc2 internal prototype to avoid an error.  */
10030 /* We use char because int might match the return type of a gcc2
10031     builtin and then its argument prototype would still apply.  */
10032 char res_query();
10033
10034 int main() {
10035 res_query()
10036 ; return 0; }
10037 EOF
10038 if { (eval echo configure:10039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10039   rm -rf conftest*
10040   eval "ac_cv_lib_$ac_lib_var=yes"
10041 else
10042   echo "configure: failed program was:" >&5
10043   cat conftest.$ac_ext >&5
10044   rm -rf conftest*
10045   eval "ac_cv_lib_$ac_lib_var=no"
10046 fi
10047 rm -f conftest*
10048 LIBS="$ac_save_LIBS"
10049
10050 fi
10051 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10052   echo "$ac_t""yes" 1>&6
10053     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10054     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10055   cat >> confdefs.h <<EOF
10056 #define $ac_tr_lib 1
10057 EOF
10058
10059   LIBS="-lresolv $LIBS"
10060
10061 else
10062   echo "$ac_t""no" 1>&6
10063 fi
10064
10065         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10066 fi
10067
10068 if test $ac_cv_func_res_query = no ; then 
10069         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10070 echo "configure:10071: checking for __res_query in -lresolv" >&5
10071 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10072 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10073   echo $ac_n "(cached) $ac_c" 1>&6
10074 else
10075   ac_save_LIBS="$LIBS"
10076 LIBS="-lresolv  $LIBS"
10077 cat > conftest.$ac_ext <<EOF
10078 #line 10079 "configure"
10079 #include "confdefs.h"
10080 /* Override any gcc2 internal prototype to avoid an error.  */
10081 /* We use char because int might match the return type of a gcc2
10082     builtin and then its argument prototype would still apply.  */
10083 char __res_query();
10084
10085 int main() {
10086 __res_query()
10087 ; return 0; }
10088 EOF
10089 if { (eval echo configure:10090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10090   rm -rf conftest*
10091   eval "ac_cv_lib_$ac_lib_var=yes"
10092 else
10093   echo "configure: failed program was:" >&5
10094   cat conftest.$ac_ext >&5
10095   rm -rf conftest*
10096   eval "ac_cv_lib_$ac_lib_var=no"
10097 fi
10098 rm -f conftest*
10099 LIBS="$ac_save_LIBS"
10100
10101 fi
10102 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10103   echo "$ac_t""yes" 1>&6
10104     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10105     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10106   cat >> confdefs.h <<EOF
10107 #define $ac_tr_lib 1
10108 EOF
10109
10110   LIBS="-lresolv $LIBS"
10111
10112 else
10113   echo "$ac_t""no" 1>&6
10114 fi
10115
10116         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10117 fi
10118
10119 if test "$ac_cv_func_res_query" = yes ; then
10120         cat >> confdefs.h <<\EOF
10121 #define HAVE_RES_QUERY 1
10122 EOF
10123
10124
10125         if test $ol_enable_dnssrv != no ; then
10126                 ol_link_dnssrv=yes
10127         fi
10128 fi
10129
10130 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10131         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10132 fi
10133
10134 for ac_func in getaddrinfo gai_strerror inet_ntop 
10135 do
10136 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10137 echo "configure:10138: checking for $ac_func" >&5
10138 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10139   echo $ac_n "(cached) $ac_c" 1>&6
10140 else
10141   cat > conftest.$ac_ext <<EOF
10142 #line 10143 "configure"
10143 #include "confdefs.h"
10144 /* System header to define __stub macros and hopefully few prototypes,
10145     which can conflict with char $ac_func(); below.  */
10146 #include <assert.h>
10147 /* Override any gcc2 internal prototype to avoid an error.  */
10148 /* We use char because int might match the return type of a gcc2
10149     builtin and then its argument prototype would still apply.  */
10150 char $ac_func();
10151 char (*f)();
10152
10153 int main() {
10154
10155 /* The GNU C library defines this for functions which it implements
10156     to always fail with ENOSYS.  Some functions are actually named
10157     something starting with __ and the normal name is an alias.  */
10158 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10159 choke me
10160 #else
10161 f = $ac_func;
10162 #endif
10163
10164 ; return 0; }
10165 EOF
10166 if { (eval echo configure:10167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10167   rm -rf conftest*
10168   eval "ac_cv_func_$ac_func=yes"
10169 else
10170   echo "configure: failed program was:" >&5
10171   cat conftest.$ac_ext >&5
10172   rm -rf conftest*
10173   eval "ac_cv_func_$ac_func=no"
10174 fi
10175 rm -f conftest*
10176 fi
10177
10178 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10179   echo "$ac_t""yes" 1>&6
10180     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10181   cat >> confdefs.h <<EOF
10182 #define $ac_tr_func 1
10183 EOF
10184  
10185 else
10186   echo "$ac_t""no" 1>&6
10187 fi
10188 done
10189
10190
10191 ol_link_ipv6=no
10192 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10193         if test $ol_enable_ipv6 = yes ; then
10194                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10195         fi
10196 elif test $ol_enable_ipv6 != no ; then
10197         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10198 echo "configure:10199: checking INET6_ADDRSTRLEN" >&5
10199 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10200   echo $ac_n "(cached) $ac_c" 1>&6
10201 else
10202   
10203                 cat > conftest.$ac_ext <<EOF
10204 #line 10205 "configure"
10205 #include "confdefs.h"
10206
10207 #                       include <netinet/in.h>
10208 #                       ifdef INET6_ADDRSTRLEN
10209                                 __has_inet6_addrstrlen__;
10210 #                       endif
10211                 
10212 EOF
10213 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10214   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10215   rm -rf conftest*
10216   ol_cv_inet6_addrstrlen=yes
10217 else
10218   rm -rf conftest*
10219   ol_cv_inet6_addrstrlen=no
10220 fi
10221 rm -f conftest*
10222
10223 fi
10224
10225 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10226
10227
10228         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10229 echo "configure:10230: checking struct sockaddr_storage" >&5
10230 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10231   echo $ac_n "(cached) $ac_c" 1>&6
10232 else
10233   
10234                 cat > conftest.$ac_ext <<EOF
10235 #line 10236 "configure"
10236 #include "confdefs.h"
10237
10238 #include <sys/types.h>
10239 #include <sys/socket.h>
10240
10241 int main() {
10242
10243                         struct sockaddr_storage ss;
10244
10245 ; return 0; }
10246 EOF
10247 if { (eval echo configure:10248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10248   rm -rf conftest*
10249   ol_cv_struct_sockaddr_storage=yes
10250 else
10251   echo "configure: failed program was:" >&5
10252   cat conftest.$ac_ext >&5
10253   rm -rf conftest*
10254   ol_cv_struct_sockaddr_storage=no
10255 fi
10256 rm -f conftest*
10257 fi
10258
10259 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10260
10261         if test $ol_cv_inet6_addrstrlen = yes \
10262                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10263                 ol_link_ipv6=yes
10264         elif test $ol_enable_ipv6 = yes \
10265                         -a $ol_cv_inet6_addrstrlen = no ; then
10266                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10267         elif test $ol_enable_ipv6 = yes \
10268                         -a $ol_cv_struct_sockaddr_storage = no ; then
10269                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10270         fi
10271 fi
10272
10273 if test $ol_enable_local != no ; then
10274         for ac_hdr in sys/un.h 
10275 do
10276 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10277 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10278 echo "configure:10279: checking for $ac_hdr" >&5
10279 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10280   echo $ac_n "(cached) $ac_c" 1>&6
10281 else
10282   cat > conftest.$ac_ext <<EOF
10283 #line 10284 "configure"
10284 #include "confdefs.h"
10285 #include <$ac_hdr>
10286 EOF
10287 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10288 { (eval echo configure:10289: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10289 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10290 if test -z "$ac_err"; then
10291   rm -rf conftest*
10292   eval "ac_cv_header_$ac_safe=yes"
10293 else
10294   echo "$ac_err" >&5
10295   echo "configure: failed program was:" >&5
10296   cat conftest.$ac_ext >&5
10297   rm -rf conftest*
10298   eval "ac_cv_header_$ac_safe=no"
10299 fi
10300 rm -f conftest*
10301 fi
10302 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10303   echo "$ac_t""yes" 1>&6
10304     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10305   cat >> confdefs.h <<EOF
10306 #define $ac_tr_hdr 1
10307 EOF
10308  
10309 else
10310   echo "$ac_t""no" 1>&6
10311 fi
10312 done
10313
10314
10315         if test $ol_enable_local = auto ; then
10316                 ol_enable_local=$ac_cv_header_sys_un_h
10317         elif test $ac_cv_header_sys_un_h = no ; then
10318                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10319         fi
10320 fi
10321
10322 ol_link_kbind=no
10323 ol_link_kpasswd=no
10324 ol_link_krb5=no
10325 ol_link_krb4=no
10326
10327 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10328         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10329         -o $ol_with_kerberos = k425 ; then
10330
10331         for ac_hdr in krb5.h
10332 do
10333 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10334 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10335 echo "configure:10336: checking for $ac_hdr" >&5
10336 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10337   echo $ac_n "(cached) $ac_c" 1>&6
10338 else
10339   cat > conftest.$ac_ext <<EOF
10340 #line 10341 "configure"
10341 #include "confdefs.h"
10342 #include <$ac_hdr>
10343 EOF
10344 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10345 { (eval echo configure:10346: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10346 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10347 if test -z "$ac_err"; then
10348   rm -rf conftest*
10349   eval "ac_cv_header_$ac_safe=yes"
10350 else
10351   echo "$ac_err" >&5
10352   echo "configure: failed program was:" >&5
10353   cat conftest.$ac_ext >&5
10354   rm -rf conftest*
10355   eval "ac_cv_header_$ac_safe=no"
10356 fi
10357 rm -f conftest*
10358 fi
10359 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10360   echo "$ac_t""yes" 1>&6
10361     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10362   cat >> confdefs.h <<EOF
10363 #define $ac_tr_hdr 1
10364 EOF
10365  
10366 else
10367   echo "$ac_t""no" 1>&6
10368 fi
10369 done
10370
10371
10372         if test $ac_cv_header_krb5_h = yes ; then
10373                                 for ac_hdr in heim_err.h
10374 do
10375 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10376 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10377 echo "configure:10378: checking for $ac_hdr" >&5
10378 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10379   echo $ac_n "(cached) $ac_c" 1>&6
10380 else
10381   cat > conftest.$ac_ext <<EOF
10382 #line 10383 "configure"
10383 #include "confdefs.h"
10384 #include <$ac_hdr>
10385 EOF
10386 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10387 { (eval echo configure:10388: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10388 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10389 if test -z "$ac_err"; then
10390   rm -rf conftest*
10391   eval "ac_cv_header_$ac_safe=yes"
10392 else
10393   echo "$ac_err" >&5
10394   echo "configure: failed program was:" >&5
10395   cat conftest.$ac_ext >&5
10396   rm -rf conftest*
10397   eval "ac_cv_header_$ac_safe=no"
10398 fi
10399 rm -f conftest*
10400 fi
10401 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10402   echo "$ac_t""yes" 1>&6
10403     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10404   cat >> confdefs.h <<EOF
10405 #define $ac_tr_hdr 1
10406 EOF
10407  
10408 else
10409   echo "$ac_t""no" 1>&6
10410 fi
10411 done
10412
10413                 if test $ac_cv_header_heim_err_h = yes ; then
10414                         krb5_impl=heimdal
10415                 else
10416                         krb5_impl=mit
10417                 fi
10418
10419                 if test $krb5_impl = mit; then
10420                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10421 echo "configure:10422: checking for main in -lk5crypto" >&5
10422 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10423 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10424   echo $ac_n "(cached) $ac_c" 1>&6
10425 else
10426   ac_save_LIBS="$LIBS"
10427 LIBS="-lk5crypto  $LIBS"
10428 cat > conftest.$ac_ext <<EOF
10429 #line 10430 "configure"
10430 #include "confdefs.h"
10431
10432 int main() {
10433 main()
10434 ; return 0; }
10435 EOF
10436 if { (eval echo configure:10437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10437   rm -rf conftest*
10438   eval "ac_cv_lib_$ac_lib_var=yes"
10439 else
10440   echo "configure: failed program was:" >&5
10441   cat conftest.$ac_ext >&5
10442   rm -rf conftest*
10443   eval "ac_cv_lib_$ac_lib_var=no"
10444 fi
10445 rm -f conftest*
10446 LIBS="$ac_save_LIBS"
10447
10448 fi
10449 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10450   echo "$ac_t""yes" 1>&6
10451   krb5crypto=k5crypto
10452 else
10453   echo "$ac_t""no" 1>&6
10454 krb5crypto=crypto
10455 fi
10456
10457
10458                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10459 echo "configure:10460: checking for main in -lkrb5" >&5
10460 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10461 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10462   echo $ac_n "(cached) $ac_c" 1>&6
10463 else
10464   ac_save_LIBS="$LIBS"
10465 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10466 cat > conftest.$ac_ext <<EOF
10467 #line 10468 "configure"
10468 #include "confdefs.h"
10469
10470 int main() {
10471 main()
10472 ; return 0; }
10473 EOF
10474 if { (eval echo configure:10475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10475   rm -rf conftest*
10476   eval "ac_cv_lib_$ac_lib_var=yes"
10477 else
10478   echo "configure: failed program was:" >&5
10479   cat conftest.$ac_ext >&5
10480   rm -rf conftest*
10481   eval "ac_cv_lib_$ac_lib_var=no"
10482 fi
10483 rm -f conftest*
10484 LIBS="$ac_save_LIBS"
10485
10486 fi
10487 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10488   echo "$ac_t""yes" 1>&6
10489   have_krb5=yes
10490                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10491 else
10492   echo "$ac_t""no" 1>&6
10493 have_krb5=no
10494 fi
10495
10496
10497                 elif test $krb5_impl = heimdal; then
10498                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10499 echo "configure:10500: checking for main in -ldes" >&5
10500 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10501 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10502   echo $ac_n "(cached) $ac_c" 1>&6
10503 else
10504   ac_save_LIBS="$LIBS"
10505 LIBS="-ldes  $LIBS"
10506 cat > conftest.$ac_ext <<EOF
10507 #line 10508 "configure"
10508 #include "confdefs.h"
10509
10510 int main() {
10511 main()
10512 ; return 0; }
10513 EOF
10514 if { (eval echo configure:10515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10515   rm -rf conftest*
10516   eval "ac_cv_lib_$ac_lib_var=yes"
10517 else
10518   echo "configure: failed program was:" >&5
10519   cat conftest.$ac_ext >&5
10520   rm -rf conftest*
10521   eval "ac_cv_lib_$ac_lib_var=no"
10522 fi
10523 rm -f conftest*
10524 LIBS="$ac_save_LIBS"
10525
10526 fi
10527 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10528   echo "$ac_t""yes" 1>&6
10529   krb5crypto=des
10530 else
10531   echo "$ac_t""no" 1>&6
10532 krb5crypto=crypto
10533 fi
10534
10535
10536                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10537 echo "configure:10538: checking for main in -lkrb5" >&5
10538 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10539 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10540   echo $ac_n "(cached) $ac_c" 1>&6
10541 else
10542   ac_save_LIBS="$LIBS"
10543 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10544 cat > conftest.$ac_ext <<EOF
10545 #line 10546 "configure"
10546 #include "confdefs.h"
10547
10548 int main() {
10549 main()
10550 ; return 0; }
10551 EOF
10552 if { (eval echo configure:10553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10553   rm -rf conftest*
10554   eval "ac_cv_lib_$ac_lib_var=yes"
10555 else
10556   echo "configure: failed program was:" >&5
10557   cat conftest.$ac_ext >&5
10558   rm -rf conftest*
10559   eval "ac_cv_lib_$ac_lib_var=no"
10560 fi
10561 rm -f conftest*
10562 LIBS="$ac_save_LIBS"
10563
10564 fi
10565 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10566   echo "$ac_t""yes" 1>&6
10567   have_krb5=yes
10568                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10569 else
10570   echo "$ac_t""no" 1>&6
10571 have_krb5=no
10572 fi
10573
10574
10575                         cat >> confdefs.h <<\EOF
10576 #define HAVE_HEIMDAL_KERBEROS 1
10577 EOF
10578
10579
10580                 else
10581                         have_krb5=no
10582                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
10583                 fi
10584
10585                 if test $have_krb5 = yes ; then
10586                         ol_link_krb5=yes
10587
10588                         cat >> confdefs.h <<\EOF
10589 #define HAVE_KRB5 1
10590 EOF
10591
10592
10593                         if test $ol_enable_kpasswd != no ; then
10594                                 ol_link_kpasswd=yes;
10595                         fi
10596
10597                         if test $ol_with_kerberos = k5only ; then
10598                                 ol_with_kerberos=found
10599                         fi
10600
10601                 elif test $ol_with_kerberos != auto ; then
10602                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10603                 fi
10604
10605         fi
10606 fi
10607
10608 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10609         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10610
10611         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10612 do
10613 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10614 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10615 echo "configure:10616: checking for $ac_hdr" >&5
10616 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10617   echo $ac_n "(cached) $ac_c" 1>&6
10618 else
10619   cat > conftest.$ac_ext <<EOF
10620 #line 10621 "configure"
10621 #include "confdefs.h"
10622 #include <$ac_hdr>
10623 EOF
10624 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10625 { (eval echo configure:10626: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10626 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10627 if test -z "$ac_err"; then
10628   rm -rf conftest*
10629   eval "ac_cv_header_$ac_safe=yes"
10630 else
10631   echo "$ac_err" >&5
10632   echo "configure: failed program was:" >&5
10633   cat conftest.$ac_ext >&5
10634   rm -rf conftest*
10635   eval "ac_cv_header_$ac_safe=no"
10636 fi
10637 rm -f conftest*
10638 fi
10639 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10640   echo "$ac_t""yes" 1>&6
10641     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10642   cat >> confdefs.h <<EOF
10643 #define $ac_tr_hdr 1
10644 EOF
10645  
10646 else
10647   echo "$ac_t""no" 1>&6
10648 fi
10649 done
10650
10651
10652         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10653                 if test $krb5_impl = mit; then
10654                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10655 echo "configure:10656: checking for main in -lkrb4" >&5
10656 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10657 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10658   echo $ac_n "(cached) $ac_c" 1>&6
10659 else
10660   ac_save_LIBS="$LIBS"
10661 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10662 cat > conftest.$ac_ext <<EOF
10663 #line 10664 "configure"
10664 #include "confdefs.h"
10665
10666 int main() {
10667 main()
10668 ; return 0; }
10669 EOF
10670 if { (eval echo configure:10671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10671   rm -rf conftest*
10672   eval "ac_cv_lib_$ac_lib_var=yes"
10673 else
10674   echo "configure: failed program was:" >&5
10675   cat conftest.$ac_ext >&5
10676   rm -rf conftest*
10677   eval "ac_cv_lib_$ac_lib_var=no"
10678 fi
10679 rm -f conftest*
10680 LIBS="$ac_save_LIBS"
10681
10682 fi
10683 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10684   echo "$ac_t""yes" 1>&6
10685   have_k425=yes
10686                                 KRB4_LIBS="-lkrb4 -ldes425"
10687 else
10688   echo "$ac_t""no" 1>&6
10689 have_k425=no
10690 fi
10691
10692
10693                 elif test $krb5_impl = heimdal; then
10694                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10695 echo "configure:10696: checking for main in -lkrb4" >&5
10696 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10697 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10698   echo $ac_n "(cached) $ac_c" 1>&6
10699 else
10700   ac_save_LIBS="$LIBS"
10701 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10702 cat > conftest.$ac_ext <<EOF
10703 #line 10704 "configure"
10704 #include "confdefs.h"
10705
10706 int main() {
10707 main()
10708 ; return 0; }
10709 EOF
10710 if { (eval echo configure:10711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10711   rm -rf conftest*
10712   eval "ac_cv_lib_$ac_lib_var=yes"
10713 else
10714   echo "configure: failed program was:" >&5
10715   cat conftest.$ac_ext >&5
10716   rm -rf conftest*
10717   eval "ac_cv_lib_$ac_lib_var=no"
10718 fi
10719 rm -f conftest*
10720 LIBS="$ac_save_LIBS"
10721
10722 fi
10723 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10724   echo "$ac_t""yes" 1>&6
10725   have_k425=yes
10726                                 KRB4_LIBS="-lkrb4"
10727 else
10728   echo "$ac_t""no" 1>&6
10729 have_k425=no
10730 fi
10731
10732
10733                 else
10734                         have_425=no
10735                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10736                 fi
10737
10738                 if test $have_k425 = yes ; then
10739                         ol_with_kerberos=found
10740                         ol_link_krb4=yes
10741
10742                         cat >> confdefs.h <<\EOF
10743 #define HAVE_KRB425 1
10744 EOF
10745
10746                         cat >> confdefs.h <<\EOF
10747 #define HAVE_KRB4 1
10748 EOF
10749
10750
10751                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10752 echo "configure:10753: checking for des_debug in Kerberos libraries" >&5
10753 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10754   echo $ac_n "(cached) $ac_c" 1>&6
10755 else
10756   
10757                                                                 save_LIBS="$LIBS"
10758                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10759                                 cat > conftest.$ac_ext <<EOF
10760 #line 10761 "configure"
10761 #include "confdefs.h"
10762
10763 #include <kerberosIV/krb.h>
10764 #include <kerberosIV/des.h>
10765 extern int des_debug;
10766
10767 int main() {
10768
10769 des_debug = 1;
10770
10771 ; return 0; }
10772 EOF
10773 if { (eval echo configure:10774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10774   rm -rf conftest*
10775   ol_cv_var_des_debug=yes
10776 else
10777   echo "configure: failed program was:" >&5
10778   cat conftest.$ac_ext >&5
10779   rm -rf conftest*
10780   ol_cv_var_des_debug=no
10781 fi
10782 rm -f conftest*
10783                                                                 LIBS="$save_LIBS"
10784                         
10785 fi
10786
10787 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10788
10789                         if test $ol_cv_var_des_debug = yes ; then
10790                                 cat >> confdefs.h <<\EOF
10791 #define HAVE_DES_DEBUG 1
10792 EOF
10793
10794                         fi
10795
10796                         LIBS="$save_LIBS"
10797                 fi
10798         fi
10799 fi
10800
10801 if test $ol_link_krb5 = yes ; then
10802         ol_with_kerberos=found
10803 fi
10804
10805 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10806         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10807
10808         for ac_hdr in krb.h des.h krb-archaeology.h 
10809 do
10810 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10811 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10812 echo "configure:10813: checking for $ac_hdr" >&5
10813 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10814   echo $ac_n "(cached) $ac_c" 1>&6
10815 else
10816   cat > conftest.$ac_ext <<EOF
10817 #line 10818 "configure"
10818 #include "confdefs.h"
10819 #include <$ac_hdr>
10820 EOF
10821 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10822 { (eval echo configure:10823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10823 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10824 if test -z "$ac_err"; then
10825   rm -rf conftest*
10826   eval "ac_cv_header_$ac_safe=yes"
10827 else
10828   echo "$ac_err" >&5
10829   echo "configure: failed program was:" >&5
10830   cat conftest.$ac_ext >&5
10831   rm -rf conftest*
10832   eval "ac_cv_header_$ac_safe=no"
10833 fi
10834 rm -f conftest*
10835 fi
10836 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10837   echo "$ac_t""yes" 1>&6
10838     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10839   cat >> confdefs.h <<EOF
10840 #define $ac_tr_hdr 1
10841 EOF
10842  
10843 else
10844   echo "$ac_t""no" 1>&6
10845 fi
10846 done
10847
10848
10849         if test $ac_cv_header_krb_h = yes ; then
10850                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10851 echo "configure:10852: checking for main in -lkrb" >&5
10852 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10853 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10854   echo $ac_n "(cached) $ac_c" 1>&6
10855 else
10856   ac_save_LIBS="$LIBS"
10857 LIBS="-lkrb -ldes $LIBS"
10858 cat > conftest.$ac_ext <<EOF
10859 #line 10860 "configure"
10860 #include "confdefs.h"
10861
10862 int main() {
10863 main()
10864 ; return 0; }
10865 EOF
10866 if { (eval echo configure:10867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10867   rm -rf conftest*
10868   eval "ac_cv_lib_$ac_lib_var=yes"
10869 else
10870   echo "configure: failed program was:" >&5
10871   cat conftest.$ac_ext >&5
10872   rm -rf conftest*
10873   eval "ac_cv_lib_$ac_lib_var=no"
10874 fi
10875 rm -f conftest*
10876 LIBS="$ac_save_LIBS"
10877
10878 fi
10879 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10880   echo "$ac_t""yes" 1>&6
10881   have_k4=yes
10882 else
10883   echo "$ac_t""no" 1>&6
10884 have_k4=no
10885 fi
10886
10887
10888                 if test $have_k4 = yes ; then
10889                         ol_with_kerberos=found
10890                         ol_link_krb4=yes
10891
10892                         cat >> confdefs.h <<\EOF
10893 #define HAVE_KRB4 1
10894 EOF
10895
10896
10897                         KRB4_LIBS="-lkrb -ldes"
10898
10899                         if test $ac_cv_header_krb_archaeology_h = yes ; then
10900                                 cat >> confdefs.h <<\EOF
10901 #define HAVE_KTH_KERBEROS 1
10902 EOF
10903
10904                         fi
10905                 fi
10906         fi
10907 fi
10908
10909 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
10910         ol_link_kpasswd=yes
10911 fi
10912
10913 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
10914         ol_link_kbind=yes
10915
10916 elif test $ol_enable_kbind = yes ; then
10917         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
10918 fi
10919
10920 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
10921         cat >> confdefs.h <<\EOF
10922 #define HAVE_KERBEROS 1
10923 EOF
10924
10925
10926 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
10927         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
10928 fi
10929
10930 ol_link_tls=no
10931 if test $ol_with_tls != no ; then
10932         for ac_hdr in openssl/ssl.h ssl.h
10933 do
10934 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10935 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10936 echo "configure:10937: checking for $ac_hdr" >&5
10937 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10938   echo $ac_n "(cached) $ac_c" 1>&6
10939 else
10940   cat > conftest.$ac_ext <<EOF
10941 #line 10942 "configure"
10942 #include "confdefs.h"
10943 #include <$ac_hdr>
10944 EOF
10945 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10946 { (eval echo configure:10947: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10947 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10948 if test -z "$ac_err"; then
10949   rm -rf conftest*
10950   eval "ac_cv_header_$ac_safe=yes"
10951 else
10952   echo "$ac_err" >&5
10953   echo "configure: failed program was:" >&5
10954   cat conftest.$ac_ext >&5
10955   rm -rf conftest*
10956   eval "ac_cv_header_$ac_safe=no"
10957 fi
10958 rm -f conftest*
10959 fi
10960 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10961   echo "$ac_t""yes" 1>&6
10962     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10963   cat >> confdefs.h <<EOF
10964 #define $ac_tr_hdr 1
10965 EOF
10966  
10967 else
10968   echo "$ac_t""no" 1>&6
10969 fi
10970 done
10971
10972         
10973         if test $ac_cv_header_openssl_ssl_h = yes \
10974                 -o $ac_cv_header_ssl_h = yes ; then
10975                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
10976 echo "configure:10977: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
10977 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
10978 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10979   echo $ac_n "(cached) $ac_c" 1>&6
10980 else
10981   ac_save_LIBS="$LIBS"
10982 LIBS="-lssl -lcrypto $LIBS"
10983 cat > conftest.$ac_ext <<EOF
10984 #line 10985 "configure"
10985 #include "confdefs.h"
10986 /* Override any gcc2 internal prototype to avoid an error.  */
10987 /* We use char because int might match the return type of a gcc2
10988     builtin and then its argument prototype would still apply.  */
10989 char SSLeay_add_ssl_algorithms();
10990
10991 int main() {
10992 SSLeay_add_ssl_algorithms()
10993 ; return 0; }
10994 EOF
10995 if { (eval echo configure:10996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10996   rm -rf conftest*
10997   eval "ac_cv_lib_$ac_lib_var=yes"
10998 else
10999   echo "configure: failed program was:" >&5
11000   cat conftest.$ac_ext >&5
11001   rm -rf conftest*
11002   eval "ac_cv_lib_$ac_lib_var=no"
11003 fi
11004 rm -f conftest*
11005 LIBS="$ac_save_LIBS"
11006
11007 fi
11008 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11009   echo "$ac_t""yes" 1>&6
11010   have_ssleay=yes
11011                         need_rsaref=no
11012 else
11013   echo "$ac_t""no" 1>&6
11014 have_ssleay=no
11015 fi
11016
11017                         
11018                 if test $have_ssleay = no ; then
11019                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11020 echo "configure:11021: checking for SSL_library_init in -lssl" >&5
11021 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11022 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11023   echo $ac_n "(cached) $ac_c" 1>&6
11024 else
11025   ac_save_LIBS="$LIBS"
11026 LIBS="-lssl -lcrypto $LIBS"
11027 cat > conftest.$ac_ext <<EOF
11028 #line 11029 "configure"
11029 #include "confdefs.h"
11030 /* Override any gcc2 internal prototype to avoid an error.  */
11031 /* We use char because int might match the return type of a gcc2
11032     builtin and then its argument prototype would still apply.  */
11033 char SSL_library_init();
11034
11035 int main() {
11036 SSL_library_init()
11037 ; return 0; }
11038 EOF
11039 if { (eval echo configure:11040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11040   rm -rf conftest*
11041   eval "ac_cv_lib_$ac_lib_var=yes"
11042 else
11043   echo "configure: failed program was:" >&5
11044   cat conftest.$ac_ext >&5
11045   rm -rf conftest*
11046   eval "ac_cv_lib_$ac_lib_var=no"
11047 fi
11048 rm -f conftest*
11049 LIBS="$ac_save_LIBS"
11050
11051 fi
11052 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11053   echo "$ac_t""yes" 1>&6
11054   have_ssleay=yes
11055                                 need_rsaref=no
11056 else
11057   echo "$ac_t""no" 1>&6
11058 have_ssleay=no
11059 fi
11060
11061                 fi
11062
11063                 if test $have_ssleay = no ; then
11064                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11065 echo "configure:11066: checking for ssl3_accept in -lssl" >&5
11066 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11067 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11068   echo $ac_n "(cached) $ac_c" 1>&6
11069 else
11070   ac_save_LIBS="$LIBS"
11071 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11072 cat > conftest.$ac_ext <<EOF
11073 #line 11074 "configure"
11074 #include "confdefs.h"
11075 /* Override any gcc2 internal prototype to avoid an error.  */
11076 /* We use char because int might match the return type of a gcc2
11077     builtin and then its argument prototype would still apply.  */
11078 char ssl3_accept();
11079
11080 int main() {
11081 ssl3_accept()
11082 ; return 0; }
11083 EOF
11084 if { (eval echo configure:11085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11085   rm -rf conftest*
11086   eval "ac_cv_lib_$ac_lib_var=yes"
11087 else
11088   echo "configure: failed program was:" >&5
11089   cat conftest.$ac_ext >&5
11090   rm -rf conftest*
11091   eval "ac_cv_lib_$ac_lib_var=no"
11092 fi
11093 rm -f conftest*
11094 LIBS="$ac_save_LIBS"
11095
11096 fi
11097 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11098   echo "$ac_t""yes" 1>&6
11099   have_ssleay=yes
11100                                 need_rsaref=yes
11101 else
11102   echo "$ac_t""no" 1>&6
11103 have_ssleay=no
11104 fi
11105
11106                 fi
11107
11108                 if test $have_ssleay = yes ; then
11109                         ol_with_tls=found
11110                         ol_link_tls=yes
11111
11112                         cat >> confdefs.h <<\EOF
11113 #define HAVE_SSLEAY 1
11114 EOF
11115
11116
11117                         if test $need_rsaref = yes; then
11118                                 cat >> confdefs.h <<\EOF
11119 #define HAVE_RSAREF 1
11120 EOF
11121
11122
11123                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11124                         else
11125                                 TLS_LIBS="-lssl -lcrypto"
11126                         fi
11127                 fi
11128         fi
11129
11130 else
11131         echo "configure: warning: TLS data protection not supported!" 1>&2
11132 fi
11133
11134 if test $ol_link_tls = yes ; then
11135         cat >> confdefs.h <<\EOF
11136 #define HAVE_TLS 1
11137 EOF
11138
11139
11140 elif test $ol_with_tls = auto ; then
11141         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11142         echo "configure: warning: TLS data protection not supported!" 1>&2
11143
11144 elif test $ol_with_tls != no ; then
11145         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11146 fi
11147
11148 if test $ol_enable_lmpasswd != no; then
11149         if test $ol_link_tls != yes ; then
11150                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11151         fi
11152
11153         cat >> confdefs.h <<\EOF
11154 #define SLAPD_LMHASH 1
11155 EOF
11156
11157 fi
11158
11159 for ac_func in \
11160         ctime_r                 \
11161         gethostbyname_r gethostbyaddr_r \
11162
11163 do
11164 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11165 echo "configure:11166: checking for $ac_func" >&5
11166 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11167   echo $ac_n "(cached) $ac_c" 1>&6
11168 else
11169   cat > conftest.$ac_ext <<EOF
11170 #line 11171 "configure"
11171 #include "confdefs.h"
11172 /* System header to define __stub macros and hopefully few prototypes,
11173     which can conflict with char $ac_func(); below.  */
11174 #include <assert.h>
11175 /* Override any gcc2 internal prototype to avoid an error.  */
11176 /* We use char because int might match the return type of a gcc2
11177     builtin and then its argument prototype would still apply.  */
11178 char $ac_func();
11179 char (*f)();
11180
11181 int main() {
11182
11183 /* The GNU C library defines this for functions which it implements
11184     to always fail with ENOSYS.  Some functions are actually named
11185     something starting with __ and the normal name is an alias.  */
11186 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11187 choke me
11188 #else
11189 f = $ac_func;
11190 #endif
11191
11192 ; return 0; }
11193 EOF
11194 if { (eval echo configure:11195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11195   rm -rf conftest*
11196   eval "ac_cv_func_$ac_func=yes"
11197 else
11198   echo "configure: failed program was:" >&5
11199   cat conftest.$ac_ext >&5
11200   rm -rf conftest*
11201   eval "ac_cv_func_$ac_func=no"
11202 fi
11203 rm -f conftest*
11204 fi
11205
11206 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11207   echo "$ac_t""yes" 1>&6
11208     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11209   cat >> confdefs.h <<EOF
11210 #define $ac_tr_func 1
11211 EOF
11212  
11213 else
11214   echo "$ac_t""no" 1>&6
11215 fi
11216 done
11217
11218
11219 if test "$ac_cv_func_ctime_r" = no ; then
11220         ol_cv_func_ctime_r_nargs=0
11221 else
11222         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
11223 echo "configure:11224: checking number of arguments of ctime_r" >&5
11224 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
11225   echo $ac_n "(cached) $ac_c" 1>&6
11226 else
11227   cat > conftest.$ac_ext <<EOF
11228 #line 11229 "configure"
11229 #include "confdefs.h"
11230 #include <time.h>
11231 int main() {
11232 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
11233 ; return 0; }
11234 EOF
11235 if { (eval echo configure:11236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11236   rm -rf conftest*
11237   ol_cv_func_ctime_r_nargs3=yes
11238 else
11239   echo "configure: failed program was:" >&5
11240   cat conftest.$ac_ext >&5
11241   rm -rf conftest*
11242   ol_cv_func_ctime_r_nargs3=no
11243 fi
11244 rm -f conftest*
11245
11246         cat > conftest.$ac_ext <<EOF
11247 #line 11248 "configure"
11248 #include "confdefs.h"
11249 #include <time.h>
11250 int main() {
11251 time_t ti; char *buffer; ctime_r(&ti,buffer);
11252 ; return 0; }
11253 EOF
11254 if { (eval echo configure:11255: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11255   rm -rf conftest*
11256   ol_cv_func_ctime_r_nargs2=yes
11257 else
11258   echo "configure: failed program was:" >&5
11259   cat conftest.$ac_ext >&5
11260   rm -rf conftest*
11261   ol_cv_func_ctime_r_nargs2=no
11262 fi
11263 rm -f conftest*
11264
11265         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
11266                 $ol_cv_func_ctime_r_nargs2 = no ; then
11267
11268                 ol_cv_func_ctime_r_nargs=3
11269
11270         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
11271                 $ol_cv_func_ctime_r_nargs2 = yes ; then
11272
11273                 ol_cv_func_ctime_r_nargs=2
11274
11275         else
11276                 ol_cv_func_ctime_r_nargs=0
11277         fi
11278   
11279 fi
11280
11281 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
11282
11283   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
11284         cat >> confdefs.h <<EOF
11285 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
11286 EOF
11287
11288   fi
11289
11290 fi
11291
11292 if test "$ac_cv_func_gethostbyname_r" = yes ; then
11293         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
11294 echo "configure:11295: checking number of arguments of gethostbyname_r" >&5
11295 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
11296   echo $ac_n "(cached) $ac_c" 1>&6
11297 else
11298   cat > conftest.$ac_ext <<EOF
11299 #line 11300 "configure"
11300 #include "confdefs.h"
11301 #include <sys/types.h>
11302 #include <sys/socket.h>
11303 #include <netinet/in.h>
11304 #include <netdb.h>
11305 #define BUFSIZE (sizeof(struct hostent)+10)
11306 int main() {
11307 struct hostent hent; char buffer[BUFSIZE];
11308                 int bufsize=BUFSIZE;int h_errno;
11309                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
11310                         buffer, bufsize, &h_errno);
11311 ; return 0; }
11312 EOF
11313 if { (eval echo configure:11314: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11314   rm -rf conftest*
11315   ol_cv_func_gethostbyname_r_nargs5=yes
11316 else
11317   echo "configure: failed program was:" >&5
11318   cat conftest.$ac_ext >&5
11319   rm -rf conftest*
11320   ol_cv_func_gethostbyname_r_nargs5=no
11321 fi
11322 rm -f conftest*
11323
11324         cat > conftest.$ac_ext <<EOF
11325 #line 11326 "configure"
11326 #include "confdefs.h"
11327 #include <sys/types.h>
11328 #include <sys/socket.h>
11329 #include <netinet/in.h>
11330 #include <netdb.h>
11331 #define BUFSIZE (sizeof(struct hostent)+10)
11332 int main() {
11333 struct hostent hent;struct hostent *rhent;
11334                 char buffer[BUFSIZE];
11335                 int bufsize=BUFSIZE;int h_errno;
11336                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
11337                         &rhent, &h_errno);
11338 ; return 0; }
11339 EOF
11340 if { (eval echo configure:11341: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11341   rm -rf conftest*
11342   ol_cv_func_gethostbyname_r_nargs6=yes
11343 else
11344   echo "configure: failed program was:" >&5
11345   cat conftest.$ac_ext >&5
11346   rm -rf conftest*
11347   ol_cv_func_gethostbyname_r_nargs6=no
11348 fi
11349 rm -f conftest*
11350
11351         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
11352                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
11353
11354                 ol_cv_func_gethostbyname_r_nargs=5
11355
11356         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
11357                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
11358
11359                 ol_cv_func_gethostbyname_r_nargs=6
11360
11361         else
11362                 ol_cv_func_gethostbyname_r_nargs=0
11363         fi
11364   
11365 fi
11366
11367 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
11368   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
11369         cat >> confdefs.h <<EOF
11370 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
11371 EOF
11372
11373   fi
11374
11375 else
11376         ol_cv_func_gethostbyname_r_nargs=0
11377 fi
11378  
11379 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
11380         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
11381 echo "configure:11382: checking number of arguments of gethostbyaddr_r" >&5
11382 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
11383   echo $ac_n "(cached) $ac_c" 1>&6
11384 else
11385   cat > conftest.$ac_ext <<EOF
11386 #line 11387 "configure"
11387 #include "confdefs.h"
11388 #include <sys/types.h>
11389 #include <sys/socket.h>
11390 #include <netinet/in.h>
11391 #include <netdb.h>
11392 #define BUFSIZE (sizeof(struct hostent)+10)
11393 int main() {
11394 struct hostent hent; char buffer[BUFSIZE]; 
11395             struct in_addr add;
11396             size_t alen=sizeof(struct in_addr);
11397             int bufsize=BUFSIZE;int h_errno;
11398                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
11399                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
11400 ; return 0; }
11401 EOF
11402 if { (eval echo configure:11403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11403   rm -rf conftest*
11404   ol_cv_func_gethostbyaddr_r_nargs7=yes
11405 else
11406   echo "configure: failed program was:" >&5
11407   cat conftest.$ac_ext >&5
11408   rm -rf conftest*
11409   ol_cv_func_gethostbyaddr_r_nargs7=no
11410 fi
11411 rm -f conftest*
11412
11413         cat > conftest.$ac_ext <<EOF
11414 #line 11415 "configure"
11415 #include "confdefs.h"
11416 #include <sys/types.h>
11417 #include <sys/socket.h>
11418 #include <netinet/in.h>
11419 #include <netdb.h>
11420 #define BUFSIZE (sizeof(struct hostent)+10)
11421 int main() {
11422 struct hostent hent;
11423                 struct hostent *rhent; char buffer[BUFSIZE]; 
11424                 struct in_addr add;
11425                 size_t alen=sizeof(struct in_addr);
11426                 int bufsize=BUFSIZE;int h_errno;
11427                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
11428                         alen, AF_INET, &hent, buffer, bufsize, 
11429                         &rhent, &h_errno);
11430 ; return 0; }
11431 EOF
11432 if { (eval echo configure:11433: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11433   rm -rf conftest*
11434   ol_cv_func_gethostbyaddr_r_nargs8=yes
11435 else
11436   echo "configure: failed program was:" >&5
11437   cat conftest.$ac_ext >&5
11438   rm -rf conftest*
11439   ol_cv_func_gethostbyaddr_r_nargs8=no
11440 fi
11441 rm -f conftest*
11442
11443         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
11444                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
11445
11446                 ol_cv_func_gethostbyaddr_r_nargs=7
11447
11448         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
11449                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
11450
11451                 ol_cv_func_gethostbyaddr_r_nargs=8
11452
11453         else
11454                 ol_cv_func_gethostbyaddr_r_nargs=0
11455         fi
11456   
11457 fi
11458
11459 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
11460   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
11461     cat >> confdefs.h <<EOF
11462 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
11463 EOF
11464
11465   fi
11466
11467 else
11468         ol_cv_func_gethostbyaddr_r_nargs=0
11469 fi
11470
11471 if test "$ac_cv_func_ctime_r" = yes \
11472         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
11473         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
11474         -a "$ac_cv_func_gethostbyname_r" = yes \
11475         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
11476         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
11477         -a "$ac_cv_func_gethostbyaddr_r" = yes \
11478         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
11479         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
11480         ; then
11481  
11482         cat >> confdefs.h <<\EOF
11483 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
11484 EOF
11485
11486 fi
11487
11488 ol_link_threads=no
11489
11490 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11491         -o $ol_with_threads = nt ; then
11492
11493         
11494         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11495 echo "configure:11496: checking for _beginthread" >&5
11496 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11497   echo $ac_n "(cached) $ac_c" 1>&6
11498 else
11499   cat > conftest.$ac_ext <<EOF
11500 #line 11501 "configure"
11501 #include "confdefs.h"
11502 /* System header to define __stub macros and hopefully few prototypes,
11503     which can conflict with char _beginthread(); below.  */
11504 #include <assert.h>
11505 /* Override any gcc2 internal prototype to avoid an error.  */
11506 /* We use char because int might match the return type of a gcc2
11507     builtin and then its argument prototype would still apply.  */
11508 char _beginthread();
11509 char (*f)();
11510
11511 int main() {
11512
11513 /* The GNU C library defines this for functions which it implements
11514     to always fail with ENOSYS.  Some functions are actually named
11515     something starting with __ and the normal name is an alias.  */
11516 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11517 choke me
11518 #else
11519 f = _beginthread;
11520 #endif
11521
11522 ; return 0; }
11523 EOF
11524 if { (eval echo configure:11525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11525   rm -rf conftest*
11526   eval "ac_cv_func__beginthread=yes"
11527 else
11528   echo "configure: failed program was:" >&5
11529   cat conftest.$ac_ext >&5
11530   rm -rf conftest*
11531   eval "ac_cv_func__beginthread=no"
11532 fi
11533 rm -f conftest*
11534 fi
11535
11536 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11537   echo "$ac_t""yes" 1>&6
11538   :
11539 else
11540   echo "$ac_t""no" 1>&6
11541 fi
11542
11543
11544         if test $ac_cv_func__beginthread = yes ; then
11545                 cat >> confdefs.h <<\EOF
11546 #define HAVE_NT_THREADS 1
11547 EOF
11548
11549                 ol_cv_nt_threads=yes
11550         fi
11551
11552
11553         if test "$ol_cv_nt_threads" = yes ; then
11554                 ol_link_threads=nt
11555                 ol_with_threads=found
11556                 ol_with_yielding_select=yes
11557
11558                 cat >> confdefs.h <<\EOF
11559 #define HAVE_NT_SERVICE_MANAGER 1
11560 EOF
11561
11562                 cat >> confdefs.h <<\EOF
11563 #define HAVE_NT_EVENT_LOG 1
11564 EOF
11565
11566         fi
11567
11568         if test $ol_with_threads = nt ; then
11569                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11570         fi
11571 fi
11572
11573 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11574         -o $ol_with_threads = posix ; then
11575
11576         for ac_hdr in pthread.h
11577 do
11578 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11579 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11580 echo "configure:11581: checking for $ac_hdr" >&5
11581 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11582   echo $ac_n "(cached) $ac_c" 1>&6
11583 else
11584   cat > conftest.$ac_ext <<EOF
11585 #line 11586 "configure"
11586 #include "confdefs.h"
11587 #include <$ac_hdr>
11588 EOF
11589 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11590 { (eval echo configure:11591: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11591 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11592 if test -z "$ac_err"; then
11593   rm -rf conftest*
11594   eval "ac_cv_header_$ac_safe=yes"
11595 else
11596   echo "$ac_err" >&5
11597   echo "configure: failed program was:" >&5
11598   cat conftest.$ac_ext >&5
11599   rm -rf conftest*
11600   eval "ac_cv_header_$ac_safe=no"
11601 fi
11602 rm -f conftest*
11603 fi
11604 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11605   echo "$ac_t""yes" 1>&6
11606     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11607   cat >> confdefs.h <<EOF
11608 #define $ac_tr_hdr 1
11609 EOF
11610  
11611 else
11612   echo "$ac_t""no" 1>&6
11613 fi
11614 done
11615
11616
11617         if test $ac_cv_header_pthread_h = yes ; then
11618                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11619 echo "configure:11620: checking POSIX thread version" >&5
11620 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11621   echo $ac_n "(cached) $ac_c" 1>&6
11622 else
11623   
11624         cat > conftest.$ac_ext <<EOF
11625 #line 11626 "configure"
11626 #include "confdefs.h"
11627
11628 #               include <pthread.h>
11629         
11630 int main() {
11631
11632                 int i = PTHREAD_CREATE_JOINABLE;
11633         
11634 ; return 0; }
11635 EOF
11636 if { (eval echo configure:11637: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11637   rm -rf conftest*
11638   
11639         cat > conftest.$ac_ext <<EOF
11640 #line 11641 "configure"
11641 #include "confdefs.h"
11642 #include <pthread.h>
11643 EOF
11644 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11645   egrep "pthread_detach" >/dev/null 2>&1; then
11646   rm -rf conftest*
11647   ol_cv_pthread_version=10
11648 else
11649   rm -rf conftest*
11650   ol_cv_pthread_version=8
11651 fi
11652 rm -f conftest*
11653
11654 else
11655   echo "configure: failed program was:" >&5
11656   cat conftest.$ac_ext >&5
11657   rm -rf conftest*
11658   
11659         cat > conftest.$ac_ext <<EOF
11660 #line 11661 "configure"
11661 #include "confdefs.h"
11662
11663 #               include <pthread.h>
11664 #               ifdef PTHREAD_CREATE_UNDETACHED
11665                 draft7
11666 #               endif
11667         
11668 EOF
11669 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11670   egrep "draft7" >/dev/null 2>&1; then
11671   rm -rf conftest*
11672   ol_cv_pthread_version=7
11673 else
11674   rm -rf conftest*
11675   
11676         cat > conftest.$ac_ext <<EOF
11677 #line 11678 "configure"
11678 #include "confdefs.h"
11679 #include <pthread.h>
11680 EOF
11681 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11682   egrep "pthread_attr_init" >/dev/null 2>&1; then
11683   rm -rf conftest*
11684   ol_cv_pthread_version=6
11685 else
11686   rm -rf conftest*
11687   
11688         cat > conftest.$ac_ext <<EOF
11689 #line 11690 "configure"
11690 #include "confdefs.h"
11691
11692 #               include <pthread.h>
11693 #ifdef          PTHREAD_MUTEX_INITIALIZER
11694                 draft5
11695 #endif
11696         
11697 EOF
11698 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11699   egrep "draft5" >/dev/null 2>&1; then
11700   rm -rf conftest*
11701   ol_cv_pthread_version=5
11702 else
11703   rm -rf conftest*
11704   ol_cv_pthread_version=4
11705 fi
11706 rm -f conftest*
11707  
11708 fi
11709 rm -f conftest*
11710  
11711 fi
11712 rm -f conftest*
11713  
11714 fi
11715 rm -f conftest*
11716
11717 fi
11718
11719 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11720
11721
11722                 if test $ol_cv_pthread_version != 0 ; then
11723                         cat >> confdefs.h <<EOF
11724 #define HAVE_PTHREADS $ol_cv_pthread_version
11725 EOF
11726
11727                 else
11728                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11729                 fi
11730
11731                 # consider threads found
11732                 ol_with_threads=found
11733
11734                 
11735         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11736 echo "configure:11737: checking for LinuxThreads pthread.h" >&5
11737 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11738   echo $ac_n "(cached) $ac_c" 1>&6
11739 else
11740   cat > conftest.$ac_ext <<EOF
11741 #line 11742 "configure"
11742 #include "confdefs.h"
11743 #include <pthread.h>
11744 EOF
11745 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11746   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11747   rm -rf conftest*
11748   ol_cv_header_linux_threads=yes
11749 else
11750   rm -rf conftest*
11751   ol_cv_header_linux_threads=no
11752 fi
11753 rm -f conftest*
11754
11755                 
11756 fi
11757
11758 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11759         if test $ol_cv_header_linux_threads = yes; then
11760                 cat >> confdefs.h <<\EOF
11761 #define HAVE_LINUX_THREADS 1
11762 EOF
11763
11764         fi
11765
11766                 
11767         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11768 echo "configure:11769: checking for GNU Pth pthread.h" >&5
11769 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11770   echo $ac_n "(cached) $ac_c" 1>&6
11771 else
11772   cat > conftest.$ac_ext <<EOF
11773 #line 11774 "configure"
11774 #include "confdefs.h"
11775 #include <pthread.h>
11776 #ifdef _POSIX_THREAD_IS_GNU_PTH
11777         __gnu_pth__;
11778 #endif
11779
11780 EOF
11781 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11782   egrep "__gnu_pth__" >/dev/null 2>&1; then
11783   rm -rf conftest*
11784   ol_cv_header_gnu_pth_pthread_h=yes
11785 else
11786   rm -rf conftest*
11787   ol_cv_header_gnu_pth_pthread_h=no
11788 fi
11789 rm -f conftest*
11790
11791                 
11792 fi
11793
11794 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11795
11796
11797                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11798                         for ac_hdr in sched.h
11799 do
11800 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11801 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11802 echo "configure:11803: checking for $ac_hdr" >&5
11803 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11804   echo $ac_n "(cached) $ac_c" 1>&6
11805 else
11806   cat > conftest.$ac_ext <<EOF
11807 #line 11808 "configure"
11808 #include "confdefs.h"
11809 #include <$ac_hdr>
11810 EOF
11811 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11812 { (eval echo configure:11813: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11813 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11814 if test -z "$ac_err"; then
11815   rm -rf conftest*
11816   eval "ac_cv_header_$ac_safe=yes"
11817 else
11818   echo "$ac_err" >&5
11819   echo "configure: failed program was:" >&5
11820   cat conftest.$ac_ext >&5
11821   rm -rf conftest*
11822   eval "ac_cv_header_$ac_safe=no"
11823 fi
11824 rm -f conftest*
11825 fi
11826 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11827   echo "$ac_t""yes" 1>&6
11828     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11829   cat >> confdefs.h <<EOF
11830 #define $ac_tr_hdr 1
11831 EOF
11832  
11833 else
11834   echo "$ac_t""no" 1>&6
11835 fi
11836 done
11837
11838                 fi
11839
11840                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11841                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11842 echo "configure:11843: checking for pthread_create in default libraries" >&5
11843 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11844   echo $ac_n "(cached) $ac_c" 1>&6
11845 else
11846   
11847                 if test "$cross_compiling" = yes; then
11848   cat > conftest.$ac_ext <<EOF
11849 #line 11850 "configure"
11850 #include "confdefs.h"
11851 /* pthread test headers */
11852 #include <pthread.h>
11853 #if HAVE_PTHREADS < 7
11854 #include <errno.h>
11855 #endif
11856 #ifndef NULL
11857 #define NULL (void*)0
11858 #endif
11859
11860 static void *task(p)
11861         void *p;
11862 {
11863         return (void *) (p == NULL);
11864 }
11865
11866 int main() {
11867
11868         /* pthread test function */
11869 #ifndef PTHREAD_CREATE_DETACHED
11870 #define PTHREAD_CREATE_DETACHED 1
11871 #endif
11872         pthread_t t;
11873         int status;
11874         int detach = PTHREAD_CREATE_DETACHED;
11875
11876 #if HAVE_PTHREADS > 4
11877         /* Final pthreads */
11878         pthread_attr_t attr;
11879
11880         status = pthread_attr_init(&attr);
11881         if( status ) return status;
11882
11883 #if HAVE_PTHREADS < 7
11884         status = pthread_attr_setdetachstate(&attr, &detach);
11885         if( status < 0 ) status = errno;
11886 #else
11887         status = pthread_attr_setdetachstate(&attr, detach);
11888 #endif
11889         if( status ) return status;
11890         status = pthread_create( &t, &attr, task, NULL );
11891 #if HAVE_PTHREADS < 7
11892         if( status < 0 ) status = errno;
11893 #endif
11894         if( status ) return status;
11895 #else
11896         /* Draft 4 pthreads */
11897         status = pthread_create( &t, pthread_attr_default, task, NULL );
11898         if( status ) return errno;
11899
11900         /* give thread a chance to complete */
11901         /* it should remain joinable and hence detachable */
11902         sleep( 1 );
11903
11904         status = pthread_detach( &t );
11905         if( status ) return errno;
11906 #endif
11907
11908 #ifdef HAVE_LINUX_THREADS
11909         pthread_kill_other_threads_np();
11910 #endif
11911
11912         return 0;
11913
11914 ; return 0; }
11915 EOF
11916 if { (eval echo configure:11917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11917   rm -rf conftest*
11918   ol_cv_pthread_create=yes
11919 else
11920   echo "configure: failed program was:" >&5
11921   cat conftest.$ac_ext >&5
11922   rm -rf conftest*
11923   ol_cv_pthread_create=no
11924 fi
11925 rm -f conftest*
11926 else
11927   cat > conftest.$ac_ext <<EOF
11928 #line 11929 "configure"
11929 #include "confdefs.h"
11930 /* pthread test headers */
11931 #include <pthread.h>
11932 #if HAVE_PTHREADS < 7
11933 #include <errno.h>
11934 #endif
11935 #ifndef NULL
11936 #define NULL (void*)0
11937 #endif
11938
11939 static void *task(p)
11940         void *p;
11941 {
11942         return (void *) (p == NULL);
11943 }
11944
11945
11946 int main(argc, argv)
11947         int argc;
11948         char **argv;
11949 {
11950
11951         /* pthread test function */
11952 #ifndef PTHREAD_CREATE_DETACHED
11953 #define PTHREAD_CREATE_DETACHED 1
11954 #endif
11955         pthread_t t;
11956         int status;
11957         int detach = PTHREAD_CREATE_DETACHED;
11958
11959 #if HAVE_PTHREADS > 4
11960         /* Final pthreads */
11961         pthread_attr_t attr;
11962
11963         status = pthread_attr_init(&attr);
11964         if( status ) return status;
11965
11966 #if HAVE_PTHREADS < 7
11967         status = pthread_attr_setdetachstate(&attr, &detach);
11968         if( status < 0 ) status = errno;
11969 #else
11970         status = pthread_attr_setdetachstate(&attr, detach);
11971 #endif
11972         if( status ) return status;
11973         status = pthread_create( &t, &attr, task, NULL );
11974 #if HAVE_PTHREADS < 7
11975         if( status < 0 ) status = errno;
11976 #endif
11977         if( status ) return status;
11978 #else
11979         /* Draft 4 pthreads */
11980         status = pthread_create( &t, pthread_attr_default, task, NULL );
11981         if( status ) return errno;
11982
11983         /* give thread a chance to complete */
11984         /* it should remain joinable and hence detachable */
11985         sleep( 1 );
11986
11987         status = pthread_detach( &t );
11988         if( status ) return errno;
11989 #endif
11990
11991 #ifdef HAVE_LINUX_THREADS
11992         pthread_kill_other_threads_np();
11993 #endif
11994
11995         return 0;
11996
11997 }
11998
11999 EOF
12000 if { (eval echo configure:12001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12001 then
12002   ol_cv_pthread_create=yes
12003 else
12004   echo "configure: failed program was:" >&5
12005   cat conftest.$ac_ext >&5
12006   rm -fr conftest*
12007   ol_cv_pthread_create=no
12008 fi
12009 rm -fr conftest*
12010 fi
12011
12012 fi
12013
12014 echo "$ac_t""$ol_cv_pthread_create" 1>&6
12015
12016                 if test $ol_cv_pthread_create != no ; then
12017                         ol_link_threads=posix
12018                         ol_link_pthreads=""
12019                 fi
12020                 
12021                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
12022 if test "$ol_link_threads" = no ; then
12023         # try -kthread
12024         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
12025 echo "configure:12026: checking for pthread link with -kthread" >&5
12026 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
12027   echo $ac_n "(cached) $ac_c" 1>&6
12028 else
12029   
12030                 # save the flags
12031                 ol_LIBS="$LIBS"
12032                 LIBS="-kthread $LIBS"
12033
12034                 if test "$cross_compiling" = yes; then
12035   cat > conftest.$ac_ext <<EOF
12036 #line 12037 "configure"
12037 #include "confdefs.h"
12038 /* pthread test headers */
12039 #include <pthread.h>
12040 #if HAVE_PTHREADS < 7
12041 #include <errno.h>
12042 #endif
12043 #ifndef NULL
12044 #define NULL (void*)0
12045 #endif
12046
12047 static void *task(p)
12048         void *p;
12049 {
12050         return (void *) (p == NULL);
12051 }
12052
12053 int main() {
12054
12055         /* pthread test function */
12056 #ifndef PTHREAD_CREATE_DETACHED
12057 #define PTHREAD_CREATE_DETACHED 1
12058 #endif
12059         pthread_t t;
12060         int status;
12061         int detach = PTHREAD_CREATE_DETACHED;
12062
12063 #if HAVE_PTHREADS > 4
12064         /* Final pthreads */
12065         pthread_attr_t attr;
12066
12067         status = pthread_attr_init(&attr);
12068         if( status ) return status;
12069
12070 #if HAVE_PTHREADS < 7
12071         status = pthread_attr_setdetachstate(&attr, &detach);
12072         if( status < 0 ) status = errno;
12073 #else
12074         status = pthread_attr_setdetachstate(&attr, detach);
12075 #endif
12076         if( status ) return status;
12077         status = pthread_create( &t, &attr, task, NULL );
12078 #if HAVE_PTHREADS < 7
12079         if( status < 0 ) status = errno;
12080 #endif
12081         if( status ) return status;
12082 #else
12083         /* Draft 4 pthreads */
12084         status = pthread_create( &t, pthread_attr_default, task, NULL );
12085         if( status ) return errno;
12086
12087         /* give thread a chance to complete */
12088         /* it should remain joinable and hence detachable */
12089         sleep( 1 );
12090
12091         status = pthread_detach( &t );
12092         if( status ) return errno;
12093 #endif
12094
12095 #ifdef HAVE_LINUX_THREADS
12096         pthread_kill_other_threads_np();
12097 #endif
12098
12099         return 0;
12100
12101 ; return 0; }
12102 EOF
12103 if { (eval echo configure:12104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12104   rm -rf conftest*
12105   ol_cv_pthread_kthread=yes
12106 else
12107   echo "configure: failed program was:" >&5
12108   cat conftest.$ac_ext >&5
12109   rm -rf conftest*
12110   ol_cv_pthread_kthread=no
12111 fi
12112 rm -f conftest*
12113 else
12114   cat > conftest.$ac_ext <<EOF
12115 #line 12116 "configure"
12116 #include "confdefs.h"
12117 /* pthread test headers */
12118 #include <pthread.h>
12119 #if HAVE_PTHREADS < 7
12120 #include <errno.h>
12121 #endif
12122 #ifndef NULL
12123 #define NULL (void*)0
12124 #endif
12125
12126 static void *task(p)
12127         void *p;
12128 {
12129         return (void *) (p == NULL);
12130 }
12131
12132
12133 int main(argc, argv)
12134         int argc;
12135         char **argv;
12136 {
12137
12138         /* pthread test function */
12139 #ifndef PTHREAD_CREATE_DETACHED
12140 #define PTHREAD_CREATE_DETACHED 1
12141 #endif
12142         pthread_t t;
12143         int status;
12144         int detach = PTHREAD_CREATE_DETACHED;
12145
12146 #if HAVE_PTHREADS > 4
12147         /* Final pthreads */
12148         pthread_attr_t attr;
12149
12150         status = pthread_attr_init(&attr);
12151         if( status ) return status;
12152
12153 #if HAVE_PTHREADS < 7
12154         status = pthread_attr_setdetachstate(&attr, &detach);
12155         if( status < 0 ) status = errno;
12156 #else
12157         status = pthread_attr_setdetachstate(&attr, detach);
12158 #endif
12159         if( status ) return status;
12160         status = pthread_create( &t, &attr, task, NULL );
12161 #if HAVE_PTHREADS < 7
12162         if( status < 0 ) status = errno;
12163 #endif
12164         if( status ) return status;
12165 #else
12166         /* Draft 4 pthreads */
12167         status = pthread_create( &t, pthread_attr_default, task, NULL );
12168         if( status ) return errno;
12169
12170         /* give thread a chance to complete */
12171         /* it should remain joinable and hence detachable */
12172         sleep( 1 );
12173
12174         status = pthread_detach( &t );
12175         if( status ) return errno;
12176 #endif
12177
12178 #ifdef HAVE_LINUX_THREADS
12179         pthread_kill_other_threads_np();
12180 #endif
12181
12182         return 0;
12183
12184 }
12185
12186 EOF
12187 if { (eval echo configure:12188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12188 then
12189   ol_cv_pthread_kthread=yes
12190 else
12191   echo "configure: failed program was:" >&5
12192   cat conftest.$ac_ext >&5
12193   rm -fr conftest*
12194   ol_cv_pthread_kthread=no
12195 fi
12196 rm -fr conftest*
12197 fi
12198
12199
12200                 # restore the LIBS
12201                 LIBS="$ol_LIBS"
12202         
12203 fi
12204
12205 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12206
12207         if test $ol_cv_pthread_kthread = yes ; then
12208                 ol_link_pthreads="-kthread"
12209                 ol_link_threads=posix
12210         fi
12211 fi
12212
12213                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12214 if test "$ol_link_threads" = no ; then
12215         # try -pthread
12216         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12217 echo "configure:12218: checking for pthread link with -pthread" >&5
12218 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12219   echo $ac_n "(cached) $ac_c" 1>&6
12220 else
12221   
12222                 # save the flags
12223                 ol_LIBS="$LIBS"
12224                 LIBS="-pthread $LIBS"
12225
12226                 if test "$cross_compiling" = yes; then
12227   cat > conftest.$ac_ext <<EOF
12228 #line 12229 "configure"
12229 #include "confdefs.h"
12230 /* pthread test headers */
12231 #include <pthread.h>
12232 #if HAVE_PTHREADS < 7
12233 #include <errno.h>
12234 #endif
12235 #ifndef NULL
12236 #define NULL (void*)0
12237 #endif
12238
12239 static void *task(p)
12240         void *p;
12241 {
12242         return (void *) (p == NULL);
12243 }
12244
12245 int main() {
12246
12247         /* pthread test function */
12248 #ifndef PTHREAD_CREATE_DETACHED
12249 #define PTHREAD_CREATE_DETACHED 1
12250 #endif
12251         pthread_t t;
12252         int status;
12253         int detach = PTHREAD_CREATE_DETACHED;
12254
12255 #if HAVE_PTHREADS > 4
12256         /* Final pthreads */
12257         pthread_attr_t attr;
12258
12259         status = pthread_attr_init(&attr);
12260         if( status ) return status;
12261
12262 #if HAVE_PTHREADS < 7
12263         status = pthread_attr_setdetachstate(&attr, &detach);
12264         if( status < 0 ) status = errno;
12265 #else
12266         status = pthread_attr_setdetachstate(&attr, detach);
12267 #endif
12268         if( status ) return status;
12269         status = pthread_create( &t, &attr, task, NULL );
12270 #if HAVE_PTHREADS < 7
12271         if( status < 0 ) status = errno;
12272 #endif
12273         if( status ) return status;
12274 #else
12275         /* Draft 4 pthreads */
12276         status = pthread_create( &t, pthread_attr_default, task, NULL );
12277         if( status ) return errno;
12278
12279         /* give thread a chance to complete */
12280         /* it should remain joinable and hence detachable */
12281         sleep( 1 );
12282
12283         status = pthread_detach( &t );
12284         if( status ) return errno;
12285 #endif
12286
12287 #ifdef HAVE_LINUX_THREADS
12288         pthread_kill_other_threads_np();
12289 #endif
12290
12291         return 0;
12292
12293 ; return 0; }
12294 EOF
12295 if { (eval echo configure:12296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12296   rm -rf conftest*
12297   ol_cv_pthread_pthread=yes
12298 else
12299   echo "configure: failed program was:" >&5
12300   cat conftest.$ac_ext >&5
12301   rm -rf conftest*
12302   ol_cv_pthread_pthread=no
12303 fi
12304 rm -f conftest*
12305 else
12306   cat > conftest.$ac_ext <<EOF
12307 #line 12308 "configure"
12308 #include "confdefs.h"
12309 /* pthread test headers */
12310 #include <pthread.h>
12311 #if HAVE_PTHREADS < 7
12312 #include <errno.h>
12313 #endif
12314 #ifndef NULL
12315 #define NULL (void*)0
12316 #endif
12317
12318 static void *task(p)
12319         void *p;
12320 {
12321         return (void *) (p == NULL);
12322 }
12323
12324
12325 int main(argc, argv)
12326         int argc;
12327         char **argv;
12328 {
12329
12330         /* pthread test function */
12331 #ifndef PTHREAD_CREATE_DETACHED
12332 #define PTHREAD_CREATE_DETACHED 1
12333 #endif
12334         pthread_t t;
12335         int status;
12336         int detach = PTHREAD_CREATE_DETACHED;
12337
12338 #if HAVE_PTHREADS > 4
12339         /* Final pthreads */
12340         pthread_attr_t attr;
12341
12342         status = pthread_attr_init(&attr);
12343         if( status ) return status;
12344
12345 #if HAVE_PTHREADS < 7
12346         status = pthread_attr_setdetachstate(&attr, &detach);
12347         if( status < 0 ) status = errno;
12348 #else
12349         status = pthread_attr_setdetachstate(&attr, detach);
12350 #endif
12351         if( status ) return status;
12352         status = pthread_create( &t, &attr, task, NULL );
12353 #if HAVE_PTHREADS < 7
12354         if( status < 0 ) status = errno;
12355 #endif
12356         if( status ) return status;
12357 #else
12358         /* Draft 4 pthreads */
12359         status = pthread_create( &t, pthread_attr_default, task, NULL );
12360         if( status ) return errno;
12361
12362         /* give thread a chance to complete */
12363         /* it should remain joinable and hence detachable */
12364         sleep( 1 );
12365
12366         status = pthread_detach( &t );
12367         if( status ) return errno;
12368 #endif
12369
12370 #ifdef HAVE_LINUX_THREADS
12371         pthread_kill_other_threads_np();
12372 #endif
12373
12374         return 0;
12375
12376 }
12377
12378 EOF
12379 if { (eval echo configure:12380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12380 then
12381   ol_cv_pthread_pthread=yes
12382 else
12383   echo "configure: failed program was:" >&5
12384   cat conftest.$ac_ext >&5
12385   rm -fr conftest*
12386   ol_cv_pthread_pthread=no
12387 fi
12388 rm -fr conftest*
12389 fi
12390
12391
12392                 # restore the LIBS
12393                 LIBS="$ol_LIBS"
12394         
12395 fi
12396
12397 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12398
12399         if test $ol_cv_pthread_pthread = yes ; then
12400                 ol_link_pthreads="-pthread"
12401                 ol_link_threads=posix
12402         fi
12403 fi
12404
12405                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12406 if test "$ol_link_threads" = no ; then
12407         # try -pthreads
12408         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12409 echo "configure:12410: checking for pthread link with -pthreads" >&5
12410 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12411   echo $ac_n "(cached) $ac_c" 1>&6
12412 else
12413   
12414                 # save the flags
12415                 ol_LIBS="$LIBS"
12416                 LIBS="-pthreads $LIBS"
12417
12418                 if test "$cross_compiling" = yes; then
12419   cat > conftest.$ac_ext <<EOF
12420 #line 12421 "configure"
12421 #include "confdefs.h"
12422 /* pthread test headers */
12423 #include <pthread.h>
12424 #if HAVE_PTHREADS < 7
12425 #include <errno.h>
12426 #endif
12427 #ifndef NULL
12428 #define NULL (void*)0
12429 #endif
12430
12431 static void *task(p)
12432         void *p;
12433 {
12434         return (void *) (p == NULL);
12435 }
12436
12437 int main() {
12438
12439         /* pthread test function */
12440 #ifndef PTHREAD_CREATE_DETACHED
12441 #define PTHREAD_CREATE_DETACHED 1
12442 #endif
12443         pthread_t t;
12444         int status;
12445         int detach = PTHREAD_CREATE_DETACHED;
12446
12447 #if HAVE_PTHREADS > 4
12448         /* Final pthreads */
12449         pthread_attr_t attr;
12450
12451         status = pthread_attr_init(&attr);
12452         if( status ) return status;
12453
12454 #if HAVE_PTHREADS < 7
12455         status = pthread_attr_setdetachstate(&attr, &detach);
12456         if( status < 0 ) status = errno;
12457 #else
12458         status = pthread_attr_setdetachstate(&attr, detach);
12459 #endif
12460         if( status ) return status;
12461         status = pthread_create( &t, &attr, task, NULL );
12462 #if HAVE_PTHREADS < 7
12463         if( status < 0 ) status = errno;
12464 #endif
12465         if( status ) return status;
12466 #else
12467         /* Draft 4 pthreads */
12468         status = pthread_create( &t, pthread_attr_default, task, NULL );
12469         if( status ) return errno;
12470
12471         /* give thread a chance to complete */
12472         /* it should remain joinable and hence detachable */
12473         sleep( 1 );
12474
12475         status = pthread_detach( &t );
12476         if( status ) return errno;
12477 #endif
12478
12479 #ifdef HAVE_LINUX_THREADS
12480         pthread_kill_other_threads_np();
12481 #endif
12482
12483         return 0;
12484
12485 ; return 0; }
12486 EOF
12487 if { (eval echo configure:12488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12488   rm -rf conftest*
12489   ol_cv_pthread_pthreads=yes
12490 else
12491   echo "configure: failed program was:" >&5
12492   cat conftest.$ac_ext >&5
12493   rm -rf conftest*
12494   ol_cv_pthread_pthreads=no
12495 fi
12496 rm -f conftest*
12497 else
12498   cat > conftest.$ac_ext <<EOF
12499 #line 12500 "configure"
12500 #include "confdefs.h"
12501 /* pthread test headers */
12502 #include <pthread.h>
12503 #if HAVE_PTHREADS < 7
12504 #include <errno.h>
12505 #endif
12506 #ifndef NULL
12507 #define NULL (void*)0
12508 #endif
12509
12510 static void *task(p)
12511         void *p;
12512 {
12513         return (void *) (p == NULL);
12514 }
12515
12516
12517 int main(argc, argv)
12518         int argc;
12519         char **argv;
12520 {
12521
12522         /* pthread test function */
12523 #ifndef PTHREAD_CREATE_DETACHED
12524 #define PTHREAD_CREATE_DETACHED 1
12525 #endif
12526         pthread_t t;
12527         int status;
12528         int detach = PTHREAD_CREATE_DETACHED;
12529
12530 #if HAVE_PTHREADS > 4
12531         /* Final pthreads */
12532         pthread_attr_t attr;
12533
12534         status = pthread_attr_init(&attr);
12535         if( status ) return status;
12536
12537 #if HAVE_PTHREADS < 7
12538         status = pthread_attr_setdetachstate(&attr, &detach);
12539         if( status < 0 ) status = errno;
12540 #else
12541         status = pthread_attr_setdetachstate(&attr, detach);
12542 #endif
12543         if( status ) return status;
12544         status = pthread_create( &t, &attr, task, NULL );
12545 #if HAVE_PTHREADS < 7
12546         if( status < 0 ) status = errno;
12547 #endif
12548         if( status ) return status;
12549 #else
12550         /* Draft 4 pthreads */
12551         status = pthread_create( &t, pthread_attr_default, task, NULL );
12552         if( status ) return errno;
12553
12554         /* give thread a chance to complete */
12555         /* it should remain joinable and hence detachable */
12556         sleep( 1 );
12557
12558         status = pthread_detach( &t );
12559         if( status ) return errno;
12560 #endif
12561
12562 #ifdef HAVE_LINUX_THREADS
12563         pthread_kill_other_threads_np();
12564 #endif
12565
12566         return 0;
12567
12568 }
12569
12570 EOF
12571 if { (eval echo configure:12572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12572 then
12573   ol_cv_pthread_pthreads=yes
12574 else
12575   echo "configure: failed program was:" >&5
12576   cat conftest.$ac_ext >&5
12577   rm -fr conftest*
12578   ol_cv_pthread_pthreads=no
12579 fi
12580 rm -fr conftest*
12581 fi
12582
12583
12584                 # restore the LIBS
12585                 LIBS="$ol_LIBS"
12586         
12587 fi
12588
12589 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12590
12591         if test $ol_cv_pthread_pthreads = yes ; then
12592                 ol_link_pthreads="-pthreads"
12593                 ol_link_threads=posix
12594         fi
12595 fi
12596
12597                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12598 if test "$ol_link_threads" = no ; then
12599         # try -mthreads
12600         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12601 echo "configure:12602: checking for pthread link with -mthreads" >&5
12602 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12603   echo $ac_n "(cached) $ac_c" 1>&6
12604 else
12605   
12606                 # save the flags
12607                 ol_LIBS="$LIBS"
12608                 LIBS="-mthreads $LIBS"
12609
12610                 if test "$cross_compiling" = yes; then
12611   cat > conftest.$ac_ext <<EOF
12612 #line 12613 "configure"
12613 #include "confdefs.h"
12614 /* pthread test headers */
12615 #include <pthread.h>
12616 #if HAVE_PTHREADS < 7
12617 #include <errno.h>
12618 #endif
12619 #ifndef NULL
12620 #define NULL (void*)0
12621 #endif
12622
12623 static void *task(p)
12624         void *p;
12625 {
12626         return (void *) (p == NULL);
12627 }
12628
12629 int main() {
12630
12631         /* pthread test function */
12632 #ifndef PTHREAD_CREATE_DETACHED
12633 #define PTHREAD_CREATE_DETACHED 1
12634 #endif
12635         pthread_t t;
12636         int status;
12637         int detach = PTHREAD_CREATE_DETACHED;
12638
12639 #if HAVE_PTHREADS > 4
12640         /* Final pthreads */
12641         pthread_attr_t attr;
12642
12643         status = pthread_attr_init(&attr);
12644         if( status ) return status;
12645
12646 #if HAVE_PTHREADS < 7
12647         status = pthread_attr_setdetachstate(&attr, &detach);
12648         if( status < 0 ) status = errno;
12649 #else
12650         status = pthread_attr_setdetachstate(&attr, detach);
12651 #endif
12652         if( status ) return status;
12653         status = pthread_create( &t, &attr, task, NULL );
12654 #if HAVE_PTHREADS < 7
12655         if( status < 0 ) status = errno;
12656 #endif
12657         if( status ) return status;
12658 #else
12659         /* Draft 4 pthreads */
12660         status = pthread_create( &t, pthread_attr_default, task, NULL );
12661         if( status ) return errno;
12662
12663         /* give thread a chance to complete */
12664         /* it should remain joinable and hence detachable */
12665         sleep( 1 );
12666
12667         status = pthread_detach( &t );
12668         if( status ) return errno;
12669 #endif
12670
12671 #ifdef HAVE_LINUX_THREADS
12672         pthread_kill_other_threads_np();
12673 #endif
12674
12675         return 0;
12676
12677 ; return 0; }
12678 EOF
12679 if { (eval echo configure:12680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12680   rm -rf conftest*
12681   ol_cv_pthread_mthreads=yes
12682 else
12683   echo "configure: failed program was:" >&5
12684   cat conftest.$ac_ext >&5
12685   rm -rf conftest*
12686   ol_cv_pthread_mthreads=no
12687 fi
12688 rm -f conftest*
12689 else
12690   cat > conftest.$ac_ext <<EOF
12691 #line 12692 "configure"
12692 #include "confdefs.h"
12693 /* pthread test headers */
12694 #include <pthread.h>
12695 #if HAVE_PTHREADS < 7
12696 #include <errno.h>
12697 #endif
12698 #ifndef NULL
12699 #define NULL (void*)0
12700 #endif
12701
12702 static void *task(p)
12703         void *p;
12704 {
12705         return (void *) (p == NULL);
12706 }
12707
12708
12709 int main(argc, argv)
12710         int argc;
12711         char **argv;
12712 {
12713
12714         /* pthread test function */
12715 #ifndef PTHREAD_CREATE_DETACHED
12716 #define PTHREAD_CREATE_DETACHED 1
12717 #endif
12718         pthread_t t;
12719         int status;
12720         int detach = PTHREAD_CREATE_DETACHED;
12721
12722 #if HAVE_PTHREADS > 4
12723         /* Final pthreads */
12724         pthread_attr_t attr;
12725
12726         status = pthread_attr_init(&attr);
12727         if( status ) return status;
12728
12729 #if HAVE_PTHREADS < 7
12730         status = pthread_attr_setdetachstate(&attr, &detach);
12731         if( status < 0 ) status = errno;
12732 #else
12733         status = pthread_attr_setdetachstate(&attr, detach);
12734 #endif
12735         if( status ) return status;
12736         status = pthread_create( &t, &attr, task, NULL );
12737 #if HAVE_PTHREADS < 7
12738         if( status < 0 ) status = errno;
12739 #endif
12740         if( status ) return status;
12741 #else
12742         /* Draft 4 pthreads */
12743         status = pthread_create( &t, pthread_attr_default, task, NULL );
12744         if( status ) return errno;
12745
12746         /* give thread a chance to complete */
12747         /* it should remain joinable and hence detachable */
12748         sleep( 1 );
12749
12750         status = pthread_detach( &t );
12751         if( status ) return errno;
12752 #endif
12753
12754 #ifdef HAVE_LINUX_THREADS
12755         pthread_kill_other_threads_np();
12756 #endif
12757
12758         return 0;
12759
12760 }
12761
12762 EOF
12763 if { (eval echo configure:12764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12764 then
12765   ol_cv_pthread_mthreads=yes
12766 else
12767   echo "configure: failed program was:" >&5
12768   cat conftest.$ac_ext >&5
12769   rm -fr conftest*
12770   ol_cv_pthread_mthreads=no
12771 fi
12772 rm -fr conftest*
12773 fi
12774
12775
12776                 # restore the LIBS
12777                 LIBS="$ol_LIBS"
12778         
12779 fi
12780
12781 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12782
12783         if test $ol_cv_pthread_mthreads = yes ; then
12784                 ol_link_pthreads="-mthreads"
12785                 ol_link_threads=posix
12786         fi
12787 fi
12788
12789                 # Pthread try link: -thread (ol_cv_pthread_thread)
12790 if test "$ol_link_threads" = no ; then
12791         # try -thread
12792         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12793 echo "configure:12794: checking for pthread link with -thread" >&5
12794 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12795   echo $ac_n "(cached) $ac_c" 1>&6
12796 else
12797   
12798                 # save the flags
12799                 ol_LIBS="$LIBS"
12800                 LIBS="-thread $LIBS"
12801
12802                 if test "$cross_compiling" = yes; then
12803   cat > conftest.$ac_ext <<EOF
12804 #line 12805 "configure"
12805 #include "confdefs.h"
12806 /* pthread test headers */
12807 #include <pthread.h>
12808 #if HAVE_PTHREADS < 7
12809 #include <errno.h>
12810 #endif
12811 #ifndef NULL
12812 #define NULL (void*)0
12813 #endif
12814
12815 static void *task(p)
12816         void *p;
12817 {
12818         return (void *) (p == NULL);
12819 }
12820
12821 int main() {
12822
12823         /* pthread test function */
12824 #ifndef PTHREAD_CREATE_DETACHED
12825 #define PTHREAD_CREATE_DETACHED 1
12826 #endif
12827         pthread_t t;
12828         int status;
12829         int detach = PTHREAD_CREATE_DETACHED;
12830
12831 #if HAVE_PTHREADS > 4
12832         /* Final pthreads */
12833         pthread_attr_t attr;
12834
12835         status = pthread_attr_init(&attr);
12836         if( status ) return status;
12837
12838 #if HAVE_PTHREADS < 7
12839         status = pthread_attr_setdetachstate(&attr, &detach);
12840         if( status < 0 ) status = errno;
12841 #else
12842         status = pthread_attr_setdetachstate(&attr, detach);
12843 #endif
12844         if( status ) return status;
12845         status = pthread_create( &t, &attr, task, NULL );
12846 #if HAVE_PTHREADS < 7
12847         if( status < 0 ) status = errno;
12848 #endif
12849         if( status ) return status;
12850 #else
12851         /* Draft 4 pthreads */
12852         status = pthread_create( &t, pthread_attr_default, task, NULL );
12853         if( status ) return errno;
12854
12855         /* give thread a chance to complete */
12856         /* it should remain joinable and hence detachable */
12857         sleep( 1 );
12858
12859         status = pthread_detach( &t );
12860         if( status ) return errno;
12861 #endif
12862
12863 #ifdef HAVE_LINUX_THREADS
12864         pthread_kill_other_threads_np();
12865 #endif
12866
12867         return 0;
12868
12869 ; return 0; }
12870 EOF
12871 if { (eval echo configure:12872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12872   rm -rf conftest*
12873   ol_cv_pthread_thread=yes
12874 else
12875   echo "configure: failed program was:" >&5
12876   cat conftest.$ac_ext >&5
12877   rm -rf conftest*
12878   ol_cv_pthread_thread=no
12879 fi
12880 rm -f conftest*
12881 else
12882   cat > conftest.$ac_ext <<EOF
12883 #line 12884 "configure"
12884 #include "confdefs.h"
12885 /* pthread test headers */
12886 #include <pthread.h>
12887 #if HAVE_PTHREADS < 7
12888 #include <errno.h>
12889 #endif
12890 #ifndef NULL
12891 #define NULL (void*)0
12892 #endif
12893
12894 static void *task(p)
12895         void *p;
12896 {
12897         return (void *) (p == NULL);
12898 }
12899
12900
12901 int main(argc, argv)
12902         int argc;
12903         char **argv;
12904 {
12905
12906         /* pthread test function */
12907 #ifndef PTHREAD_CREATE_DETACHED
12908 #define PTHREAD_CREATE_DETACHED 1
12909 #endif
12910         pthread_t t;
12911         int status;
12912         int detach = PTHREAD_CREATE_DETACHED;
12913
12914 #if HAVE_PTHREADS > 4
12915         /* Final pthreads */
12916         pthread_attr_t attr;
12917
12918         status = pthread_attr_init(&attr);
12919         if( status ) return status;
12920
12921 #if HAVE_PTHREADS < 7
12922         status = pthread_attr_setdetachstate(&attr, &detach);
12923         if( status < 0 ) status = errno;
12924 #else
12925         status = pthread_attr_setdetachstate(&attr, detach);
12926 #endif
12927         if( status ) return status;
12928         status = pthread_create( &t, &attr, task, NULL );
12929 #if HAVE_PTHREADS < 7
12930         if( status < 0 ) status = errno;
12931 #endif
12932         if( status ) return status;
12933 #else
12934         /* Draft 4 pthreads */
12935         status = pthread_create( &t, pthread_attr_default, task, NULL );
12936         if( status ) return errno;
12937
12938         /* give thread a chance to complete */
12939         /* it should remain joinable and hence detachable */
12940         sleep( 1 );
12941
12942         status = pthread_detach( &t );
12943         if( status ) return errno;
12944 #endif
12945
12946 #ifdef HAVE_LINUX_THREADS
12947         pthread_kill_other_threads_np();
12948 #endif
12949
12950         return 0;
12951
12952 }
12953
12954 EOF
12955 if { (eval echo configure:12956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12956 then
12957   ol_cv_pthread_thread=yes
12958 else
12959   echo "configure: failed program was:" >&5
12960   cat conftest.$ac_ext >&5
12961   rm -fr conftest*
12962   ol_cv_pthread_thread=no
12963 fi
12964 rm -fr conftest*
12965 fi
12966
12967
12968                 # restore the LIBS
12969                 LIBS="$ol_LIBS"
12970         
12971 fi
12972
12973 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12974
12975         if test $ol_cv_pthread_thread = yes ; then
12976                 ol_link_pthreads="-thread"
12977                 ol_link_threads=posix
12978         fi
12979 fi
12980
12981
12982                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12983 if test "$ol_link_threads" = no ; then
12984         # try -lpthread -lmach -lexc -lc_r
12985         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12986 echo "configure:12987: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12987 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12988   echo $ac_n "(cached) $ac_c" 1>&6
12989 else
12990   
12991                 # save the flags
12992                 ol_LIBS="$LIBS"
12993                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12994
12995                 if test "$cross_compiling" = yes; then
12996   cat > conftest.$ac_ext <<EOF
12997 #line 12998 "configure"
12998 #include "confdefs.h"
12999 /* pthread test headers */
13000 #include <pthread.h>
13001 #if HAVE_PTHREADS < 7
13002 #include <errno.h>
13003 #endif
13004 #ifndef NULL
13005 #define NULL (void*)0
13006 #endif
13007
13008 static void *task(p)
13009         void *p;
13010 {
13011         return (void *) (p == NULL);
13012 }
13013
13014 int main() {
13015
13016         /* pthread test function */
13017 #ifndef PTHREAD_CREATE_DETACHED
13018 #define PTHREAD_CREATE_DETACHED 1
13019 #endif
13020         pthread_t t;
13021         int status;
13022         int detach = PTHREAD_CREATE_DETACHED;
13023
13024 #if HAVE_PTHREADS > 4
13025         /* Final pthreads */
13026         pthread_attr_t attr;
13027
13028         status = pthread_attr_init(&attr);
13029         if( status ) return status;
13030
13031 #if HAVE_PTHREADS < 7
13032         status = pthread_attr_setdetachstate(&attr, &detach);
13033         if( status < 0 ) status = errno;
13034 #else
13035         status = pthread_attr_setdetachstate(&attr, detach);
13036 #endif
13037         if( status ) return status;
13038         status = pthread_create( &t, &attr, task, NULL );
13039 #if HAVE_PTHREADS < 7
13040         if( status < 0 ) status = errno;
13041 #endif
13042         if( status ) return status;
13043 #else
13044         /* Draft 4 pthreads */
13045         status = pthread_create( &t, pthread_attr_default, task, NULL );
13046         if( status ) return errno;
13047
13048         /* give thread a chance to complete */
13049         /* it should remain joinable and hence detachable */
13050         sleep( 1 );
13051
13052         status = pthread_detach( &t );
13053         if( status ) return errno;
13054 #endif
13055
13056 #ifdef HAVE_LINUX_THREADS
13057         pthread_kill_other_threads_np();
13058 #endif
13059
13060         return 0;
13061
13062 ; return 0; }
13063 EOF
13064 if { (eval echo configure:13065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13065   rm -rf conftest*
13066   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13067 else
13068   echo "configure: failed program was:" >&5
13069   cat conftest.$ac_ext >&5
13070   rm -rf conftest*
13071   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13072 fi
13073 rm -f conftest*
13074 else
13075   cat > conftest.$ac_ext <<EOF
13076 #line 13077 "configure"
13077 #include "confdefs.h"
13078 /* pthread test headers */
13079 #include <pthread.h>
13080 #if HAVE_PTHREADS < 7
13081 #include <errno.h>
13082 #endif
13083 #ifndef NULL
13084 #define NULL (void*)0
13085 #endif
13086
13087 static void *task(p)
13088         void *p;
13089 {
13090         return (void *) (p == NULL);
13091 }
13092
13093
13094 int main(argc, argv)
13095         int argc;
13096         char **argv;
13097 {
13098
13099         /* pthread test function */
13100 #ifndef PTHREAD_CREATE_DETACHED
13101 #define PTHREAD_CREATE_DETACHED 1
13102 #endif
13103         pthread_t t;
13104         int status;
13105         int detach = PTHREAD_CREATE_DETACHED;
13106
13107 #if HAVE_PTHREADS > 4
13108         /* Final pthreads */
13109         pthread_attr_t attr;
13110
13111         status = pthread_attr_init(&attr);
13112         if( status ) return status;
13113
13114 #if HAVE_PTHREADS < 7
13115         status = pthread_attr_setdetachstate(&attr, &detach);
13116         if( status < 0 ) status = errno;
13117 #else
13118         status = pthread_attr_setdetachstate(&attr, detach);
13119 #endif
13120         if( status ) return status;
13121         status = pthread_create( &t, &attr, task, NULL );
13122 #if HAVE_PTHREADS < 7
13123         if( status < 0 ) status = errno;
13124 #endif
13125         if( status ) return status;
13126 #else
13127         /* Draft 4 pthreads */
13128         status = pthread_create( &t, pthread_attr_default, task, NULL );
13129         if( status ) return errno;
13130
13131         /* give thread a chance to complete */
13132         /* it should remain joinable and hence detachable */
13133         sleep( 1 );
13134
13135         status = pthread_detach( &t );
13136         if( status ) return errno;
13137 #endif
13138
13139 #ifdef HAVE_LINUX_THREADS
13140         pthread_kill_other_threads_np();
13141 #endif
13142
13143         return 0;
13144
13145 }
13146
13147 EOF
13148 if { (eval echo configure:13149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13149 then
13150   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13151 else
13152   echo "configure: failed program was:" >&5
13153   cat conftest.$ac_ext >&5
13154   rm -fr conftest*
13155   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13156 fi
13157 rm -fr conftest*
13158 fi
13159
13160
13161                 # restore the LIBS
13162                 LIBS="$ol_LIBS"
13163         
13164 fi
13165
13166 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13167
13168         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13169                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13170                 ol_link_threads=posix
13171         fi
13172 fi
13173
13174                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13175 if test "$ol_link_threads" = no ; then
13176         # try -lpthread -lmach -lexc
13177         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13178 echo "configure:13179: checking for pthread link with -lpthread -lmach -lexc" >&5
13179 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13180   echo $ac_n "(cached) $ac_c" 1>&6
13181 else
13182   
13183                 # save the flags
13184                 ol_LIBS="$LIBS"
13185                 LIBS="-lpthread -lmach -lexc $LIBS"
13186
13187                 if test "$cross_compiling" = yes; then
13188   cat > conftest.$ac_ext <<EOF
13189 #line 13190 "configure"
13190 #include "confdefs.h"
13191 /* pthread test headers */
13192 #include <pthread.h>
13193 #if HAVE_PTHREADS < 7
13194 #include <errno.h>
13195 #endif
13196 #ifndef NULL
13197 #define NULL (void*)0
13198 #endif
13199
13200 static void *task(p)
13201         void *p;
13202 {
13203         return (void *) (p == NULL);
13204 }
13205
13206 int main() {
13207
13208         /* pthread test function */
13209 #ifndef PTHREAD_CREATE_DETACHED
13210 #define PTHREAD_CREATE_DETACHED 1
13211 #endif
13212         pthread_t t;
13213         int status;
13214         int detach = PTHREAD_CREATE_DETACHED;
13215
13216 #if HAVE_PTHREADS > 4
13217         /* Final pthreads */
13218         pthread_attr_t attr;
13219
13220         status = pthread_attr_init(&attr);
13221         if( status ) return status;
13222
13223 #if HAVE_PTHREADS < 7
13224         status = pthread_attr_setdetachstate(&attr, &detach);
13225         if( status < 0 ) status = errno;
13226 #else
13227         status = pthread_attr_setdetachstate(&attr, detach);
13228 #endif
13229         if( status ) return status;
13230         status = pthread_create( &t, &attr, task, NULL );
13231 #if HAVE_PTHREADS < 7
13232         if( status < 0 ) status = errno;
13233 #endif
13234         if( status ) return status;
13235 #else
13236         /* Draft 4 pthreads */
13237         status = pthread_create( &t, pthread_attr_default, task, NULL );
13238         if( status ) return errno;
13239
13240         /* give thread a chance to complete */
13241         /* it should remain joinable and hence detachable */
13242         sleep( 1 );
13243
13244         status = pthread_detach( &t );
13245         if( status ) return errno;
13246 #endif
13247
13248 #ifdef HAVE_LINUX_THREADS
13249         pthread_kill_other_threads_np();
13250 #endif
13251
13252         return 0;
13253
13254 ; return 0; }
13255 EOF
13256 if { (eval echo configure:13257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13257   rm -rf conftest*
13258   ol_cv_pthread_lpthread_lmach_lexc=yes
13259 else
13260   echo "configure: failed program was:" >&5
13261   cat conftest.$ac_ext >&5
13262   rm -rf conftest*
13263   ol_cv_pthread_lpthread_lmach_lexc=no
13264 fi
13265 rm -f conftest*
13266 else
13267   cat > conftest.$ac_ext <<EOF
13268 #line 13269 "configure"
13269 #include "confdefs.h"
13270 /* pthread test headers */
13271 #include <pthread.h>
13272 #if HAVE_PTHREADS < 7
13273 #include <errno.h>
13274 #endif
13275 #ifndef NULL
13276 #define NULL (void*)0
13277 #endif
13278
13279 static void *task(p)
13280         void *p;
13281 {
13282         return (void *) (p == NULL);
13283 }
13284
13285
13286 int main(argc, argv)
13287         int argc;
13288         char **argv;
13289 {
13290
13291         /* pthread test function */
13292 #ifndef PTHREAD_CREATE_DETACHED
13293 #define PTHREAD_CREATE_DETACHED 1
13294 #endif
13295         pthread_t t;
13296         int status;
13297         int detach = PTHREAD_CREATE_DETACHED;
13298
13299 #if HAVE_PTHREADS > 4
13300         /* Final pthreads */
13301         pthread_attr_t attr;
13302
13303         status = pthread_attr_init(&attr);
13304         if( status ) return status;
13305
13306 #if HAVE_PTHREADS < 7
13307         status = pthread_attr_setdetachstate(&attr, &detach);
13308         if( status < 0 ) status = errno;
13309 #else
13310         status = pthread_attr_setdetachstate(&attr, detach);
13311 #endif
13312         if( status ) return status;
13313         status = pthread_create( &t, &attr, task, NULL );
13314 #if HAVE_PTHREADS < 7
13315         if( status < 0 ) status = errno;
13316 #endif
13317         if( status ) return status;
13318 #else
13319         /* Draft 4 pthreads */
13320         status = pthread_create( &t, pthread_attr_default, task, NULL );
13321         if( status ) return errno;
13322
13323         /* give thread a chance to complete */
13324         /* it should remain joinable and hence detachable */
13325         sleep( 1 );
13326
13327         status = pthread_detach( &t );
13328         if( status ) return errno;
13329 #endif
13330
13331 #ifdef HAVE_LINUX_THREADS
13332         pthread_kill_other_threads_np();
13333 #endif
13334
13335         return 0;
13336
13337 }
13338
13339 EOF
13340 if { (eval echo configure:13341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13341 then
13342   ol_cv_pthread_lpthread_lmach_lexc=yes
13343 else
13344   echo "configure: failed program was:" >&5
13345   cat conftest.$ac_ext >&5
13346   rm -fr conftest*
13347   ol_cv_pthread_lpthread_lmach_lexc=no
13348 fi
13349 rm -fr conftest*
13350 fi
13351
13352
13353                 # restore the LIBS
13354                 LIBS="$ol_LIBS"
13355         
13356 fi
13357
13358 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13359
13360         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13361                 ol_link_pthreads="-lpthread -lmach -lexc"
13362                 ol_link_threads=posix
13363         fi
13364 fi
13365
13366
13367                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13368 if test "$ol_link_threads" = no ; then
13369         # try -lpthread -Wl,-woff,85
13370         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13371 echo "configure:13372: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13372 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13373   echo $ac_n "(cached) $ac_c" 1>&6
13374 else
13375   
13376                 # save the flags
13377                 ol_LIBS="$LIBS"
13378                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13379
13380                 if test "$cross_compiling" = yes; then
13381   cat > conftest.$ac_ext <<EOF
13382 #line 13383 "configure"
13383 #include "confdefs.h"
13384 /* pthread test headers */
13385 #include <pthread.h>
13386 #if HAVE_PTHREADS < 7
13387 #include <errno.h>
13388 #endif
13389 #ifndef NULL
13390 #define NULL (void*)0
13391 #endif
13392
13393 static void *task(p)
13394         void *p;
13395 {
13396         return (void *) (p == NULL);
13397 }
13398
13399 int main() {
13400
13401         /* pthread test function */
13402 #ifndef PTHREAD_CREATE_DETACHED
13403 #define PTHREAD_CREATE_DETACHED 1
13404 #endif
13405         pthread_t t;
13406         int status;
13407         int detach = PTHREAD_CREATE_DETACHED;
13408
13409 #if HAVE_PTHREADS > 4
13410         /* Final pthreads */
13411         pthread_attr_t attr;
13412
13413         status = pthread_attr_init(&attr);
13414         if( status ) return status;
13415
13416 #if HAVE_PTHREADS < 7
13417         status = pthread_attr_setdetachstate(&attr, &detach);
13418         if( status < 0 ) status = errno;
13419 #else
13420         status = pthread_attr_setdetachstate(&attr, detach);
13421 #endif
13422         if( status ) return status;
13423         status = pthread_create( &t, &attr, task, NULL );
13424 #if HAVE_PTHREADS < 7
13425         if( status < 0 ) status = errno;
13426 #endif
13427         if( status ) return status;
13428 #else
13429         /* Draft 4 pthreads */
13430         status = pthread_create( &t, pthread_attr_default, task, NULL );
13431         if( status ) return errno;
13432
13433         /* give thread a chance to complete */
13434         /* it should remain joinable and hence detachable */
13435         sleep( 1 );
13436
13437         status = pthread_detach( &t );
13438         if( status ) return errno;
13439 #endif
13440
13441 #ifdef HAVE_LINUX_THREADS
13442         pthread_kill_other_threads_np();
13443 #endif
13444
13445         return 0;
13446
13447 ; return 0; }
13448 EOF
13449 if { (eval echo configure:13450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13450   rm -rf conftest*
13451   ol_cv_pthread_lib_lpthread_woff=yes
13452 else
13453   echo "configure: failed program was:" >&5
13454   cat conftest.$ac_ext >&5
13455   rm -rf conftest*
13456   ol_cv_pthread_lib_lpthread_woff=no
13457 fi
13458 rm -f conftest*
13459 else
13460   cat > conftest.$ac_ext <<EOF
13461 #line 13462 "configure"
13462 #include "confdefs.h"
13463 /* pthread test headers */
13464 #include <pthread.h>
13465 #if HAVE_PTHREADS < 7
13466 #include <errno.h>
13467 #endif
13468 #ifndef NULL
13469 #define NULL (void*)0
13470 #endif
13471
13472 static void *task(p)
13473         void *p;
13474 {
13475         return (void *) (p == NULL);
13476 }
13477
13478
13479 int main(argc, argv)
13480         int argc;
13481         char **argv;
13482 {
13483
13484         /* pthread test function */
13485 #ifndef PTHREAD_CREATE_DETACHED
13486 #define PTHREAD_CREATE_DETACHED 1
13487 #endif
13488         pthread_t t;
13489         int status;
13490         int detach = PTHREAD_CREATE_DETACHED;
13491
13492 #if HAVE_PTHREADS > 4
13493         /* Final pthreads */
13494         pthread_attr_t attr;
13495
13496         status = pthread_attr_init(&attr);
13497         if( status ) return status;
13498
13499 #if HAVE_PTHREADS < 7
13500         status = pthread_attr_setdetachstate(&attr, &detach);
13501         if( status < 0 ) status = errno;
13502 #else
13503         status = pthread_attr_setdetachstate(&attr, detach);
13504 #endif
13505         if( status ) return status;
13506         status = pthread_create( &t, &attr, task, NULL );
13507 #if HAVE_PTHREADS < 7
13508         if( status < 0 ) status = errno;
13509 #endif
13510         if( status ) return status;
13511 #else
13512         /* Draft 4 pthreads */
13513         status = pthread_create( &t, pthread_attr_default, task, NULL );
13514         if( status ) return errno;
13515
13516         /* give thread a chance to complete */
13517         /* it should remain joinable and hence detachable */
13518         sleep( 1 );
13519
13520         status = pthread_detach( &t );
13521         if( status ) return errno;
13522 #endif
13523
13524 #ifdef HAVE_LINUX_THREADS
13525         pthread_kill_other_threads_np();
13526 #endif
13527
13528         return 0;
13529
13530 }
13531
13532 EOF
13533 if { (eval echo configure:13534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13534 then
13535   ol_cv_pthread_lib_lpthread_woff=yes
13536 else
13537   echo "configure: failed program was:" >&5
13538   cat conftest.$ac_ext >&5
13539   rm -fr conftest*
13540   ol_cv_pthread_lib_lpthread_woff=no
13541 fi
13542 rm -fr conftest*
13543 fi
13544
13545
13546                 # restore the LIBS
13547                 LIBS="$ol_LIBS"
13548         
13549 fi
13550
13551 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13552
13553         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13554                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13555                 ol_link_threads=posix
13556         fi
13557 fi
13558
13559
13560                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13561 if test "$ol_link_threads" = no ; then
13562         # try -lpthread
13563         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13564 echo "configure:13565: checking for pthread link with -lpthread" >&5
13565 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13566   echo $ac_n "(cached) $ac_c" 1>&6
13567 else
13568   
13569                 # save the flags
13570                 ol_LIBS="$LIBS"
13571                 LIBS="-lpthread $LIBS"
13572
13573                 if test "$cross_compiling" = yes; then
13574   cat > conftest.$ac_ext <<EOF
13575 #line 13576 "configure"
13576 #include "confdefs.h"
13577 /* pthread test headers */
13578 #include <pthread.h>
13579 #if HAVE_PTHREADS < 7
13580 #include <errno.h>
13581 #endif
13582 #ifndef NULL
13583 #define NULL (void*)0
13584 #endif
13585
13586 static void *task(p)
13587         void *p;
13588 {
13589         return (void *) (p == NULL);
13590 }
13591
13592 int main() {
13593
13594         /* pthread test function */
13595 #ifndef PTHREAD_CREATE_DETACHED
13596 #define PTHREAD_CREATE_DETACHED 1
13597 #endif
13598         pthread_t t;
13599         int status;
13600         int detach = PTHREAD_CREATE_DETACHED;
13601
13602 #if HAVE_PTHREADS > 4
13603         /* Final pthreads */
13604         pthread_attr_t attr;
13605
13606         status = pthread_attr_init(&attr);
13607         if( status ) return status;
13608
13609 #if HAVE_PTHREADS < 7
13610         status = pthread_attr_setdetachstate(&attr, &detach);
13611         if( status < 0 ) status = errno;
13612 #else
13613         status = pthread_attr_setdetachstate(&attr, detach);
13614 #endif
13615         if( status ) return status;
13616         status = pthread_create( &t, &attr, task, NULL );
13617 #if HAVE_PTHREADS < 7
13618         if( status < 0 ) status = errno;
13619 #endif
13620         if( status ) return status;
13621 #else
13622         /* Draft 4 pthreads */
13623         status = pthread_create( &t, pthread_attr_default, task, NULL );
13624         if( status ) return errno;
13625
13626         /* give thread a chance to complete */
13627         /* it should remain joinable and hence detachable */
13628         sleep( 1 );
13629
13630         status = pthread_detach( &t );
13631         if( status ) return errno;
13632 #endif
13633
13634 #ifdef HAVE_LINUX_THREADS
13635         pthread_kill_other_threads_np();
13636 #endif
13637
13638         return 0;
13639
13640 ; return 0; }
13641 EOF
13642 if { (eval echo configure:13643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13643   rm -rf conftest*
13644   ol_cv_pthread_lpthread=yes
13645 else
13646   echo "configure: failed program was:" >&5
13647   cat conftest.$ac_ext >&5
13648   rm -rf conftest*
13649   ol_cv_pthread_lpthread=no
13650 fi
13651 rm -f conftest*
13652 else
13653   cat > conftest.$ac_ext <<EOF
13654 #line 13655 "configure"
13655 #include "confdefs.h"
13656 /* pthread test headers */
13657 #include <pthread.h>
13658 #if HAVE_PTHREADS < 7
13659 #include <errno.h>
13660 #endif
13661 #ifndef NULL
13662 #define NULL (void*)0
13663 #endif
13664
13665 static void *task(p)
13666         void *p;
13667 {
13668         return (void *) (p == NULL);
13669 }
13670
13671
13672 int main(argc, argv)
13673         int argc;
13674         char **argv;
13675 {
13676
13677         /* pthread test function */
13678 #ifndef PTHREAD_CREATE_DETACHED
13679 #define PTHREAD_CREATE_DETACHED 1
13680 #endif
13681         pthread_t t;
13682         int status;
13683         int detach = PTHREAD_CREATE_DETACHED;
13684
13685 #if HAVE_PTHREADS > 4
13686         /* Final pthreads */
13687         pthread_attr_t attr;
13688
13689         status = pthread_attr_init(&attr);
13690         if( status ) return status;
13691
13692 #if HAVE_PTHREADS < 7
13693         status = pthread_attr_setdetachstate(&attr, &detach);
13694         if( status < 0 ) status = errno;
13695 #else
13696         status = pthread_attr_setdetachstate(&attr, detach);
13697 #endif
13698         if( status ) return status;
13699         status = pthread_create( &t, &attr, task, NULL );
13700 #if HAVE_PTHREADS < 7
13701         if( status < 0 ) status = errno;
13702 #endif
13703         if( status ) return status;
13704 #else
13705         /* Draft 4 pthreads */
13706         status = pthread_create( &t, pthread_attr_default, task, NULL );
13707         if( status ) return errno;
13708
13709         /* give thread a chance to complete */
13710         /* it should remain joinable and hence detachable */
13711         sleep( 1 );
13712
13713         status = pthread_detach( &t );
13714         if( status ) return errno;
13715 #endif
13716
13717 #ifdef HAVE_LINUX_THREADS
13718         pthread_kill_other_threads_np();
13719 #endif
13720
13721         return 0;
13722
13723 }
13724
13725 EOF
13726 if { (eval echo configure:13727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13727 then
13728   ol_cv_pthread_lpthread=yes
13729 else
13730   echo "configure: failed program was:" >&5
13731   cat conftest.$ac_ext >&5
13732   rm -fr conftest*
13733   ol_cv_pthread_lpthread=no
13734 fi
13735 rm -fr conftest*
13736 fi
13737
13738
13739                 # restore the LIBS
13740                 LIBS="$ol_LIBS"
13741         
13742 fi
13743
13744 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13745
13746         if test $ol_cv_pthread_lpthread = yes ; then
13747                 ol_link_pthreads="-lpthread"
13748                 ol_link_threads=posix
13749         fi
13750 fi
13751
13752                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13753 if test "$ol_link_threads" = no ; then
13754         # try -lc_r
13755         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13756 echo "configure:13757: checking for pthread link with -lc_r" >&5
13757 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13758   echo $ac_n "(cached) $ac_c" 1>&6
13759 else
13760   
13761                 # save the flags
13762                 ol_LIBS="$LIBS"
13763                 LIBS="-lc_r $LIBS"
13764
13765                 if test "$cross_compiling" = yes; then
13766   cat > conftest.$ac_ext <<EOF
13767 #line 13768 "configure"
13768 #include "confdefs.h"
13769 /* pthread test headers */
13770 #include <pthread.h>
13771 #if HAVE_PTHREADS < 7
13772 #include <errno.h>
13773 #endif
13774 #ifndef NULL
13775 #define NULL (void*)0
13776 #endif
13777
13778 static void *task(p)
13779         void *p;
13780 {
13781         return (void *) (p == NULL);
13782 }
13783
13784 int main() {
13785
13786         /* pthread test function */
13787 #ifndef PTHREAD_CREATE_DETACHED
13788 #define PTHREAD_CREATE_DETACHED 1
13789 #endif
13790         pthread_t t;
13791         int status;
13792         int detach = PTHREAD_CREATE_DETACHED;
13793
13794 #if HAVE_PTHREADS > 4
13795         /* Final pthreads */
13796         pthread_attr_t attr;
13797
13798         status = pthread_attr_init(&attr);
13799         if( status ) return status;
13800
13801 #if HAVE_PTHREADS < 7
13802         status = pthread_attr_setdetachstate(&attr, &detach);
13803         if( status < 0 ) status = errno;
13804 #else
13805         status = pthread_attr_setdetachstate(&attr, detach);
13806 #endif
13807         if( status ) return status;
13808         status = pthread_create( &t, &attr, task, NULL );
13809 #if HAVE_PTHREADS < 7
13810         if( status < 0 ) status = errno;
13811 #endif
13812         if( status ) return status;
13813 #else
13814         /* Draft 4 pthreads */
13815         status = pthread_create( &t, pthread_attr_default, task, NULL );
13816         if( status ) return errno;
13817
13818         /* give thread a chance to complete */
13819         /* it should remain joinable and hence detachable */
13820         sleep( 1 );
13821
13822         status = pthread_detach( &t );
13823         if( status ) return errno;
13824 #endif
13825
13826 #ifdef HAVE_LINUX_THREADS
13827         pthread_kill_other_threads_np();
13828 #endif
13829
13830         return 0;
13831
13832 ; return 0; }
13833 EOF
13834 if { (eval echo configure:13835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13835   rm -rf conftest*
13836   ol_cv_pthread_lc_r=yes
13837 else
13838   echo "configure: failed program was:" >&5
13839   cat conftest.$ac_ext >&5
13840   rm -rf conftest*
13841   ol_cv_pthread_lc_r=no
13842 fi
13843 rm -f conftest*
13844 else
13845   cat > conftest.$ac_ext <<EOF
13846 #line 13847 "configure"
13847 #include "confdefs.h"
13848 /* pthread test headers */
13849 #include <pthread.h>
13850 #if HAVE_PTHREADS < 7
13851 #include <errno.h>
13852 #endif
13853 #ifndef NULL
13854 #define NULL (void*)0
13855 #endif
13856
13857 static void *task(p)
13858         void *p;
13859 {
13860         return (void *) (p == NULL);
13861 }
13862
13863
13864 int main(argc, argv)
13865         int argc;
13866         char **argv;
13867 {
13868
13869         /* pthread test function */
13870 #ifndef PTHREAD_CREATE_DETACHED
13871 #define PTHREAD_CREATE_DETACHED 1
13872 #endif
13873         pthread_t t;
13874         int status;
13875         int detach = PTHREAD_CREATE_DETACHED;
13876
13877 #if HAVE_PTHREADS > 4
13878         /* Final pthreads */
13879         pthread_attr_t attr;
13880
13881         status = pthread_attr_init(&attr);
13882         if( status ) return status;
13883
13884 #if HAVE_PTHREADS < 7
13885         status = pthread_attr_setdetachstate(&attr, &detach);
13886         if( status < 0 ) status = errno;
13887 #else
13888         status = pthread_attr_setdetachstate(&attr, detach);
13889 #endif
13890         if( status ) return status;
13891         status = pthread_create( &t, &attr, task, NULL );
13892 #if HAVE_PTHREADS < 7
13893         if( status < 0 ) status = errno;
13894 #endif
13895         if( status ) return status;
13896 #else
13897         /* Draft 4 pthreads */
13898         status = pthread_create( &t, pthread_attr_default, task, NULL );
13899         if( status ) return errno;
13900
13901         /* give thread a chance to complete */
13902         /* it should remain joinable and hence detachable */
13903         sleep( 1 );
13904
13905         status = pthread_detach( &t );
13906         if( status ) return errno;
13907 #endif
13908
13909 #ifdef HAVE_LINUX_THREADS
13910         pthread_kill_other_threads_np();
13911 #endif
13912
13913         return 0;
13914
13915 }
13916
13917 EOF
13918 if { (eval echo configure:13919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13919 then
13920   ol_cv_pthread_lc_r=yes
13921 else
13922   echo "configure: failed program was:" >&5
13923   cat conftest.$ac_ext >&5
13924   rm -fr conftest*
13925   ol_cv_pthread_lc_r=no
13926 fi
13927 rm -fr conftest*
13928 fi
13929
13930
13931                 # restore the LIBS
13932                 LIBS="$ol_LIBS"
13933         
13934 fi
13935
13936 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13937
13938         if test $ol_cv_pthread_lc_r = yes ; then
13939                 ol_link_pthreads="-lc_r"
13940                 ol_link_threads=posix
13941         fi
13942 fi
13943
13944
13945                 # Pthread try link: -threads (ol_cv_pthread_threads)
13946 if test "$ol_link_threads" = no ; then
13947         # try -threads
13948         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13949 echo "configure:13950: checking for pthread link with -threads" >&5
13950 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13951   echo $ac_n "(cached) $ac_c" 1>&6
13952 else
13953   
13954                 # save the flags
13955                 ol_LIBS="$LIBS"
13956                 LIBS="-threads $LIBS"
13957
13958                 if test "$cross_compiling" = yes; then
13959   cat > conftest.$ac_ext <<EOF
13960 #line 13961 "configure"
13961 #include "confdefs.h"
13962 /* pthread test headers */
13963 #include <pthread.h>
13964 #if HAVE_PTHREADS < 7
13965 #include <errno.h>
13966 #endif
13967 #ifndef NULL
13968 #define NULL (void*)0
13969 #endif
13970
13971 static void *task(p)
13972         void *p;
13973 {
13974         return (void *) (p == NULL);
13975 }
13976
13977 int main() {
13978
13979         /* pthread test function */
13980 #ifndef PTHREAD_CREATE_DETACHED
13981 #define PTHREAD_CREATE_DETACHED 1
13982 #endif
13983         pthread_t t;
13984         int status;
13985         int detach = PTHREAD_CREATE_DETACHED;
13986
13987 #if HAVE_PTHREADS > 4
13988         /* Final pthreads */
13989         pthread_attr_t attr;
13990
13991         status = pthread_attr_init(&attr);
13992         if( status ) return status;
13993
13994 #if HAVE_PTHREADS < 7
13995         status = pthread_attr_setdetachstate(&attr, &detach);
13996         if( status < 0 ) status = errno;
13997 #else
13998         status = pthread_attr_setdetachstate(&attr, detach);
13999 #endif
14000         if( status ) return status;
14001         status = pthread_create( &t, &attr, task, NULL );
14002 #if HAVE_PTHREADS < 7
14003         if( status < 0 ) status = errno;
14004 #endif
14005         if( status ) return status;
14006 #else
14007         /* Draft 4 pthreads */
14008         status = pthread_create( &t, pthread_attr_default, task, NULL );
14009         if( status ) return errno;
14010
14011         /* give thread a chance to complete */
14012         /* it should remain joinable and hence detachable */
14013         sleep( 1 );
14014
14015         status = pthread_detach( &t );
14016         if( status ) return errno;
14017 #endif
14018
14019 #ifdef HAVE_LINUX_THREADS
14020         pthread_kill_other_threads_np();
14021 #endif
14022
14023         return 0;
14024
14025 ; return 0; }
14026 EOF
14027 if { (eval echo configure:14028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14028   rm -rf conftest*
14029   ol_cv_pthread_threads=yes
14030 else
14031   echo "configure: failed program was:" >&5
14032   cat conftest.$ac_ext >&5
14033   rm -rf conftest*
14034   ol_cv_pthread_threads=no
14035 fi
14036 rm -f conftest*
14037 else
14038   cat > conftest.$ac_ext <<EOF
14039 #line 14040 "configure"
14040 #include "confdefs.h"
14041 /* pthread test headers */
14042 #include <pthread.h>
14043 #if HAVE_PTHREADS < 7
14044 #include <errno.h>
14045 #endif
14046 #ifndef NULL
14047 #define NULL (void*)0
14048 #endif
14049
14050 static void *task(p)
14051         void *p;
14052 {
14053         return (void *) (p == NULL);
14054 }
14055
14056
14057 int main(argc, argv)
14058         int argc;
14059         char **argv;
14060 {
14061
14062         /* pthread test function */
14063 #ifndef PTHREAD_CREATE_DETACHED
14064 #define PTHREAD_CREATE_DETACHED 1
14065 #endif
14066         pthread_t t;
14067         int status;
14068         int detach = PTHREAD_CREATE_DETACHED;
14069
14070 #if HAVE_PTHREADS > 4
14071         /* Final pthreads */
14072         pthread_attr_t attr;
14073
14074         status = pthread_attr_init(&attr);
14075         if( status ) return status;
14076
14077 #if HAVE_PTHREADS < 7
14078         status = pthread_attr_setdetachstate(&attr, &detach);
14079         if( status < 0 ) status = errno;
14080 #else
14081         status = pthread_attr_setdetachstate(&attr, detach);
14082 #endif
14083         if( status ) return status;
14084         status = pthread_create( &t, &attr, task, NULL );
14085 #if HAVE_PTHREADS < 7
14086         if( status < 0 ) status = errno;
14087 #endif
14088         if( status ) return status;
14089 #else
14090         /* Draft 4 pthreads */
14091         status = pthread_create( &t, pthread_attr_default, task, NULL );
14092         if( status ) return errno;
14093
14094         /* give thread a chance to complete */
14095         /* it should remain joinable and hence detachable */
14096         sleep( 1 );
14097
14098         status = pthread_detach( &t );
14099         if( status ) return errno;
14100 #endif
14101
14102 #ifdef HAVE_LINUX_THREADS
14103         pthread_kill_other_threads_np();
14104 #endif
14105
14106         return 0;
14107
14108 }
14109
14110 EOF
14111 if { (eval echo configure:14112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14112 then
14113   ol_cv_pthread_threads=yes
14114 else
14115   echo "configure: failed program was:" >&5
14116   cat conftest.$ac_ext >&5
14117   rm -fr conftest*
14118   ol_cv_pthread_threads=no
14119 fi
14120 rm -fr conftest*
14121 fi
14122
14123
14124                 # restore the LIBS
14125                 LIBS="$ol_LIBS"
14126         
14127 fi
14128
14129 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14130
14131         if test $ol_cv_pthread_threads = yes ; then
14132                 ol_link_pthreads="-threads"
14133                 ol_link_threads=posix
14134         fi
14135 fi
14136
14137
14138                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14139 if test "$ol_link_threads" = no ; then
14140         # try -lpthreads -lmach -lexc -lc_r
14141         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14142 echo "configure:14143: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14143 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14144   echo $ac_n "(cached) $ac_c" 1>&6
14145 else
14146   
14147                 # save the flags
14148                 ol_LIBS="$LIBS"
14149                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14150
14151                 if test "$cross_compiling" = yes; then
14152   cat > conftest.$ac_ext <<EOF
14153 #line 14154 "configure"
14154 #include "confdefs.h"
14155 /* pthread test headers */
14156 #include <pthread.h>
14157 #if HAVE_PTHREADS < 7
14158 #include <errno.h>
14159 #endif
14160 #ifndef NULL
14161 #define NULL (void*)0
14162 #endif
14163
14164 static void *task(p)
14165         void *p;
14166 {
14167         return (void *) (p == NULL);
14168 }
14169
14170 int main() {
14171
14172         /* pthread test function */
14173 #ifndef PTHREAD_CREATE_DETACHED
14174 #define PTHREAD_CREATE_DETACHED 1
14175 #endif
14176         pthread_t t;
14177         int status;
14178         int detach = PTHREAD_CREATE_DETACHED;
14179
14180 #if HAVE_PTHREADS > 4
14181         /* Final pthreads */
14182         pthread_attr_t attr;
14183
14184         status = pthread_attr_init(&attr);
14185         if( status ) return status;
14186
14187 #if HAVE_PTHREADS < 7
14188         status = pthread_attr_setdetachstate(&attr, &detach);
14189         if( status < 0 ) status = errno;
14190 #else
14191         status = pthread_attr_setdetachstate(&attr, detach);
14192 #endif
14193         if( status ) return status;
14194         status = pthread_create( &t, &attr, task, NULL );
14195 #if HAVE_PTHREADS < 7
14196         if( status < 0 ) status = errno;
14197 #endif
14198         if( status ) return status;
14199 #else
14200         /* Draft 4 pthreads */
14201         status = pthread_create( &t, pthread_attr_default, task, NULL );
14202         if( status ) return errno;
14203
14204         /* give thread a chance to complete */
14205         /* it should remain joinable and hence detachable */
14206         sleep( 1 );
14207
14208         status = pthread_detach( &t );
14209         if( status ) return errno;
14210 #endif
14211
14212 #ifdef HAVE_LINUX_THREADS
14213         pthread_kill_other_threads_np();
14214 #endif
14215
14216         return 0;
14217
14218 ; return 0; }
14219 EOF
14220 if { (eval echo configure:14221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14221   rm -rf conftest*
14222   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14223 else
14224   echo "configure: failed program was:" >&5
14225   cat conftest.$ac_ext >&5
14226   rm -rf conftest*
14227   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14228 fi
14229 rm -f conftest*
14230 else
14231   cat > conftest.$ac_ext <<EOF
14232 #line 14233 "configure"
14233 #include "confdefs.h"
14234 /* pthread test headers */
14235 #include <pthread.h>
14236 #if HAVE_PTHREADS < 7
14237 #include <errno.h>
14238 #endif
14239 #ifndef NULL
14240 #define NULL (void*)0
14241 #endif
14242
14243 static void *task(p)
14244         void *p;
14245 {
14246         return (void *) (p == NULL);
14247 }
14248
14249
14250 int main(argc, argv)
14251         int argc;
14252         char **argv;
14253 {
14254
14255         /* pthread test function */
14256 #ifndef PTHREAD_CREATE_DETACHED
14257 #define PTHREAD_CREATE_DETACHED 1
14258 #endif
14259         pthread_t t;
14260         int status;
14261         int detach = PTHREAD_CREATE_DETACHED;
14262
14263 #if HAVE_PTHREADS > 4
14264         /* Final pthreads */
14265         pthread_attr_t attr;
14266
14267         status = pthread_attr_init(&attr);
14268         if( status ) return status;
14269
14270 #if HAVE_PTHREADS < 7
14271         status = pthread_attr_setdetachstate(&attr, &detach);
14272         if( status < 0 ) status = errno;
14273 #else
14274         status = pthread_attr_setdetachstate(&attr, detach);
14275 #endif
14276         if( status ) return status;
14277         status = pthread_create( &t, &attr, task, NULL );
14278 #if HAVE_PTHREADS < 7
14279         if( status < 0 ) status = errno;
14280 #endif
14281         if( status ) return status;
14282 #else
14283         /* Draft 4 pthreads */
14284         status = pthread_create( &t, pthread_attr_default, task, NULL );
14285         if( status ) return errno;
14286
14287         /* give thread a chance to complete */
14288         /* it should remain joinable and hence detachable */
14289         sleep( 1 );
14290
14291         status = pthread_detach( &t );
14292         if( status ) return errno;
14293 #endif
14294
14295 #ifdef HAVE_LINUX_THREADS
14296         pthread_kill_other_threads_np();
14297 #endif
14298
14299         return 0;
14300
14301 }
14302
14303 EOF
14304 if { (eval echo configure:14305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14305 then
14306   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14307 else
14308   echo "configure: failed program was:" >&5
14309   cat conftest.$ac_ext >&5
14310   rm -fr conftest*
14311   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14312 fi
14313 rm -fr conftest*
14314 fi
14315
14316
14317                 # restore the LIBS
14318                 LIBS="$ol_LIBS"
14319         
14320 fi
14321
14322 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14323
14324         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14325                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14326                 ol_link_threads=posix
14327         fi
14328 fi
14329
14330                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14331 if test "$ol_link_threads" = no ; then
14332         # try -lpthreads -lmach -lexc
14333         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14334 echo "configure:14335: checking for pthread link with -lpthreads -lmach -lexc" >&5
14335 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14336   echo $ac_n "(cached) $ac_c" 1>&6
14337 else
14338   
14339                 # save the flags
14340                 ol_LIBS="$LIBS"
14341                 LIBS="-lpthreads -lmach -lexc $LIBS"
14342
14343                 if test "$cross_compiling" = yes; then
14344   cat > conftest.$ac_ext <<EOF
14345 #line 14346 "configure"
14346 #include "confdefs.h"
14347 /* pthread test headers */
14348 #include <pthread.h>
14349 #if HAVE_PTHREADS < 7
14350 #include <errno.h>
14351 #endif
14352 #ifndef NULL
14353 #define NULL (void*)0
14354 #endif
14355
14356 static void *task(p)
14357         void *p;
14358 {
14359         return (void *) (p == NULL);
14360 }
14361
14362 int main() {
14363
14364         /* pthread test function */
14365 #ifndef PTHREAD_CREATE_DETACHED
14366 #define PTHREAD_CREATE_DETACHED 1
14367 #endif
14368         pthread_t t;
14369         int status;
14370         int detach = PTHREAD_CREATE_DETACHED;
14371
14372 #if HAVE_PTHREADS > 4
14373         /* Final pthreads */
14374         pthread_attr_t attr;
14375
14376         status = pthread_attr_init(&attr);
14377         if( status ) return status;
14378
14379 #if HAVE_PTHREADS < 7
14380         status = pthread_attr_setdetachstate(&attr, &detach);
14381         if( status < 0 ) status = errno;
14382 #else
14383         status = pthread_attr_setdetachstate(&attr, detach);
14384 #endif
14385         if( status ) return status;
14386         status = pthread_create( &t, &attr, task, NULL );
14387 #if HAVE_PTHREADS < 7
14388         if( status < 0 ) status = errno;
14389 #endif
14390         if( status ) return status;
14391 #else
14392         /* Draft 4 pthreads */
14393         status = pthread_create( &t, pthread_attr_default, task, NULL );
14394         if( status ) return errno;
14395
14396         /* give thread a chance to complete */
14397         /* it should remain joinable and hence detachable */
14398         sleep( 1 );
14399
14400         status = pthread_detach( &t );
14401         if( status ) return errno;
14402 #endif
14403
14404 #ifdef HAVE_LINUX_THREADS
14405         pthread_kill_other_threads_np();
14406 #endif
14407
14408         return 0;
14409
14410 ; return 0; }
14411 EOF
14412 if { (eval echo configure:14413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14413   rm -rf conftest*
14414   ol_cv_pthread_lpthreads_lmach_lexc=yes
14415 else
14416   echo "configure: failed program was:" >&5
14417   cat conftest.$ac_ext >&5
14418   rm -rf conftest*
14419   ol_cv_pthread_lpthreads_lmach_lexc=no
14420 fi
14421 rm -f conftest*
14422 else
14423   cat > conftest.$ac_ext <<EOF
14424 #line 14425 "configure"
14425 #include "confdefs.h"
14426 /* pthread test headers */
14427 #include <pthread.h>
14428 #if HAVE_PTHREADS < 7
14429 #include <errno.h>
14430 #endif
14431 #ifndef NULL
14432 #define NULL (void*)0
14433 #endif
14434
14435 static void *task(p)
14436         void *p;
14437 {
14438         return (void *) (p == NULL);
14439 }
14440
14441
14442 int main(argc, argv)
14443         int argc;
14444         char **argv;
14445 {
14446
14447         /* pthread test function */
14448 #ifndef PTHREAD_CREATE_DETACHED
14449 #define PTHREAD_CREATE_DETACHED 1
14450 #endif
14451         pthread_t t;
14452         int status;
14453         int detach = PTHREAD_CREATE_DETACHED;
14454
14455 #if HAVE_PTHREADS > 4
14456         /* Final pthreads */
14457         pthread_attr_t attr;
14458
14459         status = pthread_attr_init(&attr);
14460         if( status ) return status;
14461
14462 #if HAVE_PTHREADS < 7
14463         status = pthread_attr_setdetachstate(&attr, &detach);
14464         if( status < 0 ) status = errno;
14465 #else
14466         status = pthread_attr_setdetachstate(&attr, detach);
14467 #endif
14468         if( status ) return status;
14469         status = pthread_create( &t, &attr, task, NULL );
14470 #if HAVE_PTHREADS < 7
14471         if( status < 0 ) status = errno;
14472 #endif
14473         if( status ) return status;
14474 #else
14475         /* Draft 4 pthreads */
14476         status = pthread_create( &t, pthread_attr_default, task, NULL );
14477         if( status ) return errno;
14478
14479         /* give thread a chance to complete */
14480         /* it should remain joinable and hence detachable */
14481         sleep( 1 );
14482
14483         status = pthread_detach( &t );
14484         if( status ) return errno;
14485 #endif
14486
14487 #ifdef HAVE_LINUX_THREADS
14488         pthread_kill_other_threads_np();
14489 #endif
14490
14491         return 0;
14492
14493 }
14494
14495 EOF
14496 if { (eval echo configure:14497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14497 then
14498   ol_cv_pthread_lpthreads_lmach_lexc=yes
14499 else
14500   echo "configure: failed program was:" >&5
14501   cat conftest.$ac_ext >&5
14502   rm -fr conftest*
14503   ol_cv_pthread_lpthreads_lmach_lexc=no
14504 fi
14505 rm -fr conftest*
14506 fi
14507
14508
14509                 # restore the LIBS
14510                 LIBS="$ol_LIBS"
14511         
14512 fi
14513
14514 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14515
14516         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14517                 ol_link_pthreads="-lpthreads -lmach -lexc"
14518                 ol_link_threads=posix
14519         fi
14520 fi
14521
14522                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14523 if test "$ol_link_threads" = no ; then
14524         # try -lpthreads -lexc
14525         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14526 echo "configure:14527: checking for pthread link with -lpthreads -lexc" >&5
14527 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14528   echo $ac_n "(cached) $ac_c" 1>&6
14529 else
14530   
14531                 # save the flags
14532                 ol_LIBS="$LIBS"
14533                 LIBS="-lpthreads -lexc $LIBS"
14534
14535                 if test "$cross_compiling" = yes; then
14536   cat > conftest.$ac_ext <<EOF
14537 #line 14538 "configure"
14538 #include "confdefs.h"
14539 /* pthread test headers */
14540 #include <pthread.h>
14541 #if HAVE_PTHREADS < 7
14542 #include <errno.h>
14543 #endif
14544 #ifndef NULL
14545 #define NULL (void*)0
14546 #endif
14547
14548 static void *task(p)
14549         void *p;
14550 {
14551         return (void *) (p == NULL);
14552 }
14553
14554 int main() {
14555
14556         /* pthread test function */
14557 #ifndef PTHREAD_CREATE_DETACHED
14558 #define PTHREAD_CREATE_DETACHED 1
14559 #endif
14560         pthread_t t;
14561         int status;
14562         int detach = PTHREAD_CREATE_DETACHED;
14563
14564 #if HAVE_PTHREADS > 4
14565         /* Final pthreads */
14566         pthread_attr_t attr;
14567
14568         status = pthread_attr_init(&attr);
14569         if( status ) return status;
14570
14571 #if HAVE_PTHREADS < 7
14572         status = pthread_attr_setdetachstate(&attr, &detach);
14573         if( status < 0 ) status = errno;
14574 #else
14575         status = pthread_attr_setdetachstate(&attr, detach);
14576 #endif
14577         if( status ) return status;
14578         status = pthread_create( &t, &attr, task, NULL );
14579 #if HAVE_PTHREADS < 7
14580         if( status < 0 ) status = errno;
14581 #endif
14582         if( status ) return status;
14583 #else
14584         /* Draft 4 pthreads */
14585         status = pthread_create( &t, pthread_attr_default, task, NULL );
14586         if( status ) return errno;
14587
14588         /* give thread a chance to complete */
14589         /* it should remain joinable and hence detachable */
14590         sleep( 1 );
14591
14592         status = pthread_detach( &t );
14593         if( status ) return errno;
14594 #endif
14595
14596 #ifdef HAVE_LINUX_THREADS
14597         pthread_kill_other_threads_np();
14598 #endif
14599
14600         return 0;
14601
14602 ; return 0; }
14603 EOF
14604 if { (eval echo configure:14605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14605   rm -rf conftest*
14606   ol_cv_pthread_lpthreads_lexc=yes
14607 else
14608   echo "configure: failed program was:" >&5
14609   cat conftest.$ac_ext >&5
14610   rm -rf conftest*
14611   ol_cv_pthread_lpthreads_lexc=no
14612 fi
14613 rm -f conftest*
14614 else
14615   cat > conftest.$ac_ext <<EOF
14616 #line 14617 "configure"
14617 #include "confdefs.h"
14618 /* pthread test headers */
14619 #include <pthread.h>
14620 #if HAVE_PTHREADS < 7
14621 #include <errno.h>
14622 #endif
14623 #ifndef NULL
14624 #define NULL (void*)0
14625 #endif
14626
14627 static void *task(p)
14628         void *p;
14629 {
14630         return (void *) (p == NULL);
14631 }
14632
14633
14634 int main(argc, argv)
14635         int argc;
14636         char **argv;
14637 {
14638
14639         /* pthread test function */
14640 #ifndef PTHREAD_CREATE_DETACHED
14641 #define PTHREAD_CREATE_DETACHED 1
14642 #endif
14643         pthread_t t;
14644         int status;
14645         int detach = PTHREAD_CREATE_DETACHED;
14646
14647 #if HAVE_PTHREADS > 4
14648         /* Final pthreads */
14649         pthread_attr_t attr;
14650
14651         status = pthread_attr_init(&attr);
14652         if( status ) return status;
14653
14654 #if HAVE_PTHREADS < 7
14655         status = pthread_attr_setdetachstate(&attr, &detach);
14656         if( status < 0 ) status = errno;
14657 #else
14658         status = pthread_attr_setdetachstate(&attr, detach);
14659 #endif
14660         if( status ) return status;
14661         status = pthread_create( &t, &attr, task, NULL );
14662 #if HAVE_PTHREADS < 7
14663         if( status < 0 ) status = errno;
14664 #endif
14665         if( status ) return status;
14666 #else
14667         /* Draft 4 pthreads */
14668         status = pthread_create( &t, pthread_attr_default, task, NULL );
14669         if( status ) return errno;
14670
14671         /* give thread a chance to complete */
14672         /* it should remain joinable and hence detachable */
14673         sleep( 1 );
14674
14675         status = pthread_detach( &t );
14676         if( status ) return errno;
14677 #endif
14678
14679 #ifdef HAVE_LINUX_THREADS
14680         pthread_kill_other_threads_np();
14681 #endif
14682
14683         return 0;
14684
14685 }
14686
14687 EOF
14688 if { (eval echo configure:14689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14689 then
14690   ol_cv_pthread_lpthreads_lexc=yes
14691 else
14692   echo "configure: failed program was:" >&5
14693   cat conftest.$ac_ext >&5
14694   rm -fr conftest*
14695   ol_cv_pthread_lpthreads_lexc=no
14696 fi
14697 rm -fr conftest*
14698 fi
14699
14700
14701                 # restore the LIBS
14702                 LIBS="$ol_LIBS"
14703         
14704 fi
14705
14706 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14707
14708         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14709                 ol_link_pthreads="-lpthreads -lexc"
14710                 ol_link_threads=posix
14711         fi
14712 fi
14713
14714
14715                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14716 if test "$ol_link_threads" = no ; then
14717         # try -lpthreads
14718         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14719 echo "configure:14720: checking for pthread link with -lpthreads" >&5
14720 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14721   echo $ac_n "(cached) $ac_c" 1>&6
14722 else
14723   
14724                 # save the flags
14725                 ol_LIBS="$LIBS"
14726                 LIBS="-lpthreads $LIBS"
14727
14728                 if test "$cross_compiling" = yes; then
14729   cat > conftest.$ac_ext <<EOF
14730 #line 14731 "configure"
14731 #include "confdefs.h"
14732 /* pthread test headers */
14733 #include <pthread.h>
14734 #if HAVE_PTHREADS < 7
14735 #include <errno.h>
14736 #endif
14737 #ifndef NULL
14738 #define NULL (void*)0
14739 #endif
14740
14741 static void *task(p)
14742         void *p;
14743 {
14744         return (void *) (p == NULL);
14745 }
14746
14747 int main() {
14748
14749         /* pthread test function */
14750 #ifndef PTHREAD_CREATE_DETACHED
14751 #define PTHREAD_CREATE_DETACHED 1
14752 #endif
14753         pthread_t t;
14754         int status;
14755         int detach = PTHREAD_CREATE_DETACHED;
14756
14757 #if HAVE_PTHREADS > 4
14758         /* Final pthreads */
14759         pthread_attr_t attr;
14760
14761         status = pthread_attr_init(&attr);
14762         if( status ) return status;
14763
14764 #if HAVE_PTHREADS < 7
14765         status = pthread_attr_setdetachstate(&attr, &detach);
14766         if( status < 0 ) status = errno;
14767 #else
14768         status = pthread_attr_setdetachstate(&attr, detach);
14769 #endif
14770         if( status ) return status;
14771         status = pthread_create( &t, &attr, task, NULL );
14772 #if HAVE_PTHREADS < 7
14773         if( status < 0 ) status = errno;
14774 #endif
14775         if( status ) return status;
14776 #else
14777         /* Draft 4 pthreads */
14778         status = pthread_create( &t, pthread_attr_default, task, NULL );
14779         if( status ) return errno;
14780
14781         /* give thread a chance to complete */
14782         /* it should remain joinable and hence detachable */
14783         sleep( 1 );
14784
14785         status = pthread_detach( &t );
14786         if( status ) return errno;
14787 #endif
14788
14789 #ifdef HAVE_LINUX_THREADS
14790         pthread_kill_other_threads_np();
14791 #endif
14792
14793         return 0;
14794
14795 ; return 0; }
14796 EOF
14797 if { (eval echo configure:14798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14798   rm -rf conftest*
14799   ol_cv_pthread_lib_lpthreads=yes
14800 else
14801   echo "configure: failed program was:" >&5
14802   cat conftest.$ac_ext >&5
14803   rm -rf conftest*
14804   ol_cv_pthread_lib_lpthreads=no
14805 fi
14806 rm -f conftest*
14807 else
14808   cat > conftest.$ac_ext <<EOF
14809 #line 14810 "configure"
14810 #include "confdefs.h"
14811 /* pthread test headers */
14812 #include <pthread.h>
14813 #if HAVE_PTHREADS < 7
14814 #include <errno.h>
14815 #endif
14816 #ifndef NULL
14817 #define NULL (void*)0
14818 #endif
14819
14820 static void *task(p)
14821         void *p;
14822 {
14823         return (void *) (p == NULL);
14824 }
14825
14826
14827 int main(argc, argv)
14828         int argc;
14829         char **argv;
14830 {
14831
14832         /* pthread test function */
14833 #ifndef PTHREAD_CREATE_DETACHED
14834 #define PTHREAD_CREATE_DETACHED 1
14835 #endif
14836         pthread_t t;
14837         int status;
14838         int detach = PTHREAD_CREATE_DETACHED;
14839
14840 #if HAVE_PTHREADS > 4
14841         /* Final pthreads */
14842         pthread_attr_t attr;
14843
14844         status = pthread_attr_init(&attr);
14845         if( status ) return status;
14846
14847 #if HAVE_PTHREADS < 7
14848         status = pthread_attr_setdetachstate(&attr, &detach);
14849         if( status < 0 ) status = errno;
14850 #else
14851         status = pthread_attr_setdetachstate(&attr, detach);
14852 #endif
14853         if( status ) return status;
14854         status = pthread_create( &t, &attr, task, NULL );
14855 #if HAVE_PTHREADS < 7
14856         if( status < 0 ) status = errno;
14857 #endif
14858         if( status ) return status;
14859 #else
14860         /* Draft 4 pthreads */
14861         status = pthread_create( &t, pthread_attr_default, task, NULL );
14862         if( status ) return errno;
14863
14864         /* give thread a chance to complete */
14865         /* it should remain joinable and hence detachable */
14866         sleep( 1 );
14867
14868         status = pthread_detach( &t );
14869         if( status ) return errno;
14870 #endif
14871
14872 #ifdef HAVE_LINUX_THREADS
14873         pthread_kill_other_threads_np();
14874 #endif
14875
14876         return 0;
14877
14878 }
14879
14880 EOF
14881 if { (eval echo configure:14882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14882 then
14883   ol_cv_pthread_lib_lpthreads=yes
14884 else
14885   echo "configure: failed program was:" >&5
14886   cat conftest.$ac_ext >&5
14887   rm -fr conftest*
14888   ol_cv_pthread_lib_lpthreads=no
14889 fi
14890 rm -fr conftest*
14891 fi
14892
14893
14894                 # restore the LIBS
14895                 LIBS="$ol_LIBS"
14896         
14897 fi
14898
14899 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14900
14901         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14902                 ol_link_pthreads="-lpthreads"
14903                 ol_link_threads=posix
14904         fi
14905 fi
14906
14907
14908                 if test $ol_link_threads != no ; then
14909                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14910
14911                                                 save_CPPFLAGS="$CPPFLAGS"
14912                         save_LIBS="$LIBS"
14913                         LIBS="$LTHREAD_LIBS $LIBS"
14914
14915                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14916 do
14917 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14918 echo "configure:14919: checking for $ac_func" >&5
14919 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14920   echo $ac_n "(cached) $ac_c" 1>&6
14921 else
14922   cat > conftest.$ac_ext <<EOF
14923 #line 14924 "configure"
14924 #include "confdefs.h"
14925 /* System header to define __stub macros and hopefully few prototypes,
14926     which can conflict with char $ac_func(); below.  */
14927 #include <assert.h>
14928 /* Override any gcc2 internal prototype to avoid an error.  */
14929 /* We use char because int might match the return type of a gcc2
14930     builtin and then its argument prototype would still apply.  */
14931 char $ac_func();
14932 char (*f)();
14933
14934 int main() {
14935
14936 /* The GNU C library defines this for functions which it implements
14937     to always fail with ENOSYS.  Some functions are actually named
14938     something starting with __ and the normal name is an alias.  */
14939 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14940 choke me
14941 #else
14942 f = $ac_func;
14943 #endif
14944
14945 ; return 0; }
14946 EOF
14947 if { (eval echo configure:14948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14948   rm -rf conftest*
14949   eval "ac_cv_func_$ac_func=yes"
14950 else
14951   echo "configure: failed program was:" >&5
14952   cat conftest.$ac_ext >&5
14953   rm -rf conftest*
14954   eval "ac_cv_func_$ac_func=no"
14955 fi
14956 rm -f conftest*
14957 fi
14958
14959 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14960   echo "$ac_t""yes" 1>&6
14961     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14962   cat >> confdefs.h <<EOF
14963 #define $ac_tr_func 1
14964 EOF
14965  
14966 else
14967   echo "$ac_t""no" 1>&6
14968 fi
14969 done
14970
14971
14972                         if test $ac_cv_func_sched_yield = no -a \
14973                                 $ac_cv_func_pthread_yield = no -a \
14974                                 $ac_cv_func_thr_yield = no ; then
14975                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14976 echo "configure:14977: checking for sched_yield in -lrt" >&5
14977 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14978 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14979   echo $ac_n "(cached) $ac_c" 1>&6
14980 else
14981   ac_save_LIBS="$LIBS"
14982 LIBS="-lrt  $LIBS"
14983 cat > conftest.$ac_ext <<EOF
14984 #line 14985 "configure"
14985 #include "confdefs.h"
14986 /* Override any gcc2 internal prototype to avoid an error.  */
14987 /* We use char because int might match the return type of a gcc2
14988     builtin and then its argument prototype would still apply.  */
14989 char sched_yield();
14990
14991 int main() {
14992 sched_yield()
14993 ; return 0; }
14994 EOF
14995 if { (eval echo configure:14996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14996   rm -rf conftest*
14997   eval "ac_cv_lib_$ac_lib_var=yes"
14998 else
14999   echo "configure: failed program was:" >&5
15000   cat conftest.$ac_ext >&5
15001   rm -rf conftest*
15002   eval "ac_cv_lib_$ac_lib_var=no"
15003 fi
15004 rm -f conftest*
15005 LIBS="$ac_save_LIBS"
15006
15007 fi
15008 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15009   echo "$ac_t""yes" 1>&6
15010   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
15011                                         cat >> confdefs.h <<\EOF
15012 #define HAVE_SCHED_YIELD 1
15013 EOF
15014
15015                                         ac_cv_func_sched_yield=yes
15016 else
15017   echo "$ac_t""no" 1>&6
15018 ac_cv_func_sched_yield=no
15019 fi
15020
15021                         fi
15022                         if test $ac_cv_func_sched_yield = no -a \
15023                                 $ac_cv_func_pthread_yield = no -a \
15024                                 "$ac_cv_func_thr_yield" = no ; then
15025                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
15026                         fi
15027
15028                                                 for ac_func in pthread_kill pthread_rwlock_destroy
15029 do
15030 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15031 echo "configure:15032: checking for $ac_func" >&5
15032 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15033   echo $ac_n "(cached) $ac_c" 1>&6
15034 else
15035   cat > conftest.$ac_ext <<EOF
15036 #line 15037 "configure"
15037 #include "confdefs.h"
15038 /* System header to define __stub macros and hopefully few prototypes,
15039     which can conflict with char $ac_func(); below.  */
15040 #include <assert.h>
15041 /* Override any gcc2 internal prototype to avoid an error.  */
15042 /* We use char because int might match the return type of a gcc2
15043     builtin and then its argument prototype would still apply.  */
15044 char $ac_func();
15045 char (*f)();
15046
15047 int main() {
15048
15049 /* The GNU C library defines this for functions which it implements
15050     to always fail with ENOSYS.  Some functions are actually named
15051     something starting with __ and the normal name is an alias.  */
15052 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15053 choke me
15054 #else
15055 f = $ac_func;
15056 #endif
15057
15058 ; return 0; }
15059 EOF
15060 if { (eval echo configure:15061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15061   rm -rf conftest*
15062   eval "ac_cv_func_$ac_func=yes"
15063 else
15064   echo "configure: failed program was:" >&5
15065   cat conftest.$ac_ext >&5
15066   rm -rf conftest*
15067   eval "ac_cv_func_$ac_func=no"
15068 fi
15069 rm -f conftest*
15070 fi
15071
15072 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15073   echo "$ac_t""yes" 1>&6
15074     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15075   cat >> confdefs.h <<EOF
15076 #define $ac_tr_func 1
15077 EOF
15078  
15079 else
15080   echo "$ac_t""no" 1>&6
15081 fi
15082 done
15083
15084
15085                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
15086 echo "configure:15087: checking for pthread_detach with <pthread.h>" >&5
15087 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
15088   echo $ac_n "(cached) $ac_c" 1>&6
15089 else
15090   
15091                                                                 cat > conftest.$ac_ext <<EOF
15092 #line 15093 "configure"
15093 #include "confdefs.h"
15094
15095 #include <pthread.h>
15096 #ifndef NULL
15097 #define NULL (void*)0
15098 #endif
15099
15100 int main() {
15101 pthread_detach(NULL);
15102 ; return 0; }
15103 EOF
15104 if { (eval echo configure:15105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15105   rm -rf conftest*
15106   ol_cv_func_pthread_detach=yes
15107 else
15108   echo "configure: failed program was:" >&5
15109   cat conftest.$ac_ext >&5
15110   rm -rf conftest*
15111   ol_cv_func_pthread_detach=no
15112 fi
15113 rm -f conftest*
15114                         
15115 fi
15116
15117 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15118
15119                         if test $ol_cv_func_pthread_detach = no ; then
15120                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15121                         fi
15122
15123                         cat >> confdefs.h <<\EOF
15124 #define HAVE_PTHREAD_DETACH 1
15125 EOF
15126
15127
15128                                                 for ac_func in \
15129                                 pthread_setconcurrency \
15130                                 pthread_getconcurrency \
15131                                 thr_setconcurrency \
15132                                 thr_getconcurrency \
15133                         
15134 do
15135 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15136 echo "configure:15137: checking for $ac_func" >&5
15137 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15138   echo $ac_n "(cached) $ac_c" 1>&6
15139 else
15140   cat > conftest.$ac_ext <<EOF
15141 #line 15142 "configure"
15142 #include "confdefs.h"
15143 /* System header to define __stub macros and hopefully few prototypes,
15144     which can conflict with char $ac_func(); below.  */
15145 #include <assert.h>
15146 /* Override any gcc2 internal prototype to avoid an error.  */
15147 /* We use char because int might match the return type of a gcc2
15148     builtin and then its argument prototype would still apply.  */
15149 char $ac_func();
15150 char (*f)();
15151
15152 int main() {
15153
15154 /* The GNU C library defines this for functions which it implements
15155     to always fail with ENOSYS.  Some functions are actually named
15156     something starting with __ and the normal name is an alias.  */
15157 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15158 choke me
15159 #else
15160 f = $ac_func;
15161 #endif
15162
15163 ; return 0; }
15164 EOF
15165 if { (eval echo configure:15166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15166   rm -rf conftest*
15167   eval "ac_cv_func_$ac_func=yes"
15168 else
15169   echo "configure: failed program was:" >&5
15170   cat conftest.$ac_ext >&5
15171   rm -rf conftest*
15172   eval "ac_cv_func_$ac_func=no"
15173 fi
15174 rm -f conftest*
15175 fi
15176
15177 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15178   echo "$ac_t""yes" 1>&6
15179     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15180   cat >> confdefs.h <<EOF
15181 #define $ac_tr_func 1
15182 EOF
15183  
15184 else
15185   echo "$ac_t""no" 1>&6
15186 fi
15187 done
15188
15189
15190                         
15191         for ac_func in pthread_kill_other_threads_np
15192 do
15193 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15194 echo "configure:15195: checking for $ac_func" >&5
15195 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15196   echo $ac_n "(cached) $ac_c" 1>&6
15197 else
15198   cat > conftest.$ac_ext <<EOF
15199 #line 15200 "configure"
15200 #include "confdefs.h"
15201 /* System header to define __stub macros and hopefully few prototypes,
15202     which can conflict with char $ac_func(); below.  */
15203 #include <assert.h>
15204 /* Override any gcc2 internal prototype to avoid an error.  */
15205 /* We use char because int might match the return type of a gcc2
15206     builtin and then its argument prototype would still apply.  */
15207 char $ac_func();
15208 char (*f)();
15209
15210 int main() {
15211
15212 /* The GNU C library defines this for functions which it implements
15213     to always fail with ENOSYS.  Some functions are actually named
15214     something starting with __ and the normal name is an alias.  */
15215 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15216 choke me
15217 #else
15218 f = $ac_func;
15219 #endif
15220
15221 ; return 0; }
15222 EOF
15223 if { (eval echo configure:15224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15224   rm -rf conftest*
15225   eval "ac_cv_func_$ac_func=yes"
15226 else
15227   echo "configure: failed program was:" >&5
15228   cat conftest.$ac_ext >&5
15229   rm -rf conftest*
15230   eval "ac_cv_func_$ac_func=no"
15231 fi
15232 rm -f conftest*
15233 fi
15234
15235 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15236   echo "$ac_t""yes" 1>&6
15237     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15238   cat >> confdefs.h <<EOF
15239 #define $ac_tr_func 1
15240 EOF
15241  
15242 else
15243   echo "$ac_t""no" 1>&6
15244 fi
15245 done
15246
15247         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15248 echo "configure:15249: checking for LinuxThreads implementation" >&5
15249 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15250   echo $ac_n "(cached) $ac_c" 1>&6
15251 else
15252   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15253 fi
15254
15255 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15256
15257                         
15258         
15259         
15260         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15261 echo "configure:15262: checking for LinuxThreads consistency" >&5
15262 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15263   echo $ac_n "(cached) $ac_c" 1>&6
15264 else
15265   
15266                 if test $ol_cv_header_linux_threads = yes -a \
15267                         $ol_cv_sys_linux_threads = yes; then
15268                         ol_cv_linux_threads=yes
15269                 elif test $ol_cv_header_linux_threads = no -a \
15270                         $ol_cv_sys_linux_threads = no; then
15271                         ol_cv_linux_threads=no
15272                 else
15273                         ol_cv_linux_threads=error
15274                 fi
15275         
15276 fi
15277
15278 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15279
15280
15281                         if test $ol_cv_linux_threads = error; then
15282                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15283                         fi
15284
15285                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15286 echo "configure:15287: checking if pthread_create() works" >&5
15287 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15288   echo $ac_n "(cached) $ac_c" 1>&6
15289 else
15290   
15291                         if test "$cross_compiling" = yes; then
15292                                 ol_cv_pthread_create_works=yes
15293 else
15294   cat > conftest.$ac_ext <<EOF
15295 #line 15296 "configure"
15296 #include "confdefs.h"
15297 /* pthread test headers */
15298 #include <pthread.h>
15299 #if HAVE_PTHREADS < 7
15300 #include <errno.h>
15301 #endif
15302 #ifndef NULL
15303 #define NULL (void*)0
15304 #endif
15305
15306 static void *task(p)
15307         void *p;
15308 {
15309         return (void *) (p == NULL);
15310 }
15311
15312
15313 int main(argc, argv)
15314         int argc;
15315         char **argv;
15316 {
15317
15318         /* pthread test function */
15319 #ifndef PTHREAD_CREATE_DETACHED
15320 #define PTHREAD_CREATE_DETACHED 1
15321 #endif
15322         pthread_t t;
15323         int status;
15324         int detach = PTHREAD_CREATE_DETACHED;
15325
15326 #if HAVE_PTHREADS > 4
15327         /* Final pthreads */
15328         pthread_attr_t attr;
15329
15330         status = pthread_attr_init(&attr);
15331         if( status ) return status;
15332
15333 #if HAVE_PTHREADS < 7
15334         status = pthread_attr_setdetachstate(&attr, &detach);
15335         if( status < 0 ) status = errno;
15336 #else
15337         status = pthread_attr_setdetachstate(&attr, detach);
15338 #endif
15339         if( status ) return status;
15340         status = pthread_create( &t, &attr, task, NULL );
15341 #if HAVE_PTHREADS < 7
15342         if( status < 0 ) status = errno;
15343 #endif
15344         if( status ) return status;
15345 #else
15346         /* Draft 4 pthreads */
15347         status = pthread_create( &t, pthread_attr_default, task, NULL );
15348         if( status ) return errno;
15349
15350         /* give thread a chance to complete */
15351         /* it should remain joinable and hence detachable */
15352         sleep( 1 );
15353
15354         status = pthread_detach( &t );
15355         if( status ) return errno;
15356 #endif
15357
15358 #ifdef HAVE_LINUX_THREADS
15359         pthread_kill_other_threads_np();
15360 #endif
15361
15362         return 0;
15363
15364 }
15365
15366 EOF
15367 if { (eval echo configure:15368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15368 then
15369   ol_cv_pthread_create_works=yes
15370 else
15371   echo "configure: failed program was:" >&5
15372   cat conftest.$ac_ext >&5
15373   rm -fr conftest*
15374   ol_cv_pthread_create_works=no
15375 fi
15376 rm -fr conftest*
15377 fi
15378
15379 fi
15380
15381 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15382
15383                         if test $ol_cv_pthread_create_works = no ; then
15384                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15385                         fi
15386
15387                                                 if test $ol_with_yielding_select = auto ; then
15388                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15389 echo "configure:15390: checking if select yields when using pthreads" >&5
15390 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15391   echo $ac_n "(cached) $ac_c" 1>&6
15392 else
15393   
15394                                 if test "$cross_compiling" = yes; then
15395   ol_cv_pthread_select_yields=cross
15396 else
15397   cat > conftest.$ac_ext <<EOF
15398 #line 15399 "configure"
15399 #include "confdefs.h"
15400
15401 #include <sys/types.h>
15402 #include <sys/time.h>
15403 #include <unistd.h>
15404 #include <pthread.h>
15405 #ifndef NULL
15406 #define NULL (void*) 0
15407 #endif
15408
15409 static int fildes[2];
15410
15411 static void *task(p)
15412         void *p;
15413 {
15414         int i;
15415         struct timeval tv;
15416
15417         fd_set rfds;
15418
15419         tv.tv_sec=10;
15420         tv.tv_usec=0;
15421
15422         FD_ZERO(&rfds);
15423         FD_SET(fildes[0], &rfds);
15424
15425         /* we're not interested in any fds */
15426         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15427
15428         if(i < 0) {
15429                 perror("select");
15430                 exit(10);
15431         }
15432
15433         exit(0); /* if we exit here, the select blocked the whole process */
15434 }
15435
15436 int main(argc, argv)
15437         int argc;
15438         char **argv;
15439 {
15440         pthread_t t;
15441
15442         /* create a pipe to select */
15443         if(pipe(&fildes[0])) {
15444                 perror("select");
15445                 exit(1);
15446         }
15447
15448 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15449         (void) pthread_setconcurrency(2);
15450 #else
15451 #ifdef HAVE_THR_SETCONCURRENCY
15452         /* Set Solaris LWP concurrency to 2 */
15453         thr_setconcurrency(2);
15454 #endif
15455 #endif
15456
15457 #if HAVE_PTHREADS < 6
15458         pthread_create(&t, pthread_attr_default, task, NULL);
15459 #else
15460         pthread_create(&t, NULL, task, NULL);
15461 #endif
15462
15463         /* make sure task runs first */
15464 #if HAVE_THR_YIELD
15465         thr_yield();
15466 #elif defined( HAVE_SCHED_YIELD )
15467         sched_yield();
15468 #elif defined( HAVE_PTHREAD_YIELD )
15469         pthread_yield();
15470 #endif
15471
15472         exit(2);
15473 }
15474 EOF
15475 if { (eval echo configure:15476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15476 then
15477   ol_cv_pthread_select_yields=no
15478 else
15479   echo "configure: failed program was:" >&5
15480   cat conftest.$ac_ext >&5
15481   rm -fr conftest*
15482   ol_cv_pthread_select_yields=yes
15483 fi
15484 rm -fr conftest*
15485 fi
15486
15487 fi
15488
15489 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15490
15491                                 if test $ol_cv_pthread_select_yields = cross ; then
15492                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15493                                 fi
15494
15495                                 if test $ol_cv_pthread_select_yields = yes ; then
15496                                         ol_with_yielding_select=yes
15497                                 fi
15498                         fi
15499
15500                                                 CPPFLAGS="$save_CPPFLAGS"
15501                         LIBS="$save_LIBS"
15502                 else
15503                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15504                 fi
15505         fi
15506
15507         if test $ol_with_threads = posix ; then
15508                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15509         fi
15510 fi
15511
15512 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15513         -o $ol_with_threads = mach ; then
15514
15515                 for ac_hdr in mach/cthreads.h cthreads.h
15516 do
15517 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15518 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15519 echo "configure:15520: checking for $ac_hdr" >&5
15520 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15521   echo $ac_n "(cached) $ac_c" 1>&6
15522 else
15523   cat > conftest.$ac_ext <<EOF
15524 #line 15525 "configure"
15525 #include "confdefs.h"
15526 #include <$ac_hdr>
15527 EOF
15528 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15529 { (eval echo configure:15530: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15530 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15531 if test -z "$ac_err"; then
15532   rm -rf conftest*
15533   eval "ac_cv_header_$ac_safe=yes"
15534 else
15535   echo "$ac_err" >&5
15536   echo "configure: failed program was:" >&5
15537   cat conftest.$ac_ext >&5
15538   rm -rf conftest*
15539   eval "ac_cv_header_$ac_safe=no"
15540 fi
15541 rm -f conftest*
15542 fi
15543 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15544   echo "$ac_t""yes" 1>&6
15545     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15546   cat >> confdefs.h <<EOF
15547 #define $ac_tr_hdr 1
15548 EOF
15549  
15550 else
15551   echo "$ac_t""no" 1>&6
15552 fi
15553 done
15554
15555         if test $ac_cv_header_mach_cthreads_h = yes ; then
15556                 ol_with_threads=found
15557
15558                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15559 echo "configure:15560: checking for cthread_fork" >&5
15560 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15561   echo $ac_n "(cached) $ac_c" 1>&6
15562 else
15563   cat > conftest.$ac_ext <<EOF
15564 #line 15565 "configure"
15565 #include "confdefs.h"
15566 /* System header to define __stub macros and hopefully few prototypes,
15567     which can conflict with char cthread_fork(); below.  */
15568 #include <assert.h>
15569 /* Override any gcc2 internal prototype to avoid an error.  */
15570 /* We use char because int might match the return type of a gcc2
15571     builtin and then its argument prototype would still apply.  */
15572 char cthread_fork();
15573 char (*f)();
15574
15575 int main() {
15576
15577 /* The GNU C library defines this for functions which it implements
15578     to always fail with ENOSYS.  Some functions are actually named
15579     something starting with __ and the normal name is an alias.  */
15580 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15581 choke me
15582 #else
15583 f = cthread_fork;
15584 #endif
15585
15586 ; return 0; }
15587 EOF
15588 if { (eval echo configure:15589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15589   rm -rf conftest*
15590   eval "ac_cv_func_cthread_fork=yes"
15591 else
15592   echo "configure: failed program was:" >&5
15593   cat conftest.$ac_ext >&5
15594   rm -rf conftest*
15595   eval "ac_cv_func_cthread_fork=no"
15596 fi
15597 rm -f conftest*
15598 fi
15599
15600 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15601   echo "$ac_t""yes" 1>&6
15602   ol_link_threads=yes
15603 else
15604   echo "$ac_t""no" 1>&6
15605 fi
15606
15607
15608                 if test $ol_link_threads = no ; then
15609                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15610 echo "configure:15611: checking for cthread_fork with -all_load" >&5
15611 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15612   echo $ac_n "(cached) $ac_c" 1>&6
15613 else
15614   
15615                                                                 save_LIBS="$LIBS"
15616                                 LIBS="-all_load $LIBS"
15617                                 cat > conftest.$ac_ext <<EOF
15618 #line 15619 "configure"
15619 #include "confdefs.h"
15620 #include <mach/cthreads.h>
15621 int main() {
15622
15623                                         cthread_fork((void *)0, (void *)0);
15624                                         
15625 ; return 0; }
15626 EOF
15627 if { (eval echo configure:15628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15628   rm -rf conftest*
15629   ol_cv_cthread_all_load=yes
15630 else
15631   echo "configure: failed program was:" >&5
15632   cat conftest.$ac_ext >&5
15633   rm -rf conftest*
15634   ol_cv_cthread_all_load=no
15635 fi
15636 rm -f conftest*
15637                                                                 LIBS="$save_LIBS"
15638                         
15639 fi
15640
15641 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15642
15643                         if test $ol_cv_cthread_all_load = yes ; then
15644                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15645                                 ol_link_threads=mach
15646                                 ol_with_threads=found
15647                         fi
15648                 fi
15649
15650         elif test $ac_cv_header_cthreads_h = yes ; then
15651                                 
15652                 ol_with_threads=found
15653  
15654                                 save_LIBS="$LIBS"
15655                 LIBS="$LIBS -lthreads"
15656                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15657 echo "configure:15658: checking for cthread_fork" >&5
15658 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15659   echo $ac_n "(cached) $ac_c" 1>&6
15660 else
15661   cat > conftest.$ac_ext <<EOF
15662 #line 15663 "configure"
15663 #include "confdefs.h"
15664 /* System header to define __stub macros and hopefully few prototypes,
15665     which can conflict with char cthread_fork(); below.  */
15666 #include <assert.h>
15667 /* Override any gcc2 internal prototype to avoid an error.  */
15668 /* We use char because int might match the return type of a gcc2
15669     builtin and then its argument prototype would still apply.  */
15670 char cthread_fork();
15671 char (*f)();
15672
15673 int main() {
15674
15675 /* The GNU C library defines this for functions which it implements
15676     to always fail with ENOSYS.  Some functions are actually named
15677     something starting with __ and the normal name is an alias.  */
15678 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15679 choke me
15680 #else
15681 f = cthread_fork;
15682 #endif
15683
15684 ; return 0; }
15685 EOF
15686 if { (eval echo configure:15687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15687   rm -rf conftest*
15688   eval "ac_cv_func_cthread_fork=yes"
15689 else
15690   echo "configure: failed program was:" >&5
15691   cat conftest.$ac_ext >&5
15692   rm -rf conftest*
15693   eval "ac_cv_func_cthread_fork=no"
15694 fi
15695 rm -f conftest*
15696 fi
15697
15698 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15699   echo "$ac_t""yes" 1>&6
15700   ol_link_threads=yes
15701 else
15702   echo "$ac_t""no" 1>&6
15703 fi
15704
15705                 LIBS="$save_LIBS"
15706
15707                 if test $ol_link_threads = yes ; then
15708                         LTHREAD_LIBS="-lthreads"
15709                         ol_link_threads=mach
15710                         ol_with_threads=found
15711                 else
15712                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15713                 fi
15714
15715         elif test $ol_with_threads = mach ; then
15716                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15717         fi
15718
15719         if test $ol_link_threads = mach ; then
15720                 cat >> confdefs.h <<\EOF
15721 #define HAVE_MACH_CTHREADS 1
15722 EOF
15723
15724         elif test $ol_with_threads = found ; then
15725                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15726         fi
15727 fi
15728
15729 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15730         -o $ol_with_threads = pth ; then
15731
15732         for ac_hdr in pth.h
15733 do
15734 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15735 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15736 echo "configure:15737: checking for $ac_hdr" >&5
15737 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15738   echo $ac_n "(cached) $ac_c" 1>&6
15739 else
15740   cat > conftest.$ac_ext <<EOF
15741 #line 15742 "configure"
15742 #include "confdefs.h"
15743 #include <$ac_hdr>
15744 EOF
15745 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15746 { (eval echo configure:15747: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15747 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15748 if test -z "$ac_err"; then
15749   rm -rf conftest*
15750   eval "ac_cv_header_$ac_safe=yes"
15751 else
15752   echo "$ac_err" >&5
15753   echo "configure: failed program was:" >&5
15754   cat conftest.$ac_ext >&5
15755   rm -rf conftest*
15756   eval "ac_cv_header_$ac_safe=no"
15757 fi
15758 rm -f conftest*
15759 fi
15760 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15761   echo "$ac_t""yes" 1>&6
15762     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15763   cat >> confdefs.h <<EOF
15764 #define $ac_tr_hdr 1
15765 EOF
15766  
15767 else
15768   echo "$ac_t""no" 1>&6
15769 fi
15770 done
15771
15772
15773         if test $ac_cv_header_pth_h = yes ; then
15774                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15775 echo "configure:15776: checking for pth_version in -lpth" >&5
15776 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15777 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15778   echo $ac_n "(cached) $ac_c" 1>&6
15779 else
15780   ac_save_LIBS="$LIBS"
15781 LIBS="-lpth  $LIBS"
15782 cat > conftest.$ac_ext <<EOF
15783 #line 15784 "configure"
15784 #include "confdefs.h"
15785 /* Override any gcc2 internal prototype to avoid an error.  */
15786 /* We use char because int might match the return type of a gcc2
15787     builtin and then its argument prototype would still apply.  */
15788 char pth_version();
15789
15790 int main() {
15791 pth_version()
15792 ; return 0; }
15793 EOF
15794 if { (eval echo configure:15795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15795   rm -rf conftest*
15796   eval "ac_cv_lib_$ac_lib_var=yes"
15797 else
15798   echo "configure: failed program was:" >&5
15799   cat conftest.$ac_ext >&5
15800   rm -rf conftest*
15801   eval "ac_cv_lib_$ac_lib_var=no"
15802 fi
15803 rm -f conftest*
15804 LIBS="$ac_save_LIBS"
15805
15806 fi
15807 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15808   echo "$ac_t""yes" 1>&6
15809   have_pth=yes
15810 else
15811   echo "$ac_t""no" 1>&6
15812 have_pth=no
15813 fi
15814
15815
15816                 if test $have_pth = yes ; then
15817                         cat >> confdefs.h <<\EOF
15818 #define HAVE_GNU_PTH 1
15819 EOF
15820
15821                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15822                         ol_link_threads=pth
15823                         ol_with_threads=found
15824
15825                         if test $ol_with_yielding_select = auto ; then
15826                                 ol_with_yielding_select=yes
15827                         fi
15828                 fi
15829         fi
15830 fi
15831
15832 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15833         -o $ol_with_threads = lwp ; then
15834
15835                 for ac_hdr in thread.h synch.h
15836 do
15837 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15838 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15839 echo "configure:15840: checking for $ac_hdr" >&5
15840 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15841   echo $ac_n "(cached) $ac_c" 1>&6
15842 else
15843   cat > conftest.$ac_ext <<EOF
15844 #line 15845 "configure"
15845 #include "confdefs.h"
15846 #include <$ac_hdr>
15847 EOF
15848 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15849 { (eval echo configure:15850: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15850 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15851 if test -z "$ac_err"; then
15852   rm -rf conftest*
15853   eval "ac_cv_header_$ac_safe=yes"
15854 else
15855   echo "$ac_err" >&5
15856   echo "configure: failed program was:" >&5
15857   cat conftest.$ac_ext >&5
15858   rm -rf conftest*
15859   eval "ac_cv_header_$ac_safe=no"
15860 fi
15861 rm -f conftest*
15862 fi
15863 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15864   echo "$ac_t""yes" 1>&6
15865     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15866   cat >> confdefs.h <<EOF
15867 #define $ac_tr_hdr 1
15868 EOF
15869  
15870 else
15871   echo "$ac_t""no" 1>&6
15872 fi
15873 done
15874
15875         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15876                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15877 echo "configure:15878: checking for thr_create in -lthread" >&5
15878 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15879 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15880   echo $ac_n "(cached) $ac_c" 1>&6
15881 else
15882   ac_save_LIBS="$LIBS"
15883 LIBS="-lthread  $LIBS"
15884 cat > conftest.$ac_ext <<EOF
15885 #line 15886 "configure"
15886 #include "confdefs.h"
15887 /* Override any gcc2 internal prototype to avoid an error.  */
15888 /* We use char because int might match the return type of a gcc2
15889     builtin and then its argument prototype would still apply.  */
15890 char thr_create();
15891
15892 int main() {
15893 thr_create()
15894 ; return 0; }
15895 EOF
15896 if { (eval echo configure:15897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15897   rm -rf conftest*
15898   eval "ac_cv_lib_$ac_lib_var=yes"
15899 else
15900   echo "configure: failed program was:" >&5
15901   cat conftest.$ac_ext >&5
15902   rm -rf conftest*
15903   eval "ac_cv_lib_$ac_lib_var=no"
15904 fi
15905 rm -f conftest*
15906 LIBS="$ac_save_LIBS"
15907
15908 fi
15909 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15910   echo "$ac_t""yes" 1>&6
15911   have_thr=yes
15912 else
15913   echo "$ac_t""no" 1>&6
15914 have_thr=no
15915 fi
15916
15917
15918                 if test $have_thr = yes ; then
15919                         cat >> confdefs.h <<\EOF
15920 #define HAVE_THR 1
15921 EOF
15922
15923                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15924                         ol_link_threads=thr
15925
15926                         if test $ol_with_yielding_select = auto ; then
15927                                 ol_with_yielding_select=yes
15928                         fi
15929
15930                                                 for ac_func in \
15931                                 thr_setconcurrency \
15932                                 thr_getconcurrency \
15933                         
15934 do
15935 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15936 echo "configure:15937: checking for $ac_func" >&5
15937 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15938   echo $ac_n "(cached) $ac_c" 1>&6
15939 else
15940   cat > conftest.$ac_ext <<EOF
15941 #line 15942 "configure"
15942 #include "confdefs.h"
15943 /* System header to define __stub macros and hopefully few prototypes,
15944     which can conflict with char $ac_func(); below.  */
15945 #include <assert.h>
15946 /* Override any gcc2 internal prototype to avoid an error.  */
15947 /* We use char because int might match the return type of a gcc2
15948     builtin and then its argument prototype would still apply.  */
15949 char $ac_func();
15950 char (*f)();
15951
15952 int main() {
15953
15954 /* The GNU C library defines this for functions which it implements
15955     to always fail with ENOSYS.  Some functions are actually named
15956     something starting with __ and the normal name is an alias.  */
15957 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15958 choke me
15959 #else
15960 f = $ac_func;
15961 #endif
15962
15963 ; return 0; }
15964 EOF
15965 if { (eval echo configure:15966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15966   rm -rf conftest*
15967   eval "ac_cv_func_$ac_func=yes"
15968 else
15969   echo "configure: failed program was:" >&5
15970   cat conftest.$ac_ext >&5
15971   rm -rf conftest*
15972   eval "ac_cv_func_$ac_func=no"
15973 fi
15974 rm -f conftest*
15975 fi
15976
15977 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15978   echo "$ac_t""yes" 1>&6
15979     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15980   cat >> confdefs.h <<EOF
15981 #define $ac_tr_func 1
15982 EOF
15983  
15984 else
15985   echo "$ac_t""no" 1>&6
15986 fi
15987 done
15988
15989                 fi
15990         fi
15991
15992                 for ac_hdr in lwp/lwp.h
15993 do
15994 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15995 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15996 echo "configure:15997: checking for $ac_hdr" >&5
15997 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15998   echo $ac_n "(cached) $ac_c" 1>&6
15999 else
16000   cat > conftest.$ac_ext <<EOF
16001 #line 16002 "configure"
16002 #include "confdefs.h"
16003 #include <$ac_hdr>
16004 EOF
16005 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16006 { (eval echo configure:16007: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16007 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16008 if test -z "$ac_err"; then
16009   rm -rf conftest*
16010   eval "ac_cv_header_$ac_safe=yes"
16011 else
16012   echo "$ac_err" >&5
16013   echo "configure: failed program was:" >&5
16014   cat conftest.$ac_ext >&5
16015   rm -rf conftest*
16016   eval "ac_cv_header_$ac_safe=no"
16017 fi
16018 rm -f conftest*
16019 fi
16020 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16021   echo "$ac_t""yes" 1>&6
16022     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16023   cat >> confdefs.h <<EOF
16024 #define $ac_tr_hdr 1
16025 EOF
16026  
16027 else
16028   echo "$ac_t""no" 1>&6
16029 fi
16030 done
16031
16032         if test $ac_cv_header_lwp_lwp_h = yes ; then
16033                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
16034 echo "configure:16035: checking for lwp_create in -llwp" >&5
16035 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
16036 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16037   echo $ac_n "(cached) $ac_c" 1>&6
16038 else
16039   ac_save_LIBS="$LIBS"
16040 LIBS="-llwp  $LIBS"
16041 cat > conftest.$ac_ext <<EOF
16042 #line 16043 "configure"
16043 #include "confdefs.h"
16044 /* Override any gcc2 internal prototype to avoid an error.  */
16045 /* We use char because int might match the return type of a gcc2
16046     builtin and then its argument prototype would still apply.  */
16047 char lwp_create();
16048
16049 int main() {
16050 lwp_create()
16051 ; return 0; }
16052 EOF
16053 if { (eval echo configure:16054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16054   rm -rf conftest*
16055   eval "ac_cv_lib_$ac_lib_var=yes"
16056 else
16057   echo "configure: failed program was:" >&5
16058   cat conftest.$ac_ext >&5
16059   rm -rf conftest*
16060   eval "ac_cv_lib_$ac_lib_var=no"
16061 fi
16062 rm -f conftest*
16063 LIBS="$ac_save_LIBS"
16064
16065 fi
16066 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16067   echo "$ac_t""yes" 1>&6
16068   have_lwp=yes
16069 else
16070   echo "$ac_t""no" 1>&6
16071 have_lwp=no
16072 fi
16073
16074
16075                 if test $have_lwp = yes ; then
16076                         cat >> confdefs.h <<\EOF
16077 #define HAVE_LWP 1
16078 EOF
16079
16080                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
16081                         ol_link_threads=lwp
16082
16083                         if test $ol_with_yielding_select = auto ; then
16084                                 ol_with_yielding_select=no
16085                         fi
16086                 fi
16087         fi
16088 fi
16089
16090 if test $ol_with_yielding_select = yes ; then
16091         cat >> confdefs.h <<\EOF
16092 #define HAVE_YIELDING_SELECT 1
16093 EOF
16094
16095 fi
16096
16097 if test $ol_with_threads = manual ; then
16098                 ol_link_threads=yes
16099
16100         echo "configure: warning: thread defines and link options must be set manually" 1>&2
16101
16102         for ac_hdr in pthread.h sched.h
16103 do
16104 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16105 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16106 echo "configure:16107: checking for $ac_hdr" >&5
16107 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16108   echo $ac_n "(cached) $ac_c" 1>&6
16109 else
16110   cat > conftest.$ac_ext <<EOF
16111 #line 16112 "configure"
16112 #include "confdefs.h"
16113 #include <$ac_hdr>
16114 EOF
16115 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16116 { (eval echo configure:16117: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16117 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16118 if test -z "$ac_err"; then
16119   rm -rf conftest*
16120   eval "ac_cv_header_$ac_safe=yes"
16121 else
16122   echo "$ac_err" >&5
16123   echo "configure: failed program was:" >&5
16124   cat conftest.$ac_ext >&5
16125   rm -rf conftest*
16126   eval "ac_cv_header_$ac_safe=no"
16127 fi
16128 rm -f conftest*
16129 fi
16130 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16131   echo "$ac_t""yes" 1>&6
16132     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16133   cat >> confdefs.h <<EOF
16134 #define $ac_tr_hdr 1
16135 EOF
16136  
16137 else
16138   echo "$ac_t""no" 1>&6
16139 fi
16140 done
16141
16142         for ac_func in sched_yield pthread_yield
16143 do
16144 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16145 echo "configure:16146: checking for $ac_func" >&5
16146 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16147   echo $ac_n "(cached) $ac_c" 1>&6
16148 else
16149   cat > conftest.$ac_ext <<EOF
16150 #line 16151 "configure"
16151 #include "confdefs.h"
16152 /* System header to define __stub macros and hopefully few prototypes,
16153     which can conflict with char $ac_func(); below.  */
16154 #include <assert.h>
16155 /* Override any gcc2 internal prototype to avoid an error.  */
16156 /* We use char because int might match the return type of a gcc2
16157     builtin and then its argument prototype would still apply.  */
16158 char $ac_func();
16159 char (*f)();
16160
16161 int main() {
16162
16163 /* The GNU C library defines this for functions which it implements
16164     to always fail with ENOSYS.  Some functions are actually named
16165     something starting with __ and the normal name is an alias.  */
16166 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16167 choke me
16168 #else
16169 f = $ac_func;
16170 #endif
16171
16172 ; return 0; }
16173 EOF
16174 if { (eval echo configure:16175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16175   rm -rf conftest*
16176   eval "ac_cv_func_$ac_func=yes"
16177 else
16178   echo "configure: failed program was:" >&5
16179   cat conftest.$ac_ext >&5
16180   rm -rf conftest*
16181   eval "ac_cv_func_$ac_func=no"
16182 fi
16183 rm -f conftest*
16184 fi
16185
16186 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16187   echo "$ac_t""yes" 1>&6
16188     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16189   cat >> confdefs.h <<EOF
16190 #define $ac_tr_func 1
16191 EOF
16192  
16193 else
16194   echo "$ac_t""no" 1>&6
16195 fi
16196 done
16197
16198         
16199         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16200 echo "configure:16201: checking for LinuxThreads pthread.h" >&5
16201 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16202   echo $ac_n "(cached) $ac_c" 1>&6
16203 else
16204   cat > conftest.$ac_ext <<EOF
16205 #line 16206 "configure"
16206 #include "confdefs.h"
16207 #include <pthread.h>
16208 EOF
16209 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16210   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16211   rm -rf conftest*
16212   ol_cv_header_linux_threads=yes
16213 else
16214   rm -rf conftest*
16215   ol_cv_header_linux_threads=no
16216 fi
16217 rm -f conftest*
16218
16219                 
16220 fi
16221
16222 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16223         if test $ol_cv_header_linux_threads = yes; then
16224                 cat >> confdefs.h <<\EOF
16225 #define HAVE_LINUX_THREADS 1
16226 EOF
16227
16228         fi
16229
16230
16231         for ac_hdr in mach/cthreads.h
16232 do
16233 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16234 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16235 echo "configure:16236: checking for $ac_hdr" >&5
16236 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16237   echo $ac_n "(cached) $ac_c" 1>&6
16238 else
16239   cat > conftest.$ac_ext <<EOF
16240 #line 16241 "configure"
16241 #include "confdefs.h"
16242 #include <$ac_hdr>
16243 EOF
16244 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16245 { (eval echo configure:16246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16246 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16247 if test -z "$ac_err"; then
16248   rm -rf conftest*
16249   eval "ac_cv_header_$ac_safe=yes"
16250 else
16251   echo "$ac_err" >&5
16252   echo "configure: failed program was:" >&5
16253   cat conftest.$ac_ext >&5
16254   rm -rf conftest*
16255   eval "ac_cv_header_$ac_safe=no"
16256 fi
16257 rm -f conftest*
16258 fi
16259 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16260   echo "$ac_t""yes" 1>&6
16261     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16262   cat >> confdefs.h <<EOF
16263 #define $ac_tr_hdr 1
16264 EOF
16265  
16266 else
16267   echo "$ac_t""no" 1>&6
16268 fi
16269 done
16270
16271         for ac_hdr in lwp/lwp.h
16272 do
16273 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16274 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16275 echo "configure:16276: checking for $ac_hdr" >&5
16276 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16277   echo $ac_n "(cached) $ac_c" 1>&6
16278 else
16279   cat > conftest.$ac_ext <<EOF
16280 #line 16281 "configure"
16281 #include "confdefs.h"
16282 #include <$ac_hdr>
16283 EOF
16284 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16285 { (eval echo configure:16286: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16286 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16287 if test -z "$ac_err"; then
16288   rm -rf conftest*
16289   eval "ac_cv_header_$ac_safe=yes"
16290 else
16291   echo "$ac_err" >&5
16292   echo "configure: failed program was:" >&5
16293   cat conftest.$ac_ext >&5
16294   rm -rf conftest*
16295   eval "ac_cv_header_$ac_safe=no"
16296 fi
16297 rm -f conftest*
16298 fi
16299 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16300   echo "$ac_t""yes" 1>&6
16301     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16302   cat >> confdefs.h <<EOF
16303 #define $ac_tr_hdr 1
16304 EOF
16305  
16306 else
16307   echo "$ac_t""no" 1>&6
16308 fi
16309 done
16310
16311         for ac_hdr in thread.h synch.h
16312 do
16313 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16314 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16315 echo "configure:16316: checking for $ac_hdr" >&5
16316 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16317   echo $ac_n "(cached) $ac_c" 1>&6
16318 else
16319   cat > conftest.$ac_ext <<EOF
16320 #line 16321 "configure"
16321 #include "confdefs.h"
16322 #include <$ac_hdr>
16323 EOF
16324 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16325 { (eval echo configure:16326: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16326 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16327 if test -z "$ac_err"; then
16328   rm -rf conftest*
16329   eval "ac_cv_header_$ac_safe=yes"
16330 else
16331   echo "$ac_err" >&5
16332   echo "configure: failed program was:" >&5
16333   cat conftest.$ac_ext >&5
16334   rm -rf conftest*
16335   eval "ac_cv_header_$ac_safe=no"
16336 fi
16337 rm -f conftest*
16338 fi
16339 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16340   echo "$ac_t""yes" 1>&6
16341     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16342   cat >> confdefs.h <<EOF
16343 #define $ac_tr_hdr 1
16344 EOF
16345  
16346 else
16347   echo "$ac_t""no" 1>&6
16348 fi
16349 done
16350
16351 fi
16352
16353 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16354                         cat >> confdefs.h <<\EOF
16355 #define REENTRANT 1
16356 EOF
16357
16358         cat >> confdefs.h <<\EOF
16359 #define _REENTRANT 1
16360 EOF
16361
16362         cat >> confdefs.h <<\EOF
16363 #define THREAD_SAFE 1
16364 EOF
16365
16366         cat >> confdefs.h <<\EOF
16367 #define _THREAD_SAFE 1
16368 EOF
16369
16370         cat >> confdefs.h <<\EOF
16371 #define THREADSAFE 1
16372 EOF
16373
16374         cat >> confdefs.h <<\EOF
16375 #define _THREADSAFE 1
16376 EOF
16377
16378         cat >> confdefs.h <<\EOF
16379 #define _SGI_MP_SOURCE 1
16380 EOF
16381
16382
16383                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16384 echo "configure:16385: checking for thread specific errno" >&5
16385 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16386   echo $ac_n "(cached) $ac_c" 1>&6
16387 else
16388   
16389                 cat > conftest.$ac_ext <<EOF
16390 #line 16391 "configure"
16391 #include "confdefs.h"
16392 #include <errno.h>
16393 int main() {
16394 errno = 0;
16395 ; return 0; }
16396 EOF
16397 if { (eval echo configure:16398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16398   rm -rf conftest*
16399   ol_cv_errno_thread_specific=yes
16400 else
16401   echo "configure: failed program was:" >&5
16402   cat conftest.$ac_ext >&5
16403   rm -rf conftest*
16404   ol_cv_errno_thread_specific=no
16405 fi
16406 rm -f conftest*
16407         
16408 fi
16409
16410 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16411
16412                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16413 echo "configure:16414: checking for thread specific h_errno" >&5
16414 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16415   echo $ac_n "(cached) $ac_c" 1>&6
16416 else
16417   
16418                 cat > conftest.$ac_ext <<EOF
16419 #line 16420 "configure"
16420 #include "confdefs.h"
16421 #include <netdb.h>
16422 int main() {
16423 h_errno = 0;
16424 ; return 0; }
16425 EOF
16426 if { (eval echo configure:16427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16427   rm -rf conftest*
16428   ol_cv_h_errno_thread_specific=yes
16429 else
16430   echo "configure: failed program was:" >&5
16431   cat conftest.$ac_ext >&5
16432   rm -rf conftest*
16433   ol_cv_h_errno_thread_specific=no
16434 fi
16435 rm -f conftest*
16436         
16437 fi
16438
16439 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16440
16441         if test $ol_cv_errno_thread_specific != yes \
16442                 -o $ol_cv_h_errno_thread_specific != yes ; then
16443                 LIBS="$LTHREAD_LIBS $LIBS"
16444                 LTHREAD_LIBS=""
16445         fi
16446
16447 fi  
16448
16449 if test $ol_link_threads = no ; then
16450         if test $ol_with_threads = yes ; then
16451                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16452         fi
16453
16454         if test $ol_with_threads = auto ; then
16455                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16456                 ol_with_threads=no
16457         fi
16458
16459         cat >> confdefs.h <<\EOF
16460 #define NO_THREADS 1
16461 EOF
16462
16463         LTHREAD_LIBS=""
16464 fi
16465
16466 if test $ol_link_threads != no ; then
16467         cat >> confdefs.h <<\EOF
16468 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16469 EOF
16470
16471 fi
16472
16473 ol_link_ldbm=no 
16474
16475 if test $ol_with_ldbm_api = auto \
16476         -o $ol_with_ldbm_api = berkeley \
16477         -o $ol_with_ldbm_api = bcompat ; then
16478
16479         if test $ol_with_ldbm_api = bcompat; then \
16480                 for ac_hdr in db_185.h db.h
16481 do
16482 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16483 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16484 echo "configure:16485: checking for $ac_hdr" >&5
16485 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16486   echo $ac_n "(cached) $ac_c" 1>&6
16487 else
16488   cat > conftest.$ac_ext <<EOF
16489 #line 16490 "configure"
16490 #include "confdefs.h"
16491 #include <$ac_hdr>
16492 EOF
16493 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16494 { (eval echo configure:16495: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16495 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16496 if test -z "$ac_err"; then
16497   rm -rf conftest*
16498   eval "ac_cv_header_$ac_safe=yes"
16499 else
16500   echo "$ac_err" >&5
16501   echo "configure: failed program was:" >&5
16502   cat conftest.$ac_ext >&5
16503   rm -rf conftest*
16504   eval "ac_cv_header_$ac_safe=no"
16505 fi
16506 rm -f conftest*
16507 fi
16508 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16509   echo "$ac_t""yes" 1>&6
16510     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16511   cat >> confdefs.h <<EOF
16512 #define $ac_tr_hdr 1
16513 EOF
16514  
16515 else
16516   echo "$ac_t""no" 1>&6
16517 fi
16518 done
16519
16520 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16521         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16522 echo "configure:16523: checking if Berkeley DB header compatibility" >&5
16523 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16524   echo $ac_n "(cached) $ac_c" 1>&6
16525 else
16526   
16527                 cat > conftest.$ac_ext <<EOF
16528 #line 16529 "configure"
16529 #include "confdefs.h"
16530
16531 #if HAVE_DB_185_H
16532 #       include <db_185.h>
16533 #else
16534 #       include <db.h>
16535 #endif
16536
16537  /* this check could be improved */
16538 #ifndef DB_VERSION_MAJOR
16539 #       define DB_VERSION_MAJOR 1
16540 #endif
16541
16542 #if DB_VERSION_MAJOR == 1 
16543         __db_version_1
16544 #endif
16545
16546 EOF
16547 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16548   egrep "__db_version_1" >/dev/null 2>&1; then
16549   rm -rf conftest*
16550   ol_cv_header_db1=yes
16551 else
16552   rm -rf conftest*
16553   ol_cv_header_db1=no
16554 fi
16555 rm -f conftest*
16556
16557 fi
16558
16559 echo "$ac_t""$ol_cv_header_db1" 1>&6
16560
16561         if test $ol_cv_header_db1 = yes ; then
16562                 ol_cv_lib_db=no
16563 if test $ol_cv_lib_db = no ; then
16564         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16565 echo "configure:16566: checking for Berkeley DB link (default)" >&5
16566 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16567   echo $ac_n "(cached) $ac_c" 1>&6
16568 else
16569   
16570         ol_DB_LIB=
16571         ol_LIBS=$LIBS
16572         LIBS="$ol_DB_LIB $LIBS"
16573
16574         cat > conftest.$ac_ext <<EOF
16575 #line 16576 "configure"
16576 #include "confdefs.h"
16577
16578 #ifdef HAVE_DB_185_H
16579 # include <db_185.h>
16580 #else
16581 # include <db.h>
16582 #endif
16583
16584 #ifndef DB_VERSION_MAJOR
16585 # define DB_VERSION_MAJOR 1
16586 #endif
16587
16588 #ifndef NULL
16589 #define NULL ((void*)0)
16590 #endif
16591
16592 int main() {
16593
16594 #if DB_VERSION_MAJOR > 1
16595         {
16596                 char *version;
16597                 int major, minor, patch;
16598
16599                 version = db_version( &major, &minor, &patch );
16600
16601                 if( major != DB_VERSION_MAJOR ||
16602                         minor < DB_VERSION_MINOR )
16603                 {
16604                         printf("Berkeley DB version mismatch\n"
16605                                 "\texpected: %s\n\tgot: %s\n",
16606                                 DB_VERSION_STRING, version);
16607                         return 1;
16608                 }
16609         }
16610 #endif
16611
16612 #if DB_VERSION_MAJOR > 2
16613         db_env_create( NULL, 0 );
16614 #elif DB_VERSION_MAJOR > 1
16615         db_appexit( NULL );
16616 #else
16617         (void) dbopen( NULL, 0, 0, 0, NULL);
16618 #endif
16619
16620 ; return 0; }
16621 EOF
16622 if { (eval echo configure:16623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16623   rm -rf conftest*
16624   ol_cv_db_none=yes
16625 else
16626   echo "configure: failed program was:" >&5
16627   cat conftest.$ac_ext >&5
16628   rm -rf conftest*
16629   ol_cv_db_none=no
16630 fi
16631 rm -f conftest*
16632
16633         LIBS="$ol_LIBS"
16634
16635 fi
16636
16637 echo "$ac_t""$ol_cv_db_none" 1>&6
16638
16639         if test $ol_cv_db_none = yes ; then
16640                 ol_cv_lib_db=yes
16641         fi
16642 fi
16643
16644 if test $ol_cv_lib_db = no ; then
16645         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
16646 echo "configure:16647: checking for Berkeley DB link (-ldb4)" >&5
16647 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
16648   echo $ac_n "(cached) $ac_c" 1>&6
16649 else
16650   
16651         ol_DB_LIB=-ldb4
16652         ol_LIBS=$LIBS
16653         LIBS="$ol_DB_LIB $LIBS"
16654
16655         cat > conftest.$ac_ext <<EOF
16656 #line 16657 "configure"
16657 #include "confdefs.h"
16658
16659 #ifdef HAVE_DB_185_H
16660 # include <db_185.h>
16661 #else
16662 # include <db.h>
16663 #endif
16664
16665 #ifndef DB_VERSION_MAJOR
16666 # define DB_VERSION_MAJOR 1
16667 #endif
16668
16669 #ifndef NULL
16670 #define NULL ((void*)0)
16671 #endif
16672
16673 int main() {
16674
16675 #if DB_VERSION_MAJOR > 1
16676         {
16677                 char *version;
16678                 int major, minor, patch;
16679
16680                 version = db_version( &major, &minor, &patch );
16681
16682                 if( major != DB_VERSION_MAJOR ||
16683                         minor < DB_VERSION_MINOR )
16684                 {
16685                         printf("Berkeley DB version mismatch\n"
16686                                 "\texpected: %s\n\tgot: %s\n",
16687                                 DB_VERSION_STRING, version);
16688                         return 1;
16689                 }
16690         }
16691 #endif
16692
16693 #if DB_VERSION_MAJOR > 2
16694         db_env_create( NULL, 0 );
16695 #elif DB_VERSION_MAJOR > 1
16696         db_appexit( NULL );
16697 #else
16698         (void) dbopen( NULL, 0, 0, 0, NULL);
16699 #endif
16700
16701 ; return 0; }
16702 EOF
16703 if { (eval echo configure:16704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16704   rm -rf conftest*
16705   ol_cv_db_db4=yes
16706 else
16707   echo "configure: failed program was:" >&5
16708   cat conftest.$ac_ext >&5
16709   rm -rf conftest*
16710   ol_cv_db_db4=no
16711 fi
16712 rm -f conftest*
16713
16714         LIBS="$ol_LIBS"
16715
16716 fi
16717
16718 echo "$ac_t""$ol_cv_db_db4" 1>&6
16719
16720         if test $ol_cv_db_db4 = yes ; then
16721                 ol_cv_lib_db=-ldb4
16722         fi
16723 fi
16724
16725 if test $ol_cv_lib_db = no ; then
16726         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
16727 echo "configure:16728: checking for Berkeley DB link (-ldb-4)" >&5
16728 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
16729   echo $ac_n "(cached) $ac_c" 1>&6
16730 else
16731   
16732         ol_DB_LIB=-ldb-4
16733         ol_LIBS=$LIBS
16734         LIBS="$ol_DB_LIB $LIBS"
16735
16736         cat > conftest.$ac_ext <<EOF
16737 #line 16738 "configure"
16738 #include "confdefs.h"
16739
16740 #ifdef HAVE_DB_185_H
16741 # include <db_185.h>
16742 #else
16743 # include <db.h>
16744 #endif
16745
16746 #ifndef DB_VERSION_MAJOR
16747 # define DB_VERSION_MAJOR 1
16748 #endif
16749
16750 #ifndef NULL
16751 #define NULL ((void*)0)
16752 #endif
16753
16754 int main() {
16755
16756 #if DB_VERSION_MAJOR > 1
16757         {
16758                 char *version;
16759                 int major, minor, patch;
16760
16761                 version = db_version( &major, &minor, &patch );
16762
16763                 if( major != DB_VERSION_MAJOR ||
16764                         minor < DB_VERSION_MINOR )
16765                 {
16766                         printf("Berkeley DB version mismatch\n"
16767                                 "\texpected: %s\n\tgot: %s\n",
16768                                 DB_VERSION_STRING, version);
16769                         return 1;
16770                 }
16771         }
16772 #endif
16773
16774 #if DB_VERSION_MAJOR > 2
16775         db_env_create( NULL, 0 );
16776 #elif DB_VERSION_MAJOR > 1
16777         db_appexit( NULL );
16778 #else
16779         (void) dbopen( NULL, 0, 0, 0, NULL);
16780 #endif
16781
16782 ; return 0; }
16783 EOF
16784 if { (eval echo configure:16785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16785   rm -rf conftest*
16786   ol_cv_db_db_4=yes
16787 else
16788   echo "configure: failed program was:" >&5
16789   cat conftest.$ac_ext >&5
16790   rm -rf conftest*
16791   ol_cv_db_db_4=no
16792 fi
16793 rm -f conftest*
16794
16795         LIBS="$ol_LIBS"
16796
16797 fi
16798
16799 echo "$ac_t""$ol_cv_db_db_4" 1>&6
16800
16801         if test $ol_cv_db_db_4 = yes ; then
16802                 ol_cv_lib_db=-ldb-4
16803         fi
16804 fi
16805
16806 if test $ol_cv_lib_db = no ; then
16807         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
16808 echo "configure:16809: checking for Berkeley DB link (-ldb)" >&5
16809 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
16810   echo $ac_n "(cached) $ac_c" 1>&6
16811 else
16812   
16813         ol_DB_LIB=-ldb
16814         ol_LIBS=$LIBS
16815         LIBS="$ol_DB_LIB $LIBS"
16816
16817         cat > conftest.$ac_ext <<EOF
16818 #line 16819 "configure"
16819 #include "confdefs.h"
16820
16821 #ifdef HAVE_DB_185_H
16822 # include <db_185.h>
16823 #else
16824 # include <db.h>
16825 #endif
16826
16827 #ifndef DB_VERSION_MAJOR
16828 # define DB_VERSION_MAJOR 1
16829 #endif
16830
16831 #ifndef NULL
16832 #define NULL ((void*)0)
16833 #endif
16834
16835 int main() {
16836
16837 #if DB_VERSION_MAJOR > 1
16838         {
16839                 char *version;
16840                 int major, minor, patch;
16841
16842                 version = db_version( &major, &minor, &patch );
16843
16844                 if( major != DB_VERSION_MAJOR ||
16845                         minor < DB_VERSION_MINOR )
16846                 {
16847                         printf("Berkeley DB version mismatch\n"
16848                                 "\texpected: %s\n\tgot: %s\n",
16849                                 DB_VERSION_STRING, version);
16850                         return 1;
16851                 }
16852         }
16853 #endif
16854
16855 #if DB_VERSION_MAJOR > 2
16856         db_env_create( NULL, 0 );
16857 #elif DB_VERSION_MAJOR > 1
16858         db_appexit( NULL );
16859 #else
16860         (void) dbopen( NULL, 0, 0, 0, NULL);
16861 #endif
16862
16863 ; return 0; }
16864 EOF
16865 if { (eval echo configure:16866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16866   rm -rf conftest*
16867   ol_cv_db_db=yes
16868 else
16869   echo "configure: failed program was:" >&5
16870   cat conftest.$ac_ext >&5
16871   rm -rf conftest*
16872   ol_cv_db_db=no
16873 fi
16874 rm -f conftest*
16875
16876         LIBS="$ol_LIBS"
16877
16878 fi
16879
16880 echo "$ac_t""$ol_cv_db_db" 1>&6
16881
16882         if test $ol_cv_db_db = yes ; then
16883                 ol_cv_lib_db=-ldb
16884         fi
16885 fi
16886
16887 if test $ol_cv_lib_db = no ; then
16888         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
16889 echo "configure:16890: checking for Berkeley DB link (-ldb3)" >&5
16890 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
16891   echo $ac_n "(cached) $ac_c" 1>&6
16892 else
16893   
16894         ol_DB_LIB=-ldb3
16895         ol_LIBS=$LIBS
16896         LIBS="$ol_DB_LIB $LIBS"
16897
16898         cat > conftest.$ac_ext <<EOF
16899 #line 16900 "configure"
16900 #include "confdefs.h"
16901
16902 #ifdef HAVE_DB_185_H
16903 # include <db_185.h>
16904 #else
16905 # include <db.h>
16906 #endif
16907
16908 #ifndef DB_VERSION_MAJOR
16909 # define DB_VERSION_MAJOR 1
16910 #endif
16911
16912 #ifndef NULL
16913 #define NULL ((void*)0)
16914 #endif
16915
16916 int main() {
16917
16918 #if DB_VERSION_MAJOR > 1
16919         {
16920                 char *version;
16921                 int major, minor, patch;
16922
16923                 version = db_version( &major, &minor, &patch );
16924
16925                 if( major != DB_VERSION_MAJOR ||
16926                         minor < DB_VERSION_MINOR )
16927                 {
16928                         printf("Berkeley DB version mismatch\n"
16929                                 "\texpected: %s\n\tgot: %s\n",
16930                                 DB_VERSION_STRING, version);
16931                         return 1;
16932                 }
16933         }
16934 #endif
16935
16936 #if DB_VERSION_MAJOR > 2
16937         db_env_create( NULL, 0 );
16938 #elif DB_VERSION_MAJOR > 1
16939         db_appexit( NULL );
16940 #else
16941         (void) dbopen( NULL, 0, 0, 0, NULL);
16942 #endif
16943
16944 ; return 0; }
16945 EOF
16946 if { (eval echo configure:16947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16947   rm -rf conftest*
16948   ol_cv_db_db3=yes
16949 else
16950   echo "configure: failed program was:" >&5
16951   cat conftest.$ac_ext >&5
16952   rm -rf conftest*
16953   ol_cv_db_db3=no
16954 fi
16955 rm -f conftest*
16956
16957         LIBS="$ol_LIBS"
16958
16959 fi
16960
16961 echo "$ac_t""$ol_cv_db_db3" 1>&6
16962
16963         if test $ol_cv_db_db3 = yes ; then
16964                 ol_cv_lib_db=-ldb3
16965         fi
16966 fi
16967
16968 if test $ol_cv_lib_db = no ; then
16969         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
16970 echo "configure:16971: checking for Berkeley DB link (-ldb-3)" >&5
16971 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
16972   echo $ac_n "(cached) $ac_c" 1>&6
16973 else
16974   
16975         ol_DB_LIB=-ldb-3
16976         ol_LIBS=$LIBS
16977         LIBS="$ol_DB_LIB $LIBS"
16978
16979         cat > conftest.$ac_ext <<EOF
16980 #line 16981 "configure"
16981 #include "confdefs.h"
16982
16983 #ifdef HAVE_DB_185_H
16984 # include <db_185.h>
16985 #else
16986 # include <db.h>
16987 #endif
16988
16989 #ifndef DB_VERSION_MAJOR
16990 # define DB_VERSION_MAJOR 1
16991 #endif
16992
16993 #ifndef NULL
16994 #define NULL ((void*)0)
16995 #endif
16996
16997 int main() {
16998
16999 #if DB_VERSION_MAJOR > 1
17000         {
17001                 char *version;
17002                 int major, minor, patch;
17003
17004                 version = db_version( &major, &minor, &patch );
17005
17006                 if( major != DB_VERSION_MAJOR ||
17007                         minor < DB_VERSION_MINOR )
17008                 {
17009                         printf("Berkeley DB version mismatch\n"
17010                                 "\texpected: %s\n\tgot: %s\n",
17011                                 DB_VERSION_STRING, version);
17012                         return 1;
17013                 }
17014         }
17015 #endif
17016
17017 #if DB_VERSION_MAJOR > 2
17018         db_env_create( NULL, 0 );
17019 #elif DB_VERSION_MAJOR > 1
17020         db_appexit( NULL );
17021 #else
17022         (void) dbopen( NULL, 0, 0, 0, NULL);
17023 #endif
17024
17025 ; return 0; }
17026 EOF
17027 if { (eval echo configure:17028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17028   rm -rf conftest*
17029   ol_cv_db_db_3=yes
17030 else
17031   echo "configure: failed program was:" >&5
17032   cat conftest.$ac_ext >&5
17033   rm -rf conftest*
17034   ol_cv_db_db_3=no
17035 fi
17036 rm -f conftest*
17037
17038         LIBS="$ol_LIBS"
17039
17040 fi
17041
17042 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17043
17044         if test $ol_cv_db_db_3 = yes ; then
17045                 ol_cv_lib_db=-ldb-3
17046         fi
17047 fi
17048
17049 if test $ol_cv_lib_db = no ; then
17050         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17051 echo "configure:17052: checking for Berkeley DB link (-ldb2)" >&5
17052 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17053   echo $ac_n "(cached) $ac_c" 1>&6
17054 else
17055   
17056         ol_DB_LIB=-ldb2
17057         ol_LIBS=$LIBS
17058         LIBS="$ol_DB_LIB $LIBS"
17059
17060         cat > conftest.$ac_ext <<EOF
17061 #line 17062 "configure"
17062 #include "confdefs.h"
17063
17064 #ifdef HAVE_DB_185_H
17065 # include <db_185.h>
17066 #else
17067 # include <db.h>
17068 #endif
17069
17070 #ifndef DB_VERSION_MAJOR
17071 # define DB_VERSION_MAJOR 1
17072 #endif
17073
17074 #ifndef NULL
17075 #define NULL ((void*)0)
17076 #endif
17077
17078 int main() {
17079
17080 #if DB_VERSION_MAJOR > 1
17081         {
17082                 char *version;
17083                 int major, minor, patch;
17084
17085                 version = db_version( &major, &minor, &patch );
17086
17087                 if( major != DB_VERSION_MAJOR ||
17088                         minor < DB_VERSION_MINOR )
17089                 {
17090                         printf("Berkeley DB version mismatch\n"
17091                                 "\texpected: %s\n\tgot: %s\n",
17092                                 DB_VERSION_STRING, version);
17093                         return 1;
17094                 }
17095         }
17096 #endif
17097
17098 #if DB_VERSION_MAJOR > 2
17099         db_env_create( NULL, 0 );
17100 #elif DB_VERSION_MAJOR > 1
17101         db_appexit( NULL );
17102 #else
17103         (void) dbopen( NULL, 0, 0, 0, NULL);
17104 #endif
17105
17106 ; return 0; }
17107 EOF
17108 if { (eval echo configure:17109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17109   rm -rf conftest*
17110   ol_cv_db_db2=yes
17111 else
17112   echo "configure: failed program was:" >&5
17113   cat conftest.$ac_ext >&5
17114   rm -rf conftest*
17115   ol_cv_db_db2=no
17116 fi
17117 rm -f conftest*
17118
17119         LIBS="$ol_LIBS"
17120
17121 fi
17122
17123 echo "$ac_t""$ol_cv_db_db2" 1>&6
17124
17125         if test $ol_cv_db_db2 = yes ; then
17126                 ol_cv_lib_db=-ldb2
17127         fi
17128 fi
17129
17130 if test $ol_cv_lib_db = no ; then
17131         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17132 echo "configure:17133: checking for Berkeley DB link (-ldb-2)" >&5
17133 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17134   echo $ac_n "(cached) $ac_c" 1>&6
17135 else
17136   
17137         ol_DB_LIB=-ldb-2
17138         ol_LIBS=$LIBS
17139         LIBS="$ol_DB_LIB $LIBS"
17140
17141         cat > conftest.$ac_ext <<EOF
17142 #line 17143 "configure"
17143 #include "confdefs.h"
17144
17145 #ifdef HAVE_DB_185_H
17146 # include <db_185.h>
17147 #else
17148 # include <db.h>
17149 #endif
17150
17151 #ifndef DB_VERSION_MAJOR
17152 # define DB_VERSION_MAJOR 1
17153 #endif
17154
17155 #ifndef NULL
17156 #define NULL ((void*)0)
17157 #endif
17158
17159 int main() {
17160
17161 #if DB_VERSION_MAJOR > 1
17162         {
17163                 char *version;
17164                 int major, minor, patch;
17165
17166                 version = db_version( &major, &minor, &patch );
17167
17168                 if( major != DB_VERSION_MAJOR ||
17169                         minor < DB_VERSION_MINOR )
17170                 {
17171                         printf("Berkeley DB version mismatch\n"
17172                                 "\texpected: %s\n\tgot: %s\n",
17173                                 DB_VERSION_STRING, version);
17174                         return 1;
17175                 }
17176         }
17177 #endif
17178
17179 #if DB_VERSION_MAJOR > 2
17180         db_env_create( NULL, 0 );
17181 #elif DB_VERSION_MAJOR > 1
17182         db_appexit( NULL );
17183 #else
17184         (void) dbopen( NULL, 0, 0, 0, NULL);
17185 #endif
17186
17187 ; return 0; }
17188 EOF
17189 if { (eval echo configure:17190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17190   rm -rf conftest*
17191   ol_cv_db_db_2=yes
17192 else
17193   echo "configure: failed program was:" >&5
17194   cat conftest.$ac_ext >&5
17195   rm -rf conftest*
17196   ol_cv_db_db_2=no
17197 fi
17198 rm -f conftest*
17199
17200         LIBS="$ol_LIBS"
17201
17202 fi
17203
17204 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17205
17206         if test $ol_cv_db_db_2 = yes ; then
17207                 ol_cv_lib_db=-ldb-2
17208         fi
17209 fi
17210
17211 if test $ol_cv_lib_db = no ; then
17212         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17213 echo "configure:17214: checking for Berkeley DB link (-ldb1)" >&5
17214 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17215   echo $ac_n "(cached) $ac_c" 1>&6
17216 else
17217   
17218         ol_DB_LIB=-ldb1
17219         ol_LIBS=$LIBS
17220         LIBS="$ol_DB_LIB $LIBS"
17221
17222         cat > conftest.$ac_ext <<EOF
17223 #line 17224 "configure"
17224 #include "confdefs.h"
17225
17226 #ifdef HAVE_DB_185_H
17227 # include <db_185.h>
17228 #else
17229 # include <db.h>
17230 #endif
17231
17232 #ifndef DB_VERSION_MAJOR
17233 # define DB_VERSION_MAJOR 1
17234 #endif
17235
17236 #ifndef NULL
17237 #define NULL ((void*)0)
17238 #endif
17239
17240 int main() {
17241
17242 #if DB_VERSION_MAJOR > 1
17243         {
17244                 char *version;
17245                 int major, minor, patch;
17246
17247                 version = db_version( &major, &minor, &patch );
17248
17249                 if( major != DB_VERSION_MAJOR ||
17250                         minor < DB_VERSION_MINOR )
17251                 {
17252                         printf("Berkeley DB version mismatch\n"
17253                                 "\texpected: %s\n\tgot: %s\n",
17254                                 DB_VERSION_STRING, version);
17255                         return 1;
17256                 }
17257         }
17258 #endif
17259
17260 #if DB_VERSION_MAJOR > 2
17261         db_env_create( NULL, 0 );
17262 #elif DB_VERSION_MAJOR > 1
17263         db_appexit( NULL );
17264 #else
17265         (void) dbopen( NULL, 0, 0, 0, NULL);
17266 #endif
17267
17268 ; return 0; }
17269 EOF
17270 if { (eval echo configure:17271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17271   rm -rf conftest*
17272   ol_cv_db_db1=yes
17273 else
17274   echo "configure: failed program was:" >&5
17275   cat conftest.$ac_ext >&5
17276   rm -rf conftest*
17277   ol_cv_db_db1=no
17278 fi
17279 rm -f conftest*
17280
17281         LIBS="$ol_LIBS"
17282
17283 fi
17284
17285 echo "$ac_t""$ol_cv_db_db1" 1>&6
17286
17287         if test $ol_cv_db_db1 = yes ; then
17288                 ol_cv_lib_db=-ldb1
17289         fi
17290 fi
17291
17292 if test $ol_cv_lib_db = no ; then
17293         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
17294 echo "configure:17295: checking for Berkeley DB link (-ldb-1)" >&5
17295 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
17296   echo $ac_n "(cached) $ac_c" 1>&6
17297 else
17298   
17299         ol_DB_LIB=-ldb-1
17300         ol_LIBS=$LIBS
17301         LIBS="$ol_DB_LIB $LIBS"
17302
17303         cat > conftest.$ac_ext <<EOF
17304 #line 17305 "configure"
17305 #include "confdefs.h"
17306
17307 #ifdef HAVE_DB_185_H
17308 # include <db_185.h>
17309 #else
17310 # include <db.h>
17311 #endif
17312
17313 #ifndef DB_VERSION_MAJOR
17314 # define DB_VERSION_MAJOR 1
17315 #endif
17316
17317 #ifndef NULL
17318 #define NULL ((void*)0)
17319 #endif
17320
17321 int main() {
17322
17323 #if DB_VERSION_MAJOR > 1
17324         {
17325                 char *version;
17326                 int major, minor, patch;
17327
17328                 version = db_version( &major, &minor, &patch );
17329
17330                 if( major != DB_VERSION_MAJOR ||
17331                         minor < DB_VERSION_MINOR )
17332                 {
17333                         printf("Berkeley DB version mismatch\n"
17334                                 "\texpected: %s\n\tgot: %s\n",
17335                                 DB_VERSION_STRING, version);
17336                         return 1;
17337                 }
17338         }
17339 #endif
17340
17341 #if DB_VERSION_MAJOR > 2
17342         db_env_create( NULL, 0 );
17343 #elif DB_VERSION_MAJOR > 1
17344         db_appexit( NULL );
17345 #else
17346         (void) dbopen( NULL, 0, 0, 0, NULL);
17347 #endif
17348
17349 ; return 0; }
17350 EOF
17351 if { (eval echo configure:17352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17352   rm -rf conftest*
17353   ol_cv_db_db_1=yes
17354 else
17355   echo "configure: failed program was:" >&5
17356   cat conftest.$ac_ext >&5
17357   rm -rf conftest*
17358   ol_cv_db_db_1=no
17359 fi
17360 rm -f conftest*
17361
17362         LIBS="$ol_LIBS"
17363
17364 fi
17365
17366 echo "$ac_t""$ol_cv_db_db_1" 1>&6
17367
17368         if test $ol_cv_db_db_1 = yes ; then
17369                 ol_cv_lib_db=-ldb-1
17370         fi
17371 fi
17372
17373
17374                 if test "$ol_cv_lib_db" != no ; then
17375                         ol_cv_berkeley_db=yes
17376                 fi
17377         fi
17378 fi
17379
17380         else
17381                 ol_cv_berkeley_db=no
17382 for ac_hdr in db.h
17383 do
17384 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17385 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17386 echo "configure:17387: checking for $ac_hdr" >&5
17387 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17388   echo $ac_n "(cached) $ac_c" 1>&6
17389 else
17390   cat > conftest.$ac_ext <<EOF
17391 #line 17392 "configure"
17392 #include "confdefs.h"
17393 #include <$ac_hdr>
17394 EOF
17395 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17396 { (eval echo configure:17397: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17397 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17398 if test -z "$ac_err"; then
17399   rm -rf conftest*
17400   eval "ac_cv_header_$ac_safe=yes"
17401 else
17402   echo "$ac_err" >&5
17403   echo "configure: failed program was:" >&5
17404   cat conftest.$ac_ext >&5
17405   rm -rf conftest*
17406   eval "ac_cv_header_$ac_safe=no"
17407 fi
17408 rm -f conftest*
17409 fi
17410 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17411   echo "$ac_t""yes" 1>&6
17412     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17413   cat >> confdefs.h <<EOF
17414 #define $ac_tr_hdr 1
17415 EOF
17416  
17417 else
17418   echo "$ac_t""no" 1>&6
17419 fi
17420 done
17421
17422 if test $ac_cv_header_db_h = yes; then
17423         ol_cv_lib_db=no
17424 if test $ol_cv_lib_db = no ; then
17425         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17426 echo "configure:17427: checking for Berkeley DB link (default)" >&5
17427 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17428   echo $ac_n "(cached) $ac_c" 1>&6
17429 else
17430   
17431         ol_DB_LIB=
17432         ol_LIBS=$LIBS
17433         LIBS="$ol_DB_LIB $LIBS"
17434
17435         cat > conftest.$ac_ext <<EOF
17436 #line 17437 "configure"
17437 #include "confdefs.h"
17438
17439 #ifdef HAVE_DB_185_H
17440 # include <db_185.h>
17441 #else
17442 # include <db.h>
17443 #endif
17444
17445 #ifndef DB_VERSION_MAJOR
17446 # define DB_VERSION_MAJOR 1
17447 #endif
17448
17449 #ifndef NULL
17450 #define NULL ((void*)0)
17451 #endif
17452
17453 int main() {
17454
17455 #if DB_VERSION_MAJOR > 1
17456         {
17457                 char *version;
17458                 int major, minor, patch;
17459
17460                 version = db_version( &major, &minor, &patch );
17461
17462                 if( major != DB_VERSION_MAJOR ||
17463                         minor < DB_VERSION_MINOR )
17464                 {
17465                         printf("Berkeley DB version mismatch\n"
17466                                 "\texpected: %s\n\tgot: %s\n",
17467                                 DB_VERSION_STRING, version);
17468                         return 1;
17469                 }
17470         }
17471 #endif
17472
17473 #if DB_VERSION_MAJOR > 2
17474         db_env_create( NULL, 0 );
17475 #elif DB_VERSION_MAJOR > 1
17476         db_appexit( NULL );
17477 #else
17478         (void) dbopen( NULL, 0, 0, 0, NULL);
17479 #endif
17480
17481 ; return 0; }
17482 EOF
17483 if { (eval echo configure:17484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17484   rm -rf conftest*
17485   ol_cv_db_none=yes
17486 else
17487   echo "configure: failed program was:" >&5
17488   cat conftest.$ac_ext >&5
17489   rm -rf conftest*
17490   ol_cv_db_none=no
17491 fi
17492 rm -f conftest*
17493
17494         LIBS="$ol_LIBS"
17495
17496 fi
17497
17498 echo "$ac_t""$ol_cv_db_none" 1>&6
17499
17500         if test $ol_cv_db_none = yes ; then
17501                 ol_cv_lib_db=yes
17502         fi
17503 fi
17504
17505 if test $ol_cv_lib_db = no ; then
17506         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17507 echo "configure:17508: checking for Berkeley DB link (-ldb4)" >&5
17508 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17509   echo $ac_n "(cached) $ac_c" 1>&6
17510 else
17511   
17512         ol_DB_LIB=-ldb4
17513         ol_LIBS=$LIBS
17514         LIBS="$ol_DB_LIB $LIBS"
17515
17516         cat > conftest.$ac_ext <<EOF
17517 #line 17518 "configure"
17518 #include "confdefs.h"
17519
17520 #ifdef HAVE_DB_185_H
17521 # include <db_185.h>
17522 #else
17523 # include <db.h>
17524 #endif
17525
17526 #ifndef DB_VERSION_MAJOR
17527 # define DB_VERSION_MAJOR 1
17528 #endif
17529
17530 #ifndef NULL
17531 #define NULL ((void*)0)
17532 #endif
17533
17534 int main() {
17535
17536 #if DB_VERSION_MAJOR > 1
17537         {
17538                 char *version;
17539                 int major, minor, patch;
17540
17541                 version = db_version( &major, &minor, &patch );
17542
17543                 if( major != DB_VERSION_MAJOR ||
17544                         minor < DB_VERSION_MINOR )
17545                 {
17546                         printf("Berkeley DB version mismatch\n"
17547                                 "\texpected: %s\n\tgot: %s\n",
17548                                 DB_VERSION_STRING, version);
17549                         return 1;
17550                 }
17551         }
17552 #endif
17553
17554 #if DB_VERSION_MAJOR > 2
17555         db_env_create( NULL, 0 );
17556 #elif DB_VERSION_MAJOR > 1
17557         db_appexit( NULL );
17558 #else
17559         (void) dbopen( NULL, 0, 0, 0, NULL);
17560 #endif
17561
17562 ; return 0; }
17563 EOF
17564 if { (eval echo configure:17565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17565   rm -rf conftest*
17566   ol_cv_db_db4=yes
17567 else
17568   echo "configure: failed program was:" >&5
17569   cat conftest.$ac_ext >&5
17570   rm -rf conftest*
17571   ol_cv_db_db4=no
17572 fi
17573 rm -f conftest*
17574
17575         LIBS="$ol_LIBS"
17576
17577 fi
17578
17579 echo "$ac_t""$ol_cv_db_db4" 1>&6
17580
17581         if test $ol_cv_db_db4 = yes ; then
17582                 ol_cv_lib_db=-ldb4
17583         fi
17584 fi
17585
17586 if test $ol_cv_lib_db = no ; then
17587         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17588 echo "configure:17589: checking for Berkeley DB link (-ldb-4)" >&5
17589 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17590   echo $ac_n "(cached) $ac_c" 1>&6
17591 else
17592   
17593         ol_DB_LIB=-ldb-4
17594         ol_LIBS=$LIBS
17595         LIBS="$ol_DB_LIB $LIBS"
17596
17597         cat > conftest.$ac_ext <<EOF
17598 #line 17599 "configure"
17599 #include "confdefs.h"
17600
17601 #ifdef HAVE_DB_185_H
17602 # include <db_185.h>
17603 #else
17604 # include <db.h>
17605 #endif
17606
17607 #ifndef DB_VERSION_MAJOR
17608 # define DB_VERSION_MAJOR 1
17609 #endif
17610
17611 #ifndef NULL
17612 #define NULL ((void*)0)
17613 #endif
17614
17615 int main() {
17616
17617 #if DB_VERSION_MAJOR > 1
17618         {
17619                 char *version;
17620                 int major, minor, patch;
17621
17622                 version = db_version( &major, &minor, &patch );
17623
17624                 if( major != DB_VERSION_MAJOR ||
17625                         minor < DB_VERSION_MINOR )
17626                 {
17627                         printf("Berkeley DB version mismatch\n"
17628                                 "\texpected: %s\n\tgot: %s\n",
17629                                 DB_VERSION_STRING, version);
17630                         return 1;
17631                 }
17632         }
17633 #endif
17634
17635 #if DB_VERSION_MAJOR > 2
17636         db_env_create( NULL, 0 );
17637 #elif DB_VERSION_MAJOR > 1
17638         db_appexit( NULL );
17639 #else
17640         (void) dbopen( NULL, 0, 0, 0, NULL);
17641 #endif
17642
17643 ; return 0; }
17644 EOF
17645 if { (eval echo configure:17646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17646   rm -rf conftest*
17647   ol_cv_db_db_4=yes
17648 else
17649   echo "configure: failed program was:" >&5
17650   cat conftest.$ac_ext >&5
17651   rm -rf conftest*
17652   ol_cv_db_db_4=no
17653 fi
17654 rm -f conftest*
17655
17656         LIBS="$ol_LIBS"
17657
17658 fi
17659
17660 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17661
17662         if test $ol_cv_db_db_4 = yes ; then
17663                 ol_cv_lib_db=-ldb-4
17664         fi
17665 fi
17666
17667 if test $ol_cv_lib_db = no ; then
17668         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17669 echo "configure:17670: checking for Berkeley DB link (-ldb)" >&5
17670 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17671   echo $ac_n "(cached) $ac_c" 1>&6
17672 else
17673   
17674         ol_DB_LIB=-ldb
17675         ol_LIBS=$LIBS
17676         LIBS="$ol_DB_LIB $LIBS"
17677
17678         cat > conftest.$ac_ext <<EOF
17679 #line 17680 "configure"
17680 #include "confdefs.h"
17681
17682 #ifdef HAVE_DB_185_H
17683 # include <db_185.h>
17684 #else
17685 # include <db.h>
17686 #endif
17687
17688 #ifndef DB_VERSION_MAJOR
17689 # define DB_VERSION_MAJOR 1
17690 #endif
17691
17692 #ifndef NULL
17693 #define NULL ((void*)0)
17694 #endif
17695
17696 int main() {
17697
17698 #if DB_VERSION_MAJOR > 1
17699         {
17700                 char *version;
17701                 int major, minor, patch;
17702
17703                 version = db_version( &major, &minor, &patch );
17704
17705                 if( major != DB_VERSION_MAJOR ||
17706                         minor < DB_VERSION_MINOR )
17707                 {
17708                         printf("Berkeley DB version mismatch\n"
17709                                 "\texpected: %s\n\tgot: %s\n",
17710                                 DB_VERSION_STRING, version);
17711                         return 1;
17712                 }
17713         }
17714 #endif
17715
17716 #if DB_VERSION_MAJOR > 2
17717         db_env_create( NULL, 0 );
17718 #elif DB_VERSION_MAJOR > 1
17719         db_appexit( NULL );
17720 #else
17721         (void) dbopen( NULL, 0, 0, 0, NULL);
17722 #endif
17723
17724 ; return 0; }
17725 EOF
17726 if { (eval echo configure:17727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17727   rm -rf conftest*
17728   ol_cv_db_db=yes
17729 else
17730   echo "configure: failed program was:" >&5
17731   cat conftest.$ac_ext >&5
17732   rm -rf conftest*
17733   ol_cv_db_db=no
17734 fi
17735 rm -f conftest*
17736
17737         LIBS="$ol_LIBS"
17738
17739 fi
17740
17741 echo "$ac_t""$ol_cv_db_db" 1>&6
17742
17743         if test $ol_cv_db_db = yes ; then
17744                 ol_cv_lib_db=-ldb
17745         fi
17746 fi
17747
17748 if test $ol_cv_lib_db = no ; then
17749         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17750 echo "configure:17751: checking for Berkeley DB link (-ldb3)" >&5
17751 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17752   echo $ac_n "(cached) $ac_c" 1>&6
17753 else
17754   
17755         ol_DB_LIB=-ldb3
17756         ol_LIBS=$LIBS
17757         LIBS="$ol_DB_LIB $LIBS"
17758
17759         cat > conftest.$ac_ext <<EOF
17760 #line 17761 "configure"
17761 #include "confdefs.h"
17762
17763 #ifdef HAVE_DB_185_H
17764 # include <db_185.h>
17765 #else
17766 # include <db.h>
17767 #endif
17768
17769 #ifndef DB_VERSION_MAJOR
17770 # define DB_VERSION_MAJOR 1
17771 #endif
17772
17773 #ifndef NULL
17774 #define NULL ((void*)0)
17775 #endif
17776
17777 int main() {
17778
17779 #if DB_VERSION_MAJOR > 1
17780         {
17781                 char *version;
17782                 int major, minor, patch;
17783
17784                 version = db_version( &major, &minor, &patch );
17785
17786                 if( major != DB_VERSION_MAJOR ||
17787                         minor < DB_VERSION_MINOR )
17788                 {
17789                         printf("Berkeley DB version mismatch\n"
17790                                 "\texpected: %s\n\tgot: %s\n",
17791                                 DB_VERSION_STRING, version);
17792                         return 1;
17793                 }
17794         }
17795 #endif
17796
17797 #if DB_VERSION_MAJOR > 2
17798         db_env_create( NULL, 0 );
17799 #elif DB_VERSION_MAJOR > 1
17800         db_appexit( NULL );
17801 #else
17802         (void) dbopen( NULL, 0, 0, 0, NULL);
17803 #endif
17804
17805 ; return 0; }
17806 EOF
17807 if { (eval echo configure:17808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17808   rm -rf conftest*
17809   ol_cv_db_db3=yes
17810 else
17811   echo "configure: failed program was:" >&5
17812   cat conftest.$ac_ext >&5
17813   rm -rf conftest*
17814   ol_cv_db_db3=no
17815 fi
17816 rm -f conftest*
17817
17818         LIBS="$ol_LIBS"
17819
17820 fi
17821
17822 echo "$ac_t""$ol_cv_db_db3" 1>&6
17823
17824         if test $ol_cv_db_db3 = yes ; then
17825                 ol_cv_lib_db=-ldb3
17826         fi
17827 fi
17828
17829 if test $ol_cv_lib_db = no ; then
17830         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17831 echo "configure:17832: checking for Berkeley DB link (-ldb-3)" >&5
17832 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17833   echo $ac_n "(cached) $ac_c" 1>&6
17834 else
17835   
17836         ol_DB_LIB=-ldb-3
17837         ol_LIBS=$LIBS
17838         LIBS="$ol_DB_LIB $LIBS"
17839
17840         cat > conftest.$ac_ext <<EOF
17841 #line 17842 "configure"
17842 #include "confdefs.h"
17843
17844 #ifdef HAVE_DB_185_H
17845 # include <db_185.h>
17846 #else
17847 # include <db.h>
17848 #endif
17849
17850 #ifndef DB_VERSION_MAJOR
17851 # define DB_VERSION_MAJOR 1
17852 #endif
17853
17854 #ifndef NULL
17855 #define NULL ((void*)0)
17856 #endif
17857
17858 int main() {
17859
17860 #if DB_VERSION_MAJOR > 1
17861         {
17862                 char *version;
17863                 int major, minor, patch;
17864
17865                 version = db_version( &major, &minor, &patch );
17866
17867                 if( major != DB_VERSION_MAJOR ||
17868                         minor < DB_VERSION_MINOR )
17869                 {
17870                         printf("Berkeley DB version mismatch\n"
17871                                 "\texpected: %s\n\tgot: %s\n",
17872                                 DB_VERSION_STRING, version);
17873                         return 1;
17874                 }
17875         }
17876 #endif
17877
17878 #if DB_VERSION_MAJOR > 2
17879         db_env_create( NULL, 0 );
17880 #elif DB_VERSION_MAJOR > 1
17881         db_appexit( NULL );
17882 #else
17883         (void) dbopen( NULL, 0, 0, 0, NULL);
17884 #endif
17885
17886 ; return 0; }
17887 EOF
17888 if { (eval echo configure:17889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17889   rm -rf conftest*
17890   ol_cv_db_db_3=yes
17891 else
17892   echo "configure: failed program was:" >&5
17893   cat conftest.$ac_ext >&5
17894   rm -rf conftest*
17895   ol_cv_db_db_3=no
17896 fi
17897 rm -f conftest*
17898
17899         LIBS="$ol_LIBS"
17900
17901 fi
17902
17903 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17904
17905         if test $ol_cv_db_db_3 = yes ; then
17906                 ol_cv_lib_db=-ldb-3
17907         fi
17908 fi
17909
17910 if test $ol_cv_lib_db = no ; then
17911         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17912 echo "configure:17913: checking for Berkeley DB link (-ldb2)" >&5
17913 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17914   echo $ac_n "(cached) $ac_c" 1>&6
17915 else
17916   
17917         ol_DB_LIB=-ldb2
17918         ol_LIBS=$LIBS
17919         LIBS="$ol_DB_LIB $LIBS"
17920
17921         cat > conftest.$ac_ext <<EOF
17922 #line 17923 "configure"
17923 #include "confdefs.h"
17924
17925 #ifdef HAVE_DB_185_H
17926 # include <db_185.h>
17927 #else
17928 # include <db.h>
17929 #endif
17930
17931 #ifndef DB_VERSION_MAJOR
17932 # define DB_VERSION_MAJOR 1
17933 #endif
17934
17935 #ifndef NULL
17936 #define NULL ((void*)0)
17937 #endif
17938
17939 int main() {
17940
17941 #if DB_VERSION_MAJOR > 1
17942         {
17943                 char *version;
17944                 int major, minor, patch;
17945
17946                 version = db_version( &major, &minor, &patch );
17947
17948                 if( major != DB_VERSION_MAJOR ||
17949                         minor < DB_VERSION_MINOR )
17950                 {
17951                         printf("Berkeley DB version mismatch\n"
17952                                 "\texpected: %s\n\tgot: %s\n",
17953                                 DB_VERSION_STRING, version);
17954                         return 1;
17955                 }
17956         }
17957 #endif
17958
17959 #if DB_VERSION_MAJOR > 2
17960         db_env_create( NULL, 0 );
17961 #elif DB_VERSION_MAJOR > 1
17962         db_appexit( NULL );
17963 #else
17964         (void) dbopen( NULL, 0, 0, 0, NULL);
17965 #endif
17966
17967 ; return 0; }
17968 EOF
17969 if { (eval echo configure:17970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17970   rm -rf conftest*
17971   ol_cv_db_db2=yes
17972 else
17973   echo "configure: failed program was:" >&5
17974   cat conftest.$ac_ext >&5
17975   rm -rf conftest*
17976   ol_cv_db_db2=no
17977 fi
17978 rm -f conftest*
17979
17980         LIBS="$ol_LIBS"
17981
17982 fi
17983
17984 echo "$ac_t""$ol_cv_db_db2" 1>&6
17985
17986         if test $ol_cv_db_db2 = yes ; then
17987                 ol_cv_lib_db=-ldb2
17988         fi
17989 fi
17990
17991 if test $ol_cv_lib_db = no ; then
17992         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17993 echo "configure:17994: checking for Berkeley DB link (-ldb-2)" >&5
17994 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17995   echo $ac_n "(cached) $ac_c" 1>&6
17996 else
17997   
17998         ol_DB_LIB=-ldb-2
17999         ol_LIBS=$LIBS
18000         LIBS="$ol_DB_LIB $LIBS"
18001
18002         cat > conftest.$ac_ext <<EOF
18003 #line 18004 "configure"
18004 #include "confdefs.h"
18005
18006 #ifdef HAVE_DB_185_H
18007 # include <db_185.h>
18008 #else
18009 # include <db.h>
18010 #endif
18011
18012 #ifndef DB_VERSION_MAJOR
18013 # define DB_VERSION_MAJOR 1
18014 #endif
18015
18016 #ifndef NULL
18017 #define NULL ((void*)0)
18018 #endif
18019
18020 int main() {
18021
18022 #if DB_VERSION_MAJOR > 1
18023         {
18024                 char *version;
18025                 int major, minor, patch;
18026
18027                 version = db_version( &major, &minor, &patch );
18028
18029                 if( major != DB_VERSION_MAJOR ||
18030                         minor < DB_VERSION_MINOR )
18031                 {
18032                         printf("Berkeley DB version mismatch\n"
18033                                 "\texpected: %s\n\tgot: %s\n",
18034                                 DB_VERSION_STRING, version);
18035                         return 1;
18036                 }
18037         }
18038 #endif
18039
18040 #if DB_VERSION_MAJOR > 2
18041         db_env_create( NULL, 0 );
18042 #elif DB_VERSION_MAJOR > 1
18043         db_appexit( NULL );
18044 #else
18045         (void) dbopen( NULL, 0, 0, 0, NULL);
18046 #endif
18047
18048 ; return 0; }
18049 EOF
18050 if { (eval echo configure:18051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18051   rm -rf conftest*
18052   ol_cv_db_db_2=yes
18053 else
18054   echo "configure: failed program was:" >&5
18055   cat conftest.$ac_ext >&5
18056   rm -rf conftest*
18057   ol_cv_db_db_2=no
18058 fi
18059 rm -f conftest*
18060
18061         LIBS="$ol_LIBS"
18062
18063 fi
18064
18065 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18066
18067         if test $ol_cv_db_db_2 = yes ; then
18068                 ol_cv_lib_db=-ldb-2
18069         fi
18070 fi
18071
18072 if test $ol_cv_lib_db = no ; then
18073         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18074 echo "configure:18075: checking for Berkeley DB link (-ldb1)" >&5
18075 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18076   echo $ac_n "(cached) $ac_c" 1>&6
18077 else
18078   
18079         ol_DB_LIB=-ldb1
18080         ol_LIBS=$LIBS
18081         LIBS="$ol_DB_LIB $LIBS"
18082
18083         cat > conftest.$ac_ext <<EOF
18084 #line 18085 "configure"
18085 #include "confdefs.h"
18086
18087 #ifdef HAVE_DB_185_H
18088 # include <db_185.h>
18089 #else
18090 # include <db.h>
18091 #endif
18092
18093 #ifndef DB_VERSION_MAJOR
18094 # define DB_VERSION_MAJOR 1
18095 #endif
18096
18097 #ifndef NULL
18098 #define NULL ((void*)0)
18099 #endif
18100
18101 int main() {
18102
18103 #if DB_VERSION_MAJOR > 1
18104         {
18105                 char *version;
18106                 int major, minor, patch;
18107
18108                 version = db_version( &major, &minor, &patch );
18109
18110                 if( major != DB_VERSION_MAJOR ||
18111                         minor < DB_VERSION_MINOR )
18112                 {
18113                         printf("Berkeley DB version mismatch\n"
18114                                 "\texpected: %s\n\tgot: %s\n",
18115                                 DB_VERSION_STRING, version);
18116                         return 1;
18117                 }
18118         }
18119 #endif
18120
18121 #if DB_VERSION_MAJOR > 2
18122         db_env_create( NULL, 0 );
18123 #elif DB_VERSION_MAJOR > 1
18124         db_appexit( NULL );
18125 #else
18126         (void) dbopen( NULL, 0, 0, 0, NULL);
18127 #endif
18128
18129 ; return 0; }
18130 EOF
18131 if { (eval echo configure:18132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18132   rm -rf conftest*
18133   ol_cv_db_db1=yes
18134 else
18135   echo "configure: failed program was:" >&5
18136   cat conftest.$ac_ext >&5
18137   rm -rf conftest*
18138   ol_cv_db_db1=no
18139 fi
18140 rm -f conftest*
18141
18142         LIBS="$ol_LIBS"
18143
18144 fi
18145
18146 echo "$ac_t""$ol_cv_db_db1" 1>&6
18147
18148         if test $ol_cv_db_db1 = yes ; then
18149                 ol_cv_lib_db=-ldb1
18150         fi
18151 fi
18152
18153 if test $ol_cv_lib_db = no ; then
18154         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18155 echo "configure:18156: checking for Berkeley DB link (-ldb-1)" >&5
18156 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18157   echo $ac_n "(cached) $ac_c" 1>&6
18158 else
18159   
18160         ol_DB_LIB=-ldb-1
18161         ol_LIBS=$LIBS
18162         LIBS="$ol_DB_LIB $LIBS"
18163
18164         cat > conftest.$ac_ext <<EOF
18165 #line 18166 "configure"
18166 #include "confdefs.h"
18167
18168 #ifdef HAVE_DB_185_H
18169 # include <db_185.h>
18170 #else
18171 # include <db.h>
18172 #endif
18173
18174 #ifndef DB_VERSION_MAJOR
18175 # define DB_VERSION_MAJOR 1
18176 #endif
18177
18178 #ifndef NULL
18179 #define NULL ((void*)0)
18180 #endif
18181
18182 int main() {
18183
18184 #if DB_VERSION_MAJOR > 1
18185         {
18186                 char *version;
18187                 int major, minor, patch;
18188
18189                 version = db_version( &major, &minor, &patch );
18190
18191                 if( major != DB_VERSION_MAJOR ||
18192                         minor < DB_VERSION_MINOR )
18193                 {
18194                         printf("Berkeley DB version mismatch\n"
18195                                 "\texpected: %s\n\tgot: %s\n",
18196                                 DB_VERSION_STRING, version);
18197                         return 1;
18198                 }
18199         }
18200 #endif
18201
18202 #if DB_VERSION_MAJOR > 2
18203         db_env_create( NULL, 0 );
18204 #elif DB_VERSION_MAJOR > 1
18205         db_appexit( NULL );
18206 #else
18207         (void) dbopen( NULL, 0, 0, 0, NULL);
18208 #endif
18209
18210 ; return 0; }
18211 EOF
18212 if { (eval echo configure:18213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18213   rm -rf conftest*
18214   ol_cv_db_db_1=yes
18215 else
18216   echo "configure: failed program was:" >&5
18217   cat conftest.$ac_ext >&5
18218   rm -rf conftest*
18219   ol_cv_db_db_1=no
18220 fi
18221 rm -f conftest*
18222
18223         LIBS="$ol_LIBS"
18224
18225 fi
18226
18227 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18228
18229         if test $ol_cv_db_db_1 = yes ; then
18230                 ol_cv_lib_db=-ldb-1
18231         fi
18232 fi
18233
18234
18235         if test "$ol_cv_lib_db" != no ; then
18236                 ol_cv_berkeley_db=yes
18237                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
18238 echo "configure:18239: checking for Berkeley DB thread support" >&5
18239 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
18240   echo $ac_n "(cached) $ac_c" 1>&6
18241 else
18242   
18243         ol_LIBS="$LIBS"
18244         if test $ol_cv_lib_db != yes ; then
18245                 LIBS="$ol_cv_lib_db"
18246         fi
18247
18248         if test "$cross_compiling" = yes; then
18249   ol_cv_berkeley_db_thread=cross
18250 else
18251   cat > conftest.$ac_ext <<EOF
18252 #line 18253 "configure"
18253 #include "confdefs.h"
18254
18255 #ifdef HAVE_DB_185_H
18256         choke me;
18257 #else
18258 #include <db.h>
18259 #endif
18260 #ifndef NULL
18261 #define NULL ((void *)0)
18262 #endif
18263 main()
18264 {
18265         int rc;
18266         u_int32_t flags = DB_CREATE |
18267 #ifdef DB_PRIVATE
18268                 DB_PRIVATE |
18269 #endif
18270                 DB_THREAD;
18271
18272 #if DB_VERSION_MAJOR > 2
18273         DB_ENV *env = NULL;
18274
18275         rc = db_env_create( &env, 0 );
18276
18277         flags |= DB_INIT_MPOOL;
18278 #ifdef DB_MPOOL_PRIVATE
18279         flags |= DB_MPOOL_PRIVATE;
18280 #endif
18281
18282         if( rc ) {
18283                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18284                 return rc;
18285         }
18286
18287 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
18288         rc = env->open( env, NULL, flags, 0 );
18289 #else
18290         rc = env->open( env, NULL, NULL, flags, 0 );
18291 #endif
18292
18293         if ( rc == 0 ) {
18294                 rc = env->close( env, 0 );
18295         }
18296
18297         if( rc ) {
18298                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18299                 return rc;
18300         }
18301
18302 #else
18303         DB_ENV env;
18304         memset( &env, '\0', sizeof(env) );
18305
18306         rc = db_appinit( NULL, NULL, &env, flags );
18307
18308         if( rc == 0 ) {
18309                 db_appexit( &env );
18310         }
18311
18312         unlink("__db_mpool.share");
18313         unlink("__db_lock.share");
18314 #endif
18315
18316         return rc;
18317 }
18318 EOF
18319 if { (eval echo configure:18320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
18320 then
18321   ol_cv_berkeley_db_thread=yes
18322 else
18323   echo "configure: failed program was:" >&5
18324   cat conftest.$ac_ext >&5
18325   rm -fr conftest*
18326   ol_cv_berkeley_db_thread=no
18327 fi
18328 rm -fr conftest*
18329 fi
18330
18331
18332         LIBS="$ol_LIBS"
18333
18334 fi
18335
18336 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
18337
18338         if test $ol_cv_berkeley_db_thread != no ; then
18339                 cat >> confdefs.h <<\EOF
18340 #define HAVE_BERKELEY_DB_THREAD 1
18341 EOF
18342
18343         fi
18344
18345         fi
18346 fi
18347
18348         fi
18349
18350         if test $ol_cv_berkeley_db != no ; then
18351                 cat >> confdefs.h <<\EOF
18352 #define HAVE_BERKELEY_DB 1
18353 EOF
18354
18355
18356                 ol_link_ldbm=berkeley
18357                 ol_with_ldbm_api=berkeley
18358
18359                 if test $ol_with_ldbm_type = hash ; then
18360                         cat >> confdefs.h <<\EOF
18361 #define LDBM_USE_DBHASH 1
18362 EOF
18363
18364                 else
18365                         cat >> confdefs.h <<\EOF
18366 #define LDBM_USE_DBBTREE 1
18367 EOF
18368
18369                 fi
18370
18371                                                 if test $ol_cv_lib_db != yes ; then
18372                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
18373                 fi
18374         fi
18375 fi
18376
18377 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
18378         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
18379 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
18380         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
18381 echo "configure:18382: checking Berkeley DB version for BDB backend" >&5
18382 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
18383   echo $ac_n "(cached) $ac_c" 1>&6
18384 else
18385   
18386         cat > conftest.$ac_ext <<EOF
18387 #line 18388 "configure"
18388 #include "confdefs.h"
18389
18390 #include <db.h>
18391
18392  /* this check could be improved */
18393 #ifndef DB_VERSION_MAJOR
18394 #       define DB_VERSION_MAJOR 1
18395 #endif
18396
18397 /* require 4.0 or later */
18398 #if DB_VERSION_MAJOR >= 4 
18399         __db_version_compat
18400 #endif
18401         
18402 EOF
18403 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18404   egrep "__db_version_compat" >/dev/null 2>&1; then
18405   rm -rf conftest*
18406   ol_cv_bdb_compat=yes
18407 else
18408   rm -rf conftest*
18409   ol_cv_bdb_compat=no
18410 fi
18411 rm -f conftest*
18412
18413 fi
18414
18415 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
18416
18417
18418         if test $ol_cv_bdb_compat = yes ; then
18419                 ol_enable_bdb=yes
18420         elif test $ol_enable_bdb = yes ; then
18421                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
18422         else
18423                 ol_enable_bdb=no
18424         fi
18425 fi
18426
18427 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
18428         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
18429         ol_with_ldbm_api=none
18430 fi
18431
18432 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
18433         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
18434 echo "configure:18435: checking for MDBM library" >&5
18435 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
18436   echo $ac_n "(cached) $ac_c" 1>&6
18437 else
18438         ol_LIBS="$LIBS"
18439         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
18440 echo "configure:18441: checking for mdbm_set_chain" >&5
18441 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
18442   echo $ac_n "(cached) $ac_c" 1>&6
18443 else
18444   cat > conftest.$ac_ext <<EOF
18445 #line 18446 "configure"
18446 #include "confdefs.h"
18447 /* System header to define __stub macros and hopefully few prototypes,
18448     which can conflict with char mdbm_set_chain(); below.  */
18449 #include <assert.h>
18450 /* Override any gcc2 internal prototype to avoid an error.  */
18451 /* We use char because int might match the return type of a gcc2
18452     builtin and then its argument prototype would still apply.  */
18453 char mdbm_set_chain();
18454 char (*f)();
18455
18456 int main() {
18457
18458 /* The GNU C library defines this for functions which it implements
18459     to always fail with ENOSYS.  Some functions are actually named
18460     something starting with __ and the normal name is an alias.  */
18461 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
18462 choke me
18463 #else
18464 f = mdbm_set_chain;
18465 #endif
18466
18467 ; return 0; }
18468 EOF
18469 if { (eval echo configure:18470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18470   rm -rf conftest*
18471   eval "ac_cv_func_mdbm_set_chain=yes"
18472 else
18473   echo "configure: failed program was:" >&5
18474   cat conftest.$ac_ext >&5
18475   rm -rf conftest*
18476   eval "ac_cv_func_mdbm_set_chain=no"
18477 fi
18478 rm -f conftest*
18479 fi
18480
18481 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
18482   echo "$ac_t""yes" 1>&6
18483   ol_cv_lib_mdbm=yes
18484 else
18485   echo "$ac_t""no" 1>&6
18486
18487                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
18488 echo "configure:18489: checking for mdbm_set_chain in -lmdbm" >&5
18489 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
18490 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18491   echo $ac_n "(cached) $ac_c" 1>&6
18492 else
18493   ac_save_LIBS="$LIBS"
18494 LIBS="-lmdbm  $LIBS"
18495 cat > conftest.$ac_ext <<EOF
18496 #line 18497 "configure"
18497 #include "confdefs.h"
18498 /* Override any gcc2 internal prototype to avoid an error.  */
18499 /* We use char because int might match the return type of a gcc2
18500     builtin and then its argument prototype would still apply.  */
18501 char mdbm_set_chain();
18502
18503 int main() {
18504 mdbm_set_chain()
18505 ; return 0; }
18506 EOF
18507 if { (eval echo configure:18508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18508   rm -rf conftest*
18509   eval "ac_cv_lib_$ac_lib_var=yes"
18510 else
18511   echo "configure: failed program was:" >&5
18512   cat conftest.$ac_ext >&5
18513   rm -rf conftest*
18514   eval "ac_cv_lib_$ac_lib_var=no"
18515 fi
18516 rm -f conftest*
18517 LIBS="$ac_save_LIBS"
18518
18519 fi
18520 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18521   echo "$ac_t""yes" 1>&6
18522   ol_cv_lib_mdbm=-lmdbm
18523 else
18524   echo "$ac_t""no" 1>&6
18525 ol_cv_lib_mdbm=no
18526 fi
18527
18528         
18529 fi
18530
18531         LIBS="$ol_LIBS"
18532
18533 fi
18534
18535 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
18536
18537
18538  for ac_hdr in mdbm.h
18539 do
18540 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18541 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18542 echo "configure:18543: checking for $ac_hdr" >&5
18543 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18544   echo $ac_n "(cached) $ac_c" 1>&6
18545 else
18546   cat > conftest.$ac_ext <<EOF
18547 #line 18548 "configure"
18548 #include "confdefs.h"
18549 #include <$ac_hdr>
18550 EOF
18551 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18552 { (eval echo configure:18553: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18553 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18554 if test -z "$ac_err"; then
18555   rm -rf conftest*
18556   eval "ac_cv_header_$ac_safe=yes"
18557 else
18558   echo "$ac_err" >&5
18559   echo "configure: failed program was:" >&5
18560   cat conftest.$ac_ext >&5
18561   rm -rf conftest*
18562   eval "ac_cv_header_$ac_safe=no"
18563 fi
18564 rm -f conftest*
18565 fi
18566 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18567   echo "$ac_t""yes" 1>&6
18568     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18569   cat >> confdefs.h <<EOF
18570 #define $ac_tr_hdr 1
18571 EOF
18572  
18573 else
18574   echo "$ac_t""no" 1>&6
18575 fi
18576 done
18577
18578  echo $ac_n "checking for db""... $ac_c" 1>&6
18579 echo "configure:18580: checking for db" >&5
18580 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
18581   echo $ac_n "(cached) $ac_c" 1>&6
18582 else
18583   
18584         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
18585                 ol_cv_mdbm=no
18586         else
18587                 ol_cv_mdbm=yes
18588         fi
18589
18590 fi
18591
18592 echo "$ac_t""$ol_cv_mdbm" 1>&6
18593  if test $ol_cv_mdbm = yes ; then
18594         cat >> confdefs.h <<\EOF
18595 #define HAVE_MDBM 1
18596 EOF
18597
18598  fi
18599
18600
18601         if test $ol_cv_mdbm = yes ; then
18602                 ol_link_ldbm=mdbm
18603                 ol_with_ldbm_api=mdbm
18604                 if test $ol_cv_lib_mdbm != yes ; then
18605                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
18606                 fi
18607         fi
18608 fi
18609
18610 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
18611         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
18612 echo "configure:18613: checking for GDBM library" >&5
18613 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
18614   echo $ac_n "(cached) $ac_c" 1>&6
18615 else
18616         ol_LIBS="$LIBS"
18617         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
18618 echo "configure:18619: checking for gdbm_open" >&5
18619 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
18620   echo $ac_n "(cached) $ac_c" 1>&6
18621 else
18622   cat > conftest.$ac_ext <<EOF
18623 #line 18624 "configure"
18624 #include "confdefs.h"
18625 /* System header to define __stub macros and hopefully few prototypes,
18626     which can conflict with char gdbm_open(); below.  */
18627 #include <assert.h>
18628 /* Override any gcc2 internal prototype to avoid an error.  */
18629 /* We use char because int might match the return type of a gcc2
18630     builtin and then its argument prototype would still apply.  */
18631 char gdbm_open();
18632 char (*f)();
18633
18634 int main() {
18635
18636 /* The GNU C library defines this for functions which it implements
18637     to always fail with ENOSYS.  Some functions are actually named
18638     something starting with __ and the normal name is an alias.  */
18639 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
18640 choke me
18641 #else
18642 f = gdbm_open;
18643 #endif
18644
18645 ; return 0; }
18646 EOF
18647 if { (eval echo configure:18648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18648   rm -rf conftest*
18649   eval "ac_cv_func_gdbm_open=yes"
18650 else
18651   echo "configure: failed program was:" >&5
18652   cat conftest.$ac_ext >&5
18653   rm -rf conftest*
18654   eval "ac_cv_func_gdbm_open=no"
18655 fi
18656 rm -f conftest*
18657 fi
18658
18659 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
18660   echo "$ac_t""yes" 1>&6
18661   ol_cv_lib_gdbm=yes
18662 else
18663   echo "$ac_t""no" 1>&6
18664
18665                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
18666 echo "configure:18667: checking for gdbm_open in -lgdbm" >&5
18667 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
18668 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18669   echo $ac_n "(cached) $ac_c" 1>&6
18670 else
18671   ac_save_LIBS="$LIBS"
18672 LIBS="-lgdbm  $LIBS"
18673 cat > conftest.$ac_ext <<EOF
18674 #line 18675 "configure"
18675 #include "confdefs.h"
18676 /* Override any gcc2 internal prototype to avoid an error.  */
18677 /* We use char because int might match the return type of a gcc2
18678     builtin and then its argument prototype would still apply.  */
18679 char gdbm_open();
18680
18681 int main() {
18682 gdbm_open()
18683 ; return 0; }
18684 EOF
18685 if { (eval echo configure:18686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18686   rm -rf conftest*
18687   eval "ac_cv_lib_$ac_lib_var=yes"
18688 else
18689   echo "configure: failed program was:" >&5
18690   cat conftest.$ac_ext >&5
18691   rm -rf conftest*
18692   eval "ac_cv_lib_$ac_lib_var=no"
18693 fi
18694 rm -f conftest*
18695 LIBS="$ac_save_LIBS"
18696
18697 fi
18698 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18699   echo "$ac_t""yes" 1>&6
18700   ol_cv_lib_gdbm=-lgdbm
18701 else
18702   echo "$ac_t""no" 1>&6
18703 ol_cv_lib_gdbm=no
18704 fi
18705
18706         
18707 fi
18708
18709         LIBS="$ol_LIBS"
18710
18711 fi
18712
18713 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
18714
18715
18716  for ac_hdr in gdbm.h
18717 do
18718 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18719 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18720 echo "configure:18721: checking for $ac_hdr" >&5
18721 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18722   echo $ac_n "(cached) $ac_c" 1>&6
18723 else
18724   cat > conftest.$ac_ext <<EOF
18725 #line 18726 "configure"
18726 #include "confdefs.h"
18727 #include <$ac_hdr>
18728 EOF
18729 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18730 { (eval echo configure:18731: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18731 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18732 if test -z "$ac_err"; then
18733   rm -rf conftest*
18734   eval "ac_cv_header_$ac_safe=yes"
18735 else
18736   echo "$ac_err" >&5
18737   echo "configure: failed program was:" >&5
18738   cat conftest.$ac_ext >&5
18739   rm -rf conftest*
18740   eval "ac_cv_header_$ac_safe=no"
18741 fi
18742 rm -f conftest*
18743 fi
18744 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18745   echo "$ac_t""yes" 1>&6
18746     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18747   cat >> confdefs.h <<EOF
18748 #define $ac_tr_hdr 1
18749 EOF
18750  
18751 else
18752   echo "$ac_t""no" 1>&6
18753 fi
18754 done
18755
18756  echo $ac_n "checking for db""... $ac_c" 1>&6
18757 echo "configure:18758: checking for db" >&5
18758 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
18759   echo $ac_n "(cached) $ac_c" 1>&6
18760 else
18761   
18762         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
18763                 ol_cv_gdbm=no
18764         else
18765                 ol_cv_gdbm=yes
18766         fi
18767
18768 fi
18769
18770 echo "$ac_t""$ol_cv_gdbm" 1>&6
18771  if test $ol_cv_gdbm = yes ; then
18772         cat >> confdefs.h <<\EOF
18773 #define HAVE_GDBM 1
18774 EOF
18775
18776  fi
18777
18778
18779         if test $ol_cv_gdbm = yes ; then
18780                 ol_link_ldbm=gdbm
18781                 ol_with_ldbm_api=gdbm
18782
18783                 if test $ol_cv_lib_gdbm != yes ; then
18784                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
18785                 fi
18786         fi
18787 fi
18788
18789 if test $ol_with_ldbm_api = ndbm ; then
18790         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
18791 echo "configure:18792: checking for NDBM library" >&5
18792 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
18793   echo $ac_n "(cached) $ac_c" 1>&6
18794 else
18795         ol_LIBS="$LIBS"
18796         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
18797 echo "configure:18798: checking for dbm_open" >&5
18798 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
18799   echo $ac_n "(cached) $ac_c" 1>&6
18800 else
18801   cat > conftest.$ac_ext <<EOF
18802 #line 18803 "configure"
18803 #include "confdefs.h"
18804 /* System header to define __stub macros and hopefully few prototypes,
18805     which can conflict with char dbm_open(); below.  */
18806 #include <assert.h>
18807 /* Override any gcc2 internal prototype to avoid an error.  */
18808 /* We use char because int might match the return type of a gcc2
18809     builtin and then its argument prototype would still apply.  */
18810 char dbm_open();
18811 char (*f)();
18812
18813 int main() {
18814
18815 /* The GNU C library defines this for functions which it implements
18816     to always fail with ENOSYS.  Some functions are actually named
18817     something starting with __ and the normal name is an alias.  */
18818 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
18819 choke me
18820 #else
18821 f = dbm_open;
18822 #endif
18823
18824 ; return 0; }
18825 EOF
18826 if { (eval echo configure:18827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18827   rm -rf conftest*
18828   eval "ac_cv_func_dbm_open=yes"
18829 else
18830   echo "configure: failed program was:" >&5
18831   cat conftest.$ac_ext >&5
18832   rm -rf conftest*
18833   eval "ac_cv_func_dbm_open=no"
18834 fi
18835 rm -f conftest*
18836 fi
18837
18838 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
18839   echo "$ac_t""yes" 1>&6
18840   ol_cv_lib_ndbm=yes
18841 else
18842   echo "$ac_t""no" 1>&6
18843
18844                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
18845 echo "configure:18846: checking for dbm_open in -lndbm" >&5
18846 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
18847 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18848   echo $ac_n "(cached) $ac_c" 1>&6
18849 else
18850   ac_save_LIBS="$LIBS"
18851 LIBS="-lndbm  $LIBS"
18852 cat > conftest.$ac_ext <<EOF
18853 #line 18854 "configure"
18854 #include "confdefs.h"
18855 /* Override any gcc2 internal prototype to avoid an error.  */
18856 /* We use char because int might match the return type of a gcc2
18857     builtin and then its argument prototype would still apply.  */
18858 char dbm_open();
18859
18860 int main() {
18861 dbm_open()
18862 ; return 0; }
18863 EOF
18864 if { (eval echo configure:18865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18865   rm -rf conftest*
18866   eval "ac_cv_lib_$ac_lib_var=yes"
18867 else
18868   echo "configure: failed program was:" >&5
18869   cat conftest.$ac_ext >&5
18870   rm -rf conftest*
18871   eval "ac_cv_lib_$ac_lib_var=no"
18872 fi
18873 rm -f conftest*
18874 LIBS="$ac_save_LIBS"
18875
18876 fi
18877 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18878   echo "$ac_t""yes" 1>&6
18879   ol_cv_lib_ndbm=-lndbm
18880 else
18881   echo "$ac_t""no" 1>&6
18882
18883                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
18884 echo "configure:18885: checking for dbm_open in -ldbm" >&5
18885 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
18886 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18887   echo $ac_n "(cached) $ac_c" 1>&6
18888 else
18889   ac_save_LIBS="$LIBS"
18890 LIBS="-ldbm  $LIBS"
18891 cat > conftest.$ac_ext <<EOF
18892 #line 18893 "configure"
18893 #include "confdefs.h"
18894 /* Override any gcc2 internal prototype to avoid an error.  */
18895 /* We use char because int might match the return type of a gcc2
18896     builtin and then its argument prototype would still apply.  */
18897 char dbm_open();
18898
18899 int main() {
18900 dbm_open()
18901 ; return 0; }
18902 EOF
18903 if { (eval echo configure:18904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18904   rm -rf conftest*
18905   eval "ac_cv_lib_$ac_lib_var=yes"
18906 else
18907   echo "configure: failed program was:" >&5
18908   cat conftest.$ac_ext >&5
18909   rm -rf conftest*
18910   eval "ac_cv_lib_$ac_lib_var=no"
18911 fi
18912 rm -f conftest*
18913 LIBS="$ac_save_LIBS"
18914
18915 fi
18916 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18917   echo "$ac_t""yes" 1>&6
18918   ol_cv_lib_ndbm=-ldbm
18919 else
18920   echo "$ac_t""no" 1>&6
18921 ol_cv_lib_ndbm=no
18922 fi
18923                 
18924 fi
18925
18926         
18927 fi
18928
18929         LIBS="$ol_LIBS"
18930
18931 fi
18932
18933 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
18934
18935
18936  for ac_hdr in ndbm.h
18937 do
18938 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18939 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18940 echo "configure:18941: checking for $ac_hdr" >&5
18941 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18942   echo $ac_n "(cached) $ac_c" 1>&6
18943 else
18944   cat > conftest.$ac_ext <<EOF
18945 #line 18946 "configure"
18946 #include "confdefs.h"
18947 #include <$ac_hdr>
18948 EOF
18949 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18950 { (eval echo configure:18951: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18951 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18952 if test -z "$ac_err"; then
18953   rm -rf conftest*
18954   eval "ac_cv_header_$ac_safe=yes"
18955 else
18956   echo "$ac_err" >&5
18957   echo "configure: failed program was:" >&5
18958   cat conftest.$ac_ext >&5
18959   rm -rf conftest*
18960   eval "ac_cv_header_$ac_safe=no"
18961 fi
18962 rm -f conftest*
18963 fi
18964 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18965   echo "$ac_t""yes" 1>&6
18966     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18967   cat >> confdefs.h <<EOF
18968 #define $ac_tr_hdr 1
18969 EOF
18970  
18971 else
18972   echo "$ac_t""no" 1>&6
18973 fi
18974 done
18975
18976  echo $ac_n "checking for db""... $ac_c" 1>&6
18977 echo "configure:18978: checking for db" >&5
18978 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
18979   echo $ac_n "(cached) $ac_c" 1>&6
18980 else
18981   
18982         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
18983                 ol_cv_ndbm=no
18984         else
18985                 ol_cv_ndbm=yes
18986         fi
18987
18988 fi
18989
18990 echo "$ac_t""$ol_cv_ndbm" 1>&6
18991  if test $ol_cv_ndbm = yes ; then
18992         cat >> confdefs.h <<\EOF
18993 #define HAVE_NDBM 1
18994 EOF
18995
18996  fi
18997
18998
18999         if test $ol_cv_ndbm = yes ; then
19000                 ol_link_ldbm=ndbm
19001                 ol_with_ldbm_api=ndbm
19002
19003                 if test $ol_cv_lib_ndbm != yes ; then
19004                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
19005                 fi
19006         fi
19007 fi
19008
19009 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
19010         echo "configure: warning: could not find suitable LDBM backend" 1>&2
19011         if test $ol_enable_ldbm = yes ; then
19012                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
19013         fi
19014
19015         echo "configure: warning: disabling LDBM" 1>&2
19016         ol_enable_ldbm=no
19017 fi
19018
19019 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
19020         BUILD_LIBS_DYNAMIC=shared
19021         cat >> confdefs.h <<\EOF
19022 #define LDAP_LIBS_DYNAMIC 1
19023 EOF
19024
19025 else
19026         BUILD_LIBS_DYNAMIC=static
19027 fi
19028
19029 if test $ol_enable_wrappers != no ; then
19030         for ac_hdr in tcpd.h
19031 do
19032 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19033 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19034 echo "configure:19035: checking for $ac_hdr" >&5
19035 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19036   echo $ac_n "(cached) $ac_c" 1>&6
19037 else
19038   cat > conftest.$ac_ext <<EOF
19039 #line 19040 "configure"
19040 #include "confdefs.h"
19041 #include <$ac_hdr>
19042 EOF
19043 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19044 { (eval echo configure:19045: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19045 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19046 if test -z "$ac_err"; then
19047   rm -rf conftest*
19048   eval "ac_cv_header_$ac_safe=yes"
19049 else
19050   echo "$ac_err" >&5
19051   echo "configure: failed program was:" >&5
19052   cat conftest.$ac_ext >&5
19053   rm -rf conftest*
19054   eval "ac_cv_header_$ac_safe=no"
19055 fi
19056 rm -f conftest*
19057 fi
19058 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19059   echo "$ac_t""yes" 1>&6
19060     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19061   cat >> confdefs.h <<EOF
19062 #define $ac_tr_hdr 1
19063 EOF
19064  
19065                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
19066 echo "configure:19067: checking for TCP wrappers library" >&5
19067                 save_LIBS="$LIBS"
19068                 LIBS="$LIBS -lwrap"
19069                 cat > conftest.$ac_ext <<EOF
19070 #line 19071 "configure"
19071 #include "confdefs.h"
19072
19073 #include <tcpd.h>
19074 int allow_severity = 0;
19075 int deny_severity  = 0;
19076
19077 struct request_info *req;
19078                 
19079 int main() {
19080
19081 hosts_access(req)
19082                 
19083 ; return 0; }
19084 EOF
19085 if { (eval echo configure:19086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19086   rm -rf conftest*
19087   echo "$ac_t""-lwrap" 1>&6
19088                 have_wrappers=yes
19089                 LIBS="$save_LIBS"
19090 else
19091   echo "configure: failed program was:" >&5
19092   cat conftest.$ac_ext >&5
19093   rm -rf conftest*
19094   
19095                                 LIBS="$LIBS -lnsl"
19096                 cat > conftest.$ac_ext <<EOF
19097 #line 19098 "configure"
19098 #include "confdefs.h"
19099
19100 #include <tcpd.h>
19101 int allow_severity = 0;
19102 int deny_severity  = 0;
19103
19104 struct request_info *req;
19105                 
19106 int main() {
19107
19108 hosts_access(req)
19109                 
19110 ; return 0; }
19111 EOF
19112 if { (eval echo configure:19113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19113   rm -rf conftest*
19114   echo "$ac_t""-lwrap -lnsl" 1>&6
19115                 have_wrappers=yes
19116                 LIBS="$save_LIBS -lnsl"
19117 else
19118   echo "configure: failed program was:" >&5
19119   cat conftest.$ac_ext >&5
19120   rm -rf conftest*
19121   
19122                 echo "$ac_t""no" 1>&6
19123                 have_wrappers=no
19124                 LIBS=$save_LIBS
19125 fi
19126 rm -f conftest*
19127 fi
19128 rm -f conftest*
19129 else
19130   echo "$ac_t""no" 1>&6
19131 have_wrappers=no
19132 fi
19133 done
19134
19135
19136         if test $have_wrappers = yes ; then
19137                 cat >> confdefs.h <<\EOF
19138 #define HAVE_TCPD 1
19139 EOF
19140
19141                 WRAP_LIBS="-lwrap"
19142         elif test $ol_enable_wrappers = yes ; then
19143                 { echo "configure: error: could not find TCP wrappers, select apppropriate options ore disable" 1>&2; exit 1; }
19144         else
19145                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
19146                 WRAP_LIBS=""
19147         fi
19148 fi
19149
19150 if test $ol_enable_syslog != no ; then
19151         echo $ac_n "checking for openlog""... $ac_c" 1>&6
19152 echo "configure:19153: checking for openlog" >&5
19153 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
19154   echo $ac_n "(cached) $ac_c" 1>&6
19155 else
19156   cat > conftest.$ac_ext <<EOF
19157 #line 19158 "configure"
19158 #include "confdefs.h"
19159 /* System header to define __stub macros and hopefully few prototypes,
19160     which can conflict with char openlog(); below.  */
19161 #include <assert.h>
19162 /* Override any gcc2 internal prototype to avoid an error.  */
19163 /* We use char because int might match the return type of a gcc2
19164     builtin and then its argument prototype would still apply.  */
19165 char openlog();
19166 char (*f)();
19167
19168 int main() {
19169
19170 /* The GNU C library defines this for functions which it implements
19171     to always fail with ENOSYS.  Some functions are actually named
19172     something starting with __ and the normal name is an alias.  */
19173 #if defined (__stub_openlog) || defined (__stub___openlog)
19174 choke me
19175 #else
19176 f = openlog;
19177 #endif
19178
19179 ; return 0; }
19180 EOF
19181 if { (eval echo configure:19182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19182   rm -rf conftest*
19183   eval "ac_cv_func_openlog=yes"
19184 else
19185   echo "configure: failed program was:" >&5
19186   cat conftest.$ac_ext >&5
19187   rm -rf conftest*
19188   eval "ac_cv_func_openlog=no"
19189 fi
19190 rm -f conftest*
19191 fi
19192
19193 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
19194   echo "$ac_t""yes" 1>&6
19195   :
19196 else
19197   echo "$ac_t""no" 1>&6
19198 fi
19199
19200         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
19201                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
19202         fi
19203         ol_enable_syslog=$ac_cv_func_openlog
19204 fi
19205
19206
19207 ol_link_sql=no
19208 if test $ol_enable_sql != no ; then
19209         for ac_hdr in sql.h sqlext.h
19210 do
19211 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19212 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19213 echo "configure:19214: checking for $ac_hdr" >&5
19214 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19215   echo $ac_n "(cached) $ac_c" 1>&6
19216 else
19217   cat > conftest.$ac_ext <<EOF
19218 #line 19219 "configure"
19219 #include "confdefs.h"
19220 #include <$ac_hdr>
19221 EOF
19222 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19223 { (eval echo configure:19224: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19224 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19225 if test -z "$ac_err"; then
19226   rm -rf conftest*
19227   eval "ac_cv_header_$ac_safe=yes"
19228 else
19229   echo "$ac_err" >&5
19230   echo "configure: failed program was:" >&5
19231   cat conftest.$ac_ext >&5
19232   rm -rf conftest*
19233   eval "ac_cv_header_$ac_safe=no"
19234 fi
19235 rm -f conftest*
19236 fi
19237 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19238   echo "$ac_t""yes" 1>&6
19239     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19240   cat >> confdefs.h <<EOF
19241 #define $ac_tr_hdr 1
19242 EOF
19243  
19244 else
19245   echo "$ac_t""no" 1>&6
19246 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
19247         
19248 fi
19249 done
19250
19251
19252         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
19253 echo "configure:19254: checking for SQLDriverConnect in -liodbc" >&5
19254 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19255 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19256   echo $ac_n "(cached) $ac_c" 1>&6
19257 else
19258   ac_save_LIBS="$LIBS"
19259 LIBS="-liodbc  $LIBS"
19260 cat > conftest.$ac_ext <<EOF
19261 #line 19262 "configure"
19262 #include "confdefs.h"
19263 /* Override any gcc2 internal prototype to avoid an error.  */
19264 /* We use char because int might match the return type of a gcc2
19265     builtin and then its argument prototype would still apply.  */
19266 char SQLDriverConnect();
19267
19268 int main() {
19269 SQLDriverConnect()
19270 ; return 0; }
19271 EOF
19272 if { (eval echo configure:19273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19273   rm -rf conftest*
19274   eval "ac_cv_lib_$ac_lib_var=yes"
19275 else
19276   echo "configure: failed program was:" >&5
19277   cat conftest.$ac_ext >&5
19278   rm -rf conftest*
19279   eval "ac_cv_lib_$ac_lib_var=no"
19280 fi
19281 rm -f conftest*
19282 LIBS="$ac_save_LIBS"
19283
19284 fi
19285 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19286   echo "$ac_t""yes" 1>&6
19287   have_iodbc=yes
19288 else
19289   echo "$ac_t""no" 1>&6
19290 have_iodbc=no
19291 fi
19292
19293         if test $have_iodbc = yes ; then
19294                 ol_link_sql="-liodbc"
19295         else
19296                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
19297 echo "configure:19298: checking for SQLDriverConnect in -lodbc" >&5
19298 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19299 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19300   echo $ac_n "(cached) $ac_c" 1>&6
19301 else
19302   ac_save_LIBS="$LIBS"
19303 LIBS="-lodbc  $LIBS"
19304 cat > conftest.$ac_ext <<EOF
19305 #line 19306 "configure"
19306 #include "confdefs.h"
19307 /* Override any gcc2 internal prototype to avoid an error.  */
19308 /* We use char because int might match the return type of a gcc2
19309     builtin and then its argument prototype would still apply.  */
19310 char SQLDriverConnect();
19311
19312 int main() {
19313 SQLDriverConnect()
19314 ; return 0; }
19315 EOF
19316 if { (eval echo configure:19317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19317   rm -rf conftest*
19318   eval "ac_cv_lib_$ac_lib_var=yes"
19319 else
19320   echo "configure: failed program was:" >&5
19321   cat conftest.$ac_ext >&5
19322   rm -rf conftest*
19323   eval "ac_cv_lib_$ac_lib_var=no"
19324 fi
19325 rm -f conftest*
19326 LIBS="$ac_save_LIBS"
19327
19328 fi
19329 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19330   echo "$ac_t""yes" 1>&6
19331   have_odbc=yes
19332 else
19333   echo "$ac_t""no" 1>&6
19334 have_odbc=no
19335 fi
19336
19337                 if test $have_odbc = yes ; then
19338                         ol_link_sql="-lodbc"
19339                 fi
19340         fi
19341
19342         if test $ol_link_sql != no ; then
19343                 SLAPD_SQL_LIBS="$ol_link_sql"
19344
19345         elif test $ol_enable_sql != auto ; then
19346                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
19347         fi
19348 fi
19349
19350 if test $ol_enable_tcl != no ; then
19351         for ac_hdr in tcl.h
19352 do
19353 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19354 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19355 echo "configure:19356: checking for $ac_hdr" >&5
19356 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19357   echo $ac_n "(cached) $ac_c" 1>&6
19358 else
19359   cat > conftest.$ac_ext <<EOF
19360 #line 19361 "configure"
19361 #include "confdefs.h"
19362 #include <$ac_hdr>
19363 EOF
19364 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19365 { (eval echo configure:19366: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19366 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19367 if test -z "$ac_err"; then
19368   rm -rf conftest*
19369   eval "ac_cv_header_$ac_safe=yes"
19370 else
19371   echo "$ac_err" >&5
19372   echo "configure: failed program was:" >&5
19373   cat conftest.$ac_ext >&5
19374   rm -rf conftest*
19375   eval "ac_cv_header_$ac_safe=no"
19376 fi
19377 rm -f conftest*
19378 fi
19379 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19380   echo "$ac_t""yes" 1>&6
19381     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19382   cat >> confdefs.h <<EOF
19383 #define $ac_tr_hdr 1
19384 EOF
19385  
19386 else
19387   echo "$ac_t""no" 1>&6
19388 fi
19389 done
19390
19391
19392         if test $ac_cv_header_tcl_h != yes ; then
19393                 have_tcl=no
19394         else
19395                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
19396                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
19397 echo "configure:19398: checking for main in -l$lib" >&5
19398 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
19399 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19400   echo $ac_n "(cached) $ac_c" 1>&6
19401 else
19402   ac_save_LIBS="$LIBS"
19403 LIBS="-l$lib  $LIBS"
19404 cat > conftest.$ac_ext <<EOF
19405 #line 19406 "configure"
19406 #include "confdefs.h"
19407
19408 int main() {
19409 main()
19410 ; return 0; }
19411 EOF
19412 if { (eval echo configure:19413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19413   rm -rf conftest*
19414   eval "ac_cv_lib_$ac_lib_var=yes"
19415 else
19416   echo "configure: failed program was:" >&5
19417   cat conftest.$ac_ext >&5
19418   rm -rf conftest*
19419   eval "ac_cv_lib_$ac_lib_var=no"
19420 fi
19421 rm -f conftest*
19422 LIBS="$ac_save_LIBS"
19423
19424 fi
19425 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19426   echo "$ac_t""yes" 1>&6
19427   have_tcl=yes
19428                            if test x"$ol_with_tcl_module" = "xstatic" ; then
19429                                         SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
19430                            else
19431                                         MOD_TCL_LIB="-l${lib}"
19432                            fi;break
19433 else
19434   echo "$ac_t""no" 1>&6
19435 have_tcl=no
19436 fi
19437
19438                 done
19439         fi
19440
19441         if test $have_tcl != yes ; then
19442                 echo "configure: warning: could not find -ltcl" 1>&2
19443                 if test $ol_enable_tcl = yes ; then
19444                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
19445                 fi
19446
19447                 ol_enable_tcl=no
19448         fi
19449 fi
19450
19451 ol_link_termcap=no
19452 for ac_hdr in termcap.h ncurses.h
19453 do
19454 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19455 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19456 echo "configure:19457: checking for $ac_hdr" >&5
19457 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19458   echo $ac_n "(cached) $ac_c" 1>&6
19459 else
19460   cat > conftest.$ac_ext <<EOF
19461 #line 19462 "configure"
19462 #include "confdefs.h"
19463 #include <$ac_hdr>
19464 EOF
19465 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19466 { (eval echo configure:19467: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19467 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19468 if test -z "$ac_err"; then
19469   rm -rf conftest*
19470   eval "ac_cv_header_$ac_safe=yes"
19471 else
19472   echo "$ac_err" >&5
19473   echo "configure: failed program was:" >&5
19474   cat conftest.$ac_ext >&5
19475   rm -rf conftest*
19476   eval "ac_cv_header_$ac_safe=no"
19477 fi
19478 rm -f conftest*
19479 fi
19480 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19481   echo "$ac_t""yes" 1>&6
19482     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19483   cat >> confdefs.h <<EOF
19484 #define $ac_tr_hdr 1
19485 EOF
19486  
19487 else
19488   echo "$ac_t""no" 1>&6
19489 fi
19490 done
19491
19492
19493 if test $ol_link_termcap = no ; then
19494         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
19495 echo "configure:19496: checking for tputs in -ltermcap" >&5
19496 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
19497 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19498   echo $ac_n "(cached) $ac_c" 1>&6
19499 else
19500   ac_save_LIBS="$LIBS"
19501 LIBS="-ltermcap  $LIBS"
19502 cat > conftest.$ac_ext <<EOF
19503 #line 19504 "configure"
19504 #include "confdefs.h"
19505 /* Override any gcc2 internal prototype to avoid an error.  */
19506 /* We use char because int might match the return type of a gcc2
19507     builtin and then its argument prototype would still apply.  */
19508 char tputs();
19509
19510 int main() {
19511 tputs()
19512 ; return 0; }
19513 EOF
19514 if { (eval echo configure:19515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19515   rm -rf conftest*
19516   eval "ac_cv_lib_$ac_lib_var=yes"
19517 else
19518   echo "configure: failed program was:" >&5
19519   cat conftest.$ac_ext >&5
19520   rm -rf conftest*
19521   eval "ac_cv_lib_$ac_lib_var=no"
19522 fi
19523 rm -f conftest*
19524 LIBS="$ac_save_LIBS"
19525
19526 fi
19527 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19528   echo "$ac_t""yes" 1>&6
19529   have_termcap=yes
19530 else
19531   echo "$ac_t""no" 1>&6
19532 have_termcap=no
19533 fi
19534
19535         if test $have_termcap = yes ; then
19536                 cat >> confdefs.h <<\EOF
19537 #define HAVE_TERMCAP 1
19538 EOF
19539
19540                 ol_link_termcap=yes
19541                 TERMCAP_LIBS=-ltermcap
19542         fi
19543 fi
19544
19545 if test $ol_link_termcap = no ; then
19546         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
19547 echo "configure:19548: checking for initscr in -lncurses" >&5
19548 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
19549 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19550   echo $ac_n "(cached) $ac_c" 1>&6
19551 else
19552   ac_save_LIBS="$LIBS"
19553 LIBS="-lncurses  $LIBS"
19554 cat > conftest.$ac_ext <<EOF
19555 #line 19556 "configure"
19556 #include "confdefs.h"
19557 /* Override any gcc2 internal prototype to avoid an error.  */
19558 /* We use char because int might match the return type of a gcc2
19559     builtin and then its argument prototype would still apply.  */
19560 char initscr();
19561
19562 int main() {
19563 initscr()
19564 ; return 0; }
19565 EOF
19566 if { (eval echo configure:19567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19567   rm -rf conftest*
19568   eval "ac_cv_lib_$ac_lib_var=yes"
19569 else
19570   echo "configure: failed program was:" >&5
19571   cat conftest.$ac_ext >&5
19572   rm -rf conftest*
19573   eval "ac_cv_lib_$ac_lib_var=no"
19574 fi
19575 rm -f conftest*
19576 LIBS="$ac_save_LIBS"
19577
19578 fi
19579 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19580   echo "$ac_t""yes" 1>&6
19581   have_ncurses=yes
19582 else
19583   echo "$ac_t""no" 1>&6
19584 have_ncurses=no
19585 fi
19586
19587         if test $have_ncurses = yes ; then
19588                 cat >> confdefs.h <<\EOF
19589 #define HAVE_NCURSES 1
19590 EOF
19591
19592                 ol_link_termcap=yes
19593                 TERMCAP_LIBS=-lncurses
19594         fi
19595 fi
19596
19597 if test $ol_link_termcap = no ; then
19598         cat >> confdefs.h <<\EOF
19599 #define NO_TERMCAP 1
19600 EOF
19601
19602         TERMCAP_LIBS=
19603 fi
19604
19605 ol_link_sasl=no
19606 ol_link_spasswd=no
19607 if test $ol_with_cyrus_sasl != no ; then
19608         for ac_hdr in sasl/sasl.h sasl.h
19609 do
19610 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19611 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19612 echo "configure:19613: checking for $ac_hdr" >&5
19613 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19614   echo $ac_n "(cached) $ac_c" 1>&6
19615 else
19616   cat > conftest.$ac_ext <<EOF
19617 #line 19618 "configure"
19618 #include "confdefs.h"
19619 #include <$ac_hdr>
19620 EOF
19621 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19622 { (eval echo configure:19623: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19623 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19624 if test -z "$ac_err"; then
19625   rm -rf conftest*
19626   eval "ac_cv_header_$ac_safe=yes"
19627 else
19628   echo "$ac_err" >&5
19629   echo "configure: failed program was:" >&5
19630   cat conftest.$ac_ext >&5
19631   rm -rf conftest*
19632   eval "ac_cv_header_$ac_safe=no"
19633 fi
19634 rm -f conftest*
19635 fi
19636 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19637   echo "$ac_t""yes" 1>&6
19638     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19639   cat >> confdefs.h <<EOF
19640 #define $ac_tr_hdr 1
19641 EOF
19642  
19643 else
19644   echo "$ac_t""no" 1>&6
19645 fi
19646 done
19647
19648
19649         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
19650                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
19651 echo "configure:19652: checking for sasl_client_init in -lsasl2" >&5
19652 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
19653 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19654   echo $ac_n "(cached) $ac_c" 1>&6
19655 else
19656   ac_save_LIBS="$LIBS"
19657 LIBS="-lsasl2  $LIBS"
19658 cat > conftest.$ac_ext <<EOF
19659 #line 19660 "configure"
19660 #include "confdefs.h"
19661 /* Override any gcc2 internal prototype to avoid an error.  */
19662 /* We use char because int might match the return type of a gcc2
19663     builtin and then its argument prototype would still apply.  */
19664 char sasl_client_init();
19665
19666 int main() {
19667 sasl_client_init()
19668 ; return 0; }
19669 EOF
19670 if { (eval echo configure:19671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19671   rm -rf conftest*
19672   eval "ac_cv_lib_$ac_lib_var=yes"
19673 else
19674   echo "configure: failed program was:" >&5
19675   cat conftest.$ac_ext >&5
19676   rm -rf conftest*
19677   eval "ac_cv_lib_$ac_lib_var=no"
19678 fi
19679 rm -f conftest*
19680 LIBS="$ac_save_LIBS"
19681
19682 fi
19683 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19684   echo "$ac_t""yes" 1>&6
19685   ol_link_sasl="-lsasl2"
19686 else
19687   echo "$ac_t""no" 1>&6
19688 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
19689 echo "configure:19690: checking for sasl_client_init in -lsasl" >&5
19690 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
19691 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19692   echo $ac_n "(cached) $ac_c" 1>&6
19693 else
19694   ac_save_LIBS="$LIBS"
19695 LIBS="-lsasl  $LIBS"
19696 cat > conftest.$ac_ext <<EOF
19697 #line 19698 "configure"
19698 #include "confdefs.h"
19699 /* Override any gcc2 internal prototype to avoid an error.  */
19700 /* We use char because int might match the return type of a gcc2
19701     builtin and then its argument prototype would still apply.  */
19702 char sasl_client_init();
19703
19704 int main() {
19705 sasl_client_init()
19706 ; return 0; }
19707 EOF
19708 if { (eval echo configure:19709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19709   rm -rf conftest*
19710   eval "ac_cv_lib_$ac_lib_var=yes"
19711 else
19712   echo "configure: failed program was:" >&5
19713   cat conftest.$ac_ext >&5
19714   rm -rf conftest*
19715   eval "ac_cv_lib_$ac_lib_var=no"
19716 fi
19717 rm -f conftest*
19718 LIBS="$ac_save_LIBS"
19719
19720 fi
19721 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19722   echo "$ac_t""yes" 1>&6
19723   ol_link_sasl="-lsasl"
19724 else
19725   echo "$ac_t""no" 1>&6
19726 fi
19727
19728 fi
19729
19730         fi
19731
19732         if test $ol_link_sasl = no ; then
19733                 if test $ol_with_cyrus_sasl != auto ; then
19734                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
19735                 else
19736                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
19737                         echo "configure: warning: SASL authentication not supported!" 1>&2
19738                         if test $ol_link_tls = no ; then
19739                                 echo "configure: warning: Strong authentication not supported!" 1>&2
19740                         fi
19741                 fi
19742         else
19743                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
19744 echo "configure:19745: checking Cyrus SASL library version" >&5
19745 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
19746   echo $ac_n "(cached) $ac_c" 1>&6
19747 else
19748   
19749         cat > conftest.$ac_ext <<EOF
19750 #line 19751 "configure"
19751 #include "confdefs.h"
19752
19753 #ifdef HAVE_SASL_SASL_H
19754 #include <sasl/sasl.h>
19755 #else
19756 #include <sasl.h>
19757 #endif
19758
19759 /* require 2.1.3 or later */
19760 #if SASL_VERSION_MAJOR == 1  && SASL_VERSION_MINOR >= 5
19761         char *__sasl_compat = "1.5.x okay";
19762 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
19763         __sasl_compat "2.2+ or better okay (we guess)";
19764 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
19765         && SASL_VERSION_STEP >=3
19766         __sasl_compat = "2.1.3+ or better okay";
19767 #endif
19768         
19769 EOF
19770 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19771   egrep "__sasl_compat" >/dev/null 2>&1; then
19772   rm -rf conftest*
19773   ol_cv_sasl_compat=yes
19774 else
19775   rm -rf conftest*
19776   ol_cv_sasl_compat=no
19777 fi
19778 rm -f conftest*
19779
19780 fi
19781
19782 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
19783
19784                 if test $ol_cv_sasl_compat = no ; then
19785                         ol_link_sasl=no
19786                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
19787                 fi
19788
19789                 cat >> confdefs.h <<\EOF
19790 #define HAVE_CYRUS_SASL 1
19791 EOF
19792
19793                 SASL_LIBS="$ol_link_sasl"
19794                 if test $ol_enable_spasswd != no ; then
19795                         ol_link_spasswd=yes
19796                 fi
19797
19798                 ac_save_LIBS="$LIBS"
19799                 LIBS="$LIBS $ol_link_sasl"
19800                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
19801 echo "configure:19802: checking for sasl_version" >&5
19802 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
19803   echo $ac_n "(cached) $ac_c" 1>&6
19804 else
19805   cat > conftest.$ac_ext <<EOF
19806 #line 19807 "configure"
19807 #include "confdefs.h"
19808 /* System header to define __stub macros and hopefully few prototypes,
19809     which can conflict with char sasl_version(); below.  */
19810 #include <assert.h>
19811 /* Override any gcc2 internal prototype to avoid an error.  */
19812 /* We use char because int might match the return type of a gcc2
19813     builtin and then its argument prototype would still apply.  */
19814 char sasl_version();
19815 char (*f)();
19816
19817 int main() {
19818
19819 /* The GNU C library defines this for functions which it implements
19820     to always fail with ENOSYS.  Some functions are actually named
19821     something starting with __ and the normal name is an alias.  */
19822 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
19823 choke me
19824 #else
19825 f = sasl_version;
19826 #endif
19827
19828 ; return 0; }
19829 EOF
19830 if { (eval echo configure:19831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19831   rm -rf conftest*
19832   eval "ac_cv_func_sasl_version=yes"
19833 else
19834   echo "configure: failed program was:" >&5
19835   cat conftest.$ac_ext >&5
19836   rm -rf conftest*
19837   eval "ac_cv_func_sasl_version=no"
19838 fi
19839 rm -f conftest*
19840 fi
19841
19842 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
19843   echo "$ac_t""yes" 1>&6
19844   cat >> confdefs.h <<\EOF
19845 #define HAVE_SASL_VERSION 1
19846 EOF
19847
19848 else
19849   echo "$ac_t""no" 1>&6
19850 fi
19851
19852                 LIBS="$ac_save_LIBS"
19853         fi
19854
19855 else
19856         echo "configure: warning: SASL authentication not supported!" 1>&2
19857         if test $ol_link_tls = no ; then
19858                 echo "configure: warning: Strong authentication not supported!" 1>&2
19859         fi
19860 fi
19861
19862 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
19863         dev=no
19864         if test -r /dev/urandom ; then
19865                 dev="/dev/urandom";
19866         elif test -r /idev/urandom ; then
19867                 dev="/idev/urandom";
19868         elif test -r /dev/srandom ; then
19869                 dev="/dev/srandom";
19870         elif test -r /dev/random ; then
19871                 dev="/dev/random";
19872         elif test -r /idev/random ; then
19873                 dev="/idev/random";
19874         fi
19875
19876         if test $dev != no ; then
19877                 cat >> confdefs.h <<EOF
19878 #define URANDOM_DEVICE "$dev"
19879 EOF
19880
19881         fi
19882 fi
19883
19884 ol_link_fetch=no
19885 if test $ol_with_fetch != no ; then
19886         ol_LIBS=$LIBS
19887 LIBS="-lfetch -lcom_err $LIBS"
19888 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
19889 echo "configure:19890: checking fetch(3) library" >&5
19890 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
19891   echo $ac_n "(cached) $ac_c" 1>&6
19892 else
19893   
19894         cat > conftest.$ac_ext <<EOF
19895 #line 19896 "configure"
19896 #include "confdefs.h"
19897
19898 #include <sys/param.h>
19899 #include <stdio.h>
19900 #include <fetch.h>
19901 int main() {
19902 struct url *u = fetchParseURL("file:///"); 
19903 ; return 0; }
19904 EOF
19905 if { (eval echo configure:19906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19906   rm -rf conftest*
19907   ol_cv_lib_fetch=yes
19908 else
19909   echo "configure: failed program was:" >&5
19910   cat conftest.$ac_ext >&5
19911   rm -rf conftest*
19912   ol_cv_lib_fetch=no
19913 fi
19914 rm -f conftest*
19915 fi
19916
19917 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
19918 LIBS=$ol_LIBS
19919 if test $ol_cv_lib_fetch != no ; then
19920         ol_link_fetch="-lfetch -lcom_err"
19921         cat >> confdefs.h <<\EOF
19922 #define HAVE_FETCH 1
19923 EOF
19924
19925 fi
19926
19927
19928         if test $ol_cv_lib_fetch != no ; then
19929                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
19930                 ol_link_fetch=freebsd
19931
19932         elif test $ol_with_fetch != auto ; then
19933                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
19934         fi 
19935 fi
19936
19937 ol_link_readline=no
19938 if test $ol_with_readline != no ; then
19939         for ac_hdr in readline/readline.h readline/history.h
19940 do
19941 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19942 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19943 echo "configure:19944: checking for $ac_hdr" >&5
19944 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19945   echo $ac_n "(cached) $ac_c" 1>&6
19946 else
19947   cat > conftest.$ac_ext <<EOF
19948 #line 19949 "configure"
19949 #include "confdefs.h"
19950 #include <$ac_hdr>
19951 EOF
19952 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19953 { (eval echo configure:19954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19954 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19955 if test -z "$ac_err"; then
19956   rm -rf conftest*
19957   eval "ac_cv_header_$ac_safe=yes"
19958 else
19959   echo "$ac_err" >&5
19960   echo "configure: failed program was:" >&5
19961   cat conftest.$ac_ext >&5
19962   rm -rf conftest*
19963   eval "ac_cv_header_$ac_safe=no"
19964 fi
19965 rm -f conftest*
19966 fi
19967 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19968   echo "$ac_t""yes" 1>&6
19969     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19970   cat >> confdefs.h <<EOF
19971 #define $ac_tr_hdr 1
19972 EOF
19973  
19974 else
19975   echo "$ac_t""no" 1>&6
19976 fi
19977 done
19978
19979
19980         if test $ac_cv_header_readline_readline_h = yes ; then
19981                 save_LIBS="$LIBS"
19982                 LIBS="$TERMCAP_LIBS $LIBS"
19983                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
19984 echo "configure:19985: checking for readline in -lreadline" >&5
19985 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
19986 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19987   echo $ac_n "(cached) $ac_c" 1>&6
19988 else
19989   ac_save_LIBS="$LIBS"
19990 LIBS="-lreadline  $LIBS"
19991 cat > conftest.$ac_ext <<EOF
19992 #line 19993 "configure"
19993 #include "confdefs.h"
19994 /* Override any gcc2 internal prototype to avoid an error.  */
19995 /* We use char because int might match the return type of a gcc2
19996     builtin and then its argument prototype would still apply.  */
19997 char readline();
19998
19999 int main() {
20000 readline()
20001 ; return 0; }
20002 EOF
20003 if { (eval echo configure:20004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20004   rm -rf conftest*
20005   eval "ac_cv_lib_$ac_lib_var=yes"
20006 else
20007   echo "configure: failed program was:" >&5
20008   cat conftest.$ac_ext >&5
20009   rm -rf conftest*
20010   eval "ac_cv_lib_$ac_lib_var=no"
20011 fi
20012 rm -f conftest*
20013 LIBS="$ac_save_LIBS"
20014
20015 fi
20016 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20017   echo "$ac_t""yes" 1>&6
20018   have_readline=yes
20019 else
20020   echo "$ac_t""no" 1>&6
20021 have_readline=no
20022 fi
20023
20024                 LIBS="$save_LIBS"
20025                         
20026                 if test $have_readline = yes ; then
20027                         ol_with_readline=found
20028                         ol_link_readline=yes
20029
20030                         READLINE_LIBS="-lreadline"
20031                 fi
20032         fi
20033 fi
20034
20035 if test $ol_link_readline = yes ; then
20036         cat >> confdefs.h <<\EOF
20037 #define HAVE_READLINE 1
20038 EOF
20039
20040 fi
20041
20042
20043 if test $ol_enable_crypt != no ; then
20044         save_LIBS="$LIBS"
20045         LIBS="$TLS_LIBS $LIBS"
20046
20047         echo $ac_n "checking for crypt""... $ac_c" 1>&6
20048 echo "configure:20049: checking for crypt" >&5
20049 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
20050   echo $ac_n "(cached) $ac_c" 1>&6
20051 else
20052   cat > conftest.$ac_ext <<EOF
20053 #line 20054 "configure"
20054 #include "confdefs.h"
20055 /* System header to define __stub macros and hopefully few prototypes,
20056     which can conflict with char crypt(); below.  */
20057 #include <assert.h>
20058 /* Override any gcc2 internal prototype to avoid an error.  */
20059 /* We use char because int might match the return type of a gcc2
20060     builtin and then its argument prototype would still apply.  */
20061 char crypt();
20062 char (*f)();
20063
20064 int main() {
20065
20066 /* The GNU C library defines this for functions which it implements
20067     to always fail with ENOSYS.  Some functions are actually named
20068     something starting with __ and the normal name is an alias.  */
20069 #if defined (__stub_crypt) || defined (__stub___crypt)
20070 choke me
20071 #else
20072 f = crypt;
20073 #endif
20074
20075 ; return 0; }
20076 EOF
20077 if { (eval echo configure:20078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20078   rm -rf conftest*
20079   eval "ac_cv_func_crypt=yes"
20080 else
20081   echo "configure: failed program was:" >&5
20082   cat conftest.$ac_ext >&5
20083   rm -rf conftest*
20084   eval "ac_cv_func_crypt=no"
20085 fi
20086 rm -f conftest*
20087 fi
20088
20089 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
20090   echo "$ac_t""yes" 1>&6
20091   have_crypt=yes
20092 else
20093   echo "$ac_t""no" 1>&6
20094
20095                 LIBS="$save_LIBS"
20096                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
20097 echo "configure:20098: checking for crypt in -lcrypt" >&5
20098 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
20099 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20100   echo $ac_n "(cached) $ac_c" 1>&6
20101 else
20102   ac_save_LIBS="$LIBS"
20103 LIBS="-lcrypt  $LIBS"
20104 cat > conftest.$ac_ext <<EOF
20105 #line 20106 "configure"
20106 #include "confdefs.h"
20107 /* Override any gcc2 internal prototype to avoid an error.  */
20108 /* We use char because int might match the return type of a gcc2
20109     builtin and then its argument prototype would still apply.  */
20110 char crypt();
20111
20112 int main() {
20113 crypt()
20114 ; return 0; }
20115 EOF
20116 if { (eval echo configure:20117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20117   rm -rf conftest*
20118   eval "ac_cv_lib_$ac_lib_var=yes"
20119 else
20120   echo "configure: failed program was:" >&5
20121   cat conftest.$ac_ext >&5
20122   rm -rf conftest*
20123   eval "ac_cv_lib_$ac_lib_var=no"
20124 fi
20125 rm -f conftest*
20126 LIBS="$ac_save_LIBS"
20127
20128 fi
20129 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20130   echo "$ac_t""yes" 1>&6
20131   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
20132                         have_crypt=yes
20133 else
20134   echo "$ac_t""no" 1>&6
20135 have_crypt=no
20136 fi
20137
20138 fi
20139
20140
20141         LIBS="$save_LIBS"
20142
20143         if test $have_crypt = yes ; then
20144                 cat >> confdefs.h <<\EOF
20145 #define HAVE_CRYPT 1
20146 EOF
20147
20148         else
20149                 echo "configure: warning: could not find crypt" 1>&2
20150                 if test $ol_enable_crypt = yes ; then
20151                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
20152                 fi
20153
20154                 echo "configure: warning: disabling crypt support" 1>&2
20155                 ol_enable_crypt=no
20156         fi
20157 fi
20158
20159 if test $ol_enable_proctitle != no ; then
20160         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
20161 echo "configure:20162: checking for setproctitle" >&5
20162 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
20163   echo $ac_n "(cached) $ac_c" 1>&6
20164 else
20165   cat > conftest.$ac_ext <<EOF
20166 #line 20167 "configure"
20167 #include "confdefs.h"
20168 /* System header to define __stub macros and hopefully few prototypes,
20169     which can conflict with char setproctitle(); below.  */
20170 #include <assert.h>
20171 /* Override any gcc2 internal prototype to avoid an error.  */
20172 /* We use char because int might match the return type of a gcc2
20173     builtin and then its argument prototype would still apply.  */
20174 char setproctitle();
20175 char (*f)();
20176
20177 int main() {
20178
20179 /* The GNU C library defines this for functions which it implements
20180     to always fail with ENOSYS.  Some functions are actually named
20181     something starting with __ and the normal name is an alias.  */
20182 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
20183 choke me
20184 #else
20185 f = setproctitle;
20186 #endif
20187
20188 ; return 0; }
20189 EOF
20190 if { (eval echo configure:20191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20191   rm -rf conftest*
20192   eval "ac_cv_func_setproctitle=yes"
20193 else
20194   echo "configure: failed program was:" >&5
20195   cat conftest.$ac_ext >&5
20196   rm -rf conftest*
20197   eval "ac_cv_func_setproctitle=no"
20198 fi
20199 rm -f conftest*
20200 fi
20201
20202 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
20203   echo "$ac_t""yes" 1>&6
20204   have_setproctitle=yes
20205 else
20206   echo "$ac_t""no" 1>&6
20207
20208                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
20209 echo "configure:20210: checking for setproctitle in -lutil" >&5
20210 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
20211 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20212   echo $ac_n "(cached) $ac_c" 1>&6
20213 else
20214   ac_save_LIBS="$LIBS"
20215 LIBS="-lutil  $LIBS"
20216 cat > conftest.$ac_ext <<EOF
20217 #line 20218 "configure"
20218 #include "confdefs.h"
20219 /* Override any gcc2 internal prototype to avoid an error.  */
20220 /* We use char because int might match the return type of a gcc2
20221     builtin and then its argument prototype would still apply.  */
20222 char setproctitle();
20223
20224 int main() {
20225 setproctitle()
20226 ; return 0; }
20227 EOF
20228 if { (eval echo configure:20229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20229   rm -rf conftest*
20230   eval "ac_cv_lib_$ac_lib_var=yes"
20231 else
20232   echo "configure: failed program was:" >&5
20233   cat conftest.$ac_ext >&5
20234   rm -rf conftest*
20235   eval "ac_cv_lib_$ac_lib_var=no"
20236 fi
20237 rm -f conftest*
20238 LIBS="$ac_save_LIBS"
20239
20240 fi
20241 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20242   echo "$ac_t""yes" 1>&6
20243   have_setproctitle=yes
20244                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
20245 else
20246   echo "$ac_t""no" 1>&6
20247 have_setproctitle=no
20248                         LIBOBJS="$LIBOBJS setproctitle.o"
20249                         LIBSRCS="$LIBSRCS setproctitle.c"
20250 fi
20251
20252 fi
20253
20254
20255         if test $have_setproctitle = yes ; then
20256                 cat >> confdefs.h <<\EOF
20257 #define HAVE_SETPROCTITLE 1
20258 EOF
20259
20260         fi
20261 fi
20262
20263 if test $ol_enable_slp != no ; then
20264         for ac_hdr in slp.h 
20265 do
20266 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20267 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20268 echo "configure:20269: checking for $ac_hdr" >&5
20269 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20270   echo $ac_n "(cached) $ac_c" 1>&6
20271 else
20272   cat > conftest.$ac_ext <<EOF
20273 #line 20274 "configure"
20274 #include "confdefs.h"
20275 #include <$ac_hdr>
20276 EOF
20277 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20278 { (eval echo configure:20279: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20279 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20280 if test -z "$ac_err"; then
20281   rm -rf conftest*
20282   eval "ac_cv_header_$ac_safe=yes"
20283 else
20284   echo "$ac_err" >&5
20285   echo "configure: failed program was:" >&5
20286   cat conftest.$ac_ext >&5
20287   rm -rf conftest*
20288   eval "ac_cv_header_$ac_safe=no"
20289 fi
20290 rm -f conftest*
20291 fi
20292 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20293   echo "$ac_t""yes" 1>&6
20294     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20295   cat >> confdefs.h <<EOF
20296 #define $ac_tr_hdr 1
20297 EOF
20298  
20299 else
20300   echo "$ac_t""no" 1>&6
20301 fi
20302 done
20303
20304
20305         if test $ac_cv_header_slp_h = yes ; then
20306                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
20307 echo "configure:20308: checking for SLPOpen in -lslp" >&5
20308 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
20309 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20310   echo $ac_n "(cached) $ac_c" 1>&6
20311 else
20312   ac_save_LIBS="$LIBS"
20313 LIBS="-lslp  $LIBS"
20314 cat > conftest.$ac_ext <<EOF
20315 #line 20316 "configure"
20316 #include "confdefs.h"
20317 /* Override any gcc2 internal prototype to avoid an error.  */
20318 /* We use char because int might match the return type of a gcc2
20319     builtin and then its argument prototype would still apply.  */
20320 char SLPOpen();
20321
20322 int main() {
20323 SLPOpen()
20324 ; return 0; }
20325 EOF
20326 if { (eval echo configure:20327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20327   rm -rf conftest*
20328   eval "ac_cv_lib_$ac_lib_var=yes"
20329 else
20330   echo "configure: failed program was:" >&5
20331   cat conftest.$ac_ext >&5
20332   rm -rf conftest*
20333   eval "ac_cv_lib_$ac_lib_var=no"
20334 fi
20335 rm -f conftest*
20336 LIBS="$ac_save_LIBS"
20337
20338 fi
20339 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20340   echo "$ac_t""yes" 1>&6
20341   have_slp=yes
20342 else
20343   echo "$ac_t""no" 1>&6
20344 have_slp=no
20345 fi
20346
20347                 if test $have_slp = yes ; then
20348                         cat >> confdefs.h <<\EOF
20349 #define HAVE_SLP 1
20350 EOF
20351
20352                         SLAPD_SLP_LIBS=-lslp
20353                 fi
20354
20355         elif test $ol_enable_slp = yes ; then
20356                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
20357         fi
20358 fi
20359
20360 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
20361 echo "configure:20362: checking for ANSI C header files" >&5
20362 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
20363   echo $ac_n "(cached) $ac_c" 1>&6
20364 else
20365   cat > conftest.$ac_ext <<EOF
20366 #line 20367 "configure"
20367 #include "confdefs.h"
20368 #include <stdlib.h>
20369 #include <stdarg.h>
20370 #include <string.h>
20371 #include <float.h>
20372 EOF
20373 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20374 { (eval echo configure:20375: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20375 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20376 if test -z "$ac_err"; then
20377   rm -rf conftest*
20378   ac_cv_header_stdc=yes
20379 else
20380   echo "$ac_err" >&5
20381   echo "configure: failed program was:" >&5
20382   cat conftest.$ac_ext >&5
20383   rm -rf conftest*
20384   ac_cv_header_stdc=no
20385 fi
20386 rm -f conftest*
20387
20388 if test $ac_cv_header_stdc = yes; then
20389   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
20390 cat > conftest.$ac_ext <<EOF
20391 #line 20392 "configure"
20392 #include "confdefs.h"
20393 #include <string.h>
20394 EOF
20395 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20396   egrep "memchr" >/dev/null 2>&1; then
20397   :
20398 else
20399   rm -rf conftest*
20400   ac_cv_header_stdc=no
20401 fi
20402 rm -f conftest*
20403
20404 fi
20405
20406 if test $ac_cv_header_stdc = yes; then
20407   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
20408 cat > conftest.$ac_ext <<EOF
20409 #line 20410 "configure"
20410 #include "confdefs.h"
20411 #include <stdlib.h>
20412 EOF
20413 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20414   egrep "free" >/dev/null 2>&1; then
20415   :
20416 else
20417   rm -rf conftest*
20418   ac_cv_header_stdc=no
20419 fi
20420 rm -f conftest*
20421
20422 fi
20423
20424 if test $ac_cv_header_stdc = yes; then
20425   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
20426 if test "$cross_compiling" = yes; then
20427   :
20428 else
20429   cat > conftest.$ac_ext <<EOF
20430 #line 20431 "configure"
20431 #include "confdefs.h"
20432 #include <ctype.h>
20433 #if ((' ' & 0x0FF) == 0x020)
20434 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
20435 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
20436 #else
20437 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
20438  || ('j' <= (c) && (c) <= 'r') \
20439  || ('s' <= (c) && (c) <= 'z'))
20440 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
20441 #endif
20442 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
20443 int main () { int i; for (i = 0; i < 256; i++)
20444 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
20445 exit (0); }
20446
20447 EOF
20448 if { (eval echo configure:20449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20449 then
20450   :
20451 else
20452   echo "configure: failed program was:" >&5
20453   cat conftest.$ac_ext >&5
20454   rm -fr conftest*
20455   ac_cv_header_stdc=no
20456 fi
20457 rm -fr conftest*
20458 fi
20459
20460 fi
20461 fi
20462
20463 echo "$ac_t""$ac_cv_header_stdc" 1>&6
20464 if test $ac_cv_header_stdc = yes; then
20465   cat >> confdefs.h <<\EOF
20466 #define STDC_HEADERS 1
20467 EOF
20468
20469 fi
20470
20471 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
20472 echo "configure:20473: checking for mode_t" >&5
20473 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
20474   echo $ac_n "(cached) $ac_c" 1>&6
20475 else
20476   cat > conftest.$ac_ext <<EOF
20477 #line 20478 "configure"
20478 #include "confdefs.h"
20479 #include <sys/types.h>
20480 #if STDC_HEADERS
20481 #include <stdlib.h>
20482 #include <stddef.h>
20483 #endif
20484
20485 EOF
20486 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20487   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20488   rm -rf conftest*
20489   eval "ac_cv_type_mode_t=yes"
20490 else
20491   rm -rf conftest*
20492   eval "ac_cv_type_mode_t=no"
20493 fi
20494 rm -f conftest*
20495
20496 fi
20497 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
20498   echo "$ac_t""yes" 1>&6
20499 else
20500   echo "$ac_t""no" 1>&6
20501   cat >> confdefs.h <<EOF
20502 #define mode_t int
20503 EOF
20504
20505 fi
20506
20507 echo $ac_n "checking for off_t""... $ac_c" 1>&6
20508 echo "configure:20509: checking for off_t" >&5
20509 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
20510   echo $ac_n "(cached) $ac_c" 1>&6
20511 else
20512   cat > conftest.$ac_ext <<EOF
20513 #line 20514 "configure"
20514 #include "confdefs.h"
20515 #include <sys/types.h>
20516 #if STDC_HEADERS
20517 #include <stdlib.h>
20518 #include <stddef.h>
20519 #endif
20520
20521 EOF
20522 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20523   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20524   rm -rf conftest*
20525   eval "ac_cv_type_off_t=yes"
20526 else
20527   rm -rf conftest*
20528   eval "ac_cv_type_off_t=no"
20529 fi
20530 rm -f conftest*
20531
20532 fi
20533 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
20534   echo "$ac_t""yes" 1>&6
20535 else
20536   echo "$ac_t""no" 1>&6
20537   cat >> confdefs.h <<EOF
20538 #define off_t long
20539 EOF
20540
20541 fi
20542
20543 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
20544 echo "configure:20545: checking for pid_t" >&5
20545 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
20546   echo $ac_n "(cached) $ac_c" 1>&6
20547 else
20548   cat > conftest.$ac_ext <<EOF
20549 #line 20550 "configure"
20550 #include "confdefs.h"
20551 #include <sys/types.h>
20552 #if STDC_HEADERS
20553 #include <stdlib.h>
20554 #include <stddef.h>
20555 #endif
20556
20557 EOF
20558 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20559   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20560   rm -rf conftest*
20561   eval "ac_cv_type_pid_t=yes"
20562 else
20563   rm -rf conftest*
20564   eval "ac_cv_type_pid_t=no"
20565 fi
20566 rm -f conftest*
20567
20568 fi
20569 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
20570   echo "$ac_t""yes" 1>&6
20571 else
20572   echo "$ac_t""no" 1>&6
20573   cat >> confdefs.h <<EOF
20574 #define pid_t int
20575 EOF
20576
20577 fi
20578
20579 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
20580 echo "configure:20581: checking for ptrdiff_t" >&5
20581 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
20582   echo $ac_n "(cached) $ac_c" 1>&6
20583 else
20584   cat > conftest.$ac_ext <<EOF
20585 #line 20586 "configure"
20586 #include "confdefs.h"
20587 #include <stddef.h>
20588 int main() {
20589 ptrdiff_t p
20590 ; return 0; }
20591 EOF
20592 if { (eval echo configure:20593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20593   rm -rf conftest*
20594   am_cv_type_ptrdiff_t=yes
20595 else
20596   echo "configure: failed program was:" >&5
20597   cat conftest.$ac_ext >&5
20598   rm -rf conftest*
20599   am_cv_type_ptrdiff_t=no
20600 fi
20601 rm -f conftest*
20602 fi
20603
20604 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
20605    if test $am_cv_type_ptrdiff_t = yes; then
20606      cat >> confdefs.h <<\EOF
20607 #define HAVE_PTRDIFF_T 1
20608 EOF
20609
20610    fi
20611
20612 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
20613 echo "configure:20614: checking return type of signal handlers" >&5
20614 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
20615   echo $ac_n "(cached) $ac_c" 1>&6
20616 else
20617   cat > conftest.$ac_ext <<EOF
20618 #line 20619 "configure"
20619 #include "confdefs.h"
20620 #include <sys/types.h>
20621 #include <signal.h>
20622 #ifdef signal
20623 #undef signal
20624 #endif
20625 #ifdef __cplusplus
20626 extern "C" void (*signal (int, void (*)(int)))(int);
20627 #else
20628 void (*signal ()) ();
20629 #endif
20630
20631 int main() {
20632 int i;
20633 ; return 0; }
20634 EOF
20635 if { (eval echo configure:20636: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20636   rm -rf conftest*
20637   ac_cv_type_signal=void
20638 else
20639   echo "configure: failed program was:" >&5
20640   cat conftest.$ac_ext >&5
20641   rm -rf conftest*
20642   ac_cv_type_signal=int
20643 fi
20644 rm -f conftest*
20645 fi
20646
20647 echo "$ac_t""$ac_cv_type_signal" 1>&6
20648 cat >> confdefs.h <<EOF
20649 #define RETSIGTYPE $ac_cv_type_signal
20650 EOF
20651
20652
20653 echo $ac_n "checking for size_t""... $ac_c" 1>&6
20654 echo "configure:20655: checking for size_t" >&5
20655 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
20656   echo $ac_n "(cached) $ac_c" 1>&6
20657 else
20658   cat > conftest.$ac_ext <<EOF
20659 #line 20660 "configure"
20660 #include "confdefs.h"
20661 #include <sys/types.h>
20662 #if STDC_HEADERS
20663 #include <stdlib.h>
20664 #include <stddef.h>
20665 #endif
20666
20667 EOF
20668 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20669   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20670   rm -rf conftest*
20671   eval "ac_cv_type_size_t=yes"
20672 else
20673   rm -rf conftest*
20674   eval "ac_cv_type_size_t=no"
20675 fi
20676 rm -f conftest*
20677
20678 fi
20679 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
20680   echo "$ac_t""yes" 1>&6
20681 else
20682   echo "$ac_t""no" 1>&6
20683   cat >> confdefs.h <<EOF
20684 #define size_t unsigned
20685 EOF
20686
20687 fi
20688
20689
20690 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
20691 echo "configure:20692: checking for ssize_t" >&5
20692 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
20693   echo $ac_n "(cached) $ac_c" 1>&6
20694 else
20695   cat > conftest.$ac_ext <<EOF
20696 #line 20697 "configure"
20697 #include "confdefs.h"
20698 #include <sys/types.h>
20699 #if STDC_HEADERS
20700 #include <stdlib.h>
20701 #include <stddef.h>
20702 #endif
20703
20704 EOF
20705 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20706   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20707   rm -rf conftest*
20708   eval "ac_cv_type_ssize_t=yes"
20709 else
20710   rm -rf conftest*
20711   eval "ac_cv_type_ssize_t=no"
20712 fi
20713 rm -f conftest*
20714
20715 fi
20716 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
20717   echo "$ac_t""yes" 1>&6
20718 else
20719   echo "$ac_t""no" 1>&6
20720   cat >> confdefs.h <<EOF
20721 #define ssize_t signed int
20722 EOF
20723
20724 fi
20725
20726 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
20727 echo "configure:20728: checking for caddr_t" >&5
20728 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
20729   echo $ac_n "(cached) $ac_c" 1>&6
20730 else
20731   cat > conftest.$ac_ext <<EOF
20732 #line 20733 "configure"
20733 #include "confdefs.h"
20734 #include <sys/types.h>
20735 #if STDC_HEADERS
20736 #include <stdlib.h>
20737 #include <stddef.h>
20738 #endif
20739
20740 EOF
20741 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20742   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20743   rm -rf conftest*
20744   eval "ac_cv_type_caddr_t=yes"
20745 else
20746   rm -rf conftest*
20747   eval "ac_cv_type_caddr_t=no"
20748 fi
20749 rm -f conftest*
20750
20751 fi
20752 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
20753   echo "$ac_t""yes" 1>&6
20754 else
20755   echo "$ac_t""no" 1>&6
20756   cat >> confdefs.h <<EOF
20757 #define caddr_t char *
20758 EOF
20759
20760 fi
20761
20762
20763 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
20764 echo "configure:20765: checking for socklen_t" >&5
20765 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
20766   echo $ac_n "(cached) $ac_c" 1>&6
20767 else
20768   cat > conftest.$ac_ext <<EOF
20769 #line 20770 "configure"
20770 #include "confdefs.h"
20771
20772 #ifdef HAVE_SYS_TYPES_H
20773 #include <sys/types.h>
20774 #endif
20775 #ifdef HAVE_SYS_SOCKET_H
20776 #include <sys/socket.h>
20777 #endif
20778
20779 int main() {
20780 socklen_t len;
20781 ; return 0; }
20782 EOF
20783 if { (eval echo configure:20784: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20784   rm -rf conftest*
20785   ol_cv_type_socklen_t=yes
20786 else
20787   echo "configure: failed program was:" >&5
20788   cat conftest.$ac_ext >&5
20789   rm -rf conftest*
20790   ol_cv_type_socklen_t=no
20791 fi
20792 rm -f conftest*
20793 fi
20794
20795 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
20796   if test $ol_cv_type_socklen_t = no; then
20797     cat >> confdefs.h <<\EOF
20798 #define socklen_t int
20799 EOF
20800
20801   fi
20802  
20803 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
20804 echo "configure:20805: checking for member st_blksize in aggregate type struct stat" >&5
20805 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
20806   echo $ac_n "(cached) $ac_c" 1>&6
20807 else
20808   cat > conftest.$ac_ext <<EOF
20809 #line 20810 "configure"
20810 #include "confdefs.h"
20811 #include <sys/types.h>
20812 #include <sys/stat.h>
20813 int main() {
20814 struct stat foo; foo.st_blksize;
20815 ; return 0; }
20816 EOF
20817 if { (eval echo configure:20818: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20818   rm -rf conftest*
20819   ac_cv_c_struct_member_st_blksize=yes
20820 else
20821   echo "configure: failed program was:" >&5
20822   cat conftest.$ac_ext >&5
20823   rm -rf conftest*
20824   ac_cv_c_struct_member_st_blksize=no
20825 fi
20826 rm -f conftest*
20827 fi
20828
20829 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
20830 st_blksize="$ac_cv_c_struct_member_st_blksize"
20831 if test $ac_cv_c_struct_member_st_blksize = yes; then
20832   cat >> confdefs.h <<\EOF
20833 #define HAVE_ST_BLKSIZE 1
20834 EOF
20835
20836 fi
20837
20838 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
20839 echo "configure:20840: checking whether time.h and sys/time.h may both be included" >&5
20840 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
20841   echo $ac_n "(cached) $ac_c" 1>&6
20842 else
20843   cat > conftest.$ac_ext <<EOF
20844 #line 20845 "configure"
20845 #include "confdefs.h"
20846 #include <sys/types.h>
20847 #include <sys/time.h>
20848 #include <time.h>
20849 int main() {
20850 struct tm *tp;
20851 ; return 0; }
20852 EOF
20853 if { (eval echo configure:20854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20854   rm -rf conftest*
20855   ac_cv_header_time=yes
20856 else
20857   echo "configure: failed program was:" >&5
20858   cat conftest.$ac_ext >&5
20859   rm -rf conftest*
20860   ac_cv_header_time=no
20861 fi
20862 rm -f conftest*
20863 fi
20864
20865 echo "$ac_t""$ac_cv_header_time" 1>&6
20866 if test $ac_cv_header_time = yes; then
20867   cat >> confdefs.h <<\EOF
20868 #define TIME_WITH_SYS_TIME 1
20869 EOF
20870
20871 fi
20872
20873 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
20874 echo "configure:20875: checking whether struct tm is in sys/time.h or time.h" >&5
20875 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
20876   echo $ac_n "(cached) $ac_c" 1>&6
20877 else
20878   cat > conftest.$ac_ext <<EOF
20879 #line 20880 "configure"
20880 #include "confdefs.h"
20881 #include <sys/types.h>
20882 #include <time.h>
20883 int main() {
20884 struct tm *tp; tp->tm_sec;
20885 ; return 0; }
20886 EOF
20887 if { (eval echo configure:20888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20888   rm -rf conftest*
20889   ac_cv_struct_tm=time.h
20890 else
20891   echo "configure: failed program was:" >&5
20892   cat conftest.$ac_ext >&5
20893   rm -rf conftest*
20894   ac_cv_struct_tm=sys/time.h
20895 fi
20896 rm -f conftest*
20897 fi
20898
20899 echo "$ac_t""$ac_cv_struct_tm" 1>&6
20900 if test $ac_cv_struct_tm = sys/time.h; then
20901   cat >> confdefs.h <<\EOF
20902 #define TM_IN_SYS_TIME 1
20903 EOF
20904
20905 fi
20906
20907 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
20908 echo "configure:20909: checking for uid_t in sys/types.h" >&5
20909 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
20910   echo $ac_n "(cached) $ac_c" 1>&6
20911 else
20912   cat > conftest.$ac_ext <<EOF
20913 #line 20914 "configure"
20914 #include "confdefs.h"
20915 #include <sys/types.h>
20916 EOF
20917 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20918   egrep "uid_t" >/dev/null 2>&1; then
20919   rm -rf conftest*
20920   ac_cv_type_uid_t=yes
20921 else
20922   rm -rf conftest*
20923   ac_cv_type_uid_t=no
20924 fi
20925 rm -f conftest*
20926
20927 fi
20928
20929 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
20930 if test $ac_cv_type_uid_t = no; then
20931   cat >> confdefs.h <<\EOF
20932 #define uid_t int
20933 EOF
20934
20935   cat >> confdefs.h <<\EOF
20936 #define gid_t int
20937 EOF
20938
20939 fi
20940
20941 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
20942 echo "configure:20943: checking for sig_atomic_t" >&5
20943 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
20944   echo $ac_n "(cached) $ac_c" 1>&6
20945 else
20946   cat > conftest.$ac_ext <<EOF
20947 #line 20948 "configure"
20948 #include "confdefs.h"
20949 #include <signal.h>
20950 int main() {
20951 sig_atomic_t atomic;
20952 ; return 0; }
20953 EOF
20954 if { (eval echo configure:20955: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20955   rm -rf conftest*
20956   ol_cv_type_sig_atomic_t=yes
20957 else
20958   echo "configure: failed program was:" >&5
20959   cat conftest.$ac_ext >&5
20960   rm -rf conftest*
20961   ol_cv_type_sig_atomic_t=no
20962 fi
20963 rm -f conftest*
20964 fi
20965
20966 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
20967   if test $ol_cv_type_sig_atomic_t = no; then
20968     cat >> confdefs.h <<\EOF
20969 #define sig_atomic_t int
20970 EOF
20971
20972   fi
20973  
20974
20975
20976 # test for pw_gecos in struct passwd
20977 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
20978 echo "configure:20979: checking struct passwd for pw_gecos" >&5
20979 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
20980   echo $ac_n "(cached) $ac_c" 1>&6
20981 else
20982   
20983         cat > conftest.$ac_ext <<EOF
20984 #line 20985 "configure"
20985 #include "confdefs.h"
20986 #include <pwd.h>
20987 int main() {
20988
20989         struct passwd pwd;
20990         pwd.pw_gecos = pwd.pw_name;
20991
20992 ; return 0; }
20993 EOF
20994 if { (eval echo configure:20995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20995   rm -rf conftest*
20996   ol_cv_struct_passwd_pw_gecos=yes
20997 else
20998   echo "configure: failed program was:" >&5
20999   cat conftest.$ac_ext >&5
21000   rm -rf conftest*
21001   ol_cv_struct_passwd_pw_gecos=no
21002 fi
21003 rm -f conftest*
21004 fi
21005
21006 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
21007 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
21008         cat >> confdefs.h <<\EOF
21009 #define HAVE_PW_GECOS 1
21010 EOF
21011
21012 fi
21013
21014 # test for pw_passwd in struct passwd
21015 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
21016 echo "configure:21017: checking struct passwd for pw_passwd" >&5
21017 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
21018   echo $ac_n "(cached) $ac_c" 1>&6
21019 else
21020   
21021         cat > conftest.$ac_ext <<EOF
21022 #line 21023 "configure"
21023 #include "confdefs.h"
21024 #include <pwd.h>
21025 int main() {
21026
21027         struct passwd pwd;
21028         pwd.pw_passwd = pwd.pw_name;
21029
21030 ; return 0; }
21031 EOF
21032 if { (eval echo configure:21033: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21033   rm -rf conftest*
21034   ol_cv_struct_passwd_pw_passwd=yes
21035 else
21036   echo "configure: failed program was:" >&5
21037   cat conftest.$ac_ext >&5
21038   rm -rf conftest*
21039   ol_cv_struct_passwd_pw_passwd=no
21040 fi
21041 rm -f conftest*
21042 fi
21043
21044 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
21045 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
21046         cat >> confdefs.h <<\EOF
21047 #define HAVE_PW_PASSWD 1
21048 EOF
21049
21050 fi
21051
21052
21053 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
21054 echo "configure:21055: checking if toupper() requires islower()" >&5
21055 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
21056   echo $ac_n "(cached) $ac_c" 1>&6
21057 else
21058   
21059         if test "$cross_compiling" = yes; then
21060   ol_cv_c_upper_lower=safe
21061 else
21062   cat > conftest.$ac_ext <<EOF
21063 #line 21064 "configure"
21064 #include "confdefs.h"
21065
21066 #include <ctype.h>
21067 main()
21068 {
21069         if ('C' == toupper('C'))
21070                 exit(0);
21071         else
21072                 exit(1);
21073 }
21074 EOF
21075 if { (eval echo configure:21076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21076 then
21077   ol_cv_c_upper_lower=no
21078 else
21079   echo "configure: failed program was:" >&5
21080   cat conftest.$ac_ext >&5
21081   rm -fr conftest*
21082   ol_cv_c_upper_lower=yes
21083 fi
21084 rm -fr conftest*
21085 fi
21086
21087 fi
21088
21089 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
21090 if test $ol_cv_c_upper_lower != no ; then
21091         cat >> confdefs.h <<\EOF
21092 #define C_UPPER_LOWER 1
21093 EOF
21094
21095 fi
21096
21097 echo $ac_n "checking for working const""... $ac_c" 1>&6
21098 echo "configure:21099: checking for working const" >&5
21099 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
21100   echo $ac_n "(cached) $ac_c" 1>&6
21101 else
21102   cat > conftest.$ac_ext <<EOF
21103 #line 21104 "configure"
21104 #include "confdefs.h"
21105
21106 int main() {
21107
21108 /* Ultrix mips cc rejects this.  */
21109 typedef int charset[2]; const charset x;
21110 /* SunOS 4.1.1 cc rejects this.  */
21111 char const *const *ccp;
21112 char **p;
21113 /* NEC SVR4.0.2 mips cc rejects this.  */
21114 struct point {int x, y;};
21115 static struct point const zero = {0,0};
21116 /* AIX XL C 1.02.0.0 rejects this.
21117    It does not let you subtract one const X* pointer from another in an arm
21118    of an if-expression whose if-part is not a constant expression */
21119 const char *g = "string";
21120 ccp = &g + (g ? g-g : 0);
21121 /* HPUX 7.0 cc rejects these. */
21122 ++ccp;
21123 p = (char**) ccp;
21124 ccp = (char const *const *) p;
21125 { /* SCO 3.2v4 cc rejects this.  */
21126   char *t;
21127   char const *s = 0 ? (char *) 0 : (char const *) 0;
21128
21129   *t++ = 0;
21130 }
21131 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
21132   int x[] = {25, 17};
21133   const int *foo = &x[0];
21134   ++foo;
21135 }
21136 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21137   typedef const int *iptr;
21138   iptr p = 0;
21139   ++p;
21140 }
21141 { /* AIX XL C 1.02.0.0 rejects this saying
21142      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21143   struct s { int j; const int *ap[3]; };
21144   struct s *b; b->j = 5;
21145 }
21146 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21147   const int foo = 10;
21148 }
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   ac_cv_c_const=yes
21155 else
21156   echo "configure: failed program was:" >&5
21157   cat conftest.$ac_ext >&5
21158   rm -rf conftest*
21159   ac_cv_c_const=no
21160 fi
21161 rm -f conftest*
21162 fi
21163
21164 echo "$ac_t""$ac_cv_c_const" 1>&6
21165 if test $ac_cv_c_const = no; then
21166   cat >> confdefs.h <<\EOF
21167 #define const 
21168 EOF
21169
21170 fi
21171
21172 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
21173 echo "configure:21174: checking if compiler understands volatile" >&5
21174 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
21175   echo $ac_n "(cached) $ac_c" 1>&6
21176 else
21177   cat > conftest.$ac_ext <<EOF
21178 #line 21179 "configure"
21179 #include "confdefs.h"
21180 int x, y, z;
21181 int main() {
21182 volatile int a; int * volatile b = x ? &y : &z;
21183       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
21184       *b = 0;
21185 ; return 0; }
21186 EOF
21187 if { (eval echo configure:21188: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21188   rm -rf conftest*
21189   ol_cv_c_volatile=yes
21190 else
21191   echo "configure: failed program was:" >&5
21192   cat conftest.$ac_ext >&5
21193   rm -rf conftest*
21194   ol_cv_c_volatile=no
21195 fi
21196 rm -f conftest*
21197 fi
21198
21199 echo "$ac_t""$ol_cv_c_volatile" 1>&6
21200   if test $ol_cv_c_volatile = yes; then
21201     : 
21202   else
21203     cat >> confdefs.h <<\EOF
21204 #define volatile 
21205 EOF
21206
21207   fi
21208  
21209
21210 if test $cross_compiling = yes ; then
21211         cat >> confdefs.h <<\EOF
21212 #define CROSS_COMPILING 1
21213 EOF
21214
21215 else
21216         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
21217 echo "configure:21218: checking whether byte ordering is bigendian" >&5
21218 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
21219   echo $ac_n "(cached) $ac_c" 1>&6
21220 else
21221   ac_cv_c_bigendian=unknown
21222 # See if sys/param.h defines the BYTE_ORDER macro.
21223 cat > conftest.$ac_ext <<EOF
21224 #line 21225 "configure"
21225 #include "confdefs.h"
21226 #include <sys/types.h>
21227 #include <sys/param.h>
21228 int main() {
21229
21230 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
21231  bogus endian macros
21232 #endif
21233 ; return 0; }
21234 EOF
21235 if { (eval echo configure:21236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21236   rm -rf conftest*
21237   # It does; now see whether it defined to BIG_ENDIAN or not.
21238 cat > conftest.$ac_ext <<EOF
21239 #line 21240 "configure"
21240 #include "confdefs.h"
21241 #include <sys/types.h>
21242 #include <sys/param.h>
21243 int main() {
21244
21245 #if BYTE_ORDER != BIG_ENDIAN
21246  not big endian
21247 #endif
21248 ; return 0; }
21249 EOF
21250 if { (eval echo configure:21251: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21251   rm -rf conftest*
21252   ac_cv_c_bigendian=yes
21253 else
21254   echo "configure: failed program was:" >&5
21255   cat conftest.$ac_ext >&5
21256   rm -rf conftest*
21257   ac_cv_c_bigendian=no
21258 fi
21259 rm -f conftest*
21260 else
21261   echo "configure: failed program was:" >&5
21262   cat conftest.$ac_ext >&5
21263 fi
21264 rm -f conftest*
21265 if test $ac_cv_c_bigendian = unknown; then
21266 if test "$cross_compiling" = yes; then
21267     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
21268 else
21269   cat > conftest.$ac_ext <<EOF
21270 #line 21271 "configure"
21271 #include "confdefs.h"
21272 main () {
21273   /* Are we little or big endian?  From Harbison&Steele.  */
21274   union
21275   {
21276     long l;
21277     char c[sizeof (long)];
21278   } u;
21279   u.l = 1;
21280   exit (u.c[sizeof (long) - 1] == 1);
21281 }
21282 EOF
21283 if { (eval echo configure:21284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21284 then
21285   ac_cv_c_bigendian=no
21286 else
21287   echo "configure: failed program was:" >&5
21288   cat conftest.$ac_ext >&5
21289   rm -fr conftest*
21290   ac_cv_c_bigendian=yes
21291 fi
21292 rm -fr conftest*
21293 fi
21294
21295 fi
21296 fi
21297
21298 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
21299 if test $ac_cv_c_bigendian = yes; then
21300   cat >> confdefs.h <<\EOF
21301 #define WORDS_BIGENDIAN 1
21302 EOF
21303
21304 fi
21305
21306 fi
21307
21308 echo $ac_n "checking size of short""... $ac_c" 1>&6
21309 echo "configure:21310: checking size of short" >&5 
21310 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
21311   echo $ac_n "(cached) $ac_c" 1>&6
21312 else
21313   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21314   cat > conftest.$ac_ext <<EOF
21315 #line 21316 "configure"
21316 #include "confdefs.h"
21317 #include "confdefs.h" 
21318 #include <sys/types.h> 
21319  
21320
21321 int main() {
21322 switch (0) case 0: case (sizeof (short) == $ac_size):;
21323 ; return 0; }
21324 EOF
21325 if { (eval echo configure:21326: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21326   rm -rf conftest*
21327   ac_cv_sizeof_short=$ac_size
21328 else
21329   echo "configure: failed program was:" >&5
21330   cat conftest.$ac_ext >&5
21331 fi
21332 rm -f conftest* 
21333   if test x$ac_cv_sizeof_short != x ; then break; fi 
21334 done 
21335
21336 fi
21337  
21338 if test x$ac_cv_sizeof_short = x ; then 
21339   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
21340 fi 
21341 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
21342 cat >> confdefs.h <<EOF
21343 #define SIZEOF_SHORT $ac_cv_sizeof_short
21344 EOF
21345  
21346  
21347 echo $ac_n "checking size of int""... $ac_c" 1>&6
21348 echo "configure:21349: checking size of int" >&5 
21349 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
21350   echo $ac_n "(cached) $ac_c" 1>&6
21351 else
21352   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21353   cat > conftest.$ac_ext <<EOF
21354 #line 21355 "configure"
21355 #include "confdefs.h"
21356 #include "confdefs.h" 
21357 #include <sys/types.h> 
21358  
21359
21360 int main() {
21361 switch (0) case 0: case (sizeof (int) == $ac_size):;
21362 ; return 0; }
21363 EOF
21364 if { (eval echo configure:21365: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21365   rm -rf conftest*
21366   ac_cv_sizeof_int=$ac_size
21367 else
21368   echo "configure: failed program was:" >&5
21369   cat conftest.$ac_ext >&5
21370 fi
21371 rm -f conftest* 
21372   if test x$ac_cv_sizeof_int != x ; then break; fi 
21373 done 
21374
21375 fi
21376  
21377 if test x$ac_cv_sizeof_int = x ; then 
21378   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
21379 fi 
21380 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
21381 cat >> confdefs.h <<EOF
21382 #define SIZEOF_INT $ac_cv_sizeof_int
21383 EOF
21384  
21385  
21386 echo $ac_n "checking size of long""... $ac_c" 1>&6
21387 echo "configure:21388: checking size of long" >&5 
21388 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
21389   echo $ac_n "(cached) $ac_c" 1>&6
21390 else
21391   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21392   cat > conftest.$ac_ext <<EOF
21393 #line 21394 "configure"
21394 #include "confdefs.h"
21395 #include "confdefs.h" 
21396 #include <sys/types.h> 
21397  
21398
21399 int main() {
21400 switch (0) case 0: case (sizeof (long) == $ac_size):;
21401 ; return 0; }
21402 EOF
21403 if { (eval echo configure:21404: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21404   rm -rf conftest*
21405   ac_cv_sizeof_long=$ac_size
21406 else
21407   echo "configure: failed program was:" >&5
21408   cat conftest.$ac_ext >&5
21409 fi
21410 rm -f conftest* 
21411   if test x$ac_cv_sizeof_long != x ; then break; fi 
21412 done 
21413
21414 fi
21415  
21416 if test x$ac_cv_sizeof_long = x ; then 
21417   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
21418 fi 
21419 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
21420 cat >> confdefs.h <<EOF
21421 #define SIZEOF_LONG $ac_cv_sizeof_long
21422 EOF
21423  
21424
21425
21426 if test "$ac_cv_sizeof_int" -lt 4 ; then
21427         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
21428
21429         cat >> confdefs.h <<\EOF
21430 #define LBER_INT_T long
21431 EOF
21432
21433 else
21434         cat >> confdefs.h <<\EOF
21435 #define LBER_INT_T int
21436 EOF
21437
21438 fi
21439
21440 cat >> confdefs.h <<\EOF
21441 #define LBER_LEN_T long
21442 EOF
21443
21444 cat >> confdefs.h <<\EOF
21445 #define LBER_SOCKET_T int
21446 EOF
21447
21448 cat >> confdefs.h <<\EOF
21449 #define LBER_TAG_T long
21450 EOF
21451
21452
21453 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
21454 echo "configure:21455: checking for 8-bit clean memcmp" >&5
21455 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
21456   echo $ac_n "(cached) $ac_c" 1>&6
21457 else
21458   if test "$cross_compiling" = yes; then
21459   ac_cv_func_memcmp_clean=no
21460 else
21461   cat > conftest.$ac_ext <<EOF
21462 #line 21463 "configure"
21463 #include "confdefs.h"
21464
21465 main()
21466 {
21467   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
21468   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
21469 }
21470
21471 EOF
21472 if { (eval echo configure:21473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21473 then
21474   ac_cv_func_memcmp_clean=yes
21475 else
21476   echo "configure: failed program was:" >&5
21477   cat conftest.$ac_ext >&5
21478   rm -fr conftest*
21479   ac_cv_func_memcmp_clean=no
21480 fi
21481 rm -fr conftest*
21482 fi
21483
21484 fi
21485
21486 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
21487 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
21488
21489 echo $ac_n "checking for strftime""... $ac_c" 1>&6
21490 echo "configure:21491: checking for strftime" >&5
21491 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
21492   echo $ac_n "(cached) $ac_c" 1>&6
21493 else
21494   cat > conftest.$ac_ext <<EOF
21495 #line 21496 "configure"
21496 #include "confdefs.h"
21497 /* System header to define __stub macros and hopefully few prototypes,
21498     which can conflict with char strftime(); below.  */
21499 #include <assert.h>
21500 /* Override any gcc2 internal prototype to avoid an error.  */
21501 /* We use char because int might match the return type of a gcc2
21502     builtin and then its argument prototype would still apply.  */
21503 char strftime();
21504 char (*f)();
21505
21506 int main() {
21507
21508 /* The GNU C library defines this for functions which it implements
21509     to always fail with ENOSYS.  Some functions are actually named
21510     something starting with __ and the normal name is an alias.  */
21511 #if defined (__stub_strftime) || defined (__stub___strftime)
21512 choke me
21513 #else
21514 f = strftime;
21515 #endif
21516
21517 ; return 0; }
21518 EOF
21519 if { (eval echo configure:21520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21520   rm -rf conftest*
21521   eval "ac_cv_func_strftime=yes"
21522 else
21523   echo "configure: failed program was:" >&5
21524   cat conftest.$ac_ext >&5
21525   rm -rf conftest*
21526   eval "ac_cv_func_strftime=no"
21527 fi
21528 rm -f conftest*
21529 fi
21530
21531 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
21532   echo "$ac_t""yes" 1>&6
21533   cat >> confdefs.h <<\EOF
21534 #define HAVE_STRFTIME 1
21535 EOF
21536
21537 else
21538   echo "$ac_t""no" 1>&6
21539 # strftime is in -lintl on SCO UNIX.
21540 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
21541 echo "configure:21542: checking for strftime in -lintl" >&5
21542 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
21543 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21544   echo $ac_n "(cached) $ac_c" 1>&6
21545 else
21546   ac_save_LIBS="$LIBS"
21547 LIBS="-lintl  $LIBS"
21548 cat > conftest.$ac_ext <<EOF
21549 #line 21550 "configure"
21550 #include "confdefs.h"
21551 /* Override any gcc2 internal prototype to avoid an error.  */
21552 /* We use char because int might match the return type of a gcc2
21553     builtin and then its argument prototype would still apply.  */
21554 char strftime();
21555
21556 int main() {
21557 strftime()
21558 ; return 0; }
21559 EOF
21560 if { (eval echo configure:21561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21561   rm -rf conftest*
21562   eval "ac_cv_lib_$ac_lib_var=yes"
21563 else
21564   echo "configure: failed program was:" >&5
21565   cat conftest.$ac_ext >&5
21566   rm -rf conftest*
21567   eval "ac_cv_lib_$ac_lib_var=no"
21568 fi
21569 rm -f conftest*
21570 LIBS="$ac_save_LIBS"
21571
21572 fi
21573 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21574   echo "$ac_t""yes" 1>&6
21575   cat >> confdefs.h <<\EOF
21576 #define HAVE_STRFTIME 1
21577 EOF
21578
21579 LIBS="-lintl $LIBS"
21580 else
21581   echo "$ac_t""no" 1>&6
21582 fi
21583
21584 fi
21585
21586
21587 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
21588 echo "configure:21589: checking for inet_aton()" >&5
21589 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
21590   echo $ac_n "(cached) $ac_c" 1>&6
21591 else
21592   cat > conftest.$ac_ext <<EOF
21593 #line 21594 "configure"
21594 #include "confdefs.h"
21595
21596 #ifdef HAVE_SYS_TYPES_H
21597 #       include <sys/types.h>
21598 #endif
21599 #ifdef HAVE_SYS_SOCKET_H
21600 #       include <sys/socket.h>
21601 #       ifdef HAVE_SYS_SELECT_H
21602 #               include <sys/select.h>
21603 #       endif
21604 #       include <netinet/in.h>
21605 #       ifdef HAVE_ARPA_INET_H
21606 #               include <arpa/inet.h>
21607 #       endif
21608 #endif
21609
21610 int main() {
21611 struct in_addr in;
21612 int rc = inet_aton( "255.255.255.255", &in );
21613 ; return 0; }
21614 EOF
21615 if { (eval echo configure:21616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21616   rm -rf conftest*
21617   ol_cv_func_inet_aton=yes
21618 else
21619   echo "configure: failed program was:" >&5
21620   cat conftest.$ac_ext >&5
21621   rm -rf conftest*
21622   ol_cv_func_inet_aton=no
21623 fi
21624 rm -f conftest*
21625 fi
21626
21627 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
21628   if test $ol_cv_func_inet_aton != no; then
21629     cat >> confdefs.h <<\EOF
21630 #define HAVE_INET_ATON 1
21631 EOF
21632
21633   fi
21634  
21635
21636 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
21637 echo "configure:21638: checking for _spawnlp" >&5
21638 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
21639   echo $ac_n "(cached) $ac_c" 1>&6
21640 else
21641   cat > conftest.$ac_ext <<EOF
21642 #line 21643 "configure"
21643 #include "confdefs.h"
21644 /* System header to define __stub macros and hopefully few prototypes,
21645     which can conflict with char _spawnlp(); below.  */
21646 #include <assert.h>
21647 /* Override any gcc2 internal prototype to avoid an error.  */
21648 /* We use char because int might match the return type of a gcc2
21649     builtin and then its argument prototype would still apply.  */
21650 char _spawnlp();
21651 char (*f)();
21652
21653 int main() {
21654
21655 /* The GNU C library defines this for functions which it implements
21656     to always fail with ENOSYS.  Some functions are actually named
21657     something starting with __ and the normal name is an alias.  */
21658 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
21659 choke me
21660 #else
21661 f = _spawnlp;
21662 #endif
21663
21664 ; return 0; }
21665 EOF
21666 if { (eval echo configure:21667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21667   rm -rf conftest*
21668   eval "ac_cv_func__spawnlp=yes"
21669 else
21670   echo "configure: failed program was:" >&5
21671   cat conftest.$ac_ext >&5
21672   rm -rf conftest*
21673   eval "ac_cv_func__spawnlp=no"
21674 fi
21675 rm -f conftest*
21676 fi
21677
21678 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
21679   echo "$ac_t""yes" 1>&6
21680   cat >> confdefs.h <<\EOF
21681 #define HAVE_SPAWNLP 1
21682 EOF
21683
21684 else
21685   echo "$ac_t""no" 1>&6
21686 fi
21687
21688
21689 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
21690 echo "configure:21691: checking for _snprintf" >&5
21691 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
21692   echo $ac_n "(cached) $ac_c" 1>&6
21693 else
21694   cat > conftest.$ac_ext <<EOF
21695 #line 21696 "configure"
21696 #include "confdefs.h"
21697 /* System header to define __stub macros and hopefully few prototypes,
21698     which can conflict with char _snprintf(); below.  */
21699 #include <assert.h>
21700 /* Override any gcc2 internal prototype to avoid an error.  */
21701 /* We use char because int might match the return type of a gcc2
21702     builtin and then its argument prototype would still apply.  */
21703 char _snprintf();
21704 char (*f)();
21705
21706 int main() {
21707
21708 /* The GNU C library defines this for functions which it implements
21709     to always fail with ENOSYS.  Some functions are actually named
21710     something starting with __ and the normal name is an alias.  */
21711 #if defined (__stub__snprintf) || defined (__stub____snprintf)
21712 choke me
21713 #else
21714 f = _snprintf;
21715 #endif
21716
21717 ; return 0; }
21718 EOF
21719 if { (eval echo configure:21720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21720   rm -rf conftest*
21721   eval "ac_cv_func__snprintf=yes"
21722 else
21723   echo "configure: failed program was:" >&5
21724   cat conftest.$ac_ext >&5
21725   rm -rf conftest*
21726   eval "ac_cv_func__snprintf=no"
21727 fi
21728 rm -f conftest*
21729 fi
21730
21731 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
21732   echo "$ac_t""yes" 1>&6
21733   ac_cv_func_snprintf=yes
21734         cat >> confdefs.h <<\EOF
21735 #define snprintf _snprintf
21736 EOF
21737
21738
21739 else
21740   echo "$ac_t""no" 1>&6
21741 fi
21742
21743
21744 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
21745 echo "configure:21746: checking for _vsnprintf" >&5
21746 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
21747   echo $ac_n "(cached) $ac_c" 1>&6
21748 else
21749   cat > conftest.$ac_ext <<EOF
21750 #line 21751 "configure"
21751 #include "confdefs.h"
21752 /* System header to define __stub macros and hopefully few prototypes,
21753     which can conflict with char _vsnprintf(); below.  */
21754 #include <assert.h>
21755 /* Override any gcc2 internal prototype to avoid an error.  */
21756 /* We use char because int might match the return type of a gcc2
21757     builtin and then its argument prototype would still apply.  */
21758 char _vsnprintf();
21759 char (*f)();
21760
21761 int main() {
21762
21763 /* The GNU C library defines this for functions which it implements
21764     to always fail with ENOSYS.  Some functions are actually named
21765     something starting with __ and the normal name is an alias.  */
21766 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
21767 choke me
21768 #else
21769 f = _vsnprintf;
21770 #endif
21771
21772 ; return 0; }
21773 EOF
21774 if { (eval echo configure:21775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21775   rm -rf conftest*
21776   eval "ac_cv_func__vsnprintf=yes"
21777 else
21778   echo "configure: failed program was:" >&5
21779   cat conftest.$ac_ext >&5
21780   rm -rf conftest*
21781   eval "ac_cv_func__vsnprintf=no"
21782 fi
21783 rm -f conftest*
21784 fi
21785
21786 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
21787   echo "$ac_t""yes" 1>&6
21788   ac_cv_func_vsnprintf=yes
21789         cat >> confdefs.h <<\EOF
21790 #define vsnprintf _vsnprintf
21791 EOF
21792
21793
21794 else
21795   echo "$ac_t""no" 1>&6
21796 fi
21797
21798
21799 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
21800 echo "configure:21801: checking for vprintf" >&5
21801 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
21802   echo $ac_n "(cached) $ac_c" 1>&6
21803 else
21804   cat > conftest.$ac_ext <<EOF
21805 #line 21806 "configure"
21806 #include "confdefs.h"
21807 /* System header to define __stub macros and hopefully few prototypes,
21808     which can conflict with char vprintf(); below.  */
21809 #include <assert.h>
21810 /* Override any gcc2 internal prototype to avoid an error.  */
21811 /* We use char because int might match the return type of a gcc2
21812     builtin and then its argument prototype would still apply.  */
21813 char vprintf();
21814 char (*f)();
21815
21816 int main() {
21817
21818 /* The GNU C library defines this for functions which it implements
21819     to always fail with ENOSYS.  Some functions are actually named
21820     something starting with __ and the normal name is an alias.  */
21821 #if defined (__stub_vprintf) || defined (__stub___vprintf)
21822 choke me
21823 #else
21824 f = vprintf;
21825 #endif
21826
21827 ; return 0; }
21828 EOF
21829 if { (eval echo configure:21830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21830   rm -rf conftest*
21831   eval "ac_cv_func_vprintf=yes"
21832 else
21833   echo "configure: failed program was:" >&5
21834   cat conftest.$ac_ext >&5
21835   rm -rf conftest*
21836   eval "ac_cv_func_vprintf=no"
21837 fi
21838 rm -f conftest*
21839 fi
21840
21841 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
21842   echo "$ac_t""yes" 1>&6
21843   cat >> confdefs.h <<\EOF
21844 #define HAVE_VPRINTF 1
21845 EOF
21846
21847 else
21848   echo "$ac_t""no" 1>&6
21849 fi
21850
21851 if test "$ac_cv_func_vprintf" != yes; then
21852 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
21853 echo "configure:21854: checking for _doprnt" >&5
21854 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
21855   echo $ac_n "(cached) $ac_c" 1>&6
21856 else
21857   cat > conftest.$ac_ext <<EOF
21858 #line 21859 "configure"
21859 #include "confdefs.h"
21860 /* System header to define __stub macros and hopefully few prototypes,
21861     which can conflict with char _doprnt(); below.  */
21862 #include <assert.h>
21863 /* Override any gcc2 internal prototype to avoid an error.  */
21864 /* We use char because int might match the return type of a gcc2
21865     builtin and then its argument prototype would still apply.  */
21866 char _doprnt();
21867 char (*f)();
21868
21869 int main() {
21870
21871 /* The GNU C library defines this for functions which it implements
21872     to always fail with ENOSYS.  Some functions are actually named
21873     something starting with __ and the normal name is an alias.  */
21874 #if defined (__stub__doprnt) || defined (__stub____doprnt)
21875 choke me
21876 #else
21877 f = _doprnt;
21878 #endif
21879
21880 ; return 0; }
21881 EOF
21882 if { (eval echo configure:21883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21883   rm -rf conftest*
21884   eval "ac_cv_func__doprnt=yes"
21885 else
21886   echo "configure: failed program was:" >&5
21887   cat conftest.$ac_ext >&5
21888   rm -rf conftest*
21889   eval "ac_cv_func__doprnt=no"
21890 fi
21891 rm -f conftest*
21892 fi
21893
21894 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
21895   echo "$ac_t""yes" 1>&6
21896   cat >> confdefs.h <<\EOF
21897 #define HAVE_DOPRNT 1
21898 EOF
21899
21900 else
21901   echo "$ac_t""no" 1>&6
21902 fi
21903
21904 fi
21905
21906
21907 if test $ac_cv_func_vprintf = yes ; then
21908                 for ac_func in snprintf vsnprintf
21909 do
21910 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
21911 echo "configure:21912: checking for $ac_func" >&5
21912 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
21913   echo $ac_n "(cached) $ac_c" 1>&6
21914 else
21915   cat > conftest.$ac_ext <<EOF
21916 #line 21917 "configure"
21917 #include "confdefs.h"
21918 /* System header to define __stub macros and hopefully few prototypes,
21919     which can conflict with char $ac_func(); below.  */
21920 #include <assert.h>
21921 /* Override any gcc2 internal prototype to avoid an error.  */
21922 /* We use char because int might match the return type of a gcc2
21923     builtin and then its argument prototype would still apply.  */
21924 char $ac_func();
21925 char (*f)();
21926
21927 int main() {
21928
21929 /* The GNU C library defines this for functions which it implements
21930     to always fail with ENOSYS.  Some functions are actually named
21931     something starting with __ and the normal name is an alias.  */
21932 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21933 choke me
21934 #else
21935 f = $ac_func;
21936 #endif
21937
21938 ; return 0; }
21939 EOF
21940 if { (eval echo configure:21941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21941   rm -rf conftest*
21942   eval "ac_cv_func_$ac_func=yes"
21943 else
21944   echo "configure: failed program was:" >&5
21945   cat conftest.$ac_ext >&5
21946   rm -rf conftest*
21947   eval "ac_cv_func_$ac_func=no"
21948 fi
21949 rm -f conftest*
21950 fi
21951
21952 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
21953   echo "$ac_t""yes" 1>&6
21954     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
21955   cat >> confdefs.h <<EOF
21956 #define $ac_tr_func 1
21957 EOF
21958  
21959 else
21960   echo "$ac_t""no" 1>&6
21961 fi
21962 done
21963
21964 fi
21965
21966 for ac_func in \
21967         bcopy                   \
21968         closesocket             \
21969         chroot                  \
21970         endgrent                \
21971         endpwent                \
21972         fcntl                   \
21973         flock                   \
21974         fstat                   \
21975         getdtablesize   \
21976         getgrgid                \
21977         gethostname             \
21978         getpass                 \
21979         getpassphrase   \
21980         getpwuid                \
21981         getpwnam                \
21982         getspnam                \
21983         gettimeofday    \
21984         initgroups              \
21985         lockf                   \
21986         memcpy                  \
21987         memmove                 \
21988         mkstemp                 \
21989         mktemp                  \
21990         pipe                    \
21991         read                    \
21992         recv                    \
21993         recvfrom                \
21994         setpwfile               \
21995         setgid                  \
21996         setegid                 \
21997         setsid                  \
21998         setuid                  \
21999         seteuid                 \
22000         sigaction               \
22001         signal                  \
22002         sigset                  \
22003         strdup                  \
22004         strerror                \
22005         strpbrk                 \
22006         strrchr                 \
22007         strsep                  \
22008         strstr                  \
22009         strtol                  \
22010         strtoul                 \
22011         strspn                  \
22012         sysconf                 \
22013         usleep                  \
22014         waitpid                 \
22015         wait4                   \
22016         write                   \
22017         send                    \
22018         sendto                  \
22019
22020 do
22021 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22022 echo "configure:22023: checking for $ac_func" >&5
22023 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22024   echo $ac_n "(cached) $ac_c" 1>&6
22025 else
22026   cat > conftest.$ac_ext <<EOF
22027 #line 22028 "configure"
22028 #include "confdefs.h"
22029 /* System header to define __stub macros and hopefully few prototypes,
22030     which can conflict with char $ac_func(); below.  */
22031 #include <assert.h>
22032 /* Override any gcc2 internal prototype to avoid an error.  */
22033 /* We use char because int might match the return type of a gcc2
22034     builtin and then its argument prototype would still apply.  */
22035 char $ac_func();
22036 char (*f)();
22037
22038 int main() {
22039
22040 /* The GNU C library defines this for functions which it implements
22041     to always fail with ENOSYS.  Some functions are actually named
22042     something starting with __ and the normal name is an alias.  */
22043 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22044 choke me
22045 #else
22046 f = $ac_func;
22047 #endif
22048
22049 ; return 0; }
22050 EOF
22051 if { (eval echo configure:22052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22052   rm -rf conftest*
22053   eval "ac_cv_func_$ac_func=yes"
22054 else
22055   echo "configure: failed program was:" >&5
22056   cat conftest.$ac_ext >&5
22057   rm -rf conftest*
22058   eval "ac_cv_func_$ac_func=no"
22059 fi
22060 rm -f conftest*
22061 fi
22062
22063 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22064   echo "$ac_t""yes" 1>&6
22065     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22066   cat >> confdefs.h <<EOF
22067 #define $ac_tr_func 1
22068 EOF
22069  
22070 else
22071   echo "$ac_t""no" 1>&6
22072 fi
22073 done
22074
22075
22076 for ac_func in getopt
22077 do
22078 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22079 echo "configure:22080: checking for $ac_func" >&5
22080 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22081   echo $ac_n "(cached) $ac_c" 1>&6
22082 else
22083   cat > conftest.$ac_ext <<EOF
22084 #line 22085 "configure"
22085 #include "confdefs.h"
22086 /* System header to define __stub macros and hopefully few prototypes,
22087     which can conflict with char $ac_func(); below.  */
22088 #include <assert.h>
22089 /* Override any gcc2 internal prototype to avoid an error.  */
22090 /* We use char because int might match the return type of a gcc2
22091     builtin and then its argument prototype would still apply.  */
22092 char $ac_func();
22093 char (*f)();
22094
22095 int main() {
22096
22097 /* The GNU C library defines this for functions which it implements
22098     to always fail with ENOSYS.  Some functions are actually named
22099     something starting with __ and the normal name is an alias.  */
22100 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22101 choke me
22102 #else
22103 f = $ac_func;
22104 #endif
22105
22106 ; return 0; }
22107 EOF
22108 if { (eval echo configure:22109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22109   rm -rf conftest*
22110   eval "ac_cv_func_$ac_func=yes"
22111 else
22112   echo "configure: failed program was:" >&5
22113   cat conftest.$ac_ext >&5
22114   rm -rf conftest*
22115   eval "ac_cv_func_$ac_func=no"
22116 fi
22117 rm -f conftest*
22118 fi
22119
22120 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22121   echo "$ac_t""yes" 1>&6
22122     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22123   cat >> confdefs.h <<EOF
22124 #define $ac_tr_func 1
22125 EOF
22126  
22127 else
22128   echo "$ac_t""no" 1>&6
22129 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
22130 fi
22131 done
22132
22133
22134
22135 if test "$ac_cv_func_getopt" != yes; then
22136         LIBSRCS="$LIBSRCS getopt.c"
22137 fi
22138 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
22139         if test "$ac_cv_func_snprintf" != yes; then
22140                 cat >> confdefs.h <<\EOF
22141 #define snprintf ber_pvt_snprintf
22142 EOF
22143
22144         fi
22145         if test "$ac_cv_func_vsnprintf" != yes; then
22146                 cat >> confdefs.h <<\EOF
22147 #define vsnprintf ber_pvt_vsnprintf
22148 EOF
22149
22150         fi
22151 fi
22152
22153 # Check Configuration
22154 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
22155 echo "configure:22156: checking declaration of sys_errlist" >&5
22156 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
22157   echo $ac_n "(cached) $ac_c" 1>&6
22158 else
22159   
22160         cat > conftest.$ac_ext <<EOF
22161 #line 22162 "configure"
22162 #include "confdefs.h"
22163
22164 #include <stdio.h>
22165 #include <sys/types.h>
22166 #include <errno.h>
22167 #ifdef WINNT
22168 #include <stdlib.h>
22169 #endif 
22170 int main() {
22171 char *c = (char *) *sys_errlist
22172 ; return 0; }
22173 EOF
22174 if { (eval echo configure:22175: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22175   rm -rf conftest*
22176   ol_cv_dcl_sys_errlist=yes
22177         ol_cv_have_sys_errlist=yes
22178 else
22179   echo "configure: failed program was:" >&5
22180   cat conftest.$ac_ext >&5
22181   rm -rf conftest*
22182   ol_cv_dcl_sys_errlist=no
22183 fi
22184 rm -f conftest*
22185 fi
22186
22187 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
22188 #
22189 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
22190 if test $ol_cv_dcl_sys_errlist = no ; then
22191         cat >> confdefs.h <<\EOF
22192 #define DECL_SYS_ERRLIST 1
22193 EOF
22194
22195
22196         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
22197 echo "configure:22198: checking existence of sys_errlist" >&5
22198 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
22199   echo $ac_n "(cached) $ac_c" 1>&6
22200 else
22201   
22202                 cat > conftest.$ac_ext <<EOF
22203 #line 22204 "configure"
22204 #include "confdefs.h"
22205 #include <errno.h>
22206 int main() {
22207 char *c = (char *) *sys_errlist
22208 ; return 0; }
22209 EOF
22210 if { (eval echo configure:22211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22211   rm -rf conftest*
22212   ol_cv_have_sys_errlist=yes
22213 else
22214   echo "configure: failed program was:" >&5
22215   cat conftest.$ac_ext >&5
22216   rm -rf conftest*
22217   ol_cv_have_sys_errlist=no
22218 fi
22219 rm -f conftest*
22220 fi
22221
22222 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
22223 fi
22224 if test $ol_cv_have_sys_errlist = yes ; then
22225         cat >> confdefs.h <<\EOF
22226 #define HAVE_SYS_ERRLIST 1
22227 EOF
22228
22229 fi
22230
22231
22232
22233 if test "$ol_enable_debug" != no ; then
22234         cat >> confdefs.h <<\EOF
22235 #define LDAP_DEBUG 1
22236 EOF
22237
22238 fi
22239 if test "$ol_enable_syslog" = yes ; then
22240         cat >> confdefs.h <<\EOF
22241 #define LDAP_SYSLOG 1
22242 EOF
22243
22244 fi
22245 if test "$ol_enable_cache" = no ; then
22246         cat >> confdefs.h <<\EOF
22247 #define LDAP_NOCACHE 1
22248 EOF
22249
22250 fi
22251 if test "$ol_link_kbind" != no ; then
22252         cat >> confdefs.h <<\EOF
22253 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
22254 EOF
22255
22256 fi
22257 if test "$ol_enable_proctitle" != no ; then
22258         cat >> confdefs.h <<\EOF
22259 #define LDAP_PROCTITLE 1
22260 EOF
22261
22262 fi
22263 if test "$ol_enable_referrals" != no ; then
22264         cat >> confdefs.h <<\EOF
22265 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
22266 EOF
22267
22268 fi
22269 if test "$ol_enable_local" != no; then
22270         cat >> confdefs.h <<\EOF
22271 #define LDAP_PF_LOCAL 1
22272 EOF
22273
22274 fi
22275 if test "$ol_link_ipv6" != no; then
22276         cat >> confdefs.h <<\EOF
22277 #define LDAP_PF_INET6 1
22278 EOF
22279
22280 fi
22281 if test "$ol_enable_cleartext" != no ; then
22282         cat >> confdefs.h <<\EOF
22283 #define SLAPD_CLEARTEXT 1
22284 EOF
22285
22286 fi
22287 if test "$ol_enable_crypt" != no ; then
22288         cat >> confdefs.h <<\EOF
22289 #define SLAPD_CRYPT 1
22290 EOF
22291
22292 fi
22293 if test "$ol_link_kpasswd" != no ; then
22294         cat >> confdefs.h <<\EOF
22295 #define SLAPD_KPASSWD 1
22296 EOF
22297
22298 fi
22299 if test "$ol_link_spasswd" != no ; then
22300         cat >> confdefs.h <<\EOF
22301 #define SLAPD_SPASSWD 1
22302 EOF
22303
22304 fi
22305 if test "$ol_enable_multimaster" != no ; then
22306         cat >> confdefs.h <<\EOF
22307 #define SLAPD_MULTIMASTER 1
22308 EOF
22309
22310 fi
22311 if test "$ol_enable_phonetic" != no ; then
22312         cat >> confdefs.h <<\EOF
22313 #define SLAPD_PHONETIC 1
22314 EOF
22315
22316 fi
22317 if test "$ol_enable_rlookups" != no ; then
22318         cat >> confdefs.h <<\EOF
22319 #define SLAPD_RLOOKUPS 1
22320 EOF
22321
22322 fi
22323 if test "$ol_enable_aci" != no ; then
22324         cat >> confdefs.h <<\EOF
22325 #define SLAPD_ACI_ENABLED 1
22326 EOF
22327
22328 fi
22329
22330 if test "$ol_link_modules" != no ; then
22331         cat >> confdefs.h <<\EOF
22332 #define SLAPD_MODULES 1
22333 EOF
22334
22335         BUILD_SLAPD=yes
22336         SLAPD_MODULES_LDFLAGS="-dlopen self"
22337 fi
22338
22339 if test "$ol_enable_bdb" != no ; then
22340         cat >> confdefs.h <<\EOF
22341 #define SLAPD_BDB 1
22342 EOF
22343
22344         BUILD_SLAPD=yes
22345         BUILD_BDB=yes
22346         if test "$ol_with_bdb_module" != static ; then
22347                 cat >> confdefs.h <<\EOF
22348 #define SLAPD_BDB_DYNAMIC 1
22349 EOF
22350
22351                 BUILD_BDB=mod
22352                 BUILD_BDB_DYNAMIC=shared
22353                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
22354         else
22355                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
22356         fi
22357 fi
22358
22359 if test "$ol_link_dnssrv" != no ; then
22360         cat >> confdefs.h <<\EOF
22361 #define SLAPD_DNSSRV 1
22362 EOF
22363
22364         BUILD_SLAPD=yes
22365         BUILD_DNSSRV=yes
22366         if test "$ol_with_dnssrv_module" != static ; then
22367                 cat >> confdefs.h <<\EOF
22368 #define SLAPD_DNSSRV_DYNAMIC 1
22369 EOF
22370
22371                 BUILD_DNSSRV=mod
22372                 BUILD_DNSSRV_DYNAMIC=shared
22373                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
22374         else
22375                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
22376         fi
22377 fi
22378
22379 if test "$ol_enable_ldap" != no ; then
22380         cat >> confdefs.h <<\EOF
22381 #define SLAPD_LDAP 1
22382 EOF
22383
22384         BUILD_SLAPD=yes
22385         BUILD_LDAP=yes
22386         if test "$ol_with_ldap_module" != static ; then
22387                 cat >> confdefs.h <<\EOF
22388 #define SLAPD_LDAP_DYNAMIC 1
22389 EOF
22390
22391                 BUILD_LDAP=mod
22392                 BUILD_LDAP_DYNAMIC=shared
22393                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
22394         else
22395                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
22396         fi
22397 fi
22398
22399 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
22400         cat >> confdefs.h <<\EOF
22401 #define SLAPD_LDBM 1
22402 EOF
22403
22404         BUILD_SLAPD=yes
22405         BUILD_LDBM=yes
22406         if test "$ol_with_ldbm_module" != static ; then
22407                 cat >> confdefs.h <<\EOF
22408 #define SLAPD_LDBM_DYNAMIC 1
22409 EOF
22410
22411                 BUILD_LDBM=mod
22412                 BUILD_LDBM_DYNAMIC=shared
22413                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
22414         else
22415                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
22416         fi
22417 fi
22418
22419 if test "$ol_enable_meta" != no ; then
22420         if test "$ol_enable_ldap" = no ; then
22421                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
22422         fi
22423         if test "$ol_enable_rewrite" = no ; then
22424                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
22425         fi
22426         cat >> confdefs.h <<\EOF
22427 #define SLAPD_META 1
22428 EOF
22429
22430         BUILD_SLAPD=yes
22431         BUILD_META=yes
22432         BUILD_LDAP=yes
22433         BUILD_REWRITE=yes
22434         if test "$ol_with_meta_module" != static ; then
22435                 cat >> confdefs.h <<\EOF
22436 #define SLAPD_META_DYNAMIC 1
22437 EOF
22438
22439                 BUILD_META=mod
22440                 BUILD_META_DYNAMIC=shared
22441                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
22442         else
22443                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
22444         fi
22445 fi
22446
22447 if test "$ol_enable_monitor" != no ; then
22448         cat >> confdefs.h <<\EOF
22449 #define SLAPD_MONITOR 1
22450 EOF
22451
22452         BUILD_SLAPD=yes
22453         BUILD_MONITOR=yes
22454         if test "$ol_with_monitor_module" != static ; then
22455                 cat >> confdefs.h <<\EOF
22456 #define SLAPD_MONITOR_DYNAMIC 1
22457 EOF
22458
22459                 BUILD_MONITOR=mod
22460                 BUILD_MONITOR_DYNAMIC=shared
22461                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
22462         else
22463                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
22464         fi
22465 fi
22466
22467 if test "$ol_enable_null" != no ; then
22468         cat >> confdefs.h <<\EOF
22469 #define SLAPD_NULL 1
22470 EOF
22471
22472         BUILD_SLAPD=yes
22473         BUILD_NULL=yes
22474         if test "$ol_with_null_module" != static ; then
22475                 cat >> confdefs.h <<\EOF
22476 #define SLAPD_NULL_DYNAMIC 1
22477 EOF
22478
22479                 BUILD_NULL=mod
22480                 BUILD_NULL_DYNAMIC=shared
22481                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
22482         else
22483                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
22484         fi
22485 fi
22486
22487 if test "$ol_enable_passwd" != no ; then
22488         cat >> confdefs.h <<\EOF
22489 #define SLAPD_PASSWD 1
22490 EOF
22491
22492         BUILD_SLAPD=yes
22493         BUILD_PASSWD=yes
22494         if test "$ol_with_passwd_module" != static ; then
22495                 cat >> confdefs.h <<\EOF
22496 #define SLAPD_PASSWD_DYNAMIC 1
22497 EOF
22498
22499                 BUILD_PASSWD=mod
22500                 BUILD_PASSWD_DYNAMIC=shared
22501                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
22502         else
22503                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
22504         fi
22505 fi
22506
22507 if test "$ol_link_perl" != no ; then
22508         cat >> confdefs.h <<\EOF
22509 #define SLAPD_PERL 1
22510 EOF
22511
22512         BUILD_SLAPD=yes
22513         BUILD_PERL=yes
22514         if test "$ol_with_perl_module" != static ; then
22515                 cat >> confdefs.h <<\EOF
22516 #define SLAPD_PERL_DYNAMIC 1
22517 EOF
22518
22519                 BUILD_PERL=mod
22520                 BUILD_PERL_DYNAMIC=shared
22521                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
22522         else
22523                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
22524         fi
22525 fi
22526
22527 if test "$ol_enable_shell" != no ; then
22528         if test "$ol_link_thread" != no ; then
22529                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
22530         fi
22531         cat >> confdefs.h <<\EOF
22532 #define SLAPD_SHELL 1
22533 EOF
22534
22535         BUILD_SLAPD=yes
22536         BUILD_SHELL=yes
22537         if test "$ol_with_shell_module" != static ; then
22538                 cat >> confdefs.h <<\EOF
22539 #define SLAPD_SHELL_DYNAMIC 1
22540 EOF
22541
22542                 BUILD_SHELL=mod
22543                 BUILD_SHELL_DYNAMIC=shared
22544                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
22545         else
22546                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
22547         fi
22548 fi
22549
22550 if test "$ol_enable_tcl" != no ; then
22551         cat >> confdefs.h <<\EOF
22552 #define SLAPD_TCL 1
22553 EOF
22554
22555         BUILD_SLAPD=yes
22556         BUILD_TCL=yes
22557         if test "$ol_with_tcl_module" != static; then
22558                 cat >> confdefs.h <<\EOF
22559 #define SLAPD_TCL_DYNAMIC 1
22560 EOF
22561
22562                 BUILD_TCL=mod
22563                 BUILD_TCL_DYNAMIC=shared
22564                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-tcl"
22565         else
22566                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-tcl"
22567         fi
22568 fi
22569
22570 if test "$ol_link_sql" != no ; then
22571         cat >> confdefs.h <<\EOF
22572 #define SLAPD_SQL 1
22573 EOF
22574
22575         BUILD_SLAPD=yes
22576         BUILD_SQL=yes
22577         if test "$ol_with_sql_module" != static; then
22578                 cat >> confdefs.h <<\EOF
22579 #define SLAPD_SQL_DYNAMIC 1
22580 EOF
22581
22582                 BUILD_SQL=mod
22583                 BUILD_SQL_DYNAMIC=shared
22584                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
22585         else
22586                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
22587         fi
22588 fi
22589
22590 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
22591         $BUILD_SLAPD = yes ; then
22592         BUILD_SLURPD=yes
22593 fi
22594
22595 if test "$ol_enable_rewrite" != no ; then
22596         cat >> confdefs.h <<\EOF
22597 #define ENABLE_REWRITE 1
22598 EOF
22599
22600         BUILD_REWRITE=yes
22601 fi
22602
22603
22604
22605 if test "$ac_cv_mingw32" = yes ; then
22606         PLAT=NT
22607         SLAPD_MODULES_LDFLAGS=
22608 else
22609         PLAT=UNIX
22610 fi
22611
22612 if test -z "$SLAPD_STATIC_BACKENDS"; then
22613         SLAPD_NO_STATIC='#'
22614 else
22615         SLAPD_NO_STATIC=
22616 fi
22617
22618
22619
22620
22621
22622
22623   
22624   
22625   
22626   
22627   
22628   
22629   
22630   
22631   
22632   
22633   
22634   
22635   
22636   
22637   
22638   
22639   
22640   
22641   
22642   
22643   
22644   
22645   
22646   
22647
22648
22649
22650
22651
22652
22653
22654
22655
22656
22657
22658
22659
22660
22661
22662
22663
22664
22665
22666
22667
22668
22669
22670
22671
22672
22673
22674
22675
22676
22677
22678
22679
22680
22681
22682
22683
22684
22685 # Check whether --with-xxinstall or --without-xxinstall was given.
22686 if test "${with_xxinstall+set}" = set; then
22687   withval="$with_xxinstall"
22688   :
22689 fi
22690
22691
22692
22693 trap '' 1 2 15
22694
22695 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
22696
22697 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22698 # Let make expand exec_prefix.
22699 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22700
22701 # Any assignment to VPATH causes Sun make to only execute
22702 # the first set of double-colon rules, so remove it if not needed.
22703 # If there is a colon in the path, we need to keep it.
22704 if test "x$srcdir" = x.; then
22705   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
22706 fi
22707
22708 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
22709
22710 DEFS=-DHAVE_CONFIG_H
22711
22712 # Without the "./", some shells look in PATH for config.status.
22713 : ${CONFIG_STATUS=./config.status}
22714
22715 echo creating $CONFIG_STATUS
22716 rm -f $CONFIG_STATUS
22717 cat > $CONFIG_STATUS <<EOF
22718 #! /bin/sh
22719 # Generated automatically by configure.
22720 # Run this file to recreate the current configuration.
22721 # This directory was configured as follows,
22722 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
22723 #
22724 # $0 $ac_configure_args
22725 #
22726 # Compiler output produced by configure, useful for debugging
22727 # configure, is in ./config.log if it exists.
22728
22729 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
22730 for ac_option
22731 do
22732   case "\$ac_option" in
22733   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22734     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
22735     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
22736   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
22737     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
22738     exit 0 ;;
22739   -help | --help | --hel | --he | --h)
22740     echo "\$ac_cs_usage"; exit 0 ;;
22741   *) echo "\$ac_cs_usage"; exit 1 ;;
22742   esac
22743 done
22744
22745 ac_given_srcdir=$srcdir
22746 ac_given_INSTALL="$INSTALL"
22747
22748 trap 'rm -fr `echo "\
22749 Makefile:build/top.mk:Makefile.in:build/dir.mk \
22750 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
22751 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
22752 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
22753 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
22754 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
22755 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
22756 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
22757 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
22758 include/Makefile:build/top.mk:include/Makefile.in \
22759 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
22760 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
22761 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22762 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22763 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
22764 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
22765 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
22766 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
22767 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
22768 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
22769 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
22770 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
22771 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
22772 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
22773 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
22774 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
22775 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
22776 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
22777 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
22778 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
22779 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
22780 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
22781 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
22782 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
22783 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
22784 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
22785 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
22786 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
22787 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
22788  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
22789 EOF
22790 cat >> $CONFIG_STATUS <<EOF
22791
22792 # Protect against being on the right side of a sed subst in config.status.
22793 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
22794  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
22795 $ac_vpsub
22796 $extrasub
22797 s%@SHELL@%$SHELL%g
22798 s%@CFLAGS@%$CFLAGS%g
22799 s%@CPPFLAGS@%$CPPFLAGS%g
22800 s%@CXXFLAGS@%$CXXFLAGS%g
22801 s%@FFLAGS@%$FFLAGS%g
22802 s%@DEFS@%$DEFS%g
22803 s%@LDFLAGS@%$LDFLAGS%g
22804 s%@LIBS@%$LIBS%g
22805 s%@exec_prefix@%$exec_prefix%g
22806 s%@prefix@%$prefix%g
22807 s%@program_transform_name@%$program_transform_name%g
22808 s%@bindir@%$bindir%g
22809 s%@sbindir@%$sbindir%g
22810 s%@libexecdir@%$libexecdir%g
22811 s%@datadir@%$datadir%g
22812 s%@sysconfdir@%$sysconfdir%g
22813 s%@sharedstatedir@%$sharedstatedir%g
22814 s%@localstatedir@%$localstatedir%g
22815 s%@libdir@%$libdir%g
22816 s%@includedir@%$includedir%g
22817 s%@oldincludedir@%$oldincludedir%g
22818 s%@infodir@%$infodir%g
22819 s%@mandir@%$mandir%g
22820 s%@host@%$host%g
22821 s%@host_alias@%$host_alias%g
22822 s%@host_cpu@%$host_cpu%g
22823 s%@host_vendor@%$host_vendor%g
22824 s%@host_os@%$host_os%g
22825 s%@target@%$target%g
22826 s%@target_alias@%$target_alias%g
22827 s%@target_cpu@%$target_cpu%g
22828 s%@target_vendor@%$target_vendor%g
22829 s%@target_os@%$target_os%g
22830 s%@build@%$build%g
22831 s%@build_alias@%$build_alias%g
22832 s%@build_cpu@%$build_cpu%g
22833 s%@build_vendor@%$build_vendor%g
22834 s%@build_os@%$build_os%g
22835 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
22836 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
22837 s%@INSTALL_DATA@%$INSTALL_DATA%g
22838 s%@PACKAGE@%$PACKAGE%g
22839 s%@VERSION@%$VERSION%g
22840 s%@ACLOCAL@%$ACLOCAL%g
22841 s%@AUTOCONF@%$AUTOCONF%g
22842 s%@AUTOMAKE@%$AUTOMAKE%g
22843 s%@AUTOHEADER@%$AUTOHEADER%g
22844 s%@MAKEINFO@%$MAKEINFO%g
22845 s%@install_sh@%$install_sh%g
22846 s%@AMTAR@%$AMTAR%g
22847 s%@AWK@%$AWK%g
22848 s%@AMTARFLAGS@%$AMTARFLAGS%g
22849 s%@SET_MAKE@%$SET_MAKE%g
22850 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
22851 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
22852 s%@top_builddir@%$top_builddir%g
22853 s%@ldap_subdir@%$ldap_subdir%g
22854 s%@CC@%$CC%g
22855 s%@AR@%$AR%g
22856 s%@LN_S@%$LN_S%g
22857 s%@OBJEXT@%$OBJEXT%g
22858 s%@EXEEXT@%$EXEEXT%g
22859 s%@ECHO@%$ECHO%g
22860 s%@RANLIB@%$RANLIB%g
22861 s%@STRIP@%$STRIP%g
22862 s%@DLLTOOL@%$DLLTOOL%g
22863 s%@AS@%$AS%g
22864 s%@OBJDUMP@%$OBJDUMP%g
22865 s%@CPP@%$CPP%g
22866 s%@LIBTOOL@%$LIBTOOL%g
22867 s%@LN_H@%$LN_H%g
22868 s%@PERLBIN@%$PERLBIN%g
22869 s%@OL_MKDEP@%$OL_MKDEP%g
22870 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
22871 s%@LIBOBJS@%$LIBOBJS%g
22872 s%@LIBSRCS@%$LIBSRCS%g
22873 s%@PLAT@%$PLAT%g
22874 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
22875 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
22876 s%@BUILD_BDB@%$BUILD_BDB%g
22877 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
22878 s%@BUILD_LDAP@%$BUILD_LDAP%g
22879 s%@BUILD_LDBM@%$BUILD_LDBM%g
22880 s%@BUILD_META@%$BUILD_META%g
22881 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
22882 s%@BUILD_NULL@%$BUILD_NULL%g
22883 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
22884 s%@BUILD_PERL@%$BUILD_PERL%g
22885 s%@BUILD_SHELL@%$BUILD_SHELL%g
22886 s%@BUILD_SQL@%$BUILD_SQL%g
22887 s%@BUILD_TCL@%$BUILD_TCL%g
22888 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
22889 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
22890 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
22891 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
22892 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
22893 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
22894 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
22895 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
22896 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
22897 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
22898 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
22899 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
22900 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
22901 s%@LDAP_LIBS@%$LDAP_LIBS%g
22902 s%@LDIF_LIBS@%$LDIF_LIBS%g
22903 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
22904 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
22905 s%@LDBM_LIBS@%$LDBM_LIBS%g
22906 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
22907 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
22908 s%@WRAP_LIBS@%$WRAP_LIBS%g
22909 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
22910 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
22911 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
22912 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
22913 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
22914 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
22915 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
22916 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
22917 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
22918 s%@KRB4_LIBS@%$KRB4_LIBS%g
22919 s%@KRB5_LIBS@%$KRB5_LIBS%g
22920 s%@READLINE_LIBS@%$READLINE_LIBS%g
22921 s%@SASL_LIBS@%$SASL_LIBS%g
22922 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
22923 s%@TLS_LIBS@%$TLS_LIBS%g
22924 s%@MODULES_LIBS@%$MODULES_LIBS%g
22925 s%@AUTH_LIBS@%$AUTH_LIBS%g
22926 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
22927 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
22928 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
22929 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
22930
22931 CEOF
22932 EOF
22933
22934 cat >> $CONFIG_STATUS <<\EOF
22935
22936 # Split the substitutions into bite-sized pieces for seds with
22937 # small command number limits, like on Digital OSF/1 and HP-UX.
22938 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
22939 ac_file=1 # Number of current file.
22940 ac_beg=1 # First line for current file.
22941 ac_end=$ac_max_sed_cmds # Line after last line for current file.
22942 ac_more_lines=:
22943 ac_sed_cmds=""
22944 while $ac_more_lines; do
22945   if test $ac_beg -gt 1; then
22946     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
22947   else
22948     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
22949   fi
22950   if test ! -s conftest.s$ac_file; then
22951     ac_more_lines=false
22952     rm -f conftest.s$ac_file
22953   else
22954     if test -z "$ac_sed_cmds"; then
22955       ac_sed_cmds="sed -f conftest.s$ac_file"
22956     else
22957       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
22958     fi
22959     ac_file=`expr $ac_file + 1`
22960     ac_beg=$ac_end
22961     ac_end=`expr $ac_end + $ac_max_sed_cmds`
22962   fi
22963 done
22964 if test -z "$ac_sed_cmds"; then
22965   ac_sed_cmds=cat
22966 fi
22967 EOF
22968
22969 cat >> $CONFIG_STATUS <<EOF
22970
22971 CONFIG_FILES=\${CONFIG_FILES-"\
22972 Makefile:build/top.mk:Makefile.in:build/dir.mk \
22973 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
22974 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
22975 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
22976 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
22977 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
22978 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
22979 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
22980 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
22981 include/Makefile:build/top.mk:include/Makefile.in \
22982 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
22983 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
22984 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22985 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22986 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
22987 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
22988 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
22989 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
22990 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
22991 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
22992 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
22993 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
22994 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
22995 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
22996 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
22997 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
22998 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
22999 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23000 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23001 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23002 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23003 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23004 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23005 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
23006 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23007 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
23008 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23009 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23010 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23011 "}
23012 EOF
23013 cat >> $CONFIG_STATUS <<\EOF
23014 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
23015   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23016   case "$ac_file" in
23017   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23018        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23019   *) ac_file_in="${ac_file}.in" ;;
23020   esac
23021
23022   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
23023
23024   # Remove last slash and all that follows it.  Not all systems have dirname.
23025   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23026   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23027     # The file is in a subdirectory.
23028     test ! -d "$ac_dir" && mkdir "$ac_dir"
23029     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
23030     # A "../" for each directory in $ac_dir_suffix.
23031     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
23032   else
23033     ac_dir_suffix= ac_dots=
23034   fi
23035
23036   case "$ac_given_srcdir" in
23037   .)  srcdir=.
23038       if test -z "$ac_dots"; then top_srcdir=.
23039       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
23040   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
23041   *) # Relative path.
23042     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
23043     top_srcdir="$ac_dots$ac_given_srcdir" ;;
23044   esac
23045
23046   case "$ac_given_INSTALL" in
23047   [/$]*) INSTALL="$ac_given_INSTALL" ;;
23048   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
23049   esac
23050
23051   echo creating "$ac_file"
23052   rm -f "$ac_file"
23053   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
23054   case "$ac_file" in
23055   *[Mm]akefile*) ac_comsub="1i\\
23056 # $configure_input" ;;
23057   *) ac_comsub= ;;
23058   esac
23059
23060   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23061   sed -e "$ac_comsub
23062 s%@configure_input@%$configure_input%g
23063 s%@srcdir@%$srcdir%g
23064 s%@top_srcdir@%$top_srcdir%g
23065 s%@INSTALL@%$INSTALL%g
23066 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
23067 fi; done
23068 rm -f conftest.s*
23069
23070 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23071 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23072 #
23073 # ac_d sets the value in "#define NAME VALUE" lines.
23074 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23075 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
23076 ac_dC='\3'
23077 ac_dD='%g'
23078 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23079 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23080 ac_uB='\([      ]\)%\1#\2define\3'
23081 ac_uC=' '
23082 ac_uD='\4%g'
23083 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23084 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23085 ac_eB='$%\1#\2define\3'
23086 ac_eC=' '
23087 ac_eD='%g'
23088
23089 if test "${CONFIG_HEADERS+set}" != set; then
23090 EOF
23091 cat >> $CONFIG_STATUS <<EOF
23092   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
23093 EOF
23094 cat >> $CONFIG_STATUS <<\EOF
23095 fi
23096 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
23097   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23098   case "$ac_file" in
23099   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23100        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23101   *) ac_file_in="${ac_file}.in" ;;
23102   esac
23103
23104   echo creating $ac_file
23105
23106   rm -f conftest.frag conftest.in conftest.out
23107   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23108   cat $ac_file_inputs > conftest.in
23109
23110 EOF
23111
23112 # Transform confdefs.h into a sed script conftest.vals that substitutes
23113 # the proper values into config.h.in to produce config.h.  And first:
23114 # Protect against being on the right side of a sed subst in config.status.
23115 # Protect against being in an unquoted here document in config.status.
23116 rm -f conftest.vals
23117 cat > conftest.hdr <<\EOF
23118 s/[\\&%]/\\&/g
23119 s%[\\$`]%\\&%g
23120 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
23121 s%ac_d%ac_u%gp
23122 s%ac_u%ac_e%gp
23123 EOF
23124 sed -n -f conftest.hdr confdefs.h > conftest.vals
23125 rm -f conftest.hdr
23126
23127 # This sed command replaces #undef with comments.  This is necessary, for
23128 # example, in the case of _POSIX_SOURCE, which is predefined and required
23129 # on some systems where configure will not decide to define it.
23130 cat >> conftest.vals <<\EOF
23131 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
23132 EOF
23133
23134 # Break up conftest.vals because some shells have a limit on
23135 # the size of here documents, and old seds have small limits too.
23136
23137 rm -f conftest.tail
23138 while :
23139 do
23140   ac_lines=`grep -c . conftest.vals`
23141   # grep -c gives empty output for an empty file on some AIX systems.
23142   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
23143   # Write a limited-size here document to conftest.frag.
23144   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
23145   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
23146   echo 'CEOF
23147   sed -f conftest.frag conftest.in > conftest.out
23148   rm -f conftest.in
23149   mv conftest.out conftest.in
23150 ' >> $CONFIG_STATUS
23151   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23152   rm -f conftest.vals
23153   mv conftest.tail conftest.vals
23154 done
23155 rm -f conftest.vals
23156
23157 cat >> $CONFIG_STATUS <<\EOF
23158   rm -f conftest.frag conftest.h
23159   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
23160   cat conftest.in >> conftest.h
23161   rm -f conftest.in
23162   if cmp -s $ac_file conftest.h 2>/dev/null; then
23163     echo "$ac_file is unchanged"
23164     rm -f conftest.h
23165   else
23166     # Remove last slash and all that follows it.  Not all systems have dirname.
23167       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23168       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23169       # The file is in a subdirectory.
23170       test ! -d "$ac_dir" && mkdir "$ac_dir"
23171     fi
23172     rm -f $ac_file
23173     mv conftest.h $ac_file
23174   fi
23175 fi; done
23176
23177 EOF
23178 cat >> $CONFIG_STATUS <<EOF
23179
23180 EOF
23181 cat >> $CONFIG_STATUS <<\EOF
23182
23183 date > stamp-h
23184 echo Please run \"make depend\" to build dependencies
23185
23186 exit 0
23187 EOF
23188 chmod +x $CONFIG_STATUS
23189 rm -fr confdefs* $ac_clean_files
23190 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
23191