]> git.sur5r.net Git - openldap/blob - configure
Sync with HEAD
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP 
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
141 SLURPD (Replication Daemon) Options:"
142 ac_help="$ac_help
143   --enable-slurpd         enable building slurpd [auto]"
144 ac_help="$ac_help
145
146 Library Generation & Linking Options"
147 ac_help="$ac_help
148   --enable-static[=PKGS]  build static libraries [default=yes]"
149 ac_help="$ac_help
150   --enable-shared[=PKGS]  build shared libraries [default=yes]"
151 ac_help="$ac_help
152   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
153 ac_help="$ac_help
154   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
155
156 # Find the correct PATH separator.  Usually this is `:', but
157 # DJGPP uses `;' like DOS.
158 if test "X${PATH_SEPARATOR+set}" != Xset; then
159   UNAME=${UNAME-`uname 2>/dev/null`}
160   case X$UNAME in
161     *-DOS) lt_cv_sys_path_separator=';' ;;
162     *)     lt_cv_sys_path_separator=':' ;;
163   esac
164   PATH_SEPARATOR=$lt_cv_sys_path_separator
165 fi
166
167
168 # Check that we are running under the correct shell.
169 SHELL=${CONFIG_SHELL-/bin/sh}
170
171 case X$ECHO in
172 X*--fallback-echo)
173   # Remove one level of quotation (which was required for Make).
174   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
175   ;;
176 esac
177
178 echo=${ECHO-echo}
179 if test "X$1" = X--no-reexec; then
180   # Discard the --no-reexec flag, and continue.
181   shift
182 elif test "X$1" = X--fallback-echo; then
183   # Avoid inline document here, it may be left over
184   :
185 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
186   # Yippee, $echo works!
187   :
188 else
189   # Restart under the correct shell.
190   exec $SHELL "$0" --no-reexec ${1+"$@"}
191 fi
192
193 if test "X$1" = X--fallback-echo; then
194   # used as fallback echo
195   shift
196   cat <<EOF
197
198 EOF
199   exit 0
200 fi
201
202 # The HP-UX ksh and POSIX shell print the target directory to stdout
203 # if CDPATH is set.
204 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
205
206 if test -z "$ECHO"; then
207 if test "X${echo_test_string+set}" != Xset; then
208 # find a string as large as possible, as long as the shell can cope with it
209   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
210     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
211     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
212        echo_test_string="`eval $cmd`" &&
213        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
214     then
215       break
216     fi
217   done
218 fi
219
220 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
221    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
222    test "X$echo_testing_string" = "X$echo_test_string"; then
223   :
224 else
225   # The Solaris, AIX, and Digital Unix default echo programs unquote
226   # backslashes.  This makes it impossible to quote backslashes using
227   #   echo "$something" | sed 's/\\/\\\\/g'
228   #
229   # So, first we look for a working echo in the user's PATH.
230
231   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
232   for dir in $PATH /usr/ucb; do
233     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
234        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
235        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
236        test "X$echo_testing_string" = "X$echo_test_string"; then
237       echo="$dir/echo"
238       break
239     fi
240   done
241   IFS="$save_ifs"
242
243   if test "X$echo" = Xecho; then
244     # We didn't find a better echo, so look for alternatives.
245     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
246        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
247        test "X$echo_testing_string" = "X$echo_test_string"; then
248       # This shell has a builtin print -r that does the trick.
249       echo='print -r'
250     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
251          test "X$CONFIG_SHELL" != X/bin/ksh; then
252       # If we have ksh, try running configure again with it.
253       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
254       export ORIGINAL_CONFIG_SHELL
255       CONFIG_SHELL=/bin/ksh
256       export CONFIG_SHELL
257       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
258     else
259       # Try using printf.
260       echo='printf %s\n'
261       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
262          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
263          test "X$echo_testing_string" = "X$echo_test_string"; then
264         # Cool, printf works
265         :
266       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
267            test "X$echo_testing_string" = 'X\t' &&
268            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
269            test "X$echo_testing_string" = "X$echo_test_string"; then
270         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
271         export CONFIG_SHELL
272         SHELL="$CONFIG_SHELL"
273         export SHELL
274         echo="$CONFIG_SHELL $0 --fallback-echo"
275       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
276            test "X$echo_testing_string" = 'X\t' &&
277            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
278            test "X$echo_testing_string" = "X$echo_test_string"; then
279         echo="$CONFIG_SHELL $0 --fallback-echo"
280       else
281         # maybe with a smaller string...
282         prev=:
283
284         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
285           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
286           then
287             break
288           fi
289           prev="$cmd"
290         done
291
292         if test "$prev" != 'sed 50q "$0"'; then
293           echo_test_string=`eval $prev`
294           export echo_test_string
295           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
296         else
297           # Oops.  We lost completely, so just stick with echo.
298           echo=echo
299         fi
300       fi
301     fi
302   fi
303 fi
304 fi
305
306 # Copy echo and quote the copy suitably for passing to libtool from
307 # the Makefile, instead of quoting the original, which is used later.
308 ECHO=$echo
309 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
310    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
311 fi
312
313
314 ac_help="$ac_help
315   --disable-libtool-lock  avoid locking (might break parallel builds)"
316 ac_help="$ac_help
317   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
318 ac_help="$ac_help
319
320 See INSTALL file for further details."
321
322 # Initialize some variables set by options.
323 # The variables have the same names as the options, with
324 # dashes changed to underlines.
325 build=NONE
326 cache_file=./config.cache
327 exec_prefix=NONE
328 host=NONE
329 no_create=
330 nonopt=NONE
331 no_recursion=
332 prefix=NONE
333 program_prefix=NONE
334 program_suffix=NONE
335 program_transform_name=s,x,x,
336 silent=
337 site=
338 srcdir=
339 target=NONE
340 verbose=
341 x_includes=NONE
342 x_libraries=NONE
343 bindir='${exec_prefix}/bin'
344 sbindir='${exec_prefix}/sbin'
345 libexecdir='${exec_prefix}/libexec'
346 datadir='${prefix}/share'
347 sysconfdir='${prefix}/etc'
348 sharedstatedir='${prefix}/com'
349 localstatedir='${prefix}/var'
350 libdir='${exec_prefix}/lib'
351 includedir='${prefix}/include'
352 oldincludedir='/usr/include'
353 infodir='${prefix}/info'
354 mandir='${prefix}/man'
355
356 # Initialize some other variables.
357 subdirs=
358 MFLAGS= MAKEFLAGS=
359 SHELL=${CONFIG_SHELL-/bin/sh}
360 # Maximum number of lines to put in a shell here document.
361 ac_max_here_lines=12
362
363 ac_prev=
364 for ac_option
365 do
366
367   # If the previous option needs an argument, assign it.
368   if test -n "$ac_prev"; then
369     eval "$ac_prev=\$ac_option"
370     ac_prev=
371     continue
372   fi
373
374   case "$ac_option" in
375   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
376   *) ac_optarg= ;;
377   esac
378
379   # Accept the important Cygnus configure options, so we can diagnose typos.
380
381   case "$ac_option" in
382
383   -bindir | --bindir | --bindi | --bind | --bin | --bi)
384     ac_prev=bindir ;;
385   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
386     bindir="$ac_optarg" ;;
387
388   -build | --build | --buil | --bui | --bu)
389     ac_prev=build ;;
390   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
391     build="$ac_optarg" ;;
392
393   -cache-file | --cache-file | --cache-fil | --cache-fi \
394   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
395     ac_prev=cache_file ;;
396   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
397   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
398     cache_file="$ac_optarg" ;;
399
400   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
401     ac_prev=datadir ;;
402   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
403   | --da=*)
404     datadir="$ac_optarg" ;;
405
406   -disable-* | --disable-*)
407     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
408     # Reject names that are not valid shell variable names.
409     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
410       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
411     fi
412     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
413     eval "enable_${ac_feature}=no" ;;
414
415   -enable-* | --enable-*)
416     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
417     # Reject names that are not valid shell variable names.
418     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
419       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
420     fi
421     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
422     case "$ac_option" in
423       *=*) ;;
424       *) ac_optarg=yes ;;
425     esac
426     eval "enable_${ac_feature}='$ac_optarg'" ;;
427
428   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
429   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
430   | --exec | --exe | --ex)
431     ac_prev=exec_prefix ;;
432   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
433   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
434   | --exec=* | --exe=* | --ex=*)
435     exec_prefix="$ac_optarg" ;;
436
437   -gas | --gas | --ga | --g)
438     # Obsolete; use --with-gas.
439     with_gas=yes ;;
440
441   -help | --help | --hel | --he)
442     # Omit some internal or obsolete options to make the list less imposing.
443     # This message is too long to be a string in the A/UX 3.1 sh.
444     cat << EOF
445 Usage: configure [options] [host]
446 Options: [defaults in brackets after descriptions]
447 Configuration:
448   --cache-file=FILE       cache test results in FILE
449   --help                  print this message
450   --no-create             do not create output files
451   --quiet, --silent       do not print \`checking...' messages
452   --version               print the version of autoconf that created configure
453 Directory and file names:
454   --prefix=PREFIX         install architecture-independent files in PREFIX
455                           [$ac_default_prefix]
456   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
457                           [same as prefix]
458   --bindir=DIR            user executables in DIR [EPREFIX/bin]
459   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
460   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
461   --datadir=DIR           read-only architecture-independent data in DIR
462                           [PREFIX/share]
463   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
464   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
465                           [PREFIX/com]
466   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
467   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
468   --includedir=DIR        C header files in DIR [PREFIX/include]
469   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
470   --infodir=DIR           info documentation in DIR [PREFIX/info]
471   --mandir=DIR            man documentation in DIR [PREFIX/man]
472   --srcdir=DIR            find the sources in DIR [configure dir or ..]
473   --program-prefix=PREFIX prepend PREFIX to installed program names
474   --program-suffix=SUFFIX append SUFFIX to installed program names
475   --program-transform-name=PROGRAM
476                           run sed PROGRAM on installed program names
477 EOF
478     cat << EOF
479 Host type:
480   --build=BUILD           configure for building on BUILD [BUILD=HOST]
481   --host=HOST             configure for HOST [guessed]
482   --target=TARGET         configure for TARGET [TARGET=HOST]
483 Features and packages:
484   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
485   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
486   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
487   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
488   --x-includes=DIR        X include files are in DIR
489   --x-libraries=DIR       X library files are in DIR
490 EOF
491     if test -n "$ac_help"; then
492       echo "--enable and --with options recognized:$ac_help"
493     fi
494     exit 0 ;;
495
496   -host | --host | --hos | --ho)
497     ac_prev=host ;;
498   -host=* | --host=* | --hos=* | --ho=*)
499     host="$ac_optarg" ;;
500
501   -includedir | --includedir | --includedi | --included | --include \
502   | --includ | --inclu | --incl | --inc)
503     ac_prev=includedir ;;
504   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
505   | --includ=* | --inclu=* | --incl=* | --inc=*)
506     includedir="$ac_optarg" ;;
507
508   -infodir | --infodir | --infodi | --infod | --info | --inf)
509     ac_prev=infodir ;;
510   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
511     infodir="$ac_optarg" ;;
512
513   -libdir | --libdir | --libdi | --libd)
514     ac_prev=libdir ;;
515   -libdir=* | --libdir=* | --libdi=* | --libd=*)
516     libdir="$ac_optarg" ;;
517
518   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
519   | --libexe | --libex | --libe)
520     ac_prev=libexecdir ;;
521   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
522   | --libexe=* | --libex=* | --libe=*)
523     libexecdir="$ac_optarg" ;;
524
525   -localstatedir | --localstatedir | --localstatedi | --localstated \
526   | --localstate | --localstat | --localsta | --localst \
527   | --locals | --local | --loca | --loc | --lo)
528     ac_prev=localstatedir ;;
529   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
530   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
531   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
532     localstatedir="$ac_optarg" ;;
533
534   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
535     ac_prev=mandir ;;
536   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
537     mandir="$ac_optarg" ;;
538
539   -nfp | --nfp | --nf)
540     # Obsolete; use --without-fp.
541     with_fp=no ;;
542
543   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
544   | --no-cr | --no-c)
545     no_create=yes ;;
546
547   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
548   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
549     no_recursion=yes ;;
550
551   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
552   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
553   | --oldin | --oldi | --old | --ol | --o)
554     ac_prev=oldincludedir ;;
555   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
556   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
557   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
558     oldincludedir="$ac_optarg" ;;
559
560   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
561     ac_prev=prefix ;;
562   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
563     prefix="$ac_optarg" ;;
564
565   -program-prefix | --program-prefix | --program-prefi | --program-pref \
566   | --program-pre | --program-pr | --program-p)
567     ac_prev=program_prefix ;;
568   -program-prefix=* | --program-prefix=* | --program-prefi=* \
569   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
570     program_prefix="$ac_optarg" ;;
571
572   -program-suffix | --program-suffix | --program-suffi | --program-suff \
573   | --program-suf | --program-su | --program-s)
574     ac_prev=program_suffix ;;
575   -program-suffix=* | --program-suffix=* | --program-suffi=* \
576   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
577     program_suffix="$ac_optarg" ;;
578
579   -program-transform-name | --program-transform-name \
580   | --program-transform-nam | --program-transform-na \
581   | --program-transform-n | --program-transform- \
582   | --program-transform | --program-transfor \
583   | --program-transfo | --program-transf \
584   | --program-trans | --program-tran \
585   | --progr-tra | --program-tr | --program-t)
586     ac_prev=program_transform_name ;;
587   -program-transform-name=* | --program-transform-name=* \
588   | --program-transform-nam=* | --program-transform-na=* \
589   | --program-transform-n=* | --program-transform-=* \
590   | --program-transform=* | --program-transfor=* \
591   | --program-transfo=* | --program-transf=* \
592   | --program-trans=* | --program-tran=* \
593   | --progr-tra=* | --program-tr=* | --program-t=*)
594     program_transform_name="$ac_optarg" ;;
595
596   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
597   | -silent | --silent | --silen | --sile | --sil)
598     silent=yes ;;
599
600   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
601     ac_prev=sbindir ;;
602   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
603   | --sbi=* | --sb=*)
604     sbindir="$ac_optarg" ;;
605
606   -sharedstatedir | --sharedstatedir | --sharedstatedi \
607   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
608   | --sharedst | --shareds | --shared | --share | --shar \
609   | --sha | --sh)
610     ac_prev=sharedstatedir ;;
611   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
612   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
613   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
614   | --sha=* | --sh=*)
615     sharedstatedir="$ac_optarg" ;;
616
617   -site | --site | --sit)
618     ac_prev=site ;;
619   -site=* | --site=* | --sit=*)
620     site="$ac_optarg" ;;
621
622   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
623     ac_prev=srcdir ;;
624   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
625     srcdir="$ac_optarg" ;;
626
627   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
628   | --syscon | --sysco | --sysc | --sys | --sy)
629     ac_prev=sysconfdir ;;
630   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
631   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
632     sysconfdir="$ac_optarg" ;;
633
634   -target | --target | --targe | --targ | --tar | --ta | --t)
635     ac_prev=target ;;
636   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
637     target="$ac_optarg" ;;
638
639   -v | -verbose | --verbose | --verbos | --verbo | --verb)
640     verbose=yes ;;
641
642   -version | --version | --versio | --versi | --vers)
643     echo "configure generated by autoconf version 2.13.1"
644     exit 0 ;;
645
646   -with-* | --with-*)
647     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
648     # Reject names that are not valid shell variable names.
649     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
650       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
651     fi
652     ac_package=`echo $ac_package| sed 's/-/_/g'`
653     case "$ac_option" in
654       *=*) ;;
655       *) ac_optarg=yes ;;
656     esac
657     eval "with_${ac_package}='$ac_optarg'" ;;
658
659   -without-* | --without-*)
660     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
661     # Reject names that are not valid shell variable names.
662     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
663       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
664     fi
665     ac_package=`echo $ac_package| sed 's/-/_/g'`
666     eval "with_${ac_package}=no" ;;
667
668   --x)
669     # Obsolete; use --with-x.
670     with_x=yes ;;
671
672   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
673   | --x-incl | --x-inc | --x-in | --x-i)
674     ac_prev=x_includes ;;
675   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
676   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
677     x_includes="$ac_optarg" ;;
678
679   -x-libraries | --x-libraries | --x-librarie | --x-librari \
680   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
681     ac_prev=x_libraries ;;
682   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
683   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
684     x_libraries="$ac_optarg" ;;
685
686   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
687     ;;
688
689   *)
690     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
691       echo "configure: warning: $ac_option: invalid host type" 1>&2
692     fi
693     if test "x$nonopt" != xNONE; then
694       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
695     fi
696     nonopt="$ac_option"
697     ;;
698
699   esac
700 done
701
702 if test -n "$ac_prev"; then
703   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
704 fi
705
706 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
707
708 # File descriptor usage:
709 # 0 standard input
710 # 1 file creation
711 # 2 errors and warnings
712 # 3 some systems may open it to /dev/tty
713 # 4 used on the Kubota Titan
714 # 6 checking for... messages and results
715 # 5 compiler messages saved in config.log
716 if test "$silent" = yes; then
717   exec 6>/dev/null
718 else
719   exec 6>&1
720 fi
721 exec 5>./config.log
722
723 echo "\
724 This file contains any messages produced by compilers while
725 running configure, to aid debugging if configure makes a mistake.
726 " 1>&5
727
728 # Strip out --no-create and --no-recursion so they do not pile up.
729 # Also quote any args containing shell metacharacters.
730 ac_configure_args=
731 for ac_arg
732 do
733   case "$ac_arg" in
734   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
735   | --no-cr | --no-c) ;;
736   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
737   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
738   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
739   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
740   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
741   esac
742 done
743
744 # NLS nuisances.
745 # Only set these to C if already set.  These must not be set unconditionally
746 # because not all systems understand e.g. LANG=C (notably SCO).
747 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
748 # Non-C LC_CTYPE values break the ctype check.
749 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
750 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
751 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
752 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
753
754 # confdefs.h avoids OS command line length limits that DEFS can exceed.
755 rm -rf conftest* confdefs.h
756 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
757 echo > confdefs.h
758
759 # A filename unique to this package, relative to the directory that
760 # configure is in, which we can look for to find out if srcdir is correct.
761 ac_unique_file=build/version.sh
762
763 # Find the source files, if location was not specified.
764 if test -z "$srcdir"; then
765   ac_srcdir_defaulted=yes
766   # Try the directory containing this script, then its parent.
767   ac_prog=$0
768   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
769   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
770   srcdir=$ac_confdir
771   if test ! -r $srcdir/$ac_unique_file; then
772     srcdir=..
773   fi
774 else
775   ac_srcdir_defaulted=no
776 fi
777 if test ! -r $srcdir/$ac_unique_file; then
778   if test "$ac_srcdir_defaulted" = yes; then
779     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
780   else
781     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
782   fi
783 fi
784 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
785
786 # Prefer explicitly selected file to automatically selected ones.
787 if test -z "$CONFIG_SITE"; then
788   if test "x$prefix" != xNONE; then
789     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
790   else
791     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
792   fi
793 fi
794 for ac_site_file in $CONFIG_SITE; do
795   if test -r "$ac_site_file"; then
796     echo "loading site script $ac_site_file"
797     . "$ac_site_file"
798   fi
799 done
800
801
802 ac_ext=c
803 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
804 ac_cpp='$CPP $CPPFLAGS'
805 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
806 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
807 cross_compiling=$ac_cv_prog_cc_cross
808
809 ac_exeext=
810 ac_objext=o
811 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
812   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
813   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
814     ac_n= ac_c='
815 ' ac_t='        '
816   else
817     ac_n=-n ac_c= ac_t=
818   fi
819 else
820   ac_n= ac_c='\c' ac_t=
821 fi
822
823
824 # set unset (borrowed from autoconf 2.49c)
825 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
826   ol_unset=unset
827 else
828   ol_unset=false
829 fi
830 # unset CDPATH
831 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
832
833 ac_aux_dir=
834 for ac_dir in build $srcdir/build; do
835   if test -f $ac_dir/install-sh; then
836     ac_aux_dir=$ac_dir
837     ac_install_sh="$ac_aux_dir/install-sh -c"
838     break
839   elif 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/shtool; then
844     ac_aux_dir=$ac_dir
845     ac_install_sh="$ac_aux_dir/shtool install -c"
846     break
847   fi
848 done
849 if test -z "$ac_aux_dir"; then
850   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
851 fi
852 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
853 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
854 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
855
856 eval `$ac_aux_dir/version.sh`
857 if test -z "$OL_STRING"; then
858         { echo "configure: error: could not determine version" 1>&2; exit 1; }
859 fi
860
861 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
862         ac_cv_shtool="$ac_aux_dir/shtool"
863 else
864         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
865 fi
866
867 SHTOOL="$ac_cv_shtool"
868
869 TB=`$SHTOOL echo -e %B`
870 TN=`$SHTOOL echo -e %b`
871
872 echo "Configuring $TB$OL_STRING$TN ..."
873
874
875 echo $ac_n "checking host system type""... $ac_c" 1>&6
876 echo "configure:877: checking host system type" >&5
877 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
878
879 # Make sure we can run config.sub.
880   if $ac_config_sub sun4 >/dev/null 2>&1; then :
881     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
882   fi
883
884   ac_cv_host_alias=$host
885   case "$ac_cv_host_alias" in
886   NONE)
887     case $nonopt in
888     NONE)
889       if ac_cv_host_alias=`$ac_config_guess`; then :
890       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
891       fi ;;
892     *) ac_cv_host_alias=$nonopt ;;
893     esac ;;
894   esac
895
896   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
897   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
898   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
899   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
900 else
901   echo $ac_n "(cached) $ac_c" 1>&6
902 fi
903
904 echo "$ac_t""$ac_cv_host" 1>&6
905
906 host=$ac_cv_host
907 host_alias=$ac_cv_host_alias
908 host_cpu=$ac_cv_host_cpu
909 host_vendor=$ac_cv_host_vendor
910 host_os=$ac_cv_host_os
911
912
913
914
915
916 echo $ac_n "checking target system type""... $ac_c" 1>&6
917 echo "configure:918: checking target system type" >&5
918 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
919
920 # Make sure we can run config.sub.
921   if $ac_config_sub sun4 >/dev/null 2>&1; then :
922     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
923   fi
924
925   ac_cv_target_alias=$target
926   case "$ac_cv_target_alias" in
927   NONE)
928     case $nonopt in
929     NONE)
930       ac_cv_target_alias=$host_alias ;;
931
932     *) ac_cv_target_alias=$nonopt ;;
933     esac ;;
934   esac
935
936   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
937   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
938   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
939   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
940 else
941   echo $ac_n "(cached) $ac_c" 1>&6
942 fi
943
944 echo "$ac_t""$ac_cv_target" 1>&6
945
946 target=$ac_cv_target
947 target_alias=$ac_cv_target_alias
948 target_cpu=$ac_cv_target_cpu
949 target_vendor=$ac_cv_target_vendor
950 target_os=$ac_cv_target_os
951
952
953
954
955
956 echo $ac_n "checking build system type""... $ac_c" 1>&6
957 echo "configure:958: checking build system type" >&5
958 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
959
960 # Make sure we can run config.sub.
961   if $ac_config_sub sun4 >/dev/null 2>&1; then :
962     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
963   fi
964
965   ac_cv_build_alias=$build
966   case "$ac_cv_build_alias" in
967   NONE)
968     case $nonopt in
969     NONE)
970       ac_cv_build_alias=$host_alias ;;
971
972     *) ac_cv_build_alias=$nonopt ;;
973     esac ;;
974   esac
975
976   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
977   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
978   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
979   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
980 else
981   echo $ac_n "(cached) $ac_c" 1>&6
982 fi
983
984 echo "$ac_t""$ac_cv_build" 1>&6
985
986 build=$ac_cv_build
987 build_alias=$ac_cv_build_alias
988 build_cpu=$ac_cv_build_cpu
989 build_vendor=$ac_cv_build_vendor
990 build_os=$ac_cv_build_os
991
992
993
994
995
996 # Do some error checking and defaulting for the host and target type.
997 # The inputs are:
998 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
999 #
1000 # The rules are:
1001 # 1. You are not allowed to specify --host, --target, and nonopt at the
1002 #    same time.
1003 # 2. Host defaults to nonopt.
1004 # 3. If nonopt is not specified, then host defaults to the current host,
1005 #    as determined by config.guess.
1006 # 4. Target and build default to nonopt.
1007 # 5. If nonopt is not specified, then target and build default to host.
1008
1009 # The aliases save the names the user supplied, while $host etc.
1010 # will get canonicalized.
1011 case $host---$target---$nonopt in
1012 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1013 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1014 esac
1015
1016 test "$host_alias" != "$target_alias" &&
1017   test "$program_prefix$program_suffix$program_transform_name" = \
1018     NONENONEs,x,x, &&
1019   program_prefix=${target_alias}-
1020
1021
1022 # Find a good install program.  We prefer a C program (faster),
1023 # so one script is as good as another.  But avoid the broken or
1024 # incompatible versions:
1025 # SysV /etc/install, /usr/sbin/install
1026 # SunOS /usr/etc/install
1027 # IRIX /sbin/install
1028 # AIX /bin/install
1029 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1030 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1031 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1032 # ./install, which can be erroneously created by make from ./install.sh.
1033 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1034 echo "configure:1035: checking for a BSD compatible install" >&5
1035 if test -z "$INSTALL"; then
1036 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1037   echo $ac_n "(cached) $ac_c" 1>&6
1038 else
1039     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1040   for ac_dir in $PATH; do
1041     # Account for people who put trailing slashes in PATH elements.
1042     case "$ac_dir/" in
1043     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1044     *)
1045       # OSF1 and SCO ODT 3.0 have their own names for install.
1046       # Don't use installbsd from OSF since it installs stuff as root
1047       # by default.
1048       for ac_prog in ginstall scoinst install; do
1049         if test -f $ac_dir/$ac_prog; then
1050           if test $ac_prog = install &&
1051             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1052             # AIX install.  It has an incompatible calling convention.
1053             :
1054           elif test $ac_prog = install &&
1055             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1056             # program-specific install script used by HP pwplus--don't use.
1057             :
1058           else
1059             ac_cv_path_install="$ac_dir/$ac_prog -c"
1060             break 2
1061           fi
1062         fi
1063       done
1064       ;;
1065     esac
1066   done
1067   IFS="$ac_save_IFS"
1068
1069 fi
1070   if test "${ac_cv_path_install+set}" = set; then
1071     INSTALL="$ac_cv_path_install"
1072   else
1073     # As a last resort, use the slow shell script.  We don't cache a
1074     # path for INSTALL within a source directory, because that will
1075     # break other packages using the cache if that directory is
1076     # removed, or if the path is relative.
1077     INSTALL="$ac_install_sh"
1078   fi
1079 fi
1080 echo "$ac_t""$INSTALL" 1>&6
1081
1082 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1083 # It thinks the first close brace ends the variable substitution.
1084 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1085
1086 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1087
1088 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1089
1090 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1091 echo "configure:1092: checking whether build environment is sane" >&5
1092 # Just in case
1093 sleep 1
1094 echo timestamp > conftestfile
1095 # Do `set' in a subshell so we don't clobber the current shell's
1096 # arguments.  Must try -L first in case configure is actually a
1097 # symlink; some systems play weird games with the mod time of symlinks
1098 # (eg FreeBSD returns the mod time of the symlink's containing
1099 # directory).
1100 if (
1101    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1102    if test "$*" = "X"; then
1103       # -L didn't work.
1104       set X `ls -t $srcdir/configure conftestfile`
1105    fi
1106    if test "$*" != "X $srcdir/configure conftestfile" \
1107       && test "$*" != "X conftestfile $srcdir/configure"; then
1108
1109       # If neither matched, then we have a broken ls.  This can happen
1110       # if, for instance, CONFIG_SHELL is bash and it inherits a
1111       # broken ls alias from the environment.  This has actually
1112       # happened.  Such a system could not be considered "sane".
1113       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1114 alias in your environment" 1>&2; exit 1; }
1115    fi
1116
1117    test "$2" = conftestfile
1118    )
1119 then
1120    # Ok.
1121    :
1122 else
1123    { echo "configure: error: newly created file is older than distributed files!
1124 Check your system clock" 1>&2; exit 1; }
1125 fi
1126 rm -f conftest*
1127 echo "$ac_t""yes" 1>&6
1128 if test "$program_transform_name" = s,x,x,; then
1129   program_transform_name=
1130 else
1131   # Double any \ or $.  echo might interpret backslashes.
1132   cat <<\EOF_SED > conftestsed
1133 s,\\,\\\\,g; s,\$,$$,g
1134 EOF_SED
1135   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1136   rm -f conftestsed
1137 fi
1138 test "$program_prefix" != NONE &&
1139   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1140 # Use a double $ so make ignores it.
1141 test "$program_suffix" != NONE &&
1142   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1143
1144 # sed with no file args requires a program.
1145 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1146
1147 for ac_prog in mawk gawk nawk awk
1148 do
1149 # Extract the first word of "$ac_prog", so it can be a program name with args.
1150 set dummy $ac_prog; ac_word=$2
1151 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1152 echo "configure:1153: checking for $ac_word" >&5
1153 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1154   echo $ac_n "(cached) $ac_c" 1>&6
1155 else
1156   if test -n "$AWK"; then
1157   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1158 else
1159   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1160   ac_dummy="$PATH"
1161   for ac_dir in $ac_dummy; do
1162     test -z "$ac_dir" && ac_dir=.
1163     if test -f $ac_dir/$ac_word; then
1164       ac_cv_prog_AWK="$ac_prog"
1165       break
1166     fi
1167   done
1168   IFS="$ac_save_ifs"
1169 fi
1170 fi
1171 AWK="$ac_cv_prog_AWK"
1172 if test -n "$AWK"; then
1173   echo "$ac_t""$AWK" 1>&6
1174 else
1175   echo "$ac_t""no" 1>&6
1176 fi
1177
1178 test -n "$AWK" && break
1179 done
1180
1181 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1182 echo "configure:1183: checking whether ${MAKE-make} sets \${MAKE}" >&5
1183 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1184 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1185   echo $ac_n "(cached) $ac_c" 1>&6
1186 else
1187   cat > conftestmake <<\EOF
1188 all:
1189         @echo 'ac_maketemp="${MAKE}"'
1190 EOF
1191 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1192 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1193 if test -n "$ac_maketemp"; then
1194   eval ac_cv_prog_make_${ac_make}_set=yes
1195 else
1196   eval ac_cv_prog_make_${ac_make}_set=no
1197 fi
1198 rm -f conftestmake
1199 fi
1200 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1201   echo "$ac_t""yes" 1>&6
1202   SET_MAKE=
1203 else
1204   echo "$ac_t""no" 1>&6
1205   SET_MAKE="MAKE=${MAKE-make}"
1206 fi
1207
1208
1209
1210 PACKAGE=$OL_PACKAGE
1211
1212 VERSION=$OL_VERSION
1213
1214 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1215   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1216 fi
1217
1218
1219
1220 missing_dir=`cd $ac_aux_dir && pwd`
1221 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1222 echo "configure:1223: checking for working aclocal" >&5
1223 # Run test in a subshell; some versions of sh will print an error if
1224 # an executable is not found, even if stderr is redirected.
1225 # Redirect stdin to placate older versions of autoconf.  Sigh.
1226 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1227    ACLOCAL=aclocal
1228    echo "$ac_t""found" 1>&6
1229 else
1230    ACLOCAL="$missing_dir/missing aclocal"
1231    echo "$ac_t""missing" 1>&6
1232 fi
1233
1234 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1235 echo "configure:1236: checking for working autoconf" >&5
1236 # Run test in a subshell; some versions of sh will print an error if
1237 # an executable is not found, even if stderr is redirected.
1238 # Redirect stdin to placate older versions of autoconf.  Sigh.
1239 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1240    AUTOCONF=autoconf
1241    echo "$ac_t""found" 1>&6
1242 else
1243    AUTOCONF="$missing_dir/missing autoconf"
1244    echo "$ac_t""missing" 1>&6
1245 fi
1246
1247 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1248 echo "configure:1249: checking for working automake" >&5
1249 # Run test in a subshell; some versions of sh will print an error if
1250 # an executable is not found, even if stderr is redirected.
1251 # Redirect stdin to placate older versions of autoconf.  Sigh.
1252 if (automake --version) < /dev/null > /dev/null 2>&1; then
1253    AUTOMAKE=automake
1254    echo "$ac_t""found" 1>&6
1255 else
1256    AUTOMAKE="$missing_dir/missing automake"
1257    echo "$ac_t""missing" 1>&6
1258 fi
1259
1260 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1261 echo "configure:1262: checking for working autoheader" >&5
1262 # Run test in a subshell; some versions of sh will print an error if
1263 # an executable is not found, even if stderr is redirected.
1264 # Redirect stdin to placate older versions of autoconf.  Sigh.
1265 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1266    AUTOHEADER=autoheader
1267    echo "$ac_t""found" 1>&6
1268 else
1269    AUTOHEADER="$missing_dir/missing autoheader"
1270    echo "$ac_t""missing" 1>&6
1271 fi
1272
1273 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1274 echo "configure:1275: checking for working makeinfo" >&5
1275 # Run test in a subshell; some versions of sh will print an error if
1276 # an executable is not found, even if stderr is redirected.
1277 # Redirect stdin to placate older versions of autoconf.  Sigh.
1278 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1279    MAKEINFO=makeinfo
1280    echo "$ac_t""found" 1>&6
1281 else
1282    MAKEINFO="$missing_dir/missing makeinfo"
1283    echo "$ac_t""missing" 1>&6
1284 fi
1285
1286 install_sh="$missing_dir/install-sh"
1287 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1288
1289 for ac_prog in gnutar gtar tar
1290 do
1291 # Extract the first word of "$ac_prog", so it can be a program name with args.
1292 set dummy $ac_prog; ac_word=$2
1293 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1294 echo "configure:1295: checking for $ac_word" >&5
1295 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1296   echo $ac_n "(cached) $ac_c" 1>&6
1297 else
1298   if test -n "$AMTAR"; then
1299   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1300 else
1301   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1302   ac_dummy="$PATH"
1303   for ac_dir in $ac_dummy; do
1304     test -z "$ac_dir" && ac_dir=.
1305     if test -f $ac_dir/$ac_word; then
1306       ac_cv_prog_AMTAR="$ac_prog"
1307       break
1308     fi
1309   done
1310   IFS="$ac_save_ifs"
1311 fi
1312 fi
1313 AMTAR="$ac_cv_prog_AMTAR"
1314 if test -n "$AMTAR"; then
1315   echo "$ac_t""$AMTAR" 1>&6
1316 else
1317   echo "$ac_t""no" 1>&6
1318 fi
1319
1320 test -n "$AMTAR" && break
1321 done
1322
1323
1324 AMTARFLAGS=
1325 if test -n "$AMTAR"; then
1326   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1327         AMTARFLAGS=o
1328   fi
1329 fi
1330
1331 cat >> confdefs.h <<EOF
1332 #define OPENLDAP_PACKAGE "$PACKAGE"
1333 EOF
1334
1335 cat >> confdefs.h <<EOF
1336 #define OPENLDAP_VERSION "$VERSION"
1337 EOF
1338
1339
1340 cat >> confdefs.h <<EOF
1341 #define LDAP_VENDOR_VERSION $OL_API_INC
1342 EOF
1343
1344 cat >> confdefs.h <<EOF
1345 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1346 EOF
1347
1348 cat >> confdefs.h <<EOF
1349 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1350 EOF
1351
1352 cat >> confdefs.h <<EOF
1353 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1354 EOF
1355
1356
1357 OPENLDAP_LIBVERSION=$OL_API_LIB
1358
1359 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1360
1361
1362
1363 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1364 echo "configure:1365: checking configure arguments" >&5
1365
1366
1367 top_builddir=`pwd`
1368
1369 ldap_subdir="/openldap"
1370
1371 # Check whether --with-subdir or --without-subdir was given.
1372 if test "${with_subdir+set}" = set; then
1373   withval="$with_subdir"
1374   case "$withval" in
1375         no) ldap_subdir=""
1376                 ;;
1377         yes)
1378                 ;;
1379         /*|\\*)
1380                 ldap_subdir="$withval"
1381                 ;;
1382         *)
1383                 ldap_subdir="/$withval"
1384                 ;;
1385 esac
1386
1387 fi
1388
1389
1390 # OpenLDAP --enable-debug
1391         # Check whether --enable-debug or --disable-debug was given.
1392 if test "${enable_debug+set}" = set; then
1393   enableval="$enable_debug"
1394   
1395         ol_arg=invalid
1396         for ol_val in auto yes no ; do
1397                 if test "$enableval" = "$ol_val" ; then
1398                         ol_arg="$ol_val"
1399                 fi
1400         done
1401         if test "$ol_arg" = "invalid" ; then
1402                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1403         fi
1404         ol_enable_debug="$ol_arg"
1405
1406 else
1407         ol_enable_debug="yes"
1408 fi
1409 # end --enable-debug
1410 # OpenLDAP --enable-syslog
1411         # Check whether --enable-syslog or --disable-syslog was given.
1412 if test "${enable_syslog+set}" = set; then
1413   enableval="$enable_syslog"
1414   
1415         ol_arg=invalid
1416         for ol_val in auto yes no ; do
1417                 if test "$enableval" = "$ol_val" ; then
1418                         ol_arg="$ol_val"
1419                 fi
1420         done
1421         if test "$ol_arg" = "invalid" ; then
1422                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1423         fi
1424         ol_enable_syslog="$ol_arg"
1425
1426 else
1427         ol_enable_syslog="auto"
1428 fi
1429 # end --enable-syslog
1430 # OpenLDAP --enable-proctitle
1431         # Check whether --enable-proctitle or --disable-proctitle was given.
1432 if test "${enable_proctitle+set}" = set; then
1433   enableval="$enable_proctitle"
1434   
1435         ol_arg=invalid
1436         for ol_val in auto yes no ; do
1437                 if test "$enableval" = "$ol_val" ; then
1438                         ol_arg="$ol_val"
1439                 fi
1440         done
1441         if test "$ol_arg" = "invalid" ; then
1442                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1443         fi
1444         ol_enable_proctitle="$ol_arg"
1445
1446 else
1447         ol_enable_proctitle="yes"
1448 fi
1449 # end --enable-proctitle
1450 # OpenLDAP --enable-cache
1451         # Check whether --enable-cache or --disable-cache was given.
1452 if test "${enable_cache+set}" = set; then
1453   enableval="$enable_cache"
1454   
1455         ol_arg=invalid
1456         for ol_val in auto yes no ; do
1457                 if test "$enableval" = "$ol_val" ; then
1458                         ol_arg="$ol_val"
1459                 fi
1460         done
1461         if test "$ol_arg" = "invalid" ; then
1462                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1463         fi
1464         ol_enable_cache="$ol_arg"
1465
1466 else
1467         ol_enable_cache="no"
1468 fi
1469 # end --enable-cache
1470 # OpenLDAP --enable-referrals
1471         # Check whether --enable-referrals or --disable-referrals was given.
1472 if test "${enable_referrals+set}" = set; then
1473   enableval="$enable_referrals"
1474   
1475         ol_arg=invalid
1476         for ol_val in auto yes no ; do
1477                 if test "$enableval" = "$ol_val" ; then
1478                         ol_arg="$ol_val"
1479                 fi
1480         done
1481         if test "$ol_arg" = "invalid" ; then
1482                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1483         fi
1484         ol_enable_referrals="$ol_arg"
1485
1486 else
1487         ol_enable_referrals="no"
1488 fi
1489 # end --enable-referrals
1490 ol_enable_kbind=${ol_enable_kbind-no}
1491 # OpenLDAP --enable-ipv6
1492         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1493 if test "${enable_ipv6+set}" = set; then
1494   enableval="$enable_ipv6"
1495   
1496         ol_arg=invalid
1497         for ol_val in auto yes no ; do
1498                 if test "$enableval" = "$ol_val" ; then
1499                         ol_arg="$ol_val"
1500                 fi
1501         done
1502         if test "$ol_arg" = "invalid" ; then
1503                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1504         fi
1505         ol_enable_ipv6="$ol_arg"
1506
1507 else
1508         ol_enable_ipv6="auto"
1509 fi
1510 # end --enable-ipv6
1511 # OpenLDAP --enable-local
1512         # Check whether --enable-local or --disable-local was given.
1513 if test "${enable_local+set}" = set; then
1514   enableval="$enable_local"
1515   
1516         ol_arg=invalid
1517         for ol_val in auto yes no ; do
1518                 if test "$enableval" = "$ol_val" ; then
1519                         ol_arg="$ol_val"
1520                 fi
1521         done
1522         if test "$ol_arg" = "invalid" ; then
1523                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1524         fi
1525         ol_enable_local="$ol_arg"
1526
1527 else
1528         ol_enable_local="auto"
1529 fi
1530 # end --enable-local
1531 # OpenLDAP --enable-x_compile
1532         # Check whether --enable-x_compile or --disable-x_compile was given.
1533 if test "${enable_x_compile+set}" = set; then
1534   enableval="$enable_x_compile"
1535   
1536         ol_arg=invalid
1537         for ol_val in yes no ; do
1538                 if test "$enableval" = "$ol_val" ; then
1539                         ol_arg="$ol_val"
1540                 fi
1541         done
1542         if test "$ol_arg" = "invalid" ; then
1543                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1544         fi
1545         ol_enable_x_compile="$ol_arg"
1546
1547 else
1548         ol_enable_x_compile="no"
1549 fi
1550 # end --enable-x_compile
1551
1552
1553 # OpenLDAP --with-cyrus_sasl
1554         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1555 if test "${with_cyrus_sasl+set}" = set; then
1556   withval="$with_cyrus_sasl"
1557   
1558         ol_arg=invalid
1559         for ol_val in auto yes no  ; do
1560                 if test "$withval" = "$ol_val" ; then
1561                         ol_arg="$ol_val"
1562                 fi
1563         done
1564         if test "$ol_arg" = "invalid" ; then
1565                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1566         fi
1567         ol_with_cyrus_sasl="$ol_arg"
1568
1569 else
1570         ol_with_cyrus_sasl="auto"
1571 fi
1572 # end --with-cyrus_sasl
1573
1574 # OpenLDAP --with-fetch
1575         # Check whether --with-fetch or --without-fetch was given.
1576 if test "${with_fetch+set}" = set; then
1577   withval="$with_fetch"
1578   
1579         ol_arg=invalid
1580         for ol_val in auto yes no  ; do
1581                 if test "$withval" = "$ol_val" ; then
1582                         ol_arg="$ol_val"
1583                 fi
1584         done
1585         if test "$ol_arg" = "invalid" ; then
1586                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1587         fi
1588         ol_with_fetch="$ol_arg"
1589
1590 else
1591         ol_with_fetch="auto"
1592 fi
1593 # end --with-fetch
1594
1595 # OpenLDAP --with-kerberos
1596         # Check whether --with-kerberos or --without-kerberos was given.
1597 if test "${with_kerberos+set}" = set; then
1598   withval="$with_kerberos"
1599   
1600         ol_arg=invalid
1601         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1602                 if test "$withval" = "$ol_val" ; then
1603                         ol_arg="$ol_val"
1604                 fi
1605         done
1606         if test "$ol_arg" = "invalid" ; then
1607                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1608         fi
1609         ol_with_kerberos="$ol_arg"
1610
1611 else
1612         ol_with_kerberos="auto"
1613 fi
1614 # end --with-kerberos
1615
1616 # OpenLDAP --with-readline
1617         # Check whether --with-readline or --without-readline was given.
1618 if test "${with_readline+set}" = set; then
1619   withval="$with_readline"
1620   
1621         ol_arg=invalid
1622         for ol_val in auto yes no  ; do
1623                 if test "$withval" = "$ol_val" ; then
1624                         ol_arg="$ol_val"
1625                 fi
1626         done
1627         if test "$ol_arg" = "invalid" ; then
1628                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1629         fi
1630         ol_with_readline="$ol_arg"
1631
1632 else
1633         ol_with_readline="auto"
1634 fi
1635 # end --with-readline
1636
1637 # OpenLDAP --with-threads
1638         # Check whether --with-threads or --without-threads was given.
1639 if test "${with_threads+set}" = set; then
1640   withval="$with_threads"
1641   
1642         ol_arg=invalid
1643         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1644                 if test "$withval" = "$ol_val" ; then
1645                         ol_arg="$ol_val"
1646                 fi
1647         done
1648         if test "$ol_arg" = "invalid" ; then
1649                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1650         fi
1651         ol_with_threads="$ol_arg"
1652
1653 else
1654         ol_with_threads="auto"
1655 fi
1656 # end --with-threads
1657
1658 # OpenLDAP --with-tls
1659         # Check whether --with-tls or --without-tls was given.
1660 if test "${with_tls+set}" = set; then
1661   withval="$with_tls"
1662   
1663         ol_arg=invalid
1664         for ol_val in auto ssleay openssl yes no  ; do
1665                 if test "$withval" = "$ol_val" ; then
1666                         ol_arg="$ol_val"
1667                 fi
1668         done
1669         if test "$ol_arg" = "invalid" ; then
1670                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1671         fi
1672         ol_with_tls="$ol_arg"
1673
1674 else
1675         ol_with_tls="auto"
1676 fi
1677 # end --with-tls
1678
1679 # OpenLDAP --with-yielding_select
1680         # Check whether --with-yielding_select or --without-yielding_select was given.
1681 if test "${with_yielding_select+set}" = set; then
1682   withval="$with_yielding_select"
1683   
1684         ol_arg=invalid
1685         for ol_val in auto yes no manual  ; do
1686                 if test "$withval" = "$ol_val" ; then
1687                         ol_arg="$ol_val"
1688                 fi
1689         done
1690         if test "$ol_arg" = "invalid" ; then
1691                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1692         fi
1693         ol_with_yielding_select="$ol_arg"
1694
1695 else
1696         ol_with_yielding_select="auto"
1697 fi
1698 # end --with-yielding_select
1699
1700
1701
1702 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1703 if test "${with_xxslapdoptions+set}" = set; then
1704   withval="$with_xxslapdoptions"
1705   :
1706 fi
1707
1708 # OpenLDAP --enable-slapd
1709         # Check whether --enable-slapd or --disable-slapd was given.
1710 if test "${enable_slapd+set}" = set; then
1711   enableval="$enable_slapd"
1712   
1713         ol_arg=invalid
1714         for ol_val in auto yes no ; do
1715                 if test "$enableval" = "$ol_val" ; then
1716                         ol_arg="$ol_val"
1717                 fi
1718         done
1719         if test "$ol_arg" = "invalid" ; then
1720                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1721         fi
1722         ol_enable_slapd="$ol_arg"
1723
1724 else
1725         ol_enable_slapd="yes"
1726 fi
1727 # end --enable-slapd
1728 # OpenLDAP --enable-aci
1729         # Check whether --enable-aci or --disable-aci was given.
1730 if test "${enable_aci+set}" = set; then
1731   enableval="$enable_aci"
1732   
1733         ol_arg=invalid
1734         for ol_val in auto yes no ; do
1735                 if test "$enableval" = "$ol_val" ; then
1736                         ol_arg="$ol_val"
1737                 fi
1738         done
1739         if test "$ol_arg" = "invalid" ; then
1740                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1741         fi
1742         ol_enable_aci="$ol_arg"
1743
1744 else
1745         ol_enable_aci="no"
1746 fi
1747 # end --enable-aci
1748 # OpenLDAP --enable-cleartext
1749         # Check whether --enable-cleartext or --disable-cleartext was given.
1750 if test "${enable_cleartext+set}" = set; then
1751   enableval="$enable_cleartext"
1752   
1753         ol_arg=invalid
1754         for ol_val in auto yes no ; do
1755                 if test "$enableval" = "$ol_val" ; then
1756                         ol_arg="$ol_val"
1757                 fi
1758         done
1759         if test "$ol_arg" = "invalid" ; then
1760                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1761         fi
1762         ol_enable_cleartext="$ol_arg"
1763
1764 else
1765         ol_enable_cleartext="yes"
1766 fi
1767 # end --enable-cleartext
1768 # OpenLDAP --enable-crypt
1769         # Check whether --enable-crypt or --disable-crypt was given.
1770 if test "${enable_crypt+set}" = set; then
1771   enableval="$enable_crypt"
1772   
1773         ol_arg=invalid
1774         for ol_val in auto yes no ; do
1775                 if test "$enableval" = "$ol_val" ; then
1776                         ol_arg="$ol_val"
1777                 fi
1778         done
1779         if test "$ol_arg" = "invalid" ; then
1780                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1781         fi
1782         ol_enable_crypt="$ol_arg"
1783
1784 else
1785         ol_enable_crypt="no"
1786 fi
1787 # end --enable-crypt
1788 # OpenLDAP --enable-dynamic
1789         # Check whether --enable-dynamic or --disable-dynamic was given.
1790 if test "${enable_dynamic+set}" = set; then
1791   enableval="$enable_dynamic"
1792   
1793         ol_arg=invalid
1794         for ol_val in auto yes no ; do
1795                 if test "$enableval" = "$ol_val" ; then
1796                         ol_arg="$ol_val"
1797                 fi
1798         done
1799         if test "$ol_arg" = "invalid" ; then
1800                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1801         fi
1802         ol_enable_dynamic="$ol_arg"
1803
1804 else
1805         ol_enable_dynamic="no"
1806 fi
1807 # end --enable-dynamic
1808 # OpenLDAP --enable-kpasswd
1809         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1810 if test "${enable_kpasswd+set}" = set; then
1811   enableval="$enable_kpasswd"
1812   
1813         ol_arg=invalid
1814         for ol_val in auto yes no ; do
1815                 if test "$enableval" = "$ol_val" ; then
1816                         ol_arg="$ol_val"
1817                 fi
1818         done
1819         if test "$ol_arg" = "invalid" ; then
1820                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1821         fi
1822         ol_enable_kpasswd="$ol_arg"
1823
1824 else
1825         ol_enable_kpasswd="no"
1826 fi
1827 # end --enable-kpasswd
1828 # OpenLDAP --enable-lmpasswd
1829         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1830 if test "${enable_lmpasswd+set}" = set; then
1831   enableval="$enable_lmpasswd"
1832   
1833         ol_arg=invalid
1834         for ol_val in auto yes no ; do
1835                 if test "$enableval" = "$ol_val" ; then
1836                         ol_arg="$ol_val"
1837                 fi
1838         done
1839         if test "$ol_arg" = "invalid" ; then
1840                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1841         fi
1842         ol_enable_lmpasswd="$ol_arg"
1843
1844 else
1845         ol_enable_lmpasswd="no"
1846 fi
1847 # end --enable-lmpasswd
1848 # OpenLDAP --enable-spasswd
1849         # Check whether --enable-spasswd or --disable-spasswd was given.
1850 if test "${enable_spasswd+set}" = set; then
1851   enableval="$enable_spasswd"
1852   
1853         ol_arg=invalid
1854         for ol_val in auto yes no ; do
1855                 if test "$enableval" = "$ol_val" ; then
1856                         ol_arg="$ol_val"
1857                 fi
1858         done
1859         if test "$ol_arg" = "invalid" ; then
1860                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1861         fi
1862         ol_enable_spasswd="$ol_arg"
1863
1864 else
1865         ol_enable_spasswd="no"
1866 fi
1867 # end --enable-spasswd
1868 # OpenLDAP --enable-modules
1869         # Check whether --enable-modules or --disable-modules was given.
1870 if test "${enable_modules+set}" = set; then
1871   enableval="$enable_modules"
1872   
1873         ol_arg=invalid
1874         for ol_val in auto yes no ; do
1875                 if test "$enableval" = "$ol_val" ; then
1876                         ol_arg="$ol_val"
1877                 fi
1878         done
1879         if test "$ol_arg" = "invalid" ; then
1880                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1881         fi
1882         ol_enable_modules="$ol_arg"
1883
1884 else
1885         ol_enable_modules="no"
1886 fi
1887 # end --enable-modules
1888 ol_enable_multimaster=${ol_enable_multimaster-no}
1889 # OpenLDAP --enable-phonetic
1890         # Check whether --enable-phonetic or --disable-phonetic was given.
1891 if test "${enable_phonetic+set}" = set; then
1892   enableval="$enable_phonetic"
1893   
1894         ol_arg=invalid
1895         for ol_val in auto yes no ; do
1896                 if test "$enableval" = "$ol_val" ; then
1897                         ol_arg="$ol_val"
1898                 fi
1899         done
1900         if test "$ol_arg" = "invalid" ; then
1901                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1902         fi
1903         ol_enable_phonetic="$ol_arg"
1904
1905 else
1906         ol_enable_phonetic="no"
1907 fi
1908 # end --enable-phonetic
1909 # OpenLDAP --enable-rewrite
1910         # Check whether --enable-rewrite or --disable-rewrite was given.
1911 if test "${enable_rewrite+set}" = set; then
1912   enableval="$enable_rewrite"
1913   
1914         ol_arg=invalid
1915         for ol_val in auto yes no ; do
1916                 if test "$enableval" = "$ol_val" ; then
1917                         ol_arg="$ol_val"
1918                 fi
1919         done
1920         if test "$ol_arg" = "invalid" ; then
1921                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1922         fi
1923         ol_enable_rewrite="$ol_arg"
1924
1925 else
1926         ol_enable_rewrite="no"
1927 fi
1928 # end --enable-rewrite
1929 # OpenLDAP --enable-rlookups
1930         # Check whether --enable-rlookups or --disable-rlookups was given.
1931 if test "${enable_rlookups+set}" = set; then
1932   enableval="$enable_rlookups"
1933   
1934         ol_arg=invalid
1935         for ol_val in auto yes no ; do
1936                 if test "$enableval" = "$ol_val" ; then
1937                         ol_arg="$ol_val"
1938                 fi
1939         done
1940         if test "$ol_arg" = "invalid" ; then
1941                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1942         fi
1943         ol_enable_rlookups="$ol_arg"
1944
1945 else
1946         ol_enable_rlookups="no"
1947 fi
1948 # end --enable-rlookups
1949 # OpenLDAP --enable-slp
1950         # Check whether --enable-slp or --disable-slp was given.
1951 if test "${enable_slp+set}" = set; then
1952   enableval="$enable_slp"
1953   
1954         ol_arg=invalid
1955         for ol_val in auto yes no ; do
1956                 if test "$enableval" = "$ol_val" ; then
1957                         ol_arg="$ol_val"
1958                 fi
1959         done
1960         if test "$ol_arg" = "invalid" ; then
1961                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1962         fi
1963         ol_enable_slp="$ol_arg"
1964
1965 else
1966         ol_enable_slp="no"
1967 fi
1968 # end --enable-slp
1969 # OpenLDAP --enable-wrappers
1970         # Check whether --enable-wrappers or --disable-wrappers was given.
1971 if test "${enable_wrappers+set}" = set; then
1972   enableval="$enable_wrappers"
1973   
1974         ol_arg=invalid
1975         for ol_val in auto yes no ; do
1976                 if test "$enableval" = "$ol_val" ; then
1977                         ol_arg="$ol_val"
1978                 fi
1979         done
1980         if test "$ol_arg" = "invalid" ; then
1981                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1982         fi
1983         ol_enable_wrappers="$ol_arg"
1984
1985 else
1986         ol_enable_wrappers="no"
1987 fi
1988 # end --enable-wrappers
1989
1990 # OpenLDAP --enable-bdb
1991         # Check whether --enable-bdb or --disable-bdb was given.
1992 if test "${enable_bdb+set}" = set; then
1993   enableval="$enable_bdb"
1994   
1995         ol_arg=invalid
1996         for ol_val in auto yes no ; do
1997                 if test "$enableval" = "$ol_val" ; then
1998                         ol_arg="$ol_val"
1999                 fi
2000         done
2001         if test "$ol_arg" = "invalid" ; then
2002                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
2003         fi
2004         ol_enable_bdb="$ol_arg"
2005
2006 else
2007         ol_enable_bdb="yes"
2008 fi
2009 # end --enable-bdb
2010 # OpenLDAP --with-bdb_module
2011         # Check whether --with-bdb_module or --without-bdb_module was given.
2012 if test "${with_bdb_module+set}" = set; then
2013   withval="$with_bdb_module"
2014   
2015         ol_arg=invalid
2016         for ol_val in static dynamic ; do
2017                 if test "$withval" = "$ol_val" ; then
2018                         ol_arg="$ol_val"
2019                 fi
2020         done
2021         if test "$ol_arg" = "invalid" ; then
2022                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
2023         fi
2024         ol_with_bdb_module="$ol_arg"
2025
2026 else
2027         ol_with_bdb_module="static"
2028 fi
2029 # end --with-bdb_module
2030
2031 # OpenLDAP --enable-dnssrv
2032         # Check whether --enable-dnssrv or --disable-dnssrv was given.
2033 if test "${enable_dnssrv+set}" = set; then
2034   enableval="$enable_dnssrv"
2035   
2036         ol_arg=invalid
2037         for ol_val in auto yes no ; do
2038                 if test "$enableval" = "$ol_val" ; then
2039                         ol_arg="$ol_val"
2040                 fi
2041         done
2042         if test "$ol_arg" = "invalid" ; then
2043                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
2044         fi
2045         ol_enable_dnssrv="$ol_arg"
2046
2047 else
2048         ol_enable_dnssrv="no"
2049 fi
2050 # end --enable-dnssrv
2051 # OpenLDAP --with-dnssrv_module
2052         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
2053 if test "${with_dnssrv_module+set}" = set; then
2054   withval="$with_dnssrv_module"
2055   
2056         ol_arg=invalid
2057         for ol_val in static dynamic ; do
2058                 if test "$withval" = "$ol_val" ; then
2059                         ol_arg="$ol_val"
2060                 fi
2061         done
2062         if test "$ol_arg" = "invalid" ; then
2063                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
2064         fi
2065         ol_with_dnssrv_module="$ol_arg"
2066
2067 else
2068         ol_with_dnssrv_module="static"
2069 fi
2070 # end --with-dnssrv_module
2071
2072 # OpenLDAP --enable-ldap
2073         # Check whether --enable-ldap or --disable-ldap was given.
2074 if test "${enable_ldap+set}" = set; then
2075   enableval="$enable_ldap"
2076   
2077         ol_arg=invalid
2078         for ol_val in auto yes no ; do
2079                 if test "$enableval" = "$ol_val" ; then
2080                         ol_arg="$ol_val"
2081                 fi
2082         done
2083         if test "$ol_arg" = "invalid" ; then
2084                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2085         fi
2086         ol_enable_ldap="$ol_arg"
2087
2088 else
2089         ol_enable_ldap="no"
2090 fi
2091 # end --enable-ldap
2092 # OpenLDAP --with-ldap_module
2093         # Check whether --with-ldap_module or --without-ldap_module was given.
2094 if test "${with_ldap_module+set}" = set; then
2095   withval="$with_ldap_module"
2096   
2097         ol_arg=invalid
2098         for ol_val in static dynamic ; do
2099                 if test "$withval" = "$ol_val" ; then
2100                         ol_arg="$ol_val"
2101                 fi
2102         done
2103         if test "$ol_arg" = "invalid" ; then
2104                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
2105         fi
2106         ol_with_ldap_module="$ol_arg"
2107
2108 else
2109         ol_with_ldap_module="static"
2110 fi
2111 # end --with-ldap_module
2112
2113 # OpenLDAP --enable-ldbm
2114         # Check whether --enable-ldbm or --disable-ldbm was given.
2115 if test "${enable_ldbm+set}" = set; then
2116   enableval="$enable_ldbm"
2117   
2118         ol_arg=invalid
2119         for ol_val in auto yes no ; do
2120                 if test "$enableval" = "$ol_val" ; then
2121                         ol_arg="$ol_val"
2122                 fi
2123         done
2124         if test "$ol_arg" = "invalid" ; then
2125                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2126         fi
2127         ol_enable_ldbm="$ol_arg"
2128
2129 else
2130         ol_enable_ldbm="no"
2131 fi
2132 # end --enable-ldbm
2133 # OpenLDAP --with-ldbm_api
2134         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2135 if test "${with_ldbm_api+set}" = set; then
2136   withval="$with_ldbm_api"
2137   
2138         ol_arg=invalid
2139         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2140                 if test "$withval" = "$ol_val" ; then
2141                         ol_arg="$ol_val"
2142                 fi
2143         done
2144         if test "$ol_arg" = "invalid" ; then
2145                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2146         fi
2147         ol_with_ldbm_api="$ol_arg"
2148
2149 else
2150         ol_with_ldbm_api="auto"
2151 fi
2152 # end --with-ldbm_api
2153
2154 # OpenLDAP --with-ldbm_module
2155         # Check whether --with-ldbm_module or --without-ldbm_module was given.
2156 if test "${with_ldbm_module+set}" = set; then
2157   withval="$with_ldbm_module"
2158   
2159         ol_arg=invalid
2160         for ol_val in static dynamic ; do
2161                 if test "$withval" = "$ol_val" ; then
2162                         ol_arg="$ol_val"
2163                 fi
2164         done
2165         if test "$ol_arg" = "invalid" ; then
2166                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2167         fi
2168         ol_with_ldbm_module="$ol_arg"
2169
2170 else
2171         ol_with_ldbm_module="static"
2172 fi
2173 # end --with-ldbm_module
2174
2175 # OpenLDAP --with-ldbm_type
2176         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2177 if test "${with_ldbm_type+set}" = set; then
2178   withval="$with_ldbm_type"
2179   
2180         ol_arg=invalid
2181         for ol_val in auto btree hash ; do
2182                 if test "$withval" = "$ol_val" ; then
2183                         ol_arg="$ol_val"
2184                 fi
2185         done
2186         if test "$ol_arg" = "invalid" ; then
2187                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2188         fi
2189         ol_with_ldbm_type="$ol_arg"
2190
2191 else
2192         ol_with_ldbm_type="auto"
2193 fi
2194 # end --with-ldbm_type
2195
2196 # OpenLDAP --enable-meta
2197         # Check whether --enable-meta or --disable-meta was given.
2198 if test "${enable_meta+set}" = set; then
2199   enableval="$enable_meta"
2200   
2201         ol_arg=invalid
2202         for ol_val in auto yes no ; do
2203                 if test "$enableval" = "$ol_val" ; then
2204                         ol_arg="$ol_val"
2205                 fi
2206         done
2207         if test "$ol_arg" = "invalid" ; then
2208                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2209         fi
2210         ol_enable_meta="$ol_arg"
2211
2212 else
2213         ol_enable_meta="no"
2214 fi
2215 # end --enable-meta
2216 # OpenLDAP --with-meta_module
2217         # Check whether --with-meta_module or --without-meta_module was given.
2218 if test "${with_meta_module+set}" = set; then
2219   withval="$with_meta_module"
2220   
2221         ol_arg=invalid
2222         for ol_val in static dynamic ; do
2223                 if test "$withval" = "$ol_val" ; then
2224                         ol_arg="$ol_val"
2225                 fi
2226         done
2227         if test "$ol_arg" = "invalid" ; then
2228                 { echo "configure: error: bad value $withval for --with-meta_module" 1>&2; exit 1; }
2229         fi
2230         ol_with_meta_module="$ol_arg"
2231
2232 else
2233         ol_with_meta_module="static"
2234 fi
2235 # end --with-meta_module
2236
2237 # OpenLDAP --enable-monitor
2238         # Check whether --enable-monitor or --disable-monitor was given.
2239 if test "${enable_monitor+set}" = set; then
2240   enableval="$enable_monitor"
2241   
2242         ol_arg=invalid
2243         for ol_val in auto yes no ; do
2244                 if test "$enableval" = "$ol_val" ; then
2245                         ol_arg="$ol_val"
2246                 fi
2247         done
2248         if test "$ol_arg" = "invalid" ; then
2249                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2250         fi
2251         ol_enable_monitor="$ol_arg"
2252
2253 else
2254         ol_enable_monitor="no"
2255 fi
2256 # end --enable-monitor
2257 # OpenLDAP --with-monitor_module
2258         # Check whether --with-monitor_module or --without-monitor_module was given.
2259 if test "${with_monitor_module+set}" = set; then
2260   withval="$with_monitor_module"
2261   
2262         ol_arg=invalid
2263         for ol_val in static dynamic ; do
2264                 if test "$withval" = "$ol_val" ; then
2265                         ol_arg="$ol_val"
2266                 fi
2267         done
2268         if test "$ol_arg" = "invalid" ; then
2269                 { echo "configure: error: bad value $withval for --with-monitor_module" 1>&2; exit 1; }
2270         fi
2271         ol_with_monitor_module="$ol_arg"
2272
2273 else
2274         ol_with_monitor_module="static"
2275 fi
2276 # end --with-monitor_module
2277
2278 # OpenLDAP --enable-null
2279         # Check whether --enable-null or --disable-null was given.
2280 if test "${enable_null+set}" = set; then
2281   enableval="$enable_null"
2282   
2283         ol_arg=invalid
2284         for ol_val in auto yes no ; do
2285                 if test "$enableval" = "$ol_val" ; then
2286                         ol_arg="$ol_val"
2287                 fi
2288         done
2289         if test "$ol_arg" = "invalid" ; then
2290                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2291         fi
2292         ol_enable_null="$ol_arg"
2293
2294 else
2295         ol_enable_null="no"
2296 fi
2297 # end --enable-null
2298 # OpenLDAP --with-null_module
2299         # Check whether --with-null_module or --without-null_module was given.
2300 if test "${with_null_module+set}" = set; then
2301   withval="$with_null_module"
2302   
2303         ol_arg=invalid
2304         for ol_val in static dynamic ; do
2305                 if test "$withval" = "$ol_val" ; then
2306                         ol_arg="$ol_val"
2307                 fi
2308         done
2309         if test "$ol_arg" = "invalid" ; then
2310                 { echo "configure: error: bad value $withval for --with-null_module" 1>&2; exit 1; }
2311         fi
2312         ol_with_null_module="$ol_arg"
2313
2314 else
2315         ol_with_null_module="static"
2316 fi
2317 # end --with-null_module
2318
2319 # OpenLDAP --enable-passwd
2320         # Check whether --enable-passwd or --disable-passwd was given.
2321 if test "${enable_passwd+set}" = set; then
2322   enableval="$enable_passwd"
2323   
2324         ol_arg=invalid
2325         for ol_val in auto yes no ; do
2326                 if test "$enableval" = "$ol_val" ; then
2327                         ol_arg="$ol_val"
2328                 fi
2329         done
2330         if test "$ol_arg" = "invalid" ; then
2331                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2332         fi
2333         ol_enable_passwd="$ol_arg"
2334
2335 else
2336         ol_enable_passwd="no"
2337 fi
2338 # end --enable-passwd
2339 # OpenLDAP --with-passwd_module
2340         # Check whether --with-passwd_module or --without-passwd_module was given.
2341 if test "${with_passwd_module+set}" = set; then
2342   withval="$with_passwd_module"
2343   
2344         ol_arg=invalid
2345         for ol_val in static dynamic ; do
2346                 if test "$withval" = "$ol_val" ; then
2347                         ol_arg="$ol_val"
2348                 fi
2349         done
2350         if test "$ol_arg" = "invalid" ; then
2351                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2352         fi
2353         ol_with_passwd_module="$ol_arg"
2354
2355 else
2356         ol_with_passwd_module="static"
2357 fi
2358 # end --with-passwd_module
2359
2360 # OpenLDAP --enable-perl
2361         # Check whether --enable-perl or --disable-perl was given.
2362 if test "${enable_perl+set}" = set; then
2363   enableval="$enable_perl"
2364   
2365         ol_arg=invalid
2366         for ol_val in auto yes no ; do
2367                 if test "$enableval" = "$ol_val" ; then
2368                         ol_arg="$ol_val"
2369                 fi
2370         done
2371         if test "$ol_arg" = "invalid" ; then
2372                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2373         fi
2374         ol_enable_perl="$ol_arg"
2375
2376 else
2377         ol_enable_perl="no"
2378 fi
2379 # end --enable-perl
2380 # OpenLDAP --with-perl_module
2381         # Check whether --with-perl_module or --without-perl_module was given.
2382 if test "${with_perl_module+set}" = set; then
2383   withval="$with_perl_module"
2384   
2385         ol_arg=invalid
2386         for ol_val in static dynamic ; do
2387                 if test "$withval" = "$ol_val" ; then
2388                         ol_arg="$ol_val"
2389                 fi
2390         done
2391         if test "$ol_arg" = "invalid" ; then
2392                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2393         fi
2394         ol_with_perl_module="$ol_arg"
2395
2396 else
2397         ol_with_perl_module="static"
2398 fi
2399 # end --with-perl_module
2400
2401 # OpenLDAP --enable-shell
2402         # Check whether --enable-shell or --disable-shell was given.
2403 if test "${enable_shell+set}" = set; then
2404   enableval="$enable_shell"
2405   
2406         ol_arg=invalid
2407         for ol_val in auto yes no ; do
2408                 if test "$enableval" = "$ol_val" ; then
2409                         ol_arg="$ol_val"
2410                 fi
2411         done
2412         if test "$ol_arg" = "invalid" ; then
2413                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2414         fi
2415         ol_enable_shell="$ol_arg"
2416
2417 else
2418         ol_enable_shell="no"
2419 fi
2420 # end --enable-shell
2421 # OpenLDAP --with-shell_module
2422         # Check whether --with-shell_module or --without-shell_module was given.
2423 if test "${with_shell_module+set}" = set; then
2424   withval="$with_shell_module"
2425   
2426         ol_arg=invalid
2427         for ol_val in static dynamic ; do
2428                 if test "$withval" = "$ol_val" ; then
2429                         ol_arg="$ol_val"
2430                 fi
2431         done
2432         if test "$ol_arg" = "invalid" ; then
2433                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2434         fi
2435         ol_with_shell_module="$ol_arg"
2436
2437 else
2438         ol_with_shell_module="static"
2439 fi
2440 # end --with-shell_module
2441
2442 # OpenLDAP --enable-sql
2443         # Check whether --enable-sql or --disable-sql was given.
2444 if test "${enable_sql+set}" = set; then
2445   enableval="$enable_sql"
2446   
2447         ol_arg=invalid
2448         for ol_val in auto yes no ; do
2449                 if test "$enableval" = "$ol_val" ; then
2450                         ol_arg="$ol_val"
2451                 fi
2452         done
2453         if test "$ol_arg" = "invalid" ; then
2454                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2455         fi
2456         ol_enable_sql="$ol_arg"
2457
2458 else
2459         ol_enable_sql="no"
2460 fi
2461 # end --enable-sql
2462 # OpenLDAP --with-sql_module
2463         # Check whether --with-sql_module or --without-sql_module was given.
2464 if test "${with_sql_module+set}" = set; then
2465   withval="$with_sql_module"
2466   
2467         ol_arg=invalid
2468         for ol_val in static dynamic ; do
2469                 if test "$withval" = "$ol_val" ; then
2470                         ol_arg="$ol_val"
2471                 fi
2472         done
2473         if test "$ol_arg" = "invalid" ; then
2474                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2475         fi
2476         ol_with_sql_module="$ol_arg"
2477
2478 else
2479         ol_with_sql_module="static"
2480 fi
2481 # end --with-sql_module
2482
2483
2484 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2485 if test "${with_xxslurpdoptions+set}" = set; then
2486   withval="$with_xxslurpdoptions"
2487   :
2488 fi
2489
2490 # OpenLDAP --enable-slurpd
2491         # Check whether --enable-slurpd or --disable-slurpd was given.
2492 if test "${enable_slurpd+set}" = set; then
2493   enableval="$enable_slurpd"
2494   
2495         ol_arg=invalid
2496         for ol_val in auto yes no ; do
2497                 if test "$enableval" = "$ol_val" ; then
2498                         ol_arg="$ol_val"
2499                 fi
2500         done
2501         if test "$ol_arg" = "invalid" ; then
2502                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2503         fi
2504         ol_enable_slurpd="$ol_arg"
2505
2506 else
2507         ol_enable_slurpd="auto"
2508 fi
2509 # end --enable-slurpd
2510
2511 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2512 if test "${with_xxliboptions+set}" = set; then
2513   withval="$with_xxliboptions"
2514   :
2515 fi
2516
2517 # Check whether --enable-static or --disable-static was given.
2518 if test "${enable_static+set}" = set; then
2519   enableval="$enable_static"
2520   p=${PACKAGE-default}
2521 case $enableval in
2522 yes) enable_static=yes ;;
2523 no) enable_static=no ;;
2524 *)
2525   enable_static=no
2526   # Look at the argument we got.  We use all the common list separators.
2527   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2528   for pkg in $enableval; do
2529     if test "X$pkg" = "X$p"; then
2530       enable_static=yes
2531     fi
2532   done
2533   IFS="$ac_save_ifs"
2534   ;;
2535 esac
2536 else
2537   enable_static=yes
2538 fi
2539
2540 # Check whether --enable-shared or --disable-shared was given.
2541 if test "${enable_shared+set}" = set; then
2542   enableval="$enable_shared"
2543   p=${PACKAGE-default}
2544 case $enableval in
2545 yes) enable_shared=yes ;;
2546 no) enable_shared=no ;;
2547 *)
2548   enable_shared=no
2549   # Look at the argument we got.  We use all the common list separators.
2550   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2551   for pkg in $enableval; do
2552     if test "X$pkg" = "X$p"; then
2553       enable_shared=yes
2554     fi
2555   done
2556   IFS="$ac_save_ifs"
2557   ;;
2558 esac
2559 else
2560   enable_shared=yes
2561 fi
2562
2563
2564
2565 # validate options
2566 if test $ol_enable_slapd = no ; then
2567                 if test $ol_enable_bdb = yes ; then
2568                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2569         fi
2570         if test $ol_enable_dnssrv = yes ; then
2571                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2572         fi
2573         if test $ol_enable_ldap = yes ; then
2574                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2575         fi
2576         if test $ol_enable_ldbm = yes ; then
2577                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2578         fi
2579         if test $ol_enable_meta = yes ; then
2580                 echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2
2581         fi
2582         if test $ol_enable_monitor = yes ; then
2583                 echo "configure: warning: slapd disabled, ignoring --enable-monitor argument" 1>&2
2584         fi
2585         if test $ol_enable_null = yes ; then
2586                 echo "configure: warning: slapd disabled, ignoring --enable-null argument" 1>&2
2587         fi
2588         if test $ol_enable_passwd = yes ; then
2589                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2590         fi
2591         if test $ol_enable_perl = yes ; then
2592                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2593         fi
2594         if test $ol_enable_shell = yes ; then
2595                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2596         fi
2597         if test $ol_enable_sql = yes ; then
2598                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2599         fi
2600         if test $ol_enable_modules = yes ; then
2601                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2602         fi
2603         if test $ol_enable_multimaster = yes ; then
2604                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2605         fi
2606         if test $ol_enable_wrappers = yes ; then
2607                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2608         fi
2609         if test $ol_enable_phonetic = yes ; then
2610                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2611         fi
2612         if test $ol_enable_rlookups = yes ; then
2613                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2614         fi
2615         if test $ol_enable_aci = yes ; then
2616                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2617         fi
2618         if test $ol_with_ldbm_api != auto ; then
2619                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2620         fi
2621         if test $ol_with_ldbm_type != auto ; then
2622                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2623         fi
2624         if test $ol_with_bdb_module != static ; then
2625                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2626         fi
2627         if test $ol_with_dnssrv_module != static ; then
2628                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2629         fi
2630         if test $ol_with_ldap_module != static ; then
2631                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2632         fi
2633         if test $ol_with_ldbm_module != static ; then
2634                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2635         fi
2636         if test $ol_with_meta_module != static ; then
2637                 echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2
2638         fi
2639         if test $ol_with_monitor_module != static ; then
2640                 echo "configure: warning: slapd disabled, ignoring --with-monitor-module argument" 1>&2
2641         fi
2642         if test $ol_with_null_module != static ; then
2643                 echo "configure: warning: slapd disabled, ignoring --with-null-module argument" 1>&2
2644         fi
2645         if test $ol_with_passwd_module != static ; then
2646                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2647         fi
2648         if test $ol_with_perl_module != static ; then
2649                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2650         fi
2651         if test $ol_with_shell_module != static ; then
2652                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2653         fi
2654         if test $ol_with_sql_module != static ; then
2655                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2656         fi
2657         if test $ol_enable_slurpd = yes ; then
2658                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2659         fi
2660         if test $ol_enable_rewrite = yes ; then
2661                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2662         fi
2663
2664         # force settings to no
2665         ol_enable_bdb=no
2666         ol_enable_dnssrv=no
2667         ol_enable_ldap=no
2668         ol_enable_ldbm=no
2669         ol_enable_meta=no
2670         ol_enable_monitor=no
2671         ol_enable_null=no
2672         ol_enable_passwd=no
2673         ol_enable_perl=no
2674         ol_enable_shell=no
2675         ol_enable_sql=no
2676
2677         ol_enable_modules=no
2678         ol_enable_multimaster=no
2679         ol_enable_phonetic=no
2680         ol_enable_rlookups=no
2681         ol_enable_aci=no
2682         ol_enable_wrappers=no
2683         ol_enable_dynamic=no
2684
2685         ol_with_ldbm_api=no
2686         ol_with_ldbm_type=no
2687
2688         ol_with_bdb_module=static
2689         ol_with_dnssrv_module=static
2690         ol_with_ldap_module=static
2691         ol_with_ldbm_module=static
2692         ol_with_meta_module=static
2693         ol_with_monitor_module=static
2694         ol_with_null_module=static
2695         ol_with_passwd_module=static
2696         ol_with_perl_module=static
2697         ol_with_shell_module=static
2698         ol_with_sql_module=static
2699
2700         ol_enable_slurpd=no
2701
2702         ol_enable_rewrite=no
2703
2704 elif test $ol_enable_ldbm = no ; then
2705         
2706         if test $ol_with_ldbm_api != auto ; then
2707                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2708         fi
2709
2710         if test $ol_with_ldbm_type != auto ; then
2711                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2712         fi
2713
2714         if test $ol_with_ldbm_module != static ; then
2715                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2716         fi
2717
2718         if test $ol_enable_modules != yes -a \
2719                 $ol_enable_bdb = no -a \
2720                 $ol_enable_dnssrv = no -a \
2721                 $ol_enable_ldap = no -a \
2722                 $ol_enable_meta = no -a \
2723                 $ol_enable_monitor = no -a \
2724                 $ol_enable_null = no -a \
2725                 $ol_enable_passwd = no -a \
2726                 $ol_enable_perl = no -a \
2727                 $ol_enable_shell = no -a \
2728                 $ol_enable_sql = no ; then
2729
2730                 if test $ol_enable_slapd = yes ; then
2731                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2732                 else
2733                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2734                         ol_enable_slapd=no
2735                 fi
2736         fi
2737
2738         ol_with_ldbm_api=no
2739         ol_with_ldbm_type=no
2740         ol_with_ldbm_module=static
2741
2742         if test $ol_enable_bdb != no ; then
2743                 ol_with_ldbm_api=berkeley
2744         fi
2745
2746 else
2747                 if test $ol_with_ldbm_api = gdbm -a \
2748                 $ol_with_ldbm_type = btree ; then
2749                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2750         fi
2751         if test $ol_with_ldbm_api = mdbm -a \
2752                 $ol_with_ldbm_type = btree ; then
2753                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2754         fi
2755         if test $ol_with_ldbm_api = ndbm -a \
2756                 $ol_with_ldbm_type = btree ; then
2757                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2758         fi
2759
2760         if test $ol_enable_bdb = yes ; then
2761                 if test $ol_with_ldbm_api = auto ; then
2762                         ol_with_ldbm_api=berkeley
2763                 elif test $ol_with_ldbm_api != berkeley ; then
2764                         { echo "configure: error: LDBM API not compatible with BDB" 1>&2; exit 1; }
2765                 fi
2766
2767         elif test $ol_enable_bdb = auto ; then
2768                 if test $ol_with_ldbm_api != berkeley \
2769                         -o $ol_with_ldbm_api != auto ; then
2770                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2771                         ol_enable_bdb=no
2772                 fi
2773         fi
2774 fi
2775
2776 if test $ol_enable_slurpd = yes ; then
2777                 if test $ol_with_threads = no ; then
2778                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2779         fi
2780 fi
2781
2782 if test $ol_enable_lmpasswd = yes ; then
2783         if test $ol_with_tls = no ; then
2784                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2785         fi
2786 fi
2787
2788 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2789         if test $ol_with_kerberos = no ; then
2790                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2791         elif test $ol_with_kerberos = auto ; then
2792                 ol_with_kerberos=yes
2793         fi
2794
2795 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2796         if test $ol_with_kerberos = auto ; then
2797                 ol_with_kerberos=no
2798         elif test $ol_with_kerberos != no ; then
2799                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2800                 ol_with_kerberos=no
2801         fi
2802 fi
2803
2804 if test $ol_enable_spasswd = yes ; then
2805         if test $ol_with_cyrus_sasl = no ; then
2806                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2807         fi
2808         ol_with_cyrus_sasl=yes
2809 fi
2810
2811 echo "$ac_t""done" 1>&6
2812
2813 LDAP_LIBS=
2814 LDIF_LIBS=
2815 LDBM_LIB=
2816 LDBM_LIBS=
2817 LTHREAD_LIBS=
2818 LUTIL_LIBS=
2819
2820 SLAPD_LIBS=
2821 SLURPD_LIBS=
2822
2823 BUILD_SLAPD=no
2824 BUILD_SLURPD=no
2825
2826 BUILD_THREAD=no
2827
2828 BUILD_BDB=no
2829 BUILD_DNSSRV=no
2830 BUILD_LDAP=no
2831 BUILD_LDBM=no
2832 BUILD_META=no
2833 BUILD_MONITOR=no
2834 BUILD_NULL=no
2835 BUILD_PASSWD=no
2836 BUILD_PERL=no
2837 BUILD_SHELL=no
2838 BUILD_SQL=no
2839
2840 BUILD_BDB_DYNAMIC=static
2841 BUILD_DNSSRV_DYNAMIC=static
2842 BUILD_LDAP_DYNAMIC=static
2843 BUILD_LDBM_DYNAMIC=static
2844 BUILD_META_DYNAMIC=static
2845 BUILD_MONITOR_DYNAMIC=static
2846 BUILD_NULL_DYNAMIC=static
2847 BUILD_PASSWD_DYNAMIC=static
2848 BUILD_PERL_DYNAMIC=static
2849 BUILD_SHELL_DYNAMIC=static
2850 BUILD_SQL_DYNAMIC=static
2851
2852 SLAPD_MODULES_LDFLAGS=
2853 SLAPD_MODULES_CPPFLAGS=
2854
2855 SLAPD_STATIC_BACKENDS=
2856 SLAPD_DYNAMIC_BACKENDS=
2857
2858 SLAPD_PERL_LDFLAGS=
2859 MOD_PERL_LDFLAGS=
2860 PERL_CPPFLAGS=
2861
2862 SLAPD_SQL_LDFLAGS=
2863 SLAPD_SQL_LIBS=
2864 SLAPD_SQL_INCLUDES=
2865
2866 KRB4_LIBS=
2867 KRB5_LIBS=
2868 READLINE_LIBS=
2869 SASL_LIBS=
2870 TERMCAP_LIBS=
2871 TLS_LIBS=
2872 MODULES_LIBS=
2873 AUTH_LIBS=
2874
2875 SLAPD_SLP_LIBS=
2876
2877
2878 # Find a good install program.  We prefer a C program (faster),
2879 # so one script is as good as another.  But avoid the broken or
2880 # incompatible versions:
2881 # SysV /etc/install, /usr/sbin/install
2882 # SunOS /usr/etc/install
2883 # IRIX /sbin/install
2884 # AIX /bin/install
2885 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2886 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2887 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2888 # ./install, which can be erroneously created by make from ./install.sh.
2889 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2890 echo "configure:2891: checking for a BSD compatible install" >&5
2891 if test -z "$INSTALL"; then
2892 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2893   echo $ac_n "(cached) $ac_c" 1>&6
2894 else
2895     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2896   for ac_dir in $PATH; do
2897     # Account for people who put trailing slashes in PATH elements.
2898     case "$ac_dir/" in
2899     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2900     *)
2901       # OSF1 and SCO ODT 3.0 have their own names for install.
2902       # Don't use installbsd from OSF since it installs stuff as root
2903       # by default.
2904       for ac_prog in ginstall scoinst install; do
2905         if test -f $ac_dir/$ac_prog; then
2906           if test $ac_prog = install &&
2907             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2908             # AIX install.  It has an incompatible calling convention.
2909             :
2910           elif test $ac_prog = install &&
2911             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2912             # program-specific install script used by HP pwplus--don't use.
2913             :
2914           else
2915             ac_cv_path_install="$ac_dir/$ac_prog -c"
2916             break 2
2917           fi
2918         fi
2919       done
2920       ;;
2921     esac
2922   done
2923   IFS="$ac_save_IFS"
2924
2925 fi
2926   if test "${ac_cv_path_install+set}" = set; then
2927     INSTALL="$ac_cv_path_install"
2928   else
2929     # As a last resort, use the slow shell script.  We don't cache a
2930     # path for INSTALL within a source directory, because that will
2931     # break other packages using the cache if that directory is
2932     # removed, or if the path is relative.
2933     INSTALL="$ac_install_sh"
2934   fi
2935 fi
2936 echo "$ac_t""$INSTALL" 1>&6
2937
2938 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2939 # It thinks the first close brace ends the variable substitution.
2940 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2941
2942 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2943
2944 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2945
2946
2947 cat >> confdefs.h <<\EOF
2948 #define HAVE_MKVERSION 1
2949 EOF
2950
2951
2952
2953
2954 ol_aix_threads=no
2955 case "$target" in
2956 *-*-aix*)       if test -z "$CC" ; then
2957                 case "$ol_with_threads" in
2958                 auto | yes |  posix) ol_aix_threads=yes ;;
2959                 esac
2960         fi
2961 ;;
2962 esac
2963
2964 if test $ol_aix_threads = yes ; then
2965         if test -z "${CC}" ; then
2966                 for ac_prog in cc_r xlc_r cc
2967 do
2968 # Extract the first word of "$ac_prog", so it can be a program name with args.
2969 set dummy $ac_prog; ac_word=$2
2970 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2971 echo "configure:2972: checking for $ac_word" >&5
2972 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2973   echo $ac_n "(cached) $ac_c" 1>&6
2974 else
2975   if test -n "$CC"; then
2976   ac_cv_prog_CC="$CC" # Let the user override the test.
2977 else
2978   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2979   ac_dummy="$PATH"
2980   for ac_dir in $ac_dummy; do
2981     test -z "$ac_dir" && ac_dir=.
2982     if test -f $ac_dir/$ac_word; then
2983       ac_cv_prog_CC="$ac_prog"
2984       break
2985     fi
2986   done
2987   IFS="$ac_save_ifs"
2988 fi
2989 fi
2990 CC="$ac_cv_prog_CC"
2991 if test -n "$CC"; then
2992   echo "$ac_t""$CC" 1>&6
2993 else
2994   echo "$ac_t""no" 1>&6
2995 fi
2996
2997 test -n "$CC" && break
2998 done
2999
3000
3001                 if test "$CC" = cc ; then
3002                                                 if test $ol_with_threads != auto ; then
3003                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
3004                         else
3005                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
3006                         fi
3007                         ol_with_threads=no
3008                 fi
3009         fi
3010
3011         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3012                 ol_with_threads=posix
3013                 ol_cv_pthread_create=yes
3014         fi
3015 fi
3016
3017 if test -z "${CC}"; then
3018         for ac_prog in cc gcc
3019 do
3020 # Extract the first word of "$ac_prog", so it can be a program name with args.
3021 set dummy $ac_prog; ac_word=$2
3022 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3023 echo "configure:3024: checking for $ac_word" >&5
3024 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3025   echo $ac_n "(cached) $ac_c" 1>&6
3026 else
3027   if test -n "$CC"; then
3028   ac_cv_prog_CC="$CC" # Let the user override the test.
3029 else
3030   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3031   ac_dummy="$PATH"
3032   for ac_dir in $ac_dummy; do
3033     test -z "$ac_dir" && ac_dir=.
3034     if test -f $ac_dir/$ac_word; then
3035       ac_cv_prog_CC="$ac_prog"
3036       break
3037     fi
3038   done
3039   IFS="$ac_save_ifs"
3040 fi
3041 fi
3042 CC="$ac_cv_prog_CC"
3043 if test -n "$CC"; then
3044   echo "$ac_t""$CC" 1>&6
3045 else
3046   echo "$ac_t""no" 1>&6
3047 fi
3048
3049 test -n "$CC" && break
3050 done
3051 test -n "$CC" || CC="missing"
3052
3053
3054         if test "${CC}" = "missing" ; then
3055                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
3056         fi
3057 fi
3058
3059 if test -z "${AR}"; then
3060         for ac_prog in ar gar
3061 do
3062 # Extract the first word of "$ac_prog", so it can be a program name with args.
3063 set dummy $ac_prog; ac_word=$2
3064 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3065 echo "configure:3066: checking for $ac_word" >&5
3066 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3067   echo $ac_n "(cached) $ac_c" 1>&6
3068 else
3069   if test -n "$AR"; then
3070   ac_cv_prog_AR="$AR" # Let the user override the test.
3071 else
3072   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3073   ac_dummy="$PATH"
3074   for ac_dir in $ac_dummy; do
3075     test -z "$ac_dir" && ac_dir=.
3076     if test -f $ac_dir/$ac_word; then
3077       ac_cv_prog_AR="$ac_prog"
3078       break
3079     fi
3080   done
3081   IFS="$ac_save_ifs"
3082 fi
3083 fi
3084 AR="$ac_cv_prog_AR"
3085 if test -n "$AR"; then
3086   echo "$ac_t""$AR" 1>&6
3087 else
3088   echo "$ac_t""no" 1>&6
3089 fi
3090
3091 test -n "$AR" && break
3092 done
3093 test -n "$AR" || AR="missing"
3094
3095
3096         if test "${AR}" = "missing" ; then
3097                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3098         fi
3099 fi
3100
3101
3102
3103 # Find the correct PATH separator.  Usually this is `:', but
3104 # DJGPP uses `;' like DOS.
3105 if test "X${PATH_SEPARATOR+set}" != Xset; then
3106   UNAME=${UNAME-`uname 2>/dev/null`}
3107   case X$UNAME in
3108     *-DOS) lt_cv_sys_path_separator=';' ;;
3109     *)     lt_cv_sys_path_separator=':' ;;
3110   esac
3111   PATH_SEPARATOR=$lt_cv_sys_path_separator
3112 fi
3113
3114 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3115 echo "configure:3116: checking for Cygwin environment" >&5
3116 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3117   echo $ac_n "(cached) $ac_c" 1>&6
3118 else
3119   cat > conftest.$ac_ext <<EOF
3120 #line 3121 "configure"
3121 #include "confdefs.h"
3122
3123 int main() {
3124
3125 #ifndef __CYGWIN__
3126 #define __CYGWIN__ __CYGWIN32__
3127 #endif
3128 return __CYGWIN__;
3129 ; return 0; }
3130 EOF
3131 if { (eval echo configure:3132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3132   rm -rf conftest*
3133   ac_cv_cygwin=yes
3134 else
3135   echo "configure: failed program was:" >&5
3136   cat conftest.$ac_ext >&5
3137   rm -rf conftest*
3138   ac_cv_cygwin=no
3139 fi
3140 rm -f conftest*
3141 fi
3142
3143 echo "$ac_t""$ac_cv_cygwin" 1>&6
3144 CYGWIN=
3145 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3146 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3147 echo "configure:3148: checking for mingw32 environment" >&5
3148 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3149   echo $ac_n "(cached) $ac_c" 1>&6
3150 else
3151   cat > conftest.$ac_ext <<EOF
3152 #line 3153 "configure"
3153 #include "confdefs.h"
3154
3155 int main() {
3156 return __MINGW32__;
3157 ; return 0; }
3158 EOF
3159 if { (eval echo configure:3160: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3160   rm -rf conftest*
3161   ac_cv_mingw32=yes
3162 else
3163   echo "configure: failed program was:" >&5
3164   cat conftest.$ac_ext >&5
3165   rm -rf conftest*
3166   ac_cv_mingw32=no
3167 fi
3168 rm -f conftest*
3169 fi
3170
3171 echo "$ac_t""$ac_cv_mingw32" 1>&6
3172 MINGW32=
3173 test "$ac_cv_mingw32" = yes && MINGW32=yes
3174 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3175 echo "configure:3176: checking for EMX OS/2 environment" >&5
3176 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3177   echo $ac_n "(cached) $ac_c" 1>&6
3178 else
3179   cat > conftest.$ac_ext <<EOF
3180 #line 3181 "configure"
3181 #include "confdefs.h"
3182
3183 int main() {
3184 return __EMX__;
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_emxos2=yes
3190 else
3191   echo "configure: failed program was:" >&5
3192   cat conftest.$ac_ext >&5
3193   rm -rf conftest*
3194   ac_cv_emxos2=no
3195 fi
3196 rm -f conftest*
3197 fi
3198
3199 echo "$ac_t""$ac_cv_emxos2" 1>&6
3200 EMXOS2=
3201 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3202 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3203 echo "configure:3204: checking how to run the C preprocessor" >&5
3204 # On Suns, sometimes $CPP names a directory.
3205 if test -n "$CPP" && test -d "$CPP"; then
3206   CPP=
3207 fi
3208 if test -z "$CPP"; then
3209 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3210   echo $ac_n "(cached) $ac_c" 1>&6
3211 else
3212     # This must be in double quotes, not single quotes, because CPP may get
3213   # substituted into the Makefile and "${CC-cc}" will confuse make.
3214   CPP="${CC-cc} -E"
3215   # On the NeXT, cc -E runs the code through the compiler's parser,
3216   # not just through cpp.
3217   cat > conftest.$ac_ext <<EOF
3218 #line 3219 "configure"
3219 #include "confdefs.h"
3220 #include <assert.h>
3221 Syntax Error
3222 EOF
3223 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3224 { (eval echo configure:3225: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3225 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3226 if test -z "$ac_err"; then
3227   :
3228 else
3229   echo "$ac_err" >&5
3230   echo "configure: failed program was:" >&5
3231   cat conftest.$ac_ext >&5
3232   rm -rf conftest*
3233   CPP="${CC-cc} -E -traditional-cpp"
3234   cat > conftest.$ac_ext <<EOF
3235 #line 3236 "configure"
3236 #include "confdefs.h"
3237 #include <assert.h>
3238 Syntax Error
3239 EOF
3240 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3241 { (eval echo configure:3242: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3242 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3243 if test -z "$ac_err"; then
3244   :
3245 else
3246   echo "$ac_err" >&5
3247   echo "configure: failed program was:" >&5
3248   cat conftest.$ac_ext >&5
3249   rm -rf conftest*
3250   CPP="${CC-cc} -nologo -E"
3251   cat > conftest.$ac_ext <<EOF
3252 #line 3253 "configure"
3253 #include "confdefs.h"
3254 #include <assert.h>
3255 Syntax Error
3256 EOF
3257 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3258 { (eval echo configure:3259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3259 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3260 if test -z "$ac_err"; then
3261   :
3262 else
3263   echo "$ac_err" >&5
3264   echo "configure: failed program was:" >&5
3265   cat conftest.$ac_ext >&5
3266   rm -rf conftest*
3267   CPP=/lib/cpp
3268 fi
3269 rm -f conftest*
3270 fi
3271 rm -f conftest*
3272 fi
3273 rm -f conftest*
3274   ac_cv_prog_CPP="$CPP"
3275 fi
3276   CPP="$ac_cv_prog_CPP"
3277 else
3278   ac_cv_prog_CPP="$CPP"
3279 fi
3280 echo "$ac_t""$CPP" 1>&6
3281
3282 # Check whether --enable-fast-install or --disable-fast-install was given.
3283 if test "${enable_fast_install+set}" = set; then
3284   enableval="$enable_fast_install"
3285   p=${PACKAGE-default}
3286 case $enableval in
3287 yes) enable_fast_install=yes ;;
3288 no) enable_fast_install=no ;;
3289 *)
3290   enable_fast_install=no
3291   # Look at the argument we got.  We use all the common list separators.
3292   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3293   for pkg in $enableval; do
3294     if test "X$pkg" = "X$p"; then
3295       enable_fast_install=yes
3296     fi
3297   done
3298   IFS="$ac_save_ifs"
3299   ;;
3300 esac
3301 else
3302   enable_fast_install=yes
3303 fi
3304
3305 # Extract the first word of "gcc", so it can be a program name with args.
3306 set dummy gcc; ac_word=$2
3307 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3308 echo "configure:3309: checking for $ac_word" >&5
3309 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3310   echo $ac_n "(cached) $ac_c" 1>&6
3311 else
3312   if test -n "$CC"; then
3313   ac_cv_prog_CC="$CC" # Let the user override the test.
3314 else
3315   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3316   ac_dummy="$PATH"
3317   for ac_dir in $ac_dummy; do
3318     test -z "$ac_dir" && ac_dir=.
3319     if test -f $ac_dir/$ac_word; then
3320       ac_cv_prog_CC="gcc"
3321       break
3322     fi
3323   done
3324   IFS="$ac_save_ifs"
3325 fi
3326 fi
3327 CC="$ac_cv_prog_CC"
3328 if test -n "$CC"; then
3329   echo "$ac_t""$CC" 1>&6
3330 else
3331   echo "$ac_t""no" 1>&6
3332 fi
3333
3334 if test -z "$CC"; then
3335   # Extract the first word of "cc", so it can be a program name with args.
3336 set dummy cc; ac_word=$2
3337 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3338 echo "configure:3339: checking for $ac_word" >&5
3339 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3340   echo $ac_n "(cached) $ac_c" 1>&6
3341 else
3342   if test -n "$CC"; then
3343   ac_cv_prog_CC="$CC" # Let the user override the test.
3344 else
3345   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3346   ac_prog_rejected=no
3347   ac_dummy="$PATH"
3348   for ac_dir in $ac_dummy; do
3349     test -z "$ac_dir" && ac_dir=.
3350     if test -f $ac_dir/$ac_word; then
3351       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3352         ac_prog_rejected=yes
3353         continue
3354       fi
3355       ac_cv_prog_CC="cc"
3356       break
3357     fi
3358   done
3359   IFS="$ac_save_ifs"
3360 if test $ac_prog_rejected = yes; then
3361   # We found a bogon in the path, so make sure we never use it.
3362   set dummy $ac_cv_prog_CC
3363   shift
3364   if test $# -gt 0; then
3365     # We chose a different compiler from the bogus one.
3366     # However, it has the same basename, so the bogon will be chosen
3367     # first if we set CC to just the basename; use the full file name.
3368     shift
3369     set dummy "$ac_dir/$ac_word" "$@"
3370     shift
3371     ac_cv_prog_CC="$@"
3372   fi
3373 fi
3374 fi
3375 fi
3376 CC="$ac_cv_prog_CC"
3377 if test -n "$CC"; then
3378   echo "$ac_t""$CC" 1>&6
3379 else
3380   echo "$ac_t""no" 1>&6
3381 fi
3382
3383   if test -z "$CC"; then
3384     case "`uname -s`" in
3385     *win32* | *WIN32* | *CYGWIN*)
3386       # Extract the first word of "cl", so it can be a program name with args.
3387 set dummy cl; ac_word=$2
3388 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3389 echo "configure:3390: checking for $ac_word" >&5
3390 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3391   echo $ac_n "(cached) $ac_c" 1>&6
3392 else
3393   if test -n "$CC"; then
3394   ac_cv_prog_CC="$CC" # Let the user override the test.
3395 else
3396   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3397   ac_dummy="$PATH"
3398   for ac_dir in $ac_dummy; do
3399     test -z "$ac_dir" && ac_dir=.
3400     if test -f $ac_dir/$ac_word; then
3401       ac_cv_prog_CC="cl"
3402       break
3403     fi
3404   done
3405   IFS="$ac_save_ifs"
3406 fi
3407 fi
3408 CC="$ac_cv_prog_CC"
3409 if test -n "$CC"; then
3410   echo "$ac_t""$CC" 1>&6
3411 else
3412   echo "$ac_t""no" 1>&6
3413 fi
3414  ;;
3415     esac
3416   fi
3417   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3418 fi
3419
3420 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3421 echo "configure:3422: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3422
3423 ac_ext=c
3424 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3425 ac_cpp='$CPP $CPPFLAGS'
3426 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3427 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3428 cross_compiling=$ac_cv_prog_cc_cross
3429
3430 cat > conftest.$ac_ext << EOF
3431
3432 #line 3433 "configure"
3433 #include "confdefs.h"
3434
3435 main(){return(0);}
3436 EOF
3437 if { (eval echo configure:3438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3438   ac_cv_prog_cc_works=yes
3439   # If we can't run a trivial program, we are probably using a cross compiler.
3440   if (./conftest; exit) 2>/dev/null; then
3441     ac_cv_prog_cc_cross=no
3442   else
3443     ac_cv_prog_cc_cross=yes
3444   fi
3445 else
3446   echo "configure: failed program was:" >&5
3447   cat conftest.$ac_ext >&5
3448   ac_cv_prog_cc_works=no
3449 fi
3450 rm -fr conftest*
3451 ac_ext=c
3452 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3453 ac_cpp='$CPP $CPPFLAGS'
3454 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3455 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3456 cross_compiling=$ac_cv_prog_cc_cross
3457
3458 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3459 if test $ac_cv_prog_cc_works = no; then
3460   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3461 fi
3462 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3463 echo "configure:3464: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3464 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3465 cross_compiling=$ac_cv_prog_cc_cross
3466
3467 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3468 echo "configure:3469: checking whether we are using GNU C" >&5
3469 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3470   echo $ac_n "(cached) $ac_c" 1>&6
3471 else
3472   cat > conftest.c <<EOF
3473 #ifdef __GNUC__
3474   yes;
3475 #endif
3476 EOF
3477 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3478: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3478   ac_cv_prog_gcc=yes
3479 else
3480   ac_cv_prog_gcc=no
3481 fi
3482 fi
3483
3484 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3485
3486 if test $ac_cv_prog_gcc = yes; then
3487   GCC=yes
3488 else
3489   GCC=
3490 fi
3491
3492 ac_test_CFLAGS="${CFLAGS+set}"
3493 ac_save_CFLAGS="$CFLAGS"
3494 CFLAGS=
3495 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3496 echo "configure:3497: checking whether ${CC-cc} accepts -g" >&5
3497 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3498   echo $ac_n "(cached) $ac_c" 1>&6
3499 else
3500   echo 'void f(){}' > conftest.c
3501 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3502   ac_cv_prog_cc_g=yes
3503 else
3504   ac_cv_prog_cc_g=no
3505 fi
3506 rm -f conftest*
3507
3508 fi
3509
3510 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3511 if test "$ac_test_CFLAGS" = set; then
3512   CFLAGS="$ac_save_CFLAGS"
3513 elif test $ac_cv_prog_cc_g = yes; then
3514   if test "$GCC" = yes; then
3515     CFLAGS="-g -O2"
3516   else
3517     CFLAGS="-g"
3518   fi
3519 else
3520   if test "$GCC" = yes; then
3521     CFLAGS="-O2"
3522   else
3523     CFLAGS=
3524   fi
3525 fi
3526
3527 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3528 if test "${with_gnu_ld+set}" = set; then
3529   withval="$with_gnu_ld"
3530   test "$withval" = no || with_gnu_ld=yes
3531 else
3532   with_gnu_ld=no
3533 fi
3534
3535 ac_prog=ld
3536 if test "$GCC" = yes; then
3537   # Check if gcc -print-prog-name=ld gives a path.
3538   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3539 echo "configure:3540: checking for ld used by GCC" >&5
3540   case $host in
3541   *-*-mingw*)
3542     # gcc leaves a trailing carriage return which upsets mingw
3543     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3544   *)
3545     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3546   esac
3547   case $ac_prog in
3548     # Accept absolute paths.
3549     [\\/]* | [A-Za-z]:[\\/]*)
3550       re_direlt='/[^/][^/]*/\.\./'
3551       # Canonicalize the path of ld
3552       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3553       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3554         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3555       done
3556       test -z "$LD" && LD="$ac_prog"
3557       ;;
3558   "")
3559     # If it fails, then pretend we aren't using GCC.
3560     ac_prog=ld
3561     ;;
3562   *)
3563     # If it is relative, then search for the first ld in PATH.
3564     with_gnu_ld=unknown
3565     ;;
3566   esac
3567 elif test "$with_gnu_ld" = yes; then
3568   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3569 echo "configure:3570: checking for GNU ld" >&5
3570 else
3571   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3572 echo "configure:3573: checking for non-GNU ld" >&5
3573 fi
3574 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3575   echo $ac_n "(cached) $ac_c" 1>&6
3576 else
3577   if test -z "$LD"; then
3578   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3579   for ac_dir in $PATH; do
3580     test -z "$ac_dir" && ac_dir=.
3581     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3582       lt_cv_path_LD="$ac_dir/$ac_prog"
3583       # Check to see if the program is GNU ld.  I'd rather use --version,
3584       # but apparently some GNU ld's only accept -v.
3585       # Break only if it was the GNU/non-GNU ld that we prefer.
3586       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3587         test "$with_gnu_ld" != no && break
3588       else
3589         test "$with_gnu_ld" != yes && break
3590       fi
3591     fi
3592   done
3593   IFS="$ac_save_ifs"
3594 else
3595   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3596 fi
3597 fi
3598
3599 LD="$lt_cv_path_LD"
3600 if test -n "$LD"; then
3601   echo "$ac_t""$LD" 1>&6
3602 else
3603   echo "$ac_t""no" 1>&6
3604 fi
3605 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3606 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3607 echo "configure:3608: checking if the linker ($LD) is GNU ld" >&5
3608 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3609   echo $ac_n "(cached) $ac_c" 1>&6
3610 else
3611   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3612 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3613   lt_cv_prog_gnu_ld=yes
3614 else
3615   lt_cv_prog_gnu_ld=no
3616 fi
3617 fi
3618
3619 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3620 with_gnu_ld=$lt_cv_prog_gnu_ld
3621
3622
3623 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3624 echo "configure:3625: checking for $LD option to reload object files" >&5
3625 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3626   echo $ac_n "(cached) $ac_c" 1>&6
3627 else
3628   lt_cv_ld_reload_flag='-r'
3629 fi
3630
3631 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3632 reload_flag=$lt_cv_ld_reload_flag
3633 test -n "$reload_flag" && reload_flag=" $reload_flag"
3634
3635 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3636 echo "configure:3637: checking for BSD-compatible nm" >&5
3637 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3638   echo $ac_n "(cached) $ac_c" 1>&6
3639 else
3640   if test -n "$NM"; then
3641   # Let the user override the test.
3642   lt_cv_path_NM="$NM"
3643 else
3644   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3645   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3646     test -z "$ac_dir" && ac_dir=.
3647     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3648     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3649       # Check to see if the nm accepts a BSD-compat flag.
3650       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3651       #   nm: unknown option "B" ignored
3652       # Tru64's nm complains that /dev/null is an invalid object file
3653       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3654         lt_cv_path_NM="$tmp_nm -B"
3655         break
3656       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3657         lt_cv_path_NM="$tmp_nm -p"
3658         break
3659       else
3660         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3661         continue # so that we can try to find one that supports BSD flags
3662       fi
3663     fi
3664   done
3665   IFS="$ac_save_ifs"
3666   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3667 fi
3668 fi
3669
3670 NM="$lt_cv_path_NM"
3671 echo "$ac_t""$NM" 1>&6
3672
3673 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3674 echo "configure:3675: checking whether ln -s works" >&5
3675 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3676   echo $ac_n "(cached) $ac_c" 1>&6
3677 else
3678   rm -f conftestdata
3679 if ln -s X conftestdata 2>/dev/null
3680 then
3681   rm -f conftestdata
3682   ac_cv_prog_LN_S="ln -s"
3683 else
3684   ac_cv_prog_LN_S=ln
3685 fi
3686 fi
3687 LN_S="$ac_cv_prog_LN_S"
3688 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3689   echo "$ac_t""yes" 1>&6
3690 else
3691   echo "$ac_t""no" 1>&6
3692 fi
3693
3694 echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
3695 echo "configure:3696: checking how to recognise dependant libraries" >&5
3696 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3697   echo $ac_n "(cached) $ac_c" 1>&6
3698 else
3699   lt_cv_file_magic_cmd='$MAGIC_CMD'
3700 lt_cv_file_magic_test_file=
3701 lt_cv_deplibs_check_method='unknown'
3702 # Need to set the preceding variable on all platforms that support
3703 # interlibrary dependencies.
3704 # 'none' -- dependencies not supported.
3705 # `unknown' -- same as none, but documents that we really don't know.
3706 # 'pass_all' -- all dependencies passed with no checks.
3707 # 'test_compile' -- check by making test program.
3708 # 'file_magic [[regex]]' -- check by looking for files in library path
3709 # which responds to the $file_magic_cmd with a given egrep regex.
3710 # If you have `file' or equivalent on your system and you're not sure
3711 # whether `pass_all' will *always* work, you probably want this one.
3712
3713 case $host_os in
3714 aix4* | aix5*)
3715   lt_cv_deplibs_check_method=pass_all
3716   ;;
3717
3718 beos*)
3719   lt_cv_deplibs_check_method=pass_all
3720   ;;
3721
3722 bsdi4*)
3723   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3724   lt_cv_file_magic_cmd='/usr/bin/file -L'
3725   lt_cv_file_magic_test_file=/shlib/libc.so
3726   ;;
3727
3728 cygwin* | mingw* | pw32*)
3729   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3730   lt_cv_file_magic_cmd='$OBJDUMP -f'
3731   ;;
3732
3733 darwin* | rhapsody*)
3734   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3735   lt_cv_file_magic_cmd='/usr/bin/file -L'
3736   case "$host_os" in
3737   rhapsody* | darwin1.[012])
3738     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3739     ;;
3740   *) # Darwin 1.3 on
3741     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3742     ;;
3743   esac
3744   ;;
3745
3746 freebsd*)
3747   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3748     case $host_cpu in
3749     i*86 )
3750       # Not sure whether the presence of OpenBSD here was a mistake.
3751       # Let's accept both of them until this is cleared up.
3752       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3753       lt_cv_file_magic_cmd=/usr/bin/file
3754       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3755       ;;
3756     esac
3757   else
3758     lt_cv_deplibs_check_method=pass_all
3759   fi
3760   ;;
3761
3762 gnu*)
3763   lt_cv_deplibs_check_method=pass_all
3764   ;;
3765
3766 hpux10.20*|hpux11*)
3767   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3768   lt_cv_file_magic_cmd=/usr/bin/file
3769   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3770   ;;
3771
3772 irix5* | irix6*)
3773   case $host_os in
3774   irix5*)
3775     # this will be overridden with pass_all, but let us keep it just in case
3776     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3777     ;;
3778   *)
3779     case $LD in
3780     *-32|*"-32 ") libmagic=32-bit;;
3781     *-n32|*"-n32 ") libmagic=N32;;
3782     *-64|*"-64 ") libmagic=64-bit;;
3783     *) libmagic=never-match;;
3784     esac
3785     # this will be overridden with pass_all, but let us keep it just in case
3786     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3787     ;;
3788   esac
3789   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3790   lt_cv_deplibs_check_method=pass_all
3791   ;;
3792
3793 # This must be Linux ELF.
3794 linux-gnu*)
3795   case $host_cpu in
3796   alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
3797     lt_cv_deplibs_check_method=pass_all ;;
3798   *)
3799     # glibc up to 2.1.1 does not perform some relocations on ARM
3800     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3801   esac
3802   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3803   ;;
3804
3805 netbsd*)
3806   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3807     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3808   else
3809     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3810   fi
3811   ;;
3812
3813 newos6*)
3814   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3815   lt_cv_file_magic_cmd=/usr/bin/file
3816   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3817   ;;
3818
3819 openbsd*)
3820   lt_cv_file_magic_cmd=/usr/bin/file
3821   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3822   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3823     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3824   else
3825     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3826   fi
3827   ;;
3828
3829 osf3* | osf4* | osf5*)
3830   # this will be overridden with pass_all, but let us keep it just in case
3831   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3832   lt_cv_file_magic_test_file=/shlib/libc.so
3833   lt_cv_deplibs_check_method=pass_all
3834   ;;
3835
3836 sco3.2v5*)
3837   lt_cv_deplibs_check_method=pass_all
3838   ;;
3839
3840 solaris*)
3841   lt_cv_deplibs_check_method=pass_all
3842   lt_cv_file_magic_test_file=/lib/libc.so
3843   ;;
3844
3845 sysv5uw[78]* | sysv4*uw2*)
3846   lt_cv_deplibs_check_method=pass_all
3847   ;;
3848
3849 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3850   case $host_vendor in
3851   motorola)
3852     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]'
3853     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3854     ;;
3855   ncr)
3856     lt_cv_deplibs_check_method=pass_all
3857     ;;
3858   sequent)
3859     lt_cv_file_magic_cmd='/bin/file'
3860     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3861     ;;
3862   sni)
3863     lt_cv_file_magic_cmd='/bin/file'
3864     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3865     lt_cv_file_magic_test_file=/lib/libc.so
3866     ;;
3867   esac
3868   ;;
3869 esac
3870
3871 fi
3872
3873 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3874 file_magic_cmd=$lt_cv_file_magic_cmd
3875 deplibs_check_method=$lt_cv_deplibs_check_method
3876
3877 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3878 echo "configure:3879: checking for object suffix" >&5
3879 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3880   echo $ac_n "(cached) $ac_c" 1>&6
3881 else
3882   rm -f conftest*
3883 echo 'int i = 1;' > conftest.$ac_ext
3884 if { (eval echo configure:3885: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3885   for ac_file in conftest.*; do
3886     case $ac_file in
3887     *.c) ;;
3888     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3889     esac
3890   done
3891 else
3892   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3893 fi
3894 rm -f conftest*
3895 fi
3896
3897 echo "$ac_t""$ac_cv_objext" 1>&6
3898 OBJEXT=$ac_cv_objext
3899 ac_objext=$ac_cv_objext
3900
3901
3902
3903
3904 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3905 echo "configure:3906: checking for executable suffix" >&5
3906 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3907   echo $ac_n "(cached) $ac_c" 1>&6
3908 else
3909   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3910   ac_cv_exeext=.exe
3911 else
3912   rm -f conftest*
3913   echo 'int main () { return 0; }' > conftest.$ac_ext
3914   ac_cv_exeext=
3915   if { (eval echo configure:3916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3916     for file in conftest.*; do
3917       case $file in
3918       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3919       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3920       esac
3921     done
3922   else
3923     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3924   fi
3925   rm -f conftest*
3926   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3927 fi
3928 fi
3929
3930 EXEEXT=""
3931 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3932 echo "$ac_t""${ac_cv_exeext}" 1>&6
3933 ac_exeext=$EXEEXT
3934
3935 if test $host != $build; then
3936   ac_tool_prefix=${host_alias}-
3937 else
3938   ac_tool_prefix=
3939 fi
3940
3941
3942
3943
3944 # Check for command to grab the raw symbol name followed by C symbol from nm.
3945 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
3946 echo "configure:3947: checking command to parse $NM output" >&5
3947 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
3948   echo $ac_n "(cached) $ac_c" 1>&6
3949 else
3950   
3951 # These are sane defaults that work on at least a few old systems.
3952 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3953
3954 # Character class describing NM global symbol codes.
3955 symcode='[BCDEGRST]'
3956
3957 # Regexp to match symbols that can be accessed directly from C.
3958 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
3959
3960 # Transform the above into a raw symbol and a C symbol.
3961 symxfrm='\1 \2\3 \3'
3962
3963 # Transform an extracted symbol line into a proper C declaration
3964 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
3965
3966 # Transform an extracted symbol line into symbol name and symbol address
3967 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'"
3968
3969 # Define system-specific variables.
3970 case $host_os in
3971 aix*)
3972   symcode='[BCDT]'
3973   ;;
3974 cygwin* | mingw* | pw32*)
3975   symcode='[ABCDGISTW]'
3976   ;;
3977 hpux*) # Its linker distinguishes data from code symbols
3978   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3979   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'"
3980   ;;
3981 irix*)
3982   symcode='[BCDEGRST]'
3983   ;;
3984 solaris* | sysv5*)
3985   symcode='[BDT]'
3986   ;;
3987 sysv4)
3988   symcode='[DFNSTU]'
3989   ;;
3990 esac
3991
3992 # Handle CRLF in mingw tool chain
3993 opt_cr=
3994 case $host_os in
3995 mingw*)
3996   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3997   ;;
3998 esac
3999
4000 # If we're using GNU nm, then use its standard symbol codes.
4001 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4002   symcode='[ABCDGISTW]'
4003 fi
4004
4005 # Try without a prefix undercore, then with it.
4006 for ac_symprfx in "" "_"; do
4007
4008   # Write the raw and C identifiers.
4009 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4010
4011   # Check to see that the pipe works correctly.
4012   pipe_works=no
4013   rm -f conftest*
4014   cat > conftest.$ac_ext <<EOF
4015 #ifdef __cplusplus
4016 extern "C" {
4017 #endif
4018 char nm_test_var;
4019 void nm_test_func(){}
4020 #ifdef __cplusplus
4021 }
4022 #endif
4023 int main(){nm_test_var='a';nm_test_func();return(0);}
4024 EOF
4025
4026   if { (eval echo configure:4027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4027     # Now try to grab the symbols.
4028     nlist=conftest.nm
4029     if { (eval echo configure:4030: \"$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
4030       # Try sorting and uniquifying the output.
4031       if sort "$nlist" | uniq > "$nlist"T; then
4032         mv -f "$nlist"T "$nlist"
4033       else
4034         rm -f "$nlist"T
4035       fi
4036
4037       # Make sure that we snagged all the symbols we need.
4038       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4039         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4040           cat <<EOF > conftest.$ac_ext
4041 #ifdef __cplusplus
4042 extern "C" {
4043 #endif
4044
4045 EOF
4046           # Now generate the symbol file.
4047           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4048
4049           cat <<EOF >> conftest.$ac_ext
4050 #if defined (__STDC__) && __STDC__
4051 # define lt_ptr void *
4052 #else
4053 # define lt_ptr char *
4054 # define const
4055 #endif
4056
4057 /* The mapping between symbol names and symbols. */
4058 const struct {
4059   const char *name;
4060   lt_ptr address;
4061 }
4062 lt_preloaded_symbols[] =
4063 {
4064 EOF
4065           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4066           cat <<\EOF >> conftest.$ac_ext
4067   {0, (lt_ptr) 0}
4068 };
4069
4070 #ifdef __cplusplus
4071 }
4072 #endif
4073 EOF
4074           # Now try linking the two files.
4075           mv conftest.$ac_objext conftstm.$ac_objext
4076           save_LIBS="$LIBS"
4077           save_CFLAGS="$CFLAGS"
4078           LIBS="conftstm.$ac_objext"
4079           CFLAGS="$CFLAGS$no_builtin_flag"
4080           if { (eval echo configure:4081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4081             pipe_works=yes
4082           fi
4083           LIBS="$save_LIBS"
4084           CFLAGS="$save_CFLAGS"
4085         else
4086           echo "cannot find nm_test_func in $nlist" >&5
4087         fi
4088       else
4089         echo "cannot find nm_test_var in $nlist" >&5
4090       fi
4091     else
4092       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4093     fi
4094   else
4095     echo "$progname: failed program was:" >&5
4096     cat conftest.$ac_ext >&5
4097   fi
4098   rm -f conftest* conftst*
4099
4100   # Do not use the global_symbol_pipe unless it works.
4101   if test "$pipe_works" = yes; then
4102     break
4103   else
4104     lt_cv_sys_global_symbol_pipe=
4105   fi
4106 done
4107
4108 fi
4109
4110 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4111 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4112   global_symbol_to_cdecl=
4113   global_symbol_to_c_name_address=
4114 else
4115   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4116   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4117 fi
4118 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4119 then
4120   echo "$ac_t""failed" 1>&6
4121 else
4122   echo "$ac_t""ok" 1>&6
4123 fi
4124
4125 for ac_hdr in dlfcn.h
4126 do
4127 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4128 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4129 echo "configure:4130: checking for $ac_hdr" >&5
4130 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4131   echo $ac_n "(cached) $ac_c" 1>&6
4132 else
4133   cat > conftest.$ac_ext <<EOF
4134 #line 4135 "configure"
4135 #include "confdefs.h"
4136 #include <$ac_hdr>
4137 EOF
4138 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4139 { (eval echo configure:4140: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4140 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4141 if test -z "$ac_err"; then
4142   rm -rf conftest*
4143   eval "ac_cv_header_$ac_safe=yes"
4144 else
4145   echo "$ac_err" >&5
4146   echo "configure: failed program was:" >&5
4147   cat conftest.$ac_ext >&5
4148   rm -rf conftest*
4149   eval "ac_cv_header_$ac_safe=no"
4150 fi
4151 rm -f conftest*
4152 fi
4153 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4154   echo "$ac_t""yes" 1>&6
4155     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4156   cat >> confdefs.h <<EOF
4157 #define $ac_tr_hdr 1
4158 EOF
4159  
4160 else
4161   echo "$ac_t""no" 1>&6
4162 fi
4163 done
4164
4165
4166
4167
4168
4169 # Only perform the check for file, if the check method requires it
4170 case $deplibs_check_method in
4171 file_magic*)
4172   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4173     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4174 echo "configure:4175: checking for ${ac_tool_prefix}file" >&5
4175 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4176   echo $ac_n "(cached) $ac_c" 1>&6
4177 else
4178   case $MAGIC_CMD in
4179   /*)
4180   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4181   ;;
4182   ?:/*)
4183   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4184   ;;
4185   *)
4186   ac_save_MAGIC_CMD="$MAGIC_CMD"
4187   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4188   ac_dummy="/usr/bin:$PATH"
4189   for ac_dir in $ac_dummy; do
4190     test -z "$ac_dir" && ac_dir=.
4191     if test -f $ac_dir/${ac_tool_prefix}file; then
4192       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4193       if test -n "$file_magic_test_file"; then
4194         case $deplibs_check_method in
4195         "file_magic "*)
4196           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4197           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4198           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4199             egrep "$file_magic_regex" > /dev/null; then
4200             :
4201           else
4202             cat <<EOF 1>&2
4203
4204 *** Warning: the command libtool uses to detect shared libraries,
4205 *** $file_magic_cmd, produces output that libtool cannot recognize.
4206 *** The result is that libtool may fail to recognize shared libraries
4207 *** as such.  This will affect the creation of libtool libraries that
4208 *** depend on shared libraries, but programs linked with such libtool
4209 *** libraries will work regardless of this problem.  Nevertheless, you
4210 *** may want to report the problem to your system manager and/or to
4211 *** bug-libtool@gnu.org
4212
4213 EOF
4214           fi ;;
4215         esac
4216       fi
4217       break
4218     fi
4219   done
4220   IFS="$ac_save_ifs"
4221   MAGIC_CMD="$ac_save_MAGIC_CMD"
4222   ;;
4223 esac
4224 fi
4225
4226 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4227 if test -n "$MAGIC_CMD"; then
4228   echo "$ac_t""$MAGIC_CMD" 1>&6
4229 else
4230   echo "$ac_t""no" 1>&6
4231 fi
4232
4233 if test -z "$lt_cv_path_MAGIC_CMD"; then
4234   if test -n "$ac_tool_prefix"; then
4235     echo $ac_n "checking for file""... $ac_c" 1>&6
4236 echo "configure:4237: checking for file" >&5
4237 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4238   echo $ac_n "(cached) $ac_c" 1>&6
4239 else
4240   case $MAGIC_CMD in
4241   /*)
4242   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4243   ;;
4244   ?:/*)
4245   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4246   ;;
4247   *)
4248   ac_save_MAGIC_CMD="$MAGIC_CMD"
4249   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4250   ac_dummy="/usr/bin:$PATH"
4251   for ac_dir in $ac_dummy; do
4252     test -z "$ac_dir" && ac_dir=.
4253     if test -f $ac_dir/file; then
4254       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4255       if test -n "$file_magic_test_file"; then
4256         case $deplibs_check_method in
4257         "file_magic "*)
4258           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4259           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4260           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4261             egrep "$file_magic_regex" > /dev/null; then
4262             :
4263           else
4264             cat <<EOF 1>&2
4265
4266 *** Warning: the command libtool uses to detect shared libraries,
4267 *** $file_magic_cmd, produces output that libtool cannot recognize.
4268 *** The result is that libtool may fail to recognize shared libraries
4269 *** as such.  This will affect the creation of libtool libraries that
4270 *** depend on shared libraries, but programs linked with such libtool
4271 *** libraries will work regardless of this problem.  Nevertheless, you
4272 *** may want to report the problem to your system manager and/or to
4273 *** bug-libtool@gnu.org
4274
4275 EOF
4276           fi ;;
4277         esac
4278       fi
4279       break
4280     fi
4281   done
4282   IFS="$ac_save_ifs"
4283   MAGIC_CMD="$ac_save_MAGIC_CMD"
4284   ;;
4285 esac
4286 fi
4287
4288 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4289 if test -n "$MAGIC_CMD"; then
4290   echo "$ac_t""$MAGIC_CMD" 1>&6
4291 else
4292   echo "$ac_t""no" 1>&6
4293 fi
4294
4295   else
4296     MAGIC_CMD=:
4297   fi
4298 fi
4299
4300   fi
4301   ;;
4302 esac
4303
4304 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4305 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4306 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4307 echo "configure:4308: checking for $ac_word" >&5
4308 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4309   echo $ac_n "(cached) $ac_c" 1>&6
4310 else
4311   if test -n "$RANLIB"; then
4312   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4313 else
4314   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4315   ac_dummy="$PATH"
4316   for ac_dir in $ac_dummy; do
4317     test -z "$ac_dir" && ac_dir=.
4318     if test -f $ac_dir/$ac_word; then
4319       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4320       break
4321     fi
4322   done
4323   IFS="$ac_save_ifs"
4324 fi
4325 fi
4326 RANLIB="$ac_cv_prog_RANLIB"
4327 if test -n "$RANLIB"; then
4328   echo "$ac_t""$RANLIB" 1>&6
4329 else
4330   echo "$ac_t""no" 1>&6
4331 fi
4332
4333
4334 if test -z "$ac_cv_prog_RANLIB"; then
4335 if test -n "$ac_tool_prefix"; then
4336   # Extract the first word of "ranlib", so it can be a program name with args.
4337 set dummy ranlib; ac_word=$2
4338 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4339 echo "configure:4340: checking for $ac_word" >&5
4340 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4341   echo $ac_n "(cached) $ac_c" 1>&6
4342 else
4343   if test -n "$RANLIB"; then
4344   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4345 else
4346   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4347   ac_dummy="$PATH"
4348   for ac_dir in $ac_dummy; do
4349     test -z "$ac_dir" && ac_dir=.
4350     if test -f $ac_dir/$ac_word; then
4351       ac_cv_prog_RANLIB="ranlib"
4352       break
4353     fi
4354   done
4355   IFS="$ac_save_ifs"
4356   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4357 fi
4358 fi
4359 RANLIB="$ac_cv_prog_RANLIB"
4360 if test -n "$RANLIB"; then
4361   echo "$ac_t""$RANLIB" 1>&6
4362 else
4363   echo "$ac_t""no" 1>&6
4364 fi
4365
4366 else
4367   RANLIB=":"
4368 fi
4369 fi
4370
4371 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4372 set dummy ${ac_tool_prefix}strip; ac_word=$2
4373 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4374 echo "configure:4375: checking for $ac_word" >&5
4375 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4376   echo $ac_n "(cached) $ac_c" 1>&6
4377 else
4378   if test -n "$STRIP"; then
4379   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4380 else
4381   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4382   ac_dummy="$PATH"
4383   for ac_dir in $ac_dummy; do
4384     test -z "$ac_dir" && ac_dir=.
4385     if test -f $ac_dir/$ac_word; then
4386       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4387       break
4388     fi
4389   done
4390   IFS="$ac_save_ifs"
4391 fi
4392 fi
4393 STRIP="$ac_cv_prog_STRIP"
4394 if test -n "$STRIP"; then
4395   echo "$ac_t""$STRIP" 1>&6
4396 else
4397   echo "$ac_t""no" 1>&6
4398 fi
4399
4400
4401 if test -z "$ac_cv_prog_STRIP"; then
4402 if test -n "$ac_tool_prefix"; then
4403   # Extract the first word of "strip", so it can be a program name with args.
4404 set dummy strip; ac_word=$2
4405 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4406 echo "configure:4407: checking for $ac_word" >&5
4407 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4408   echo $ac_n "(cached) $ac_c" 1>&6
4409 else
4410   if test -n "$STRIP"; then
4411   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4412 else
4413   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4414   ac_dummy="$PATH"
4415   for ac_dir in $ac_dummy; do
4416     test -z "$ac_dir" && ac_dir=.
4417     if test -f $ac_dir/$ac_word; then
4418       ac_cv_prog_STRIP="strip"
4419       break
4420     fi
4421   done
4422   IFS="$ac_save_ifs"
4423   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4424 fi
4425 fi
4426 STRIP="$ac_cv_prog_STRIP"
4427 if test -n "$STRIP"; then
4428   echo "$ac_t""$STRIP" 1>&6
4429 else
4430   echo "$ac_t""no" 1>&6
4431 fi
4432
4433 else
4434   STRIP=":"
4435 fi
4436 fi
4437
4438
4439 enable_dlopen=yes
4440 enable_win32_dll=yes
4441
4442 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4443 if test "${enable_libtool_lock+set}" = set; then
4444   enableval="$enable_libtool_lock"
4445   :
4446 fi
4447
4448 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4449
4450 # Some flags need to be propagated to the compiler or linker for good
4451 # libtool support.
4452 case $host in
4453 *-*-irix6*)
4454   # Find out which ABI we are using.
4455   echo '#line 4456 "configure"' > conftest.$ac_ext
4456   if { (eval echo configure:4457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4457     case `/usr/bin/file conftest.$ac_objext` in
4458     *32-bit*)
4459       LD="${LD-ld} -32"
4460       ;;
4461     *N32*)
4462       LD="${LD-ld} -n32"
4463       ;;
4464     *64-bit*)
4465       LD="${LD-ld} -64"
4466       ;;
4467     esac
4468   fi
4469   rm -rf conftest*
4470   ;;
4471
4472 *-*-sco3.2v5*)
4473   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4474   SAVE_CFLAGS="$CFLAGS"
4475   CFLAGS="$CFLAGS -belf"
4476   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4477 echo "configure:4478: checking whether the C compiler needs -belf" >&5
4478 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4479   echo $ac_n "(cached) $ac_c" 1>&6
4480 else
4481   
4482      ac_ext=c
4483 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4484 ac_cpp='$CPP $CPPFLAGS'
4485 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4486 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4487 cross_compiling=$ac_cv_prog_cc_cross
4488
4489      cat > conftest.$ac_ext <<EOF
4490 #line 4491 "configure"
4491 #include "confdefs.h"
4492
4493 int main() {
4494
4495 ; return 0; }
4496 EOF
4497 if { (eval echo configure:4498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4498   rm -rf conftest*
4499   lt_cv_cc_needs_belf=yes
4500 else
4501   echo "configure: failed program was:" >&5
4502   cat conftest.$ac_ext >&5
4503   rm -rf conftest*
4504   lt_cv_cc_needs_belf=no
4505 fi
4506 rm -f conftest*
4507      ac_ext=c
4508 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4509 ac_cpp='$CPP $CPPFLAGS'
4510 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4511 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4512 cross_compiling=$ac_cv_prog_cc_cross
4513
4514 fi
4515
4516 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4517   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4518     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4519     CFLAGS="$SAVE_CFLAGS"
4520   fi
4521   ;;
4522
4523 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4524   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4525 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4526 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4527 echo "configure:4528: checking for $ac_word" >&5
4528 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4529   echo $ac_n "(cached) $ac_c" 1>&6
4530 else
4531   if test -n "$DLLTOOL"; then
4532   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4533 else
4534   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4535   ac_dummy="$PATH"
4536   for ac_dir in $ac_dummy; do
4537     test -z "$ac_dir" && ac_dir=.
4538     if test -f $ac_dir/$ac_word; then
4539       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4540       break
4541     fi
4542   done
4543   IFS="$ac_save_ifs"
4544 fi
4545 fi
4546 DLLTOOL="$ac_cv_prog_DLLTOOL"
4547 if test -n "$DLLTOOL"; then
4548   echo "$ac_t""$DLLTOOL" 1>&6
4549 else
4550   echo "$ac_t""no" 1>&6
4551 fi
4552
4553
4554 if test -z "$ac_cv_prog_DLLTOOL"; then
4555 if test -n "$ac_tool_prefix"; then
4556   # Extract the first word of "dlltool", so it can be a program name with args.
4557 set dummy dlltool; ac_word=$2
4558 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4559 echo "configure:4560: checking for $ac_word" >&5
4560 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4561   echo $ac_n "(cached) $ac_c" 1>&6
4562 else
4563   if test -n "$DLLTOOL"; then
4564   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4565 else
4566   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4567   ac_dummy="$PATH"
4568   for ac_dir in $ac_dummy; do
4569     test -z "$ac_dir" && ac_dir=.
4570     if test -f $ac_dir/$ac_word; then
4571       ac_cv_prog_DLLTOOL="dlltool"
4572       break
4573     fi
4574   done
4575   IFS="$ac_save_ifs"
4576   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4577 fi
4578 fi
4579 DLLTOOL="$ac_cv_prog_DLLTOOL"
4580 if test -n "$DLLTOOL"; then
4581   echo "$ac_t""$DLLTOOL" 1>&6
4582 else
4583   echo "$ac_t""no" 1>&6
4584 fi
4585
4586 else
4587   DLLTOOL="false"
4588 fi
4589 fi
4590
4591   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4592 set dummy ${ac_tool_prefix}as; ac_word=$2
4593 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4594 echo "configure:4595: checking for $ac_word" >&5
4595 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4596   echo $ac_n "(cached) $ac_c" 1>&6
4597 else
4598   if test -n "$AS"; then
4599   ac_cv_prog_AS="$AS" # Let the user override the test.
4600 else
4601   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4602   ac_dummy="$PATH"
4603   for ac_dir in $ac_dummy; do
4604     test -z "$ac_dir" && ac_dir=.
4605     if test -f $ac_dir/$ac_word; then
4606       ac_cv_prog_AS="${ac_tool_prefix}as"
4607       break
4608     fi
4609   done
4610   IFS="$ac_save_ifs"
4611 fi
4612 fi
4613 AS="$ac_cv_prog_AS"
4614 if test -n "$AS"; then
4615   echo "$ac_t""$AS" 1>&6
4616 else
4617   echo "$ac_t""no" 1>&6
4618 fi
4619
4620
4621 if test -z "$ac_cv_prog_AS"; then
4622 if test -n "$ac_tool_prefix"; then
4623   # Extract the first word of "as", so it can be a program name with args.
4624 set dummy as; ac_word=$2
4625 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4626 echo "configure:4627: checking for $ac_word" >&5
4627 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4628   echo $ac_n "(cached) $ac_c" 1>&6
4629 else
4630   if test -n "$AS"; then
4631   ac_cv_prog_AS="$AS" # Let the user override the test.
4632 else
4633   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4634   ac_dummy="$PATH"
4635   for ac_dir in $ac_dummy; do
4636     test -z "$ac_dir" && ac_dir=.
4637     if test -f $ac_dir/$ac_word; then
4638       ac_cv_prog_AS="as"
4639       break
4640     fi
4641   done
4642   IFS="$ac_save_ifs"
4643   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4644 fi
4645 fi
4646 AS="$ac_cv_prog_AS"
4647 if test -n "$AS"; then
4648   echo "$ac_t""$AS" 1>&6
4649 else
4650   echo "$ac_t""no" 1>&6
4651 fi
4652
4653 else
4654   AS="false"
4655 fi
4656 fi
4657
4658   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4659 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4660 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4661 echo "configure:4662: checking for $ac_word" >&5
4662 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4663   echo $ac_n "(cached) $ac_c" 1>&6
4664 else
4665   if test -n "$OBJDUMP"; then
4666   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4667 else
4668   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4669   ac_dummy="$PATH"
4670   for ac_dir in $ac_dummy; do
4671     test -z "$ac_dir" && ac_dir=.
4672     if test -f $ac_dir/$ac_word; then
4673       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4674       break
4675     fi
4676   done
4677   IFS="$ac_save_ifs"
4678 fi
4679 fi
4680 OBJDUMP="$ac_cv_prog_OBJDUMP"
4681 if test -n "$OBJDUMP"; then
4682   echo "$ac_t""$OBJDUMP" 1>&6
4683 else
4684   echo "$ac_t""no" 1>&6
4685 fi
4686
4687
4688 if test -z "$ac_cv_prog_OBJDUMP"; then
4689 if test -n "$ac_tool_prefix"; then
4690   # Extract the first word of "objdump", so it can be a program name with args.
4691 set dummy objdump; ac_word=$2
4692 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4693 echo "configure:4694: checking for $ac_word" >&5
4694 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4695   echo $ac_n "(cached) $ac_c" 1>&6
4696 else
4697   if test -n "$OBJDUMP"; then
4698   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4699 else
4700   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4701   ac_dummy="$PATH"
4702   for ac_dir in $ac_dummy; do
4703     test -z "$ac_dir" && ac_dir=.
4704     if test -f $ac_dir/$ac_word; then
4705       ac_cv_prog_OBJDUMP="objdump"
4706       break
4707     fi
4708   done
4709   IFS="$ac_save_ifs"
4710   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4711 fi
4712 fi
4713 OBJDUMP="$ac_cv_prog_OBJDUMP"
4714 if test -n "$OBJDUMP"; then
4715   echo "$ac_t""$OBJDUMP" 1>&6
4716 else
4717   echo "$ac_t""no" 1>&6
4718 fi
4719
4720 else
4721   OBJDUMP="false"
4722 fi
4723 fi
4724
4725
4726   # recent cygwin and mingw systems supply a stub DllMain which the user
4727   # can override, but on older systems we have to supply one
4728   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4729 echo "configure:4730: checking if libtool should supply DllMain function" >&5
4730 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4731   echo $ac_n "(cached) $ac_c" 1>&6
4732 else
4733   cat > conftest.$ac_ext <<EOF
4734 #line 4735 "configure"
4735 #include "confdefs.h"
4736
4737 int main() {
4738 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4739       DllMain (0, 0, 0);
4740 ; return 0; }
4741 EOF
4742 if { (eval echo configure:4743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4743   rm -rf conftest*
4744   lt_cv_need_dllmain=no
4745 else
4746   echo "configure: failed program was:" >&5
4747   cat conftest.$ac_ext >&5
4748   rm -rf conftest*
4749   lt_cv_need_dllmain=yes
4750 fi
4751 rm -f conftest*
4752 fi
4753
4754 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4755
4756   case $host/$CC in
4757   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4758     # old mingw systems require "-dll" to link a DLL, while more recent ones
4759     # require "-mdll"
4760     SAVE_CFLAGS="$CFLAGS"
4761     CFLAGS="$CFLAGS -mdll"
4762     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4763 echo "configure:4764: checking how to link DLLs" >&5
4764 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4765   echo $ac_n "(cached) $ac_c" 1>&6
4766 else
4767   cat > conftest.$ac_ext <<EOF
4768 #line 4769 "configure"
4769 #include "confdefs.h"
4770
4771 int main() {
4772
4773 ; return 0; }
4774 EOF
4775 if { (eval echo configure:4776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4776   rm -rf conftest*
4777   lt_cv_cc_dll_switch=-mdll
4778 else
4779   echo "configure: failed program was:" >&5
4780   cat conftest.$ac_ext >&5
4781   rm -rf conftest*
4782   lt_cv_cc_dll_switch=-dll
4783 fi
4784 rm -f conftest*
4785 fi
4786
4787 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4788     CFLAGS="$SAVE_CFLAGS" ;;
4789   *-*-cygwin* | *-*-pw32*)
4790     # cygwin systems need to pass --dll to the linker, and not link
4791     # crt.o which will require a WinMain@16 definition.
4792     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4793   esac
4794   ;;
4795   
4796 esac
4797
4798 # Sed substitution that helps us do robust quoting.  It backslashifies
4799 # metacharacters that are still active within double-quoted strings.
4800 Xsed='sed -e s/^X//'
4801 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4802
4803 # Same as above, but do not quote variable references.
4804 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4805
4806 # Sed substitution to delay expansion of an escaped shell variable in a
4807 # double_quote_subst'ed string.
4808 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4809
4810 # Constants:
4811 rm="rm -f"
4812
4813 # Global variables:
4814 default_ofile=libtool
4815 can_build_shared=yes
4816
4817 # All known linkers require a `.a' archive for static linking (except M$VC,
4818 # which needs '.lib').
4819 libext=a
4820 ltmain="$ac_aux_dir/ltmain.sh"
4821 ofile="$default_ofile"
4822 with_gnu_ld="$lt_cv_prog_gnu_ld"
4823 need_locks="$enable_libtool_lock"
4824
4825 old_CC="$CC"
4826 old_CFLAGS="$CFLAGS"
4827
4828 # Set sane defaults for various variables
4829 test -z "$AR" && AR=ar
4830 test -z "$AR_FLAGS" && AR_FLAGS=cru
4831 test -z "$AS" && AS=as
4832 test -z "$CC" && CC=cc
4833 test -z "$DLLTOOL" && DLLTOOL=dlltool
4834 test -z "$LD" && LD=ld
4835 test -z "$LN_S" && LN_S="ln -s"
4836 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4837 test -z "$NM" && NM=nm
4838 test -z "$OBJDUMP" && OBJDUMP=objdump
4839 test -z "$RANLIB" && RANLIB=:
4840 test -z "$STRIP" && STRIP=:
4841 test -z "$ac_objext" && ac_objext=o
4842
4843 if test x"$host" != x"$build"; then
4844   ac_tool_prefix=${host_alias}-
4845 else
4846   ac_tool_prefix=
4847 fi
4848
4849 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4850 case $host_os in
4851 linux-gnu*) ;;
4852 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4853 esac
4854
4855 case $host_os in
4856 aix3*)
4857   # AIX sometimes has problems with the GCC collect2 program.  For some
4858   # reason, if we set the COLLECT_NAMES environment variable, the problems
4859   # vanish in a puff of smoke.
4860   if test "X${COLLECT_NAMES+set}" != Xset; then
4861     COLLECT_NAMES=
4862     export COLLECT_NAMES
4863   fi
4864   ;;
4865 esac
4866
4867 # Determine commands to create old-style static archives.
4868 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4869 old_postinstall_cmds='chmod 644 $oldlib'
4870 old_postuninstall_cmds=
4871
4872 if test -n "$RANLIB"; then
4873   case $host_os in
4874   openbsd*)
4875     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4876     ;;
4877   *)
4878     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4879     ;;
4880   esac
4881   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4882 fi
4883
4884 # Allow CC to be a program name with arguments.
4885 set dummy $CC
4886 compiler="$2"
4887
4888 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4889 echo "configure:4890: checking for objdir" >&5
4890 rm -f .libs 2>/dev/null
4891 mkdir .libs 2>/dev/null
4892 if test -d .libs; then
4893   objdir=.libs
4894 else
4895   # MS-DOS does not allow filenames that begin with a dot.
4896   objdir=_libs
4897 fi
4898 rmdir .libs 2>/dev/null
4899 echo "$ac_t""$objdir" 1>&6
4900
4901
4902 # Check whether --with-pic or --without-pic was given.
4903 if test "${with_pic+set}" = set; then
4904   withval="$with_pic"
4905   pic_mode="$withval"
4906 else
4907   pic_mode=default
4908 fi
4909
4910 test -z "$pic_mode" && pic_mode=default
4911
4912 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4913 # in isolation, and that seeing it set (from the cache) indicates that
4914 # the associated values are set (in the cache) correctly too.
4915 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4916 echo "configure:4917: checking for $compiler option to produce PIC" >&5
4917 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4918   echo $ac_n "(cached) $ac_c" 1>&6
4919 else
4920    lt_cv_prog_cc_pic=
4921   lt_cv_prog_cc_shlib=
4922   lt_cv_prog_cc_wl=
4923   lt_cv_prog_cc_static=
4924   lt_cv_prog_cc_no_builtin=
4925   lt_cv_prog_cc_can_build_shared=$can_build_shared
4926
4927   if test "$GCC" = yes; then
4928     lt_cv_prog_cc_wl='-Wl,'
4929     lt_cv_prog_cc_static='-static'
4930
4931     case $host_os in
4932     aix*)
4933       # Below there is a dirty hack to force normal static linking with -ldl
4934       # The problem is because libdl dynamically linked with both libc and
4935       # libC (AIX C++ library), which obviously doesn't included in libraries
4936       # list by gcc. This cause undefined symbols with -static flags.
4937       # This hack allows C programs to be linked with "-static -ldl", but
4938       # not sure about C++ programs.
4939       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
4940       ;;
4941     amigaos*)
4942       # FIXME: we need at least 68020 code to build shared libraries, but
4943       # adding the `-m68020' flag to GCC prevents building anything better,
4944       # like `-m68040'.
4945       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
4946       ;;
4947     beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
4948       # PIC is the default for these OSes.
4949       ;;
4950     darwin* | rhapsody*)
4951       # PIC is the default on this platform
4952       # Common symbols not allowed in MH_DYLIB files
4953       lt_cv_prog_cc_pic='-fno-common'
4954       ;;
4955     cygwin* | mingw* | pw32* | os2*)
4956       # This hack is so that the source file can tell whether it is being
4957       # built for inclusion in a dll (and should export symbols for example).
4958       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4959       ;;
4960     sysv4*MP*)
4961       if test -d /usr/nec; then
4962          lt_cv_prog_cc_pic=-Kconform_pic
4963       fi
4964       ;;
4965     *)
4966       lt_cv_prog_cc_pic='-fPIC'
4967       ;;
4968     esac
4969   else
4970     # PORTME Check for PIC flags for the system compiler.
4971     case $host_os in
4972     aix3* | aix4* | aix5*)
4973       lt_cv_prog_cc_wl='-Wl,'
4974       # All AIX code is PIC.
4975       if test "$host_cpu" = ia64; then
4976         # AIX 5 now supports IA64 processor
4977         lt_cv_prog_cc_static='-Bstatic'
4978       else
4979         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
4980       fi
4981       ;;
4982
4983     hpux9* | hpux10* | hpux11*)
4984       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
4985       lt_cv_prog_cc_wl='-Wl,'
4986       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
4987       lt_cv_prog_cc_pic='+Z'
4988       ;;
4989
4990     irix5* | irix6*)
4991       lt_cv_prog_cc_wl='-Wl,'
4992       lt_cv_prog_cc_static='-non_shared'
4993       # PIC (with -KPIC) is the default.
4994       ;;
4995
4996     cygwin* | mingw* | pw32* | os2*)
4997       # This hack is so that the source file can tell whether it is being
4998       # built for inclusion in a dll (and should export symbols for example).
4999       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5000       ;;
5001
5002     newsos6)
5003       lt_cv_prog_cc_pic='-KPIC'
5004       lt_cv_prog_cc_static='-Bstatic'
5005       ;;
5006
5007     osf3* | osf4* | osf5*)
5008       # All OSF/1 code is PIC.
5009       lt_cv_prog_cc_wl='-Wl,'
5010       lt_cv_prog_cc_static='-non_shared'
5011       ;;
5012
5013     sco3.2v5*)
5014       lt_cv_prog_cc_pic='-Kpic'
5015       lt_cv_prog_cc_static='-dn'
5016       lt_cv_prog_cc_shlib='-belf'
5017       ;;
5018
5019     solaris*)
5020       lt_cv_prog_cc_pic='-KPIC'
5021       lt_cv_prog_cc_static='-Bstatic'
5022       lt_cv_prog_cc_wl='-Wl,'
5023       ;;
5024
5025     sunos4*)
5026       lt_cv_prog_cc_pic='-PIC'
5027       lt_cv_prog_cc_static='-Bstatic'
5028       lt_cv_prog_cc_wl='-Qoption ld '
5029       ;;
5030
5031     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5032       lt_cv_prog_cc_pic='-KPIC'
5033       lt_cv_prog_cc_static='-Bstatic'
5034       if test "x$host_vendor" = xsni; then
5035         lt_cv_prog_cc_wl='-LD'
5036       else
5037         lt_cv_prog_cc_wl='-Wl,'
5038       fi
5039       ;;
5040
5041     uts4*)
5042       lt_cv_prog_cc_pic='-pic'
5043       lt_cv_prog_cc_static='-Bstatic'
5044       ;;
5045
5046     sysv4*MP*)
5047       if test -d /usr/nec ;then
5048         lt_cv_prog_cc_pic='-Kconform_pic'
5049         lt_cv_prog_cc_static='-Bstatic'
5050       fi
5051       ;;
5052
5053     *)
5054       lt_cv_prog_cc_can_build_shared=no
5055       ;;
5056     esac
5057   fi
5058
5059 fi
5060
5061 if test -z "$lt_cv_prog_cc_pic"; then
5062   echo "$ac_t""none" 1>&6
5063 else
5064   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5065
5066   # Check to make sure the pic_flag actually works.
5067   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5068 echo "configure:5069: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5069   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5070   echo $ac_n "(cached) $ac_c" 1>&6
5071 else
5072       save_CFLAGS="$CFLAGS"
5073     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5074     cat > conftest.$ac_ext <<EOF
5075 #line 5076 "configure"
5076 #include "confdefs.h"
5077
5078 int main() {
5079
5080 ; return 0; }
5081 EOF
5082 if { (eval echo configure:5083: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5083   rm -rf conftest*
5084         case $host_os in
5085       hpux9* | hpux10* | hpux11*)
5086         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5087         # they create non-PIC objects.  So, if there were any warnings, we
5088         # assume that PIC is not supported.
5089         if test -s conftest.err; then
5090           lt_cv_prog_cc_pic_works=no
5091         else
5092           lt_cv_prog_cc_pic_works=yes
5093         fi
5094         ;;
5095       *)
5096         lt_cv_prog_cc_pic_works=yes
5097         ;;
5098       esac
5099     
5100 else
5101   echo "configure: failed program was:" >&5
5102   cat conftest.$ac_ext >&5
5103   rm -rf conftest*
5104         lt_cv_prog_cc_pic_works=no
5105     
5106 fi
5107 rm -f conftest*
5108     CFLAGS="$save_CFLAGS"
5109   
5110 fi
5111
5112
5113   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5114     lt_cv_prog_cc_pic=
5115     lt_cv_prog_cc_can_build_shared=no
5116   else
5117     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5118   fi
5119
5120   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5121 fi
5122
5123 # Check for any special shared library compilation flags.
5124 if test -n "$lt_cv_prog_cc_shlib"; then
5125   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5126   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5127   else
5128    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5129     lt_cv_prog_cc_can_build_shared=no
5130   fi
5131 fi
5132
5133 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5134 echo "configure:5135: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5135 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5136   echo $ac_n "(cached) $ac_c" 1>&6
5137 else
5138     lt_cv_prog_cc_static_works=no
5139   save_LDFLAGS="$LDFLAGS"
5140   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5141   cat > conftest.$ac_ext <<EOF
5142 #line 5143 "configure"
5143 #include "confdefs.h"
5144
5145 int main() {
5146
5147 ; return 0; }
5148 EOF
5149 if { (eval echo configure:5150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5150   rm -rf conftest*
5151   lt_cv_prog_cc_static_works=yes
5152 else
5153   echo "configure: failed program was:" >&5
5154   cat conftest.$ac_ext >&5
5155 fi
5156 rm -f conftest*
5157   LDFLAGS="$save_LDFLAGS"
5158
5159 fi
5160
5161
5162 # Belt *and* braces to stop my trousers falling down:
5163 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5164 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5165
5166 pic_flag="$lt_cv_prog_cc_pic"
5167 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5168 wl="$lt_cv_prog_cc_wl"
5169 link_static_flag="$lt_cv_prog_cc_static"
5170 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5171 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5172
5173
5174 # Check to see if options -o and -c are simultaneously supported by compiler
5175 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5176 echo "configure:5177: checking if $compiler supports -c -o file.$ac_objext" >&5
5177 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5178   echo $ac_n "(cached) $ac_c" 1>&6
5179 else
5180   
5181 $rm -r conftest 2>/dev/null
5182 mkdir conftest
5183 cd conftest
5184 echo "int some_variable = 0;" > conftest.$ac_ext
5185 mkdir out
5186 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5187 # that will create temporary files in the current directory regardless of
5188 # the output directory.  Thus, making CWD read-only will cause this test
5189 # to fail, enabling locking or at least warning the user not to do parallel
5190 # builds.
5191 chmod -w .
5192 save_CFLAGS="$CFLAGS"
5193 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5194 compiler_c_o=no
5195 if { (eval echo configure:5196: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5196   # The compiler can only warn and ignore the option if not recognized
5197   # So say no if there are warnings
5198   if test -s out/conftest.err; then
5199     lt_cv_compiler_c_o=no
5200   else
5201     lt_cv_compiler_c_o=yes
5202   fi
5203 else
5204   # Append any errors to the config.log.
5205   cat out/conftest.err 1>&5
5206   lt_cv_compiler_c_o=no
5207 fi
5208 CFLAGS="$save_CFLAGS"
5209 chmod u+w .
5210 $rm conftest* out/*
5211 rmdir out
5212 cd ..
5213 rmdir conftest
5214 $rm -r conftest 2>/dev/null
5215
5216 fi
5217
5218 compiler_c_o=$lt_cv_compiler_c_o
5219 echo "$ac_t""$compiler_c_o" 1>&6
5220
5221 if test x"$compiler_c_o" = x"yes"; then
5222   # Check to see if we can write to a .lo
5223   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5224 echo "configure:5225: checking if $compiler supports -c -o file.lo" >&5
5225   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5226   echo $ac_n "(cached) $ac_c" 1>&6
5227 else
5228   
5229   lt_cv_compiler_o_lo=no
5230   save_CFLAGS="$CFLAGS"
5231   CFLAGS="$CFLAGS -c -o conftest.lo"
5232   save_objext="$ac_objext"
5233   ac_objext=lo
5234   cat > conftest.$ac_ext <<EOF
5235 #line 5236 "configure"
5236 #include "confdefs.h"
5237
5238 int main() {
5239 int some_variable = 0;
5240 ; return 0; }
5241 EOF
5242 if { (eval echo configure:5243: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5243   rm -rf conftest*
5244       # The compiler can only warn and ignore the option if not recognized
5245     # So say no if there are warnings
5246     if test -s conftest.err; then
5247       lt_cv_compiler_o_lo=no
5248     else
5249       lt_cv_compiler_o_lo=yes
5250     fi
5251   
5252 else
5253   echo "configure: failed program was:" >&5
5254   cat conftest.$ac_ext >&5
5255 fi
5256 rm -f conftest*
5257   ac_objext="$save_objext"
5258   CFLAGS="$save_CFLAGS"
5259   
5260 fi
5261
5262   compiler_o_lo=$lt_cv_compiler_o_lo
5263   echo "$ac_t""$compiler_o_lo" 1>&6
5264 else
5265   compiler_o_lo=no
5266 fi
5267
5268 # Check to see if we can do hard links to lock some files if needed
5269 hard_links="nottested"
5270 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5271   # do not overwrite the value of need_locks provided by the user
5272   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5273 echo "configure:5274: checking if we can lock with hard links" >&5
5274   hard_links=yes
5275   $rm conftest*
5276   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5277   touch conftest.a
5278   ln conftest.a conftest.b 2>&5 || hard_links=no
5279   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5280   echo "$ac_t""$hard_links" 1>&6
5281   if test "$hard_links" = no; then
5282     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5283     need_locks=warn
5284   fi
5285 else
5286   need_locks=no
5287 fi
5288
5289 if test "$GCC" = yes; then
5290   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5291   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5292 echo "configure:5293: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5293   echo "int some_variable = 0;" > conftest.$ac_ext
5294   save_CFLAGS="$CFLAGS"
5295   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5296   compiler_rtti_exceptions=no
5297   cat > conftest.$ac_ext <<EOF
5298 #line 5299 "configure"
5299 #include "confdefs.h"
5300
5301 int main() {
5302 int some_variable = 0;
5303 ; return 0; }
5304 EOF
5305 if { (eval echo configure:5306: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5306   rm -rf conftest*
5307       # The compiler can only warn and ignore the option if not recognized
5308     # So say no if there are warnings
5309     if test -s conftest.err; then
5310       compiler_rtti_exceptions=no
5311     else
5312       compiler_rtti_exceptions=yes
5313     fi
5314   
5315 else
5316   echo "configure: failed program was:" >&5
5317   cat conftest.$ac_ext >&5
5318 fi
5319 rm -f conftest*
5320   CFLAGS="$save_CFLAGS"
5321   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5322
5323   if test "$compiler_rtti_exceptions" = "yes"; then
5324     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5325   else
5326     no_builtin_flag=' -fno-builtin'
5327   fi
5328 fi
5329
5330 # See if the linker supports building shared libraries.
5331 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5332 echo "configure:5333: checking whether the linker ($LD) supports shared libraries" >&5
5333
5334 allow_undefined_flag=
5335 no_undefined_flag=
5336 need_lib_prefix=unknown
5337 need_version=unknown
5338 # when you set need_version to no, make sure it does not cause -set_version
5339 # flags to be left without arguments
5340 archive_cmds=
5341 archive_expsym_cmds=
5342 old_archive_from_new_cmds=
5343 old_archive_from_expsyms_cmds=
5344 export_dynamic_flag_spec=
5345 whole_archive_flag_spec=
5346 thread_safe_flag_spec=
5347 hardcode_into_libs=no
5348 hardcode_libdir_flag_spec=
5349 hardcode_libdir_separator=
5350 hardcode_direct=no
5351 hardcode_minus_L=no
5352 hardcode_shlibpath_var=unsupported
5353 runpath_var=
5354 link_all_deplibs=unknown
5355 always_export_symbols=no
5356 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5357 # include_expsyms should be a list of space-separated symbols to be *always*
5358 # included in the symbol list
5359 include_expsyms=
5360 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5361 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5362 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5363 # as well as any symbol that contains `d'.
5364 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5365 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5366 # platforms (ab)use it in PIC code, but their linkers get confused if
5367 # the symbol is explicitly referenced.  Since portable code cannot
5368 # rely on this symbol name, it's probably fine to never include it in
5369 # preloaded symbol tables.
5370 extract_expsyms_cmds=
5371
5372 case $host_os in
5373 cygwin* | mingw* | pw32*)
5374   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5375   # When not using gcc, we currently assume that we are using
5376   # Microsoft Visual C++.
5377   if test "$GCC" != yes; then
5378     with_gnu_ld=no
5379   fi
5380   ;;
5381 openbsd*)
5382   with_gnu_ld=no
5383   ;;
5384 esac
5385
5386 ld_shlibs=yes
5387 if test "$with_gnu_ld" = yes; then
5388   # If archive_cmds runs LD, not CC, wlarc should be empty
5389   wlarc='${wl}'
5390
5391   # See if GNU ld supports shared libraries.
5392   case $host_os in
5393   aix3* | aix4* | aix5*)
5394     # On AIX, the GNU linker is very broken
5395     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5396     ld_shlibs=no
5397     cat <<EOF 1>&2
5398
5399 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5400 *** to be unable to reliably create shared libraries on AIX.
5401 *** Therefore, libtool is disabling shared libraries support.  If you
5402 *** really care for shared libraries, you may want to modify your PATH
5403 *** so that a non-GNU linker is found, and then restart.
5404
5405 EOF
5406     ;;
5407
5408   amigaos*)
5409     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)'
5410     hardcode_libdir_flag_spec='-L$libdir'
5411     hardcode_minus_L=yes
5412
5413     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5414     # that the semantics of dynamic libraries on AmigaOS, at least up
5415     # to version 4, is to share data among multiple programs linked
5416     # with the same dynamic library.  Since this doesn't match the
5417     # behavior of shared libraries on other platforms, we can use
5418     # them.
5419     ld_shlibs=no
5420     ;;
5421
5422   beos*)
5423     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5424       allow_undefined_flag=unsupported
5425       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5426       # support --undefined.  This deserves some investigation.  FIXME
5427       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5428     else
5429       ld_shlibs=no
5430     fi
5431     ;;
5432
5433   cygwin* | mingw* | pw32*)
5434     # hardcode_libdir_flag_spec is actually meaningless, as there is
5435     # no search path for DLLs.
5436     hardcode_libdir_flag_spec='-L$libdir'
5437     allow_undefined_flag=unsupported
5438     always_export_symbols=yes
5439
5440     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5441       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5442       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5443       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5444       else $CC -o impgen impgen.c ; fi)~
5445       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5446
5447     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5448
5449     # cygwin and mingw dlls have different entry points and sets of symbols
5450     # to exclude.
5451     # FIXME: what about values for MSVC?
5452     dll_entry=__cygwin_dll_entry@12
5453     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5454     case $host_os in
5455     mingw*)
5456       # mingw values
5457       dll_entry=_DllMainCRTStartup@12
5458       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5459       ;;
5460     esac
5461
5462     # mingw and cygwin differ, and it's simplest to just exclude the union
5463     # of the two symbol sets.
5464     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5465
5466     # recent cygwin and mingw systems supply a stub DllMain which the user
5467     # can override, but on older systems we have to supply one (in ltdll.c)
5468     if test "x$lt_cv_need_dllmain" = "xyes"; then
5469       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5470       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~
5471         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5472     else
5473       ltdll_obj=
5474       ltdll_cmds=
5475     fi
5476
5477     # Extract the symbol export list from an `--export-all' def file,
5478     # then regenerate the def file from the symbol export list, so that
5479     # the compiled dll only exports the symbol export list.
5480     # Be careful not to strip the DATA tag left be newer dlltools.
5481     export_symbols_cmds="$ltdll_cmds"'
5482       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5483       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5484
5485     # If the export-symbols file already is a .def file (1st line
5486     # is EXPORTS), use it as is.
5487     # If DATA tags from a recent dlltool are present, honour them!
5488     archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
5489         cp $export_symbols $output_objdir/$soname-def;
5490       else
5491         echo EXPORTS > $output_objdir/$soname-def;
5492         _lt_hint=1;
5493         cat $export_symbols | while read symbol; do
5494          set dummy \$symbol;
5495          case \$# in
5496            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5497            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5498          esac;
5499          _lt_hint=`expr 1 + \$_lt_hint`;
5500         done;
5501       fi~
5502       '"$ltdll_cmds"'
5503       $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~
5504       $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~
5505       $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~
5506       $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~
5507       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5508     ;;
5509
5510   netbsd*)
5511     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5512       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5513       wlarc=
5514     else
5515       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5516       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5517     fi
5518     ;;
5519
5520   solaris* | sysv5*)
5521     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5522       ld_shlibs=no
5523       cat <<EOF 1>&2
5524
5525 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5526 *** create shared libraries on Solaris systems.  Therefore, libtool
5527 *** is disabling shared libraries support.  We urge you to upgrade GNU
5528 *** binutils to release 2.9.1 or newer.  Another option is to modify
5529 *** your PATH or compiler configuration so that the native linker is
5530 *** used, and then restart.
5531
5532 EOF
5533     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5534       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5535       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5536     else
5537       ld_shlibs=no
5538     fi
5539     ;;
5540
5541   sunos4*)
5542     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5543     wlarc=
5544     hardcode_direct=yes
5545     hardcode_shlibpath_var=no
5546     ;;
5547
5548   *)
5549     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5550       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5551       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5552     else
5553       ld_shlibs=no
5554     fi
5555     ;;
5556   esac
5557
5558   if test "$ld_shlibs" = yes; then
5559     runpath_var=LD_RUN_PATH
5560     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5561     export_dynamic_flag_spec='${wl}--export-dynamic'
5562     case $host_os in
5563     cygwin* | mingw* | pw32*)
5564       # dlltool doesn't understand --whole-archive et. al.
5565       whole_archive_flag_spec=
5566       ;;
5567     *)
5568       # ancient GNU ld didn't support --whole-archive et. al.
5569       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5570         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5571       else
5572         whole_archive_flag_spec=
5573       fi
5574       ;;
5575     esac
5576   fi
5577 else
5578   # PORTME fill in a description of your system's linker (not GNU ld)
5579   case $host_os in
5580   aix3*)
5581     allow_undefined_flag=unsupported
5582     always_export_symbols=yes
5583     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'
5584     # Note: this linker hardcodes the directories in LIBPATH if there
5585     # are no directories specified by -L.
5586     hardcode_minus_L=yes
5587     if test "$GCC" = yes && test -z "$link_static_flag"; then
5588       # Neither direct hardcoding nor static linking is supported with a
5589       # broken collect2.
5590       hardcode_direct=unsupported
5591     fi
5592     ;;
5593
5594   aix4* | aix5*)
5595     if test "$host_cpu" = ia64; then
5596       # On IA64, the linker does run time linking by default, so we don't
5597       # have to do anything special.
5598       aix_use_runtimelinking=no
5599       exp_sym_flag='-Bexport'
5600       no_entry_flag=""
5601     else
5602       aix_use_runtimelinking=no
5603
5604       # Test if we are trying to use run time linking or normal
5605       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5606       # need to do runtime linking.
5607       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5608         for ld_flag in $LDFLAGS; do
5609           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5610             aix_use_runtimelinking=yes
5611             break
5612           fi
5613         done
5614       esac
5615
5616       exp_sym_flag='-bexport'
5617       no_entry_flag='-bnoentry'
5618     fi
5619
5620     # When large executables or shared objects are built, AIX ld can
5621     # have problems creating the table of contents.  If linking a library
5622     # or program results in "error TOC overflow" add -mminimal-toc to
5623     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5624     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5625
5626     hardcode_direct=yes
5627     archive_cmds=''
5628     hardcode_libdir_separator=':'
5629     if test "$GCC" = yes; then
5630       case $host_os in aix4.[012]|aix4.[012].*)
5631         collect2name=`${CC} -print-prog-name=collect2`
5632         if test -f "$collect2name" && \
5633           strings "$collect2name" | grep resolve_lib_name >/dev/null
5634         then
5635           # We have reworked collect2
5636           hardcode_direct=yes
5637         else
5638           # We have old collect2
5639           hardcode_direct=unsupported
5640           # It fails to find uninstalled libraries when the uninstalled
5641           # path is not listed in the libpath.  Setting hardcode_minus_L
5642           # to unsupported forces relinking
5643           hardcode_minus_L=yes
5644           hardcode_libdir_flag_spec='-L$libdir'
5645           hardcode_libdir_separator=
5646         fi
5647       esac
5648
5649       shared_flag='-shared'
5650     else
5651       # not using gcc
5652       if test "$host_cpu" = ia64; then
5653         shared_flag='${wl}-G'
5654       else
5655         if test "$aix_use_runtimelinking" = yes; then
5656           shared_flag='${wl}-G'
5657         else
5658           shared_flag='${wl}-bM:SRE'
5659         fi
5660       fi
5661     fi
5662
5663     # It seems that -bexpall can do strange things, so it is better to
5664     # generate a list of symbols to export.
5665     always_export_symbols=yes
5666     if test "$aix_use_runtimelinking" = yes; then
5667       # Warning - without using the other runtime loading flags (-brtl),
5668       # -berok will link without error, but may produce a broken library.
5669       allow_undefined_flag='-berok'
5670       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5671       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"
5672     else
5673       if test "$host_cpu" = ia64; then
5674         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5675         allow_undefined_flag="-z nodefs"
5676         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"
5677       else
5678         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5679         # Warning - without using the other run time loading flags,
5680         # -berok will link without error, but may produce a broken library.
5681         allow_undefined_flag='${wl}-berok'
5682         # This is a bit strange, but is similar to how AIX traditionally builds
5683         # it's shared libraries.
5684         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'
5685       fi
5686     fi
5687     ;;
5688
5689   amigaos*)
5690     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)'
5691     hardcode_libdir_flag_spec='-L$libdir'
5692     hardcode_minus_L=yes
5693     # see comment about different semantics on the GNU ld section
5694     ld_shlibs=no
5695     ;;
5696
5697   cygwin* | mingw* | pw32*)
5698     # When not using gcc, we currently assume that we are using
5699     # Microsoft Visual C++.
5700     # hardcode_libdir_flag_spec is actually meaningless, as there is
5701     # no search path for DLLs.
5702     hardcode_libdir_flag_spec=' '
5703     allow_undefined_flag=unsupported
5704     # Tell ltmain to make .lib files, not .a files.
5705     libext=lib
5706     # FIXME: Setting linknames here is a bad hack.
5707     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5708     # The linker will automatically build a .lib file if we build a DLL.
5709     old_archive_from_new_cmds='true'
5710     # FIXME: Should let the user specify the lib program.
5711     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5712     fix_srcfile_path='`cygpath -w "$srcfile"`'
5713     ;;
5714
5715   darwin* | rhapsody*)
5716     case "$host_os" in
5717     rhapsody* | darwin1.[012])
5718       allow_undefined_flag='-undefined suppress'
5719       ;;
5720     *) # Darwin 1.3 on
5721       allow_undefined_flag='-flat_namespace -undefined suppress'
5722       ;;
5723     esac
5724     # FIXME: Relying on posixy $() will cause problems for
5725     #        cross-compilation, but unfortunately the echo tests do not
5726     #        yet detect zsh echo's removal of \ escapes.
5727     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'
5728     # We need to add '_' to the symbols in $export_symbols first
5729     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5730     hardcode_direct=yes
5731     hardcode_shlibpath_var=no
5732     whole_archive_flag_spec='-all_load $convenience'
5733     ;;
5734
5735   freebsd1*)
5736     ld_shlibs=no
5737     ;;
5738
5739   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5740   # support.  Future versions do this automatically, but an explicit c++rt0.o
5741   # does not break anything, and helps significantly (at the cost of a little
5742   # extra space).
5743   freebsd2.2*)
5744     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5745     hardcode_libdir_flag_spec='-R$libdir'
5746     hardcode_direct=yes
5747     hardcode_shlibpath_var=no
5748     ;;
5749
5750   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5751   freebsd2*)
5752     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5753     hardcode_direct=yes
5754     hardcode_minus_L=yes
5755     hardcode_shlibpath_var=no
5756     ;;
5757
5758   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5759   freebsd*)
5760     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5761     hardcode_libdir_flag_spec='-R$libdir'
5762     hardcode_direct=yes
5763     hardcode_shlibpath_var=no
5764     ;;
5765
5766   hpux9* | hpux10* | hpux11*)
5767     case $host_os in
5768     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' ;;
5769     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5770     esac
5771     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5772     hardcode_libdir_separator=:
5773     hardcode_direct=yes
5774     hardcode_minus_L=yes # Not in the search PATH, but as the default
5775                          # location of the library.
5776     export_dynamic_flag_spec='${wl}-E'
5777     ;;
5778
5779   irix5* | irix6*)
5780     if test "$GCC" = yes; then
5781       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'
5782     else
5783       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'
5784     fi
5785     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5786     hardcode_libdir_separator=:
5787     link_all_deplibs=yes
5788     ;;
5789
5790   netbsd*)
5791     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5792       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5793     else
5794       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5795     fi
5796     hardcode_libdir_flag_spec='-R$libdir'
5797     hardcode_direct=yes
5798     hardcode_shlibpath_var=no
5799     ;;
5800
5801   newsos6)
5802     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5803     hardcode_direct=yes
5804     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5805     hardcode_libdir_separator=:
5806     hardcode_shlibpath_var=no
5807     ;;
5808
5809   openbsd*)
5810     hardcode_direct=yes
5811     hardcode_shlibpath_var=no
5812     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5813       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
5814       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5815       export_dynamic_flag_spec='${wl}-E'
5816     else
5817       case "$host_os" in
5818       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5819         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5820         hardcode_libdir_flag_spec='-R$libdir'
5821         ;;
5822       *)
5823         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
5824         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5825         ;;
5826       esac
5827     fi
5828     ;;
5829
5830   os2*)
5831     hardcode_libdir_flag_spec='-L$libdir'
5832     hardcode_minus_L=yes
5833     allow_undefined_flag=unsupported
5834     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'
5835     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5836     ;;
5837
5838   osf3*)
5839     if test "$GCC" = yes; then
5840       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5841       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'
5842     else
5843       allow_undefined_flag=' -expect_unresolved \*'
5844       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'
5845     fi
5846     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5847     hardcode_libdir_separator=:
5848     ;;
5849
5850   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5851     if test "$GCC" = yes; then
5852       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5853       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'
5854       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5855     else
5856       allow_undefined_flag=' -expect_unresolved \*'
5857       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'
5858       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5859       $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'
5860
5861       #Both c and cxx compiler support -rpath directly
5862       hardcode_libdir_flag_spec='-rpath $libdir'
5863     fi
5864     hardcode_libdir_separator=:
5865     ;;
5866
5867   sco3.2v5*)
5868     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5869     hardcode_shlibpath_var=no
5870     runpath_var=LD_RUN_PATH
5871     hardcode_runpath_var=yes
5872     export_dynamic_flag_spec='${wl}-Bexport'
5873     ;;
5874
5875   solaris*)
5876     # gcc --version < 3.0 without binutils cannot create self contained
5877     # shared libraries reliably, requiring libgcc.a to resolve some of
5878     # the object symbols generated in some cases.  Libraries that use
5879     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5880     # a copy of libgcc.a into every shared library to guarantee resolving
5881     # such symbols causes other problems:  According to Tim Van Holder
5882     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5883     # (to the application) exception stack for one thing.
5884     no_undefined_flag=' -z defs'
5885     if test "$GCC" = yes; then
5886       case `$CC --version 2>/dev/null` in
5887       [12].*)
5888         cat <<EOF 1>&2
5889
5890 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5891 *** create self contained shared libraries on Solaris systems, without
5892 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5893 *** -no-undefined support, which will at least allow you to build shared
5894 *** libraries.  However, you may find that when you link such libraries
5895 *** into an application without using GCC, you have to manually add
5896 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5897 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5898 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5899
5900 EOF
5901         no_undefined_flag=
5902         ;;
5903       esac
5904     fi
5905     # $CC -shared without GNU ld will not create a library from C++
5906     # object files and a static libstdc++, better avoid it by now
5907     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5908     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5909                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5910     hardcode_libdir_flag_spec='-R$libdir'
5911     hardcode_shlibpath_var=no
5912     case $host_os in
5913     solaris2.[0-5] | solaris2.[0-5].*) ;;
5914     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5915       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5916     esac
5917     link_all_deplibs=yes
5918     ;;
5919
5920   sunos4*)
5921     if test "x$host_vendor" = xsequent; then
5922       # Use $CC to link under sequent, because it throws in some extra .o
5923       # files that make .init and .fini sections work.
5924       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5925     else
5926       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5927     fi
5928     hardcode_libdir_flag_spec='-L$libdir'
5929     hardcode_direct=yes
5930     hardcode_minus_L=yes
5931     hardcode_shlibpath_var=no
5932     ;;
5933
5934   sysv4)
5935     if test "x$host_vendor" = xsno; then
5936       archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
5937       hardcode_direct=yes # is this really true???
5938     else
5939       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5940       hardcode_direct=no #Motorola manual says yes, but my tests say they lie
5941     fi
5942     runpath_var='LD_RUN_PATH'
5943     hardcode_shlibpath_var=no
5944     ;;
5945
5946   sysv4.3*)
5947     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5948     hardcode_shlibpath_var=no
5949     export_dynamic_flag_spec='-Bexport'
5950     ;;
5951
5952   sysv5*)
5953     no_undefined_flag=' -z text'
5954     # $CC -shared without GNU ld will not create a library from C++
5955     # object files and a static libstdc++, better avoid it by now
5956     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5957     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5958                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5959     hardcode_libdir_flag_spec=
5960     hardcode_shlibpath_var=no
5961     runpath_var='LD_RUN_PATH'
5962     ;;
5963
5964   uts4*)
5965     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5966     hardcode_libdir_flag_spec='-L$libdir'
5967     hardcode_shlibpath_var=no
5968     ;;
5969
5970   dgux*)
5971     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5972     hardcode_libdir_flag_spec='-L$libdir'
5973     hardcode_shlibpath_var=no
5974     ;;
5975
5976   sysv4*MP*)
5977     if test -d /usr/nec; then
5978       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5979       hardcode_shlibpath_var=no
5980       runpath_var=LD_RUN_PATH
5981       hardcode_runpath_var=yes
5982       ld_shlibs=yes
5983     fi
5984     ;;
5985
5986   sysv4.2uw2*)
5987     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5988     hardcode_direct=yes
5989     hardcode_minus_L=no
5990     hardcode_shlibpath_var=no
5991     hardcode_runpath_var=yes
5992     runpath_var=LD_RUN_PATH
5993     ;;
5994
5995   sysv5uw7* | unixware7*)
5996     no_undefined_flag='${wl}-z ${wl}text'
5997     if test "$GCC" = yes; then
5998       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5999     else
6000       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6001     fi
6002     runpath_var='LD_RUN_PATH'
6003     hardcode_shlibpath_var=no
6004     ;;
6005
6006   *)
6007     ld_shlibs=no
6008     ;;
6009   esac
6010 fi
6011 echo "$ac_t""$ld_shlibs" 1>&6
6012 test "$ld_shlibs" = no && can_build_shared=no
6013
6014 # Check hardcoding attributes.
6015 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6016 echo "configure:6017: checking how to hardcode library paths into programs" >&5
6017 hardcode_action=
6018 if test -n "$hardcode_libdir_flag_spec" || \
6019    test -n "$runpath_var"; then
6020
6021   # We can hardcode non-existant directories.
6022   if test "$hardcode_direct" != no &&
6023      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6024      # have to relink, otherwise we might link with an installed library
6025      # when we should be linking with a yet-to-be-installed one
6026      ## test "$hardcode_shlibpath_var" != no &&
6027      test "$hardcode_minus_L" != no; then
6028     # Linking always hardcodes the temporary library directory.
6029     hardcode_action=relink
6030   else
6031     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6032     hardcode_action=immediate
6033   fi
6034 else
6035   # We cannot hardcode anything, or else we can only hardcode existing
6036   # directories.
6037   hardcode_action=unsupported
6038 fi
6039 echo "$ac_t""$hardcode_action" 1>&6
6040
6041 striplib=
6042 old_striplib=
6043 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6044 echo "configure:6045: checking whether stripping libraries is possible" >&5
6045 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6046   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6047   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6048   echo "$ac_t""yes" 1>&6
6049 else
6050   echo "$ac_t""no" 1>&6
6051 fi
6052
6053 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6054 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6055
6056 # PORTME Fill in your ld.so characteristics
6057 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6058 echo "configure:6059: checking dynamic linker characteristics" >&5
6059 library_names_spec=
6060 libname_spec='lib$name'
6061 soname_spec=
6062 postinstall_cmds=
6063 postuninstall_cmds=
6064 finish_cmds=
6065 finish_eval=
6066 shlibpath_var=
6067 shlibpath_overrides_runpath=unknown
6068 version_type=none
6069 dynamic_linker="$host_os ld.so"
6070 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6071 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6072
6073 case $host_os in
6074 aix3*)
6075   version_type=linux
6076   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6077   shlibpath_var=LIBPATH
6078
6079   # AIX has no versioning support, so we append a major version to the name.
6080   soname_spec='${libname}${release}.so$major'
6081   ;;
6082
6083 aix4* | aix5*)
6084   version_type=linux
6085   if test "$host_cpu" = ia64; then
6086     # AIX 5 supports IA64
6087     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6088     shlibpath_var=LD_LIBRARY_PATH
6089   else
6090     # With GCC up to 2.95.x, collect2 would create an import file
6091     # for dependence libraries.  The import file would start with
6092     # the line `#! .'.  This would cause the generated library to
6093     # depend on `.', always an invalid library.  This was fixed in
6094     # development snapshots of GCC prior to 3.0.
6095     case $host_os in
6096       aix4 | aix4.[01] | aix4.[01].*)
6097         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6098              echo ' yes '
6099              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6100           :
6101         else
6102           can_build_shared=no
6103         fi
6104         ;;
6105     esac
6106     # AIX (on Power*) has no versioning support, so currently we can
6107     # not hardcode correct soname into executable. Probably we can
6108     # add versioning support to collect2, so additional links can
6109     # be useful in future.
6110     if test "$aix_use_runtimelinking" = yes; then
6111       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6112       # instead of lib<name>.a to let people know that these are not
6113       # typical AIX shared libraries.
6114       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6115     else
6116       # We preserve .a as extension for shared libraries through AIX4.2
6117       # and later when we are not doing run time linking.
6118       library_names_spec='${libname}${release}.a $libname.a'
6119       soname_spec='${libname}${release}.so$major'
6120     fi
6121     shlibpath_var=LIBPATH
6122   fi
6123   ;;
6124
6125 amigaos*)
6126   library_names_spec='$libname.ixlibrary $libname.a'
6127   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6128   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'
6129   ;;
6130
6131 beos*)
6132   library_names_spec='${libname}.so'
6133   dynamic_linker="$host_os ld.so"
6134   shlibpath_var=LIBRARY_PATH
6135   ;;
6136
6137 bsdi4*)
6138   version_type=linux
6139   need_version=no
6140   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6141   soname_spec='${libname}${release}.so$major'
6142   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6143   shlibpath_var=LD_LIBRARY_PATH
6144   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6145   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6146   export_dynamic_flag_spec=-rdynamic
6147   # the default ld.so.conf also contains /usr/contrib/lib and
6148   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6149   # libtool to hard-code these into programs
6150   ;;
6151
6152 cygwin* | mingw* | pw32*)
6153   version_type=windows
6154   need_version=no
6155   need_lib_prefix=no
6156   case $GCC,$host_os in
6157   yes,cygwin*)
6158     library_names_spec='$libname.dll.a'
6159     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6160     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6161       dldir=$destdir/`dirname \$dlpath`~
6162       test -d \$dldir || mkdir -p \$dldir~
6163       $install_prog .libs/$dlname \$dldir/$dlname'
6164     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6165       dlpath=$dir/\$dldll~
6166        $rm \$dlpath'
6167     ;;
6168   yes,mingw*)
6169     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6170     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
6171     ;;
6172   yes,pw32*)
6173     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6174     ;;
6175   *)
6176     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6177     ;;
6178   esac
6179   dynamic_linker='Win32 ld.exe'
6180   # FIXME: first we should search . and the directory the executable is in
6181   shlibpath_var=PATH
6182   ;;
6183
6184 darwin* | rhapsody*)
6185   dynamic_linker="$host_os dyld"
6186   version_type=darwin
6187   need_lib_prefix=no
6188   need_version=no
6189   # FIXME: Relying on posixy $() will cause problems for
6190   #        cross-compilation, but unfortunately the echo tests do not
6191   #        yet detect zsh echo's removal of \ escapes.
6192   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)'
6193   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6194   shlibpath_overrides_runpath=yes
6195   shlibpath_var=DYLD_LIBRARY_PATH
6196   ;;
6197
6198 freebsd1*)
6199   dynamic_linker=no
6200   ;;
6201
6202 freebsd*)
6203   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6204   version_type=freebsd-$objformat
6205   case $version_type in
6206     freebsd-elf*)
6207       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6208       need_version=no
6209       need_lib_prefix=no
6210       ;;
6211     freebsd-*)
6212       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6213       need_version=yes
6214       ;;
6215   esac
6216   shlibpath_var=LD_LIBRARY_PATH
6217   case $host_os in
6218   freebsd2*)
6219     shlibpath_overrides_runpath=yes
6220     ;;
6221   *)
6222     shlibpath_overrides_runpath=no
6223     hardcode_into_libs=yes
6224     ;;
6225   esac
6226   ;;
6227
6228 gnu*)
6229   version_type=linux
6230   need_lib_prefix=no
6231   need_version=no
6232   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6233   soname_spec='${libname}${release}.so$major'
6234   shlibpath_var=LD_LIBRARY_PATH
6235   hardcode_into_libs=yes
6236   ;;
6237
6238 hpux9* | hpux10* | hpux11*)
6239   # Give a soname corresponding to the major version so that dld.sl refuses to
6240   # link against other versions.
6241   dynamic_linker="$host_os dld.sl"
6242   version_type=sunos
6243   need_lib_prefix=no
6244   need_version=no
6245   shlibpath_var=SHLIB_PATH
6246   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6247   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6248   soname_spec='${libname}${release}.sl$major'
6249   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6250   postinstall_cmds='chmod 555 $lib'
6251   ;;
6252
6253 irix5* | irix6*)
6254   version_type=irix
6255   need_lib_prefix=no
6256   need_version=no
6257   soname_spec='${libname}${release}.so$major'
6258   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6259   case $host_os in
6260   irix5*)
6261     libsuff= shlibsuff=
6262     ;;
6263   *)
6264     case $LD in # libtool.m4 will add one of these switches to LD
6265     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6266     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6267     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6268     *) libsuff= shlibsuff= libmagic=never-match;;
6269     esac
6270     ;;
6271   esac
6272   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6273   shlibpath_overrides_runpath=no
6274   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6275   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6276   ;;
6277
6278 # No shared lib support for Linux oldld, aout, or coff.
6279 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6280   dynamic_linker=no
6281   ;;
6282
6283 # This must be Linux ELF.
6284 linux-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   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6291   shlibpath_var=LD_LIBRARY_PATH
6292   shlibpath_overrides_runpath=no
6293   # This implies no fast_install, which is unacceptable.
6294   # Some rework will be needed to allow for fast_install
6295   # before this can be enabled.
6296   hardcode_into_libs=yes
6297
6298   # We used to test for /lib/ld.so.1 and disable shared libraries on
6299   # powerpc, because MkLinux only supported shared libraries with the
6300   # GNU dynamic linker.  Since this was broken with cross compilers,
6301   # most powerpc-linux boxes support dynamic linking these days and
6302   # people can always --disable-shared, the test was removed, and we
6303   # assume the GNU/Linux dynamic linker is in use.
6304   dynamic_linker='GNU/Linux ld.so'
6305   ;;
6306
6307 netbsd*)
6308   version_type=sunos
6309   need_lib_prefix=no
6310   need_version=no
6311   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6312     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6313     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6314     dynamic_linker='NetBSD (a.out) ld.so'
6315   else
6316     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6317     soname_spec='${libname}${release}.so$major'
6318     dynamic_linker='NetBSD ld.elf_so'
6319   fi
6320   shlibpath_var=LD_LIBRARY_PATH
6321   shlibpath_overrides_runpath=yes
6322   hardcode_into_libs=yes
6323   ;;
6324
6325 newsos6)
6326   version_type=linux
6327   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6328   shlibpath_var=LD_LIBRARY_PATH
6329   shlibpath_overrides_runpath=yes
6330   ;;
6331
6332 openbsd*)
6333   version_type=sunos
6334   need_lib_prefix=no
6335   need_version=no
6336   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6337     case "$host_os" in
6338     openbsd2.[89] | openbsd2.[89].*)
6339       shlibpath_overrides_runpath=no
6340       ;;
6341     *)
6342       shlibpath_overrides_runpath=yes
6343       ;;
6344     esac
6345   else
6346     shlibpath_overrides_runpath=yes
6347   fi
6348   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6349   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6350   shlibpath_var=LD_LIBRARY_PATH
6351   ;;
6352
6353 os2*)
6354   libname_spec='$name'
6355   need_lib_prefix=no
6356   library_names_spec='$libname.dll $libname.a'
6357   dynamic_linker='OS/2 ld.exe'
6358   shlibpath_var=LIBPATH
6359   ;;
6360
6361 osf3* | osf4* | osf5*)
6362   version_type=osf
6363   need_version=no
6364   soname_spec='${libname}${release}.so'
6365   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6366   shlibpath_var=LD_LIBRARY_PATH
6367   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6368   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6369   ;;
6370
6371 sco3.2v5*)
6372   version_type=osf
6373   soname_spec='${libname}${release}.so$major'
6374   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6375   shlibpath_var=LD_LIBRARY_PATH
6376   ;;
6377
6378 solaris*)
6379   version_type=linux
6380   need_lib_prefix=no
6381   need_version=no
6382   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6383   soname_spec='${libname}${release}.so$major'
6384   shlibpath_var=LD_LIBRARY_PATH
6385   shlibpath_overrides_runpath=yes
6386   hardcode_into_libs=yes
6387   # ldd complains unless libraries are executable
6388   postinstall_cmds='chmod +x $lib'
6389   ;;
6390
6391 sunos4*)
6392   version_type=sunos
6393   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6394   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6395   shlibpath_var=LD_LIBRARY_PATH
6396   shlibpath_overrides_runpath=yes
6397   if test "$with_gnu_ld" = yes; then
6398     need_lib_prefix=no
6399   fi
6400   need_version=yes
6401   ;;
6402
6403 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6404   version_type=linux
6405   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6406   soname_spec='${libname}${release}.so$major'
6407   shlibpath_var=LD_LIBRARY_PATH
6408   case $host_vendor in
6409     sni)
6410       shlibpath_overrides_runpath=no
6411       ;;
6412     motorola)
6413       need_lib_prefix=no
6414       need_version=no
6415       shlibpath_overrides_runpath=no
6416       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6417       ;;
6418   esac
6419   ;;
6420
6421 uts4*)
6422   version_type=linux
6423   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6424   soname_spec='${libname}${release}.so$major'
6425   shlibpath_var=LD_LIBRARY_PATH
6426   ;;
6427
6428 dgux*)
6429   version_type=linux
6430   need_lib_prefix=no
6431   need_version=no
6432   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6433   soname_spec='${libname}${release}.so$major'
6434   shlibpath_var=LD_LIBRARY_PATH
6435   ;;
6436
6437 sysv4*MP*)
6438   if test -d /usr/nec ;then
6439     version_type=linux
6440     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6441     soname_spec='$libname.so.$major'
6442     shlibpath_var=LD_LIBRARY_PATH
6443   fi
6444   ;;
6445
6446 *)
6447   dynamic_linker=no
6448   ;;
6449 esac
6450 echo "$ac_t""$dynamic_linker" 1>&6
6451 test "$dynamic_linker" = no && can_build_shared=no
6452
6453 # Report the final consequences.
6454 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6455 echo "configure:6456: checking if libtool supports shared libraries" >&5
6456 echo "$ac_t""$can_build_shared" 1>&6
6457
6458 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6459 echo "configure:6460: checking whether to build shared libraries" >&5
6460 test "$can_build_shared" = "no" && enable_shared=no
6461
6462 # On AIX, shared libraries and static libraries use the same namespace, and
6463 # are all built from PIC.
6464 case "$host_os" in
6465 aix3*)
6466   test "$enable_shared" = yes && enable_static=no
6467   if test -n "$RANLIB"; then
6468     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6469     postinstall_cmds='$RANLIB $lib'
6470   fi
6471   ;;
6472
6473 aix4*)
6474   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6475     test "$enable_shared" = yes && enable_static=no
6476   fi
6477   ;;
6478 esac
6479 echo "$ac_t""$enable_shared" 1>&6
6480
6481 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6482 echo "configure:6483: checking whether to build static libraries" >&5
6483 # Make sure either enable_shared or enable_static is yes.
6484 test "$enable_shared" = yes || enable_static=yes
6485 echo "$ac_t""$enable_static" 1>&6
6486
6487 if test "$hardcode_action" = relink; then
6488   # Fast installation is not supported
6489   enable_fast_install=no
6490 elif test "$shlibpath_overrides_runpath" = yes ||
6491      test "$enable_shared" = no; then
6492   # Fast installation is not necessary
6493   enable_fast_install=needless
6494 fi
6495
6496 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6497 if test "$GCC" = yes; then
6498   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6499 fi
6500
6501 if test "x$enable_dlopen" != xyes; then
6502   enable_dlopen=unknown
6503   enable_dlopen_self=unknown
6504   enable_dlopen_self_static=unknown
6505 else
6506   lt_cv_dlopen=no
6507   lt_cv_dlopen_libs=
6508
6509   case $host_os in
6510   beos*)
6511     lt_cv_dlopen="load_add_on"
6512     lt_cv_dlopen_libs=
6513     lt_cv_dlopen_self=yes
6514     ;;
6515
6516   cygwin* | mingw* | pw32*)
6517     lt_cv_dlopen="LoadLibrary"
6518     lt_cv_dlopen_libs=
6519    ;;
6520
6521   *)
6522     echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6523 echo "configure:6524: checking for shl_load" >&5
6524 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6525   echo $ac_n "(cached) $ac_c" 1>&6
6526 else
6527   cat > conftest.$ac_ext <<EOF
6528 #line 6529 "configure"
6529 #include "confdefs.h"
6530 /* System header to define __stub macros and hopefully few prototypes,
6531     which can conflict with char shl_load(); below.  */
6532 #include <assert.h>
6533 /* Override any gcc2 internal prototype to avoid an error.  */
6534 /* We use char because int might match the return type of a gcc2
6535     builtin and then its argument prototype would still apply.  */
6536 char shl_load();
6537 char (*f)();
6538
6539 int main() {
6540
6541 /* The GNU C library defines this for functions which it implements
6542     to always fail with ENOSYS.  Some functions are actually named
6543     something starting with __ and the normal name is an alias.  */
6544 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6545 choke me
6546 #else
6547 f = shl_load;
6548 #endif
6549
6550 ; return 0; }
6551 EOF
6552 if { (eval echo configure:6553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6553   rm -rf conftest*
6554   eval "ac_cv_func_shl_load=yes"
6555 else
6556   echo "configure: failed program was:" >&5
6557   cat conftest.$ac_ext >&5
6558   rm -rf conftest*
6559   eval "ac_cv_func_shl_load=no"
6560 fi
6561 rm -f conftest*
6562 fi
6563
6564 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6565   echo "$ac_t""yes" 1>&6
6566   lt_cv_dlopen="shl_load"
6567 else
6568   echo "$ac_t""no" 1>&6
6569 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6570 echo "configure:6571: checking for shl_load in -ldld" >&5
6571 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6572 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6573   echo $ac_n "(cached) $ac_c" 1>&6
6574 else
6575   ac_save_LIBS="$LIBS"
6576 LIBS="-ldld  $LIBS"
6577 cat > conftest.$ac_ext <<EOF
6578 #line 6579 "configure"
6579 #include "confdefs.h"
6580 /* Override any gcc2 internal prototype to avoid an error.  */
6581 /* We use char because int might match the return type of a gcc2
6582     builtin and then its argument prototype would still apply.  */
6583 char shl_load();
6584
6585 int main() {
6586 shl_load()
6587 ; return 0; }
6588 EOF
6589 if { (eval echo configure:6590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6590   rm -rf conftest*
6591   eval "ac_cv_lib_$ac_lib_var=yes"
6592 else
6593   echo "configure: failed program was:" >&5
6594   cat conftest.$ac_ext >&5
6595   rm -rf conftest*
6596   eval "ac_cv_lib_$ac_lib_var=no"
6597 fi
6598 rm -f conftest*
6599 LIBS="$ac_save_LIBS"
6600
6601 fi
6602 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6603   echo "$ac_t""yes" 1>&6
6604   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6605 else
6606   echo "$ac_t""no" 1>&6
6607 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6608 echo "configure:6609: checking for dlopen" >&5
6609 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6610   echo $ac_n "(cached) $ac_c" 1>&6
6611 else
6612   cat > conftest.$ac_ext <<EOF
6613 #line 6614 "configure"
6614 #include "confdefs.h"
6615 /* System header to define __stub macros and hopefully few prototypes,
6616     which can conflict with char dlopen(); below.  */
6617 #include <assert.h>
6618 /* Override any gcc2 internal prototype to avoid an error.  */
6619 /* We use char because int might match the return type of a gcc2
6620     builtin and then its argument prototype would still apply.  */
6621 char dlopen();
6622 char (*f)();
6623
6624 int main() {
6625
6626 /* The GNU C library defines this for functions which it implements
6627     to always fail with ENOSYS.  Some functions are actually named
6628     something starting with __ and the normal name is an alias.  */
6629 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6630 choke me
6631 #else
6632 f = dlopen;
6633 #endif
6634
6635 ; return 0; }
6636 EOF
6637 if { (eval echo configure:6638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6638   rm -rf conftest*
6639   eval "ac_cv_func_dlopen=yes"
6640 else
6641   echo "configure: failed program was:" >&5
6642   cat conftest.$ac_ext >&5
6643   rm -rf conftest*
6644   eval "ac_cv_func_dlopen=no"
6645 fi
6646 rm -f conftest*
6647 fi
6648
6649 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6650   echo "$ac_t""yes" 1>&6
6651   lt_cv_dlopen="dlopen"
6652 else
6653   echo "$ac_t""no" 1>&6
6654 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6655 echo "configure:6656: checking for dlopen in -ldl" >&5
6656 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6657 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6658   echo $ac_n "(cached) $ac_c" 1>&6
6659 else
6660   ac_save_LIBS="$LIBS"
6661 LIBS="-ldl  $LIBS"
6662 cat > conftest.$ac_ext <<EOF
6663 #line 6664 "configure"
6664 #include "confdefs.h"
6665 /* Override any gcc2 internal prototype to avoid an error.  */
6666 /* We use char because int might match the return type of a gcc2
6667     builtin and then its argument prototype would still apply.  */
6668 char dlopen();
6669
6670 int main() {
6671 dlopen()
6672 ; return 0; }
6673 EOF
6674 if { (eval echo configure:6675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6675   rm -rf conftest*
6676   eval "ac_cv_lib_$ac_lib_var=yes"
6677 else
6678   echo "configure: failed program was:" >&5
6679   cat conftest.$ac_ext >&5
6680   rm -rf conftest*
6681   eval "ac_cv_lib_$ac_lib_var=no"
6682 fi
6683 rm -f conftest*
6684 LIBS="$ac_save_LIBS"
6685
6686 fi
6687 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6688   echo "$ac_t""yes" 1>&6
6689   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6690 else
6691   echo "$ac_t""no" 1>&6
6692 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6693 echo "configure:6694: checking for dlopen in -lsvld" >&5
6694 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6695 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6696   echo $ac_n "(cached) $ac_c" 1>&6
6697 else
6698   ac_save_LIBS="$LIBS"
6699 LIBS="-lsvld  $LIBS"
6700 cat > conftest.$ac_ext <<EOF
6701 #line 6702 "configure"
6702 #include "confdefs.h"
6703 /* Override any gcc2 internal prototype to avoid an error.  */
6704 /* We use char because int might match the return type of a gcc2
6705     builtin and then its argument prototype would still apply.  */
6706 char dlopen();
6707
6708 int main() {
6709 dlopen()
6710 ; return 0; }
6711 EOF
6712 if { (eval echo configure:6713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6713   rm -rf conftest*
6714   eval "ac_cv_lib_$ac_lib_var=yes"
6715 else
6716   echo "configure: failed program was:" >&5
6717   cat conftest.$ac_ext >&5
6718   rm -rf conftest*
6719   eval "ac_cv_lib_$ac_lib_var=no"
6720 fi
6721 rm -f conftest*
6722 LIBS="$ac_save_LIBS"
6723
6724 fi
6725 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6726   echo "$ac_t""yes" 1>&6
6727   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6728 else
6729   echo "$ac_t""no" 1>&6
6730 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6731 echo "configure:6732: checking for dld_link in -ldld" >&5
6732 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6733 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6734   echo $ac_n "(cached) $ac_c" 1>&6
6735 else
6736   ac_save_LIBS="$LIBS"
6737 LIBS="-ldld  $LIBS"
6738 cat > conftest.$ac_ext <<EOF
6739 #line 6740 "configure"
6740 #include "confdefs.h"
6741 /* Override any gcc2 internal prototype to avoid an error.  */
6742 /* We use char because int might match the return type of a gcc2
6743     builtin and then its argument prototype would still apply.  */
6744 char dld_link();
6745
6746 int main() {
6747 dld_link()
6748 ; return 0; }
6749 EOF
6750 if { (eval echo configure:6751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6751   rm -rf conftest*
6752   eval "ac_cv_lib_$ac_lib_var=yes"
6753 else
6754   echo "configure: failed program was:" >&5
6755   cat conftest.$ac_ext >&5
6756   rm -rf conftest*
6757   eval "ac_cv_lib_$ac_lib_var=no"
6758 fi
6759 rm -f conftest*
6760 LIBS="$ac_save_LIBS"
6761
6762 fi
6763 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6764   echo "$ac_t""yes" 1>&6
6765   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6766 else
6767   echo "$ac_t""no" 1>&6
6768 fi
6769
6770               
6771 fi
6772
6773             
6774 fi
6775
6776           
6777 fi
6778
6779         
6780 fi
6781
6782       
6783 fi
6784
6785     ;;
6786   esac
6787
6788   if test "x$lt_cv_dlopen" != xno; then
6789     enable_dlopen=yes
6790   else
6791     enable_dlopen=no
6792   fi
6793
6794   case $lt_cv_dlopen in
6795   dlopen)
6796     save_CPPFLAGS="$CPPFLAGS"
6797         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6798
6799     save_LDFLAGS="$LDFLAGS"
6800     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6801
6802     save_LIBS="$LIBS"
6803     LIBS="$lt_cv_dlopen_libs $LIBS"
6804
6805     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6806 echo "configure:6807: checking whether a program can dlopen itself" >&5
6807 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6808   echo $ac_n "(cached) $ac_c" 1>&6
6809 else
6810           if test "$cross_compiling" = yes; then :
6811   lt_cv_dlopen_self=cross
6812 else
6813     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6814   lt_status=$lt_dlunknown
6815   cat > conftest.$ac_ext <<EOF
6816 #line 6817 "configure"
6817 #include "confdefs.h"
6818
6819 #if HAVE_DLFCN_H
6820 #include <dlfcn.h>
6821 #endif
6822
6823 #include <stdio.h>
6824
6825 #ifdef RTLD_GLOBAL
6826 #  define LT_DLGLOBAL           RTLD_GLOBAL
6827 #else
6828 #  ifdef DL_GLOBAL
6829 #    define LT_DLGLOBAL         DL_GLOBAL
6830 #  else
6831 #    define LT_DLGLOBAL         0
6832 #  endif
6833 #endif
6834
6835 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6836    find out it does not work in some platform. */
6837 #ifndef LT_DLLAZY_OR_NOW
6838 #  ifdef RTLD_LAZY
6839 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6840 #  else
6841 #    ifdef DL_LAZY
6842 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6843 #    else
6844 #      ifdef RTLD_NOW
6845 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6846 #      else
6847 #        ifdef DL_NOW
6848 #          define LT_DLLAZY_OR_NOW      DL_NOW
6849 #        else
6850 #          define LT_DLLAZY_OR_NOW      0
6851 #        endif
6852 #      endif
6853 #    endif
6854 #  endif
6855 #endif
6856
6857 #ifdef __cplusplus
6858 extern "C" void exit (int);
6859 #endif
6860
6861 void fnord() { int i=42;}
6862 int main ()
6863 {
6864   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6865   int status = $lt_dlunknown;
6866
6867   if (self)
6868     {
6869       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6870       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6871       /* dlclose (self); */
6872     }
6873
6874     exit (status);
6875 }
6876 EOF
6877   if { (eval echo configure:6878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6878     (./conftest; exit; ) 2>/dev/null
6879     lt_status=$?
6880     case x$lt_status in
6881       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6882       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
6883       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
6884     esac
6885   else :
6886     # compilation failed
6887     lt_cv_dlopen_self=no
6888   fi
6889 fi
6890 rm -fr conftest*
6891
6892     
6893 fi
6894
6895 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
6896
6897     if test "x$lt_cv_dlopen_self" = xyes; then
6898       LDFLAGS="$LDFLAGS $link_static_flag"
6899       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
6900 echo "configure:6901: checking whether a statically linked program can dlopen itself" >&5
6901 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
6902   echo $ac_n "(cached) $ac_c" 1>&6
6903 else
6904           if test "$cross_compiling" = yes; then :
6905   lt_cv_dlopen_self_static=cross
6906 else
6907     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6908   lt_status=$lt_dlunknown
6909   cat > conftest.$ac_ext <<EOF
6910 #line 6911 "configure"
6911 #include "confdefs.h"
6912
6913 #if HAVE_DLFCN_H
6914 #include <dlfcn.h>
6915 #endif
6916
6917 #include <stdio.h>
6918
6919 #ifdef RTLD_GLOBAL
6920 #  define LT_DLGLOBAL           RTLD_GLOBAL
6921 #else
6922 #  ifdef DL_GLOBAL
6923 #    define LT_DLGLOBAL         DL_GLOBAL
6924 #  else
6925 #    define LT_DLGLOBAL         0
6926 #  endif
6927 #endif
6928
6929 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6930    find out it does not work in some platform. */
6931 #ifndef LT_DLLAZY_OR_NOW
6932 #  ifdef RTLD_LAZY
6933 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6934 #  else
6935 #    ifdef DL_LAZY
6936 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6937 #    else
6938 #      ifdef RTLD_NOW
6939 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6940 #      else
6941 #        ifdef DL_NOW
6942 #          define LT_DLLAZY_OR_NOW      DL_NOW
6943 #        else
6944 #          define LT_DLLAZY_OR_NOW      0
6945 #        endif
6946 #      endif
6947 #    endif
6948 #  endif
6949 #endif
6950
6951 #ifdef __cplusplus
6952 extern "C" void exit (int);
6953 #endif
6954
6955 void fnord() { int i=42;}
6956 int main ()
6957 {
6958   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6959   int status = $lt_dlunknown;
6960
6961   if (self)
6962     {
6963       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6964       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6965       /* dlclose (self); */
6966     }
6967
6968     exit (status);
6969 }
6970 EOF
6971   if { (eval echo configure:6972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6972     (./conftest; exit; ) 2>/dev/null
6973     lt_status=$?
6974     case x$lt_status in
6975       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
6976       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
6977       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
6978     esac
6979   else :
6980     # compilation failed
6981     lt_cv_dlopen_self_static=no
6982   fi
6983 fi
6984 rm -fr conftest*
6985
6986       
6987 fi
6988
6989 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
6990     fi
6991
6992     CPPFLAGS="$save_CPPFLAGS"
6993     LDFLAGS="$save_LDFLAGS"
6994     LIBS="$save_LIBS"
6995     ;;
6996   esac
6997
6998   case $lt_cv_dlopen_self in
6999   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7000   *) enable_dlopen_self=unknown ;;
7001   esac
7002
7003   case $lt_cv_dlopen_self_static in
7004   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7005   *) enable_dlopen_self_static=unknown ;;
7006   esac
7007 fi
7008
7009
7010 if test "$enable_shared" = yes && test "$GCC" = yes; then
7011   case $archive_cmds in
7012   *'~'*)
7013     # FIXME: we may have to deal with multi-command sequences.
7014     ;;
7015   '$CC '*)
7016     # Test whether the compiler implicitly links with -lc since on some
7017     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7018     # to ld, don't add -lc before -lgcc.
7019     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7020 echo "configure:7021: checking whether -lc should be explicitly linked in" >&5
7021     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7022   echo $ac_n "(cached) $ac_c" 1>&6
7023 else
7024   $rm conftest*
7025     echo 'static int dummy;' > conftest.$ac_ext
7026
7027     if { (eval echo configure:7028: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7028       soname=conftest
7029       lib=conftest
7030       libobjs=conftest.$ac_objext
7031       deplibs=
7032       wl=$lt_cv_prog_cc_wl
7033       compiler_flags=-v
7034       linker_flags=-v
7035       verstring=
7036       output_objdir=.
7037       libname=conftest
7038       save_allow_undefined_flag=$allow_undefined_flag
7039       allow_undefined_flag=
7040       if { (eval echo configure:7041: \"$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; }
7041       then
7042         lt_cv_archive_cmds_need_lc=no
7043       else
7044         lt_cv_archive_cmds_need_lc=yes
7045       fi
7046       allow_undefined_flag=$save_allow_undefined_flag
7047     else
7048       cat conftest.err 1>&5
7049     fi
7050 fi
7051
7052     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7053     ;;
7054   esac
7055 fi
7056 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7057
7058 # The second clause should only fire when bootstrapping the
7059 # libtool distribution, otherwise you forgot to ship ltmain.sh
7060 # with your package, and you will get complaints that there are
7061 # no rules to generate ltmain.sh.
7062 if test -f "$ltmain"; then
7063   :
7064 else
7065   # If there is no Makefile yet, we rely on a make rule to execute
7066   # `config.status --recheck' to rerun these tests and create the
7067   # libtool script then.
7068   test -f Makefile && make "$ltmain"
7069 fi
7070
7071 if test -f "$ltmain"; then
7072   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7073   $rm -f "${ofile}T"
7074
7075   echo creating $ofile
7076
7077   # Now quote all the things that may contain metacharacters while being
7078   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7079   # variables and quote the copies for generation of the libtool script.
7080   for var in echo old_CC old_CFLAGS \
7081     AR AR_FLAGS CC LD LN_S NM SHELL \
7082     reload_flag reload_cmds wl \
7083     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7084     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7085     library_names_spec soname_spec \
7086     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7087     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7088     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7089     old_striplib striplib file_magic_cmd export_symbols_cmds \
7090     deplibs_check_method allow_undefined_flag no_undefined_flag \
7091     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7092     global_symbol_to_c_name_address \
7093     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7094     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7095     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7096
7097     case $var in
7098     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7099     old_postinstall_cmds | old_postuninstall_cmds | \
7100     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7101     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7102     postinstall_cmds | postuninstall_cmds | \
7103     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7104       # Double-quote double-evaled strings.
7105       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7106       ;;
7107     *)
7108       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7109       ;;
7110     esac
7111   done
7112
7113   cat <<__EOF__ > "${ofile}T"
7114 #! $SHELL
7115
7116 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7117 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7118 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7119 #
7120 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7121 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7122 #
7123 # This program is free software; you can redistribute it and/or modify
7124 # it under the terms of the GNU General Public License as published by
7125 # the Free Software Foundation; either version 2 of the License, or
7126 # (at your option) any later version.
7127 #
7128 # This program is distributed in the hope that it will be useful, but
7129 # WITHOUT ANY WARRANTY; without even the implied warranty of
7130 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7131 # General Public License for more details.
7132 #
7133 # You should have received a copy of the GNU General Public License
7134 # along with this program; if not, write to the Free Software
7135 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7136 #
7137 # As a special exception to the GNU General Public License, if you
7138 # distribute this file as part of a program that contains a
7139 # configuration script generated by Autoconf, you may include it under
7140 # the same distribution terms that you use for the rest of that program.
7141
7142 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7143 Xsed="sed -e s/^X//"
7144
7145 # The HP-UX ksh and POSIX shell print the target directory to stdout
7146 # if CDPATH is set.
7147 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7148
7149 # ### BEGIN LIBTOOL CONFIG
7150
7151 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7152
7153 # Shell to use when invoking shell scripts.
7154 SHELL=$lt_SHELL
7155
7156 # Whether or not to build shared libraries.
7157 build_libtool_libs=$enable_shared
7158
7159 # Whether or not to build static libraries.
7160 build_old_libs=$enable_static
7161
7162 # Whether or not to add -lc for building shared libraries.
7163 build_libtool_need_lc=$need_lc
7164
7165 # Whether or not to optimize for fast installation.
7166 fast_install=$enable_fast_install
7167
7168 # The host system.
7169 host_alias=$host_alias
7170 host=$host
7171
7172 # An echo program that does not interpret backslashes.
7173 echo=$lt_echo
7174
7175 # The archiver.
7176 AR=$lt_AR
7177 AR_FLAGS=$lt_AR_FLAGS
7178
7179 # The default C compiler.
7180 CC=$lt_CC
7181
7182 # Is the compiler the GNU C compiler?
7183 with_gcc=$GCC
7184
7185 # The linker used to build libraries.
7186 LD=$lt_LD
7187
7188 # Whether we need hard or soft links.
7189 LN_S=$lt_LN_S
7190
7191 # A BSD-compatible nm program.
7192 NM=$lt_NM
7193
7194 # A symbol stripping program
7195 STRIP=$STRIP
7196
7197 # Used to examine libraries when file_magic_cmd begins "file"
7198 MAGIC_CMD=$MAGIC_CMD
7199
7200 # Used on cygwin: DLL creation program.
7201 DLLTOOL="$DLLTOOL"
7202
7203 # Used on cygwin: object dumper.
7204 OBJDUMP="$OBJDUMP"
7205
7206 # Used on cygwin: assembler.
7207 AS="$AS"
7208
7209 # The name of the directory that contains temporary libtool files.
7210 objdir=$objdir
7211
7212 # How to create reloadable object files.
7213 reload_flag=$lt_reload_flag
7214 reload_cmds=$lt_reload_cmds
7215
7216 # How to pass a linker flag through the compiler.
7217 wl=$lt_wl
7218
7219 # Object file suffix (normally "o").
7220 objext="$ac_objext"
7221
7222 # Old archive suffix (normally "a").
7223 libext="$libext"
7224
7225 # Executable file suffix (normally "").
7226 exeext="$exeext"
7227
7228 # Additional compiler flags for building library objects.
7229 pic_flag=$lt_pic_flag
7230 pic_mode=$pic_mode
7231
7232 # Does compiler simultaneously support -c and -o options?
7233 compiler_c_o=$lt_compiler_c_o
7234
7235 # Can we write directly to a .lo ?
7236 compiler_o_lo=$lt_compiler_o_lo
7237
7238 # Must we lock files when doing compilation ?
7239 need_locks=$lt_need_locks
7240
7241 # Do we need the lib prefix for modules?
7242 need_lib_prefix=$need_lib_prefix
7243
7244 # Do we need a version for libraries?
7245 need_version=$need_version
7246
7247 # Whether dlopen is supported.
7248 dlopen_support=$enable_dlopen
7249
7250 # Whether dlopen of programs is supported.
7251 dlopen_self=$enable_dlopen_self
7252
7253 # Whether dlopen of statically linked programs is supported.
7254 dlopen_self_static=$enable_dlopen_self_static
7255
7256 # Compiler flag to prevent dynamic linking.
7257 link_static_flag=$lt_link_static_flag
7258
7259 # Compiler flag to turn off builtin functions.
7260 no_builtin_flag=$lt_no_builtin_flag
7261
7262 # Compiler flag to allow reflexive dlopens.
7263 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7264
7265 # Compiler flag to generate shared objects directly from archives.
7266 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7267
7268 # Compiler flag to generate thread-safe objects.
7269 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7270
7271 # Library versioning type.
7272 version_type=$version_type
7273
7274 # Format of library name prefix.
7275 libname_spec=$lt_libname_spec
7276
7277 # List of archive names.  First name is the real one, the rest are links.
7278 # The last name is the one that the linker finds with -lNAME.
7279 library_names_spec=$lt_library_names_spec
7280
7281 # The coded name of the library, if different from the real name.
7282 soname_spec=$lt_soname_spec
7283
7284 # Commands used to build and install an old-style archive.
7285 RANLIB=$lt_RANLIB
7286 old_archive_cmds=$lt_old_archive_cmds
7287 old_postinstall_cmds=$lt_old_postinstall_cmds
7288 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7289
7290 # Create an old-style archive from a shared archive.
7291 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7292
7293 # Create a temporary old-style archive to link instead of a shared archive.
7294 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7295
7296 # Commands used to build and install a shared archive.
7297 archive_cmds=$lt_archive_cmds
7298 archive_expsym_cmds=$lt_archive_expsym_cmds
7299 postinstall_cmds=$lt_postinstall_cmds
7300 postuninstall_cmds=$lt_postuninstall_cmds
7301
7302 # Commands to strip libraries.
7303 old_striplib=$lt_old_striplib
7304 striplib=$lt_striplib
7305
7306 # Method to check whether dependent libraries are shared objects.
7307 deplibs_check_method=$lt_deplibs_check_method
7308
7309 # Command to use when deplibs_check_method == file_magic.
7310 file_magic_cmd=$lt_file_magic_cmd
7311
7312 # Flag that allows shared libraries with undefined symbols to be built.
7313 allow_undefined_flag=$lt_allow_undefined_flag
7314
7315 # Flag that forces no undefined symbols.
7316 no_undefined_flag=$lt_no_undefined_flag
7317
7318 # Commands used to finish a libtool library installation in a directory.
7319 finish_cmds=$lt_finish_cmds
7320
7321 # Same as above, but a single script fragment to be evaled but not shown.
7322 finish_eval=$lt_finish_eval
7323
7324 # Take the output of nm and produce a listing of raw symbols and C names.
7325 global_symbol_pipe=$lt_global_symbol_pipe
7326
7327 # Transform the output of nm in a proper C declaration
7328 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7329
7330 # Transform the output of nm in a C name address pair
7331 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7332
7333 # This is the shared library runtime path variable.
7334 runpath_var=$runpath_var
7335
7336 # This is the shared library path variable.
7337 shlibpath_var=$shlibpath_var
7338
7339 # Is shlibpath searched before the hard-coded library search path?
7340 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7341
7342 # How to hardcode a shared library path into an executable.
7343 hardcode_action=$hardcode_action
7344
7345 # Whether we should hardcode library paths into libraries.
7346 hardcode_into_libs=$hardcode_into_libs
7347
7348 # Flag to hardcode \$libdir into a binary during linking.
7349 # This must work even if \$libdir does not exist.
7350 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7351
7352 # Whether we need a single -rpath flag with a separated argument.
7353 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7354
7355 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7356 # resulting binary.
7357 hardcode_direct=$hardcode_direct
7358
7359 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7360 # resulting binary.
7361 hardcode_minus_L=$hardcode_minus_L
7362
7363 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7364 # the resulting binary.
7365 hardcode_shlibpath_var=$hardcode_shlibpath_var
7366
7367 # Variables whose values should be saved in libtool wrapper scripts and
7368 # restored at relink time.
7369 variables_saved_for_relink="$variables_saved_for_relink"
7370
7371 # Whether libtool must link a program against all its dependency libraries.
7372 link_all_deplibs=$link_all_deplibs
7373
7374 # Compile-time system search path for libraries
7375 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7376
7377 # Run-time system search path for libraries
7378 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7379
7380 # Fix the shell variable \$srcfile for the compiler.
7381 fix_srcfile_path="$fix_srcfile_path"
7382
7383 # Set to yes if exported symbols are required.
7384 always_export_symbols=$always_export_symbols
7385
7386 # The commands to list exported symbols.
7387 export_symbols_cmds=$lt_export_symbols_cmds
7388
7389 # The commands to extract the exported symbol list from a shared archive.
7390 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7391
7392 # Symbols that should not be listed in the preloaded symbols.
7393 exclude_expsyms=$lt_exclude_expsyms
7394
7395 # Symbols that must always be exported.
7396 include_expsyms=$lt_include_expsyms
7397
7398 # ### END LIBTOOL CONFIG
7399
7400 __EOF__
7401
7402   case $host_os in
7403   aix3*)
7404     cat <<\EOF >> "${ofile}T"
7405
7406 # AIX sometimes has problems with the GCC collect2 program.  For some
7407 # reason, if we set the COLLECT_NAMES environment variable, the problems
7408 # vanish in a puff of smoke.
7409 if test "X${COLLECT_NAMES+set}" != Xset; then
7410   COLLECT_NAMES=
7411   export COLLECT_NAMES
7412 fi
7413 EOF
7414     ;;
7415   esac
7416
7417   case $host_os in
7418   cygwin* | mingw* | pw32* | os2*)
7419     cat <<'EOF' >> "${ofile}T"
7420       # This is a source program that is used to create dlls on Windows
7421       # Don't remove nor modify the starting and closing comments
7422 # /* ltdll.c starts here */
7423 # #define WIN32_LEAN_AND_MEAN
7424 # #include <windows.h>
7425 # #undef WIN32_LEAN_AND_MEAN
7426 # #include <stdio.h>
7427 #
7428 # #ifndef __CYGWIN__
7429 # #  ifdef __CYGWIN32__
7430 # #    define __CYGWIN__ __CYGWIN32__
7431 # #  endif
7432 # #endif
7433 #
7434 # #ifdef __cplusplus
7435 # extern "C" {
7436 # #endif
7437 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7438 # #ifdef __cplusplus
7439 # }
7440 # #endif
7441 #
7442 # #ifdef __CYGWIN__
7443 # #include <cygwin/cygwin_dll.h>
7444 # DECLARE_CYGWIN_DLL( DllMain );
7445 # #endif
7446 # HINSTANCE __hDllInstance_base;
7447 #
7448 # BOOL APIENTRY
7449 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7450 # {
7451 #   __hDllInstance_base = hInst;
7452 #   return TRUE;
7453 # }
7454 # /* ltdll.c ends here */
7455         # This is a source program that is used to create import libraries
7456         # on Windows for dlls which lack them. Don't remove nor modify the
7457         # starting and closing comments
7458 # /* impgen.c starts here */
7459 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7460 #
7461 #  This file is part of GNU libtool.
7462 #
7463 #  This program is free software; you can redistribute it and/or modify
7464 #  it under the terms of the GNU General Public License as published by
7465 #  the Free Software Foundation; either version 2 of the License, or
7466 #  (at your option) any later version.
7467 #
7468 #  This program is distributed in the hope that it will be useful,
7469 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7470 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7471 #  GNU General Public License for more details.
7472 #
7473 #  You should have received a copy of the GNU General Public License
7474 #  along with this program; if not, write to the Free Software
7475 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7476 #  */
7477 #
7478 # #include <stdio.h>            /* for printf() */
7479 # #include <unistd.h>           /* for open(), lseek(), read() */
7480 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7481 # #include <string.h>           /* for strdup() */
7482 #
7483 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7484 # #ifndef O_BINARY
7485 # #define O_BINARY 0
7486 # #endif
7487 #
7488 # static unsigned int
7489 # pe_get16 (fd, offset)
7490 #      int fd;
7491 #      int offset;
7492 # {
7493 #   unsigned char b[2];
7494 #   lseek (fd, offset, SEEK_SET);
7495 #   read (fd, b, 2);
7496 #   return b[0] + (b[1]<<8);
7497 # }
7498 #
7499 # static unsigned int
7500 # pe_get32 (fd, offset)
7501 #     int fd;
7502 #     int offset;
7503 # {
7504 #   unsigned char b[4];
7505 #   lseek (fd, offset, SEEK_SET);
7506 #   read (fd, b, 4);
7507 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7508 # }
7509 #
7510 # static unsigned int
7511 # pe_as32 (ptr)
7512 #      void *ptr;
7513 # {
7514 #   unsigned char *b = ptr;
7515 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7516 # }
7517 #
7518 # int
7519 # main (argc, argv)
7520 #     int argc;
7521 #     char *argv[];
7522 # {
7523 #     int dll;
7524 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7525 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7526 #     unsigned long name_rvas, nexp;
7527 #     unsigned char *expdata, *erva;
7528 #     char *filename, *dll_name;
7529 #
7530 #     filename = argv[1];
7531 #
7532 #     dll = open(filename, O_RDONLY|O_BINARY);
7533 #     if (dll < 1)
7534 #       return 1;
7535 #
7536 #     dll_name = filename;
7537 #
7538 #     for (i=0; filename[i]; i++)
7539 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7540 #           dll_name = filename + i +1;
7541 #
7542 #     pe_header_offset = pe_get32 (dll, 0x3c);
7543 #     opthdr_ofs = pe_header_offset + 4 + 20;
7544 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7545 #
7546 #     if (num_entries < 1) /* no exports */
7547 #       return 1;
7548 #
7549 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7550 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7551 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7552 #     secptr = (pe_header_offset + 4 + 20 +
7553 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7554 #
7555 #     expptr = 0;
7556 #     for (i = 0; i < nsections; i++)
7557 #     {
7558 #       char sname[8];
7559 #       unsigned long secptr1 = secptr + 40 * i;
7560 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7561 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7562 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7563 #       lseek(dll, secptr1, SEEK_SET);
7564 #       read(dll, sname, 8);
7565 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7566 #       {
7567 #           expptr = fptr + (export_rva - vaddr);
7568 #           if (export_rva + export_size > vaddr + vsize)
7569 #               export_size = vsize - (export_rva - vaddr);
7570 #           break;
7571 #       }
7572 #     }
7573 #
7574 #     expdata = (unsigned char*)malloc(export_size);
7575 #     lseek (dll, expptr, SEEK_SET);
7576 #     read (dll, expdata, export_size);
7577 #     erva = expdata - export_rva;
7578 #
7579 #     nexp = pe_as32 (expdata+24);
7580 #     name_rvas = pe_as32 (expdata+32);
7581 #
7582 #     printf ("EXPORTS\n");
7583 #     for (i = 0; i<nexp; i++)
7584 #     {
7585 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7586 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7587 #     }
7588 #
7589 #     return 0;
7590 # }
7591 # /* impgen.c ends here */
7592
7593 EOF
7594     ;;
7595   esac
7596
7597   # We use sed instead of cat because bash on DJGPP gets confused if
7598   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7599   # text mode, it properly converts lines to CR/LF.  This bash problem
7600   # is reportedly fixed, but why not run on old versions too?
7601   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7602
7603   mv -f "${ofile}T" "$ofile" || \
7604     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7605   chmod +x "$ofile"
7606 fi
7607
7608
7609
7610
7611
7612 # This can be used to rebuild libtool when needed
7613 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7614
7615 # Always use our own libtool.
7616 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7617
7618 # Prevent multiple expansion
7619
7620
7621
7622 for ac_prog in mawk gawk nawk awk
7623 do
7624 # Extract the first word of "$ac_prog", so it can be a program name with args.
7625 set dummy $ac_prog; ac_word=$2
7626 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7627 echo "configure:7628: checking for $ac_word" >&5
7628 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
7629   echo $ac_n "(cached) $ac_c" 1>&6
7630 else
7631   if test -n "$AWK"; then
7632   ac_cv_prog_AWK="$AWK" # Let the user override the test.
7633 else
7634   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7635   ac_dummy="$PATH"
7636   for ac_dir in $ac_dummy; do
7637     test -z "$ac_dir" && ac_dir=.
7638     if test -f $ac_dir/$ac_word; then
7639       ac_cv_prog_AWK="$ac_prog"
7640       break
7641     fi
7642   done
7643   IFS="$ac_save_ifs"
7644 fi
7645 fi
7646 AWK="$ac_cv_prog_AWK"
7647 if test -n "$AWK"; then
7648   echo "$ac_t""$AWK" 1>&6
7649 else
7650   echo "$ac_t""no" 1>&6
7651 fi
7652
7653 test -n "$AWK" && break
7654 done
7655
7656 # test for ln hardlink support
7657 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7658 echo "configure:7659: checking whether ln works" >&5
7659 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7660   echo $ac_n "(cached) $ac_c" 1>&6
7661 else
7662   rm -f conftest.src conftest.dst
7663 echo "conftest" > conftest.src
7664 if ln conftest.src conftest.dst 2>/dev/null
7665 then
7666   ol_cv_prog_LN_H="ln"
7667 else
7668   ol_cv_prog_LN_H="cp"
7669 fi
7670 rm -f conftest.src conftest.dst
7671
7672 fi
7673 LN_H="$ol_cv_prog_LN_H"
7674 if test "$ol_cv_prog_LN_H" = "ln"; then
7675         echo "$ac_t""yes" 1>&6
7676 else
7677         echo "$ac_t""no" 1>&6
7678 fi
7679
7680 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7681 echo "configure:7682: checking whether ln -s works" >&5
7682 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7683   echo $ac_n "(cached) $ac_c" 1>&6
7684 else
7685   rm -f conftestdata
7686 if ln -s X conftestdata 2>/dev/null
7687 then
7688   rm -f conftestdata
7689   ac_cv_prog_LN_S="ln -s"
7690 else
7691   ac_cv_prog_LN_S=ln
7692 fi
7693 fi
7694 LN_S="$ac_cv_prog_LN_S"
7695 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7696   echo "$ac_t""yes" 1>&6
7697 else
7698   echo "$ac_t""no" 1>&6
7699 fi
7700
7701
7702 # Extract the first word of "sendmail", so it can be a program name with args.
7703 set dummy sendmail; ac_word=$2
7704 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7705 echo "configure:7706: checking for $ac_word" >&5
7706 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
7707   echo $ac_n "(cached) $ac_c" 1>&6
7708 else
7709   case "$SENDMAIL" in
7710   /*)
7711   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
7712   ;;
7713   ?:/*)
7714   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
7715   ;;
7716   *)
7717   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7718   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
7719   for ac_dir in $ac_dummy; do 
7720     test -z "$ac_dir" && ac_dir=.
7721     if test -f $ac_dir/$ac_word; then
7722       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
7723       break
7724     fi
7725   done
7726   IFS="$ac_save_ifs"
7727   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
7728   ;;
7729 esac
7730 fi
7731 SENDMAIL="$ac_cv_path_SENDMAIL"
7732 if test -n "$SENDMAIL"; then
7733   echo "$ac_t""$SENDMAIL" 1>&6
7734 else
7735   echo "$ac_t""no" 1>&6
7736 fi
7737
7738 # Extract the first word of "vi", so it can be a program name with args.
7739 set dummy vi; ac_word=$2
7740 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7741 echo "configure:7742: checking for $ac_word" >&5
7742 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
7743   echo $ac_n "(cached) $ac_c" 1>&6
7744 else
7745   case "$EDITOR" in
7746   /*)
7747   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
7748   ;;
7749   ?:/*)
7750   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
7751   ;;
7752   *)
7753   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7754   ac_dummy="$PATH:/usr/ucb"
7755   for ac_dir in $ac_dummy; do 
7756     test -z "$ac_dir" && ac_dir=.
7757     if test -f $ac_dir/$ac_word; then
7758       ac_cv_path_EDITOR="$ac_dir/$ac_word"
7759       break
7760     fi
7761   done
7762   IFS="$ac_save_ifs"
7763   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
7764   ;;
7765 esac
7766 fi
7767 EDITOR="$ac_cv_path_EDITOR"
7768 if test -n "$EDITOR"; then
7769   echo "$ac_t""$EDITOR" 1>&6
7770 else
7771   echo "$ac_t""no" 1>&6
7772 fi
7773
7774
7775 ol_link_perl=no
7776 if test $ol_enable_perl != no ; then
7777         # Extract the first word of "perl", so it can be a program name with args.
7778 set dummy perl; ac_word=$2
7779 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7780 echo "configure:7781: checking for $ac_word" >&5
7781 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7782   echo $ac_n "(cached) $ac_c" 1>&6
7783 else
7784   case "$PERLBIN" in
7785   /*)
7786   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7787   ;;
7788   ?:/*)
7789   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7790   ;;
7791   *)
7792   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7793   ac_dummy="$PATH"
7794   for ac_dir in $ac_dummy; do 
7795     test -z "$ac_dir" && ac_dir=.
7796     if test -f $ac_dir/$ac_word; then
7797       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7798       break
7799     fi
7800   done
7801   IFS="$ac_save_ifs"
7802   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7803   ;;
7804 esac
7805 fi
7806 PERLBIN="$ac_cv_path_PERLBIN"
7807 if test -n "$PERLBIN"; then
7808   echo "$ac_t""$PERLBIN" 1>&6
7809 else
7810   echo "$ac_t""no" 1>&6
7811 fi
7812
7813
7814         if test "no$PERLBIN" = "no" ; then
7815                 if test $ol_enable_perl = yes ; then
7816                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7817                 fi
7818
7819         else
7820                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7821                 if test x"$ol_with_perl_module" = "xstatic" ; then
7822                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7823                 else
7824                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7825                 fi
7826                                 ol_link_perl=yes
7827         fi
7828 fi
7829
7830 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7831 echo "configure:7832: checking how to run the C preprocessor" >&5
7832 # On Suns, sometimes $CPP names a directory.
7833 if test -n "$CPP" && test -d "$CPP"; then
7834   CPP=
7835 fi
7836 if test -z "$CPP"; then
7837 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7838   echo $ac_n "(cached) $ac_c" 1>&6
7839 else
7840     # This must be in double quotes, not single quotes, because CPP may get
7841   # substituted into the Makefile and "${CC-cc}" will confuse make.
7842   CPP="${CC-cc} -E"
7843   # On the NeXT, cc -E runs the code through the compiler's parser,
7844   # not just through cpp.
7845   cat > conftest.$ac_ext <<EOF
7846 #line 7847 "configure"
7847 #include "confdefs.h"
7848 #include <assert.h>
7849 Syntax Error
7850 EOF
7851 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7852 { (eval echo configure:7853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7853 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7854 if test -z "$ac_err"; then
7855   :
7856 else
7857   echo "$ac_err" >&5
7858   echo "configure: failed program was:" >&5
7859   cat conftest.$ac_ext >&5
7860   rm -rf conftest*
7861   CPP="${CC-cc} -E -traditional-cpp"
7862   cat > conftest.$ac_ext <<EOF
7863 #line 7864 "configure"
7864 #include "confdefs.h"
7865 #include <assert.h>
7866 Syntax Error
7867 EOF
7868 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7869 { (eval echo configure:7870: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7870 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7871 if test -z "$ac_err"; then
7872   :
7873 else
7874   echo "$ac_err" >&5
7875   echo "configure: failed program was:" >&5
7876   cat conftest.$ac_ext >&5
7877   rm -rf conftest*
7878   CPP="${CC-cc} -nologo -E"
7879   cat > conftest.$ac_ext <<EOF
7880 #line 7881 "configure"
7881 #include "confdefs.h"
7882 #include <assert.h>
7883 Syntax Error
7884 EOF
7885 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7886 { (eval echo configure:7887: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7887 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7888 if test -z "$ac_err"; then
7889   :
7890 else
7891   echo "$ac_err" >&5
7892   echo "configure: failed program was:" >&5
7893   cat conftest.$ac_ext >&5
7894   rm -rf conftest*
7895   CPP=/lib/cpp
7896 fi
7897 rm -f conftest*
7898 fi
7899 rm -f conftest*
7900 fi
7901 rm -f conftest*
7902   ac_cv_prog_CPP="$CPP"
7903 fi
7904   CPP="$ac_cv_prog_CPP"
7905 else
7906   ac_cv_prog_CPP="$CPP"
7907 fi
7908 echo "$ac_t""$CPP" 1>&6
7909
7910
7911 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
7912         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
7913
7914 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
7915         echo "configure: warning: programs compiled here do run here..." 1>&2
7916         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
7917
7918 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
7919         echo "configure: warning: programs compiled here do not run here..." 1>&2
7920         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
7921 fi
7922
7923
7924 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7925 echo "configure:7926: checking for Cygwin environment" >&5
7926 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7927   echo $ac_n "(cached) $ac_c" 1>&6
7928 else
7929   cat > conftest.$ac_ext <<EOF
7930 #line 7931 "configure"
7931 #include "confdefs.h"
7932
7933 int main() {
7934
7935 #ifndef __CYGWIN__
7936 #define __CYGWIN__ __CYGWIN32__
7937 #endif
7938 return __CYGWIN__;
7939 ; return 0; }
7940 EOF
7941 if { (eval echo configure:7942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7942   rm -rf conftest*
7943   ac_cv_cygwin=yes
7944 else
7945   echo "configure: failed program was:" >&5
7946   cat conftest.$ac_ext >&5
7947   rm -rf conftest*
7948   ac_cv_cygwin=no
7949 fi
7950 rm -f conftest*
7951 fi
7952
7953 echo "$ac_t""$ac_cv_cygwin" 1>&6
7954 CYGWIN=
7955 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7956 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7957 echo "configure:7958: checking for mingw32 environment" >&5
7958 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7959   echo $ac_n "(cached) $ac_c" 1>&6
7960 else
7961   cat > conftest.$ac_ext <<EOF
7962 #line 7963 "configure"
7963 #include "confdefs.h"
7964
7965 int main() {
7966 return __MINGW32__;
7967 ; return 0; }
7968 EOF
7969 if { (eval echo configure:7970: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7970   rm -rf conftest*
7971   ac_cv_mingw32=yes
7972 else
7973   echo "configure: failed program was:" >&5
7974   cat conftest.$ac_ext >&5
7975   rm -rf conftest*
7976   ac_cv_mingw32=no
7977 fi
7978 rm -f conftest*
7979 fi
7980
7981 echo "$ac_t""$ac_cv_mingw32" 1>&6
7982 MINGW32=
7983 test "$ac_cv_mingw32" = yes && MINGW32=yes
7984
7985
7986
7987 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
7988 echo "configure:7989: checking for executable suffix" >&5
7989 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
7990   echo $ac_n "(cached) $ac_c" 1>&6
7991 else
7992   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
7993   ac_cv_exeext=.exe
7994 else
7995   rm -f conftest*
7996   echo 'int main () { return 0; }' > conftest.$ac_ext
7997   ac_cv_exeext=
7998   if { (eval echo configure:7999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
7999     for file in conftest.*; do
8000       case $file in
8001       *.c | *.C | *.o | *.obj | *.xcoff) ;;
8002       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8003       esac
8004     done
8005   else
8006     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8007   fi
8008   rm -f conftest*
8009   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8010 fi
8011 fi
8012
8013 EXEEXT=""
8014 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8015 echo "$ac_t""${ac_cv_exeext}" 1>&6
8016 ac_exeext=$EXEEXT
8017
8018 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8019 echo "configure:8020: checking for object suffix" >&5
8020 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8021   echo $ac_n "(cached) $ac_c" 1>&6
8022 else
8023   rm -f conftest*
8024 echo 'int i = 1;' > conftest.$ac_ext
8025 if { (eval echo configure:8026: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8026   for ac_file in conftest.*; do
8027     case $ac_file in
8028     *.c) ;;
8029     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8030     esac
8031   done
8032 else
8033   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8034 fi
8035 rm -f conftest*
8036 fi
8037
8038 echo "$ac_t""$ac_cv_objext" 1>&6
8039 OBJEXT=$ac_cv_objext
8040 ac_objext=$ac_cv_objext
8041
8042
8043 cat >> confdefs.h <<EOF
8044 #define EXEEXT "${EXEEXT}"
8045 EOF
8046
8047
8048 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8049 echo "configure:8050: checking for be_app in -lbe" >&5
8050 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8051 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8052   echo $ac_n "(cached) $ac_c" 1>&6
8053 else
8054   ac_save_LIBS="$LIBS"
8055 LIBS="-lbe -lroot -lnet $LIBS"
8056 cat > conftest.$ac_ext <<EOF
8057 #line 8058 "configure"
8058 #include "confdefs.h"
8059 /* Override any gcc2 internal prototype to avoid an error.  */
8060 /* We use char because int might match the return type of a gcc2
8061     builtin and then its argument prototype would still apply.  */
8062 char be_app();
8063
8064 int main() {
8065 be_app()
8066 ; return 0; }
8067 EOF
8068 if { (eval echo configure:8069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8069   rm -rf conftest*
8070   eval "ac_cv_lib_$ac_lib_var=yes"
8071 else
8072   echo "configure: failed program was:" >&5
8073   cat conftest.$ac_ext >&5
8074   rm -rf conftest*
8075   eval "ac_cv_lib_$ac_lib_var=no"
8076 fi
8077 rm -f conftest*
8078 LIBS="$ac_save_LIBS"
8079
8080 fi
8081 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8082   echo "$ac_t""yes" 1>&6
8083   LIBS="$LIBS -lbe -lroot -lnet"
8084 else
8085   echo "$ac_t""no" 1>&6
8086 :
8087 fi
8088
8089
8090
8091
8092
8093 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8094 echo "configure:8095: checking for ${CC-cc} option to accept ANSI C" >&5
8095 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8096   echo $ac_n "(cached) $ac_c" 1>&6
8097 else
8098   am_cv_prog_cc_stdc=no
8099 ac_save_CC="$CC"
8100 # Don't try gcc -ansi; that turns off useful extensions and
8101 # breaks some systems' header files.
8102 # AIX                   -qlanglvl=ansi
8103 # Ultrix and OSF/1      -std1
8104 # HP-UX 10.20 and later -Ae
8105 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8106 # SVR4                  -Xc -D__EXTENSIONS__
8107 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8108 do
8109   CC="$ac_save_CC $ac_arg"
8110   cat > conftest.$ac_ext <<EOF
8111 #line 8112 "configure"
8112 #include "confdefs.h"
8113 #include <stdarg.h>
8114 #include <stdio.h>
8115 #include <sys/types.h>
8116 #include <sys/stat.h>
8117 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8118 struct buf { int x; };
8119 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8120 static char *e (p, i)
8121      char **p;
8122      int i;
8123 {
8124   return p[i];
8125 }
8126 static char *f (char * (*g) (char **, int), char **p, ...)
8127 {
8128   char *s;
8129   va_list v;
8130   va_start (v,p);
8131   s = g (p, va_arg (v,int));
8132   va_end (v);
8133   return s;
8134 }
8135 int test (int i, double x);
8136 struct s1 {int (*f) (int a);};
8137 struct s2 {int (*f) (double a);};
8138 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8139 int argc;
8140 char **argv;
8141
8142 int main() {
8143
8144 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8145
8146 ; return 0; }
8147 EOF
8148 if { (eval echo configure:8149: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8149   rm -rf conftest*
8150   am_cv_prog_cc_stdc="$ac_arg"; break
8151 else
8152   echo "configure: failed program was:" >&5
8153   cat conftest.$ac_ext >&5
8154 fi
8155 rm -f conftest*
8156 done
8157 CC="$ac_save_CC"
8158
8159 fi
8160
8161 if test -z "$am_cv_prog_cc_stdc"; then
8162   echo "$ac_t""none needed" 1>&6
8163 else
8164   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8165 fi
8166 case "x$am_cv_prog_cc_stdc" in
8167   x|xno) ;;
8168   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8169 esac
8170
8171 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8172         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8173 fi
8174
8175 # test for make depend flag
8176 OL_MKDEP=
8177 OL_MKDEP_FLAGS=
8178 if test -z "${MKDEP}"; then
8179         OL_MKDEP="${CC-cc}"
8180         if test -z "${MKDEP_FLAGS}"; then
8181                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8182 echo "configure:8183: checking for ${OL_MKDEP} depend flag" >&5
8183 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8184   echo $ac_n "(cached) $ac_c" 1>&6
8185 else
8186   
8187                         ol_cv_mkdep=no
8188                         for flag in "-M" "-xM"; do
8189                                 cat > conftest.c <<EOF
8190  noCode;
8191 EOF
8192                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8193: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8193                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8194                                 then
8195                                         if test ! -f conftest."${ac_object}" ; then
8196                                                 ol_cv_mkdep=$flag
8197                                                 OL_MKDEP_FLAGS="$flag"
8198                                                 break
8199                                         fi
8200                                 fi
8201                         done
8202                         rm -f conftest*
8203                 
8204 fi
8205
8206 echo "$ac_t""$ol_cv_mkdep" 1>&6
8207         else
8208                 cc_cv_mkdep=yes
8209                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8210         fi
8211 else
8212         cc_cv_mkdep=yes
8213         OL_MKDEP="${MKDEP}"
8214         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8215 fi
8216
8217
8218
8219 if test "${ol_cv_mkdep}" = no ; then
8220         # this will soon become an error
8221         echo "configure: warning: do not know how to generate dependencies" 1>&2
8222 fi
8223
8224 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8225 echo "configure:8226: checking for afopen in -ls" >&5
8226 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8227 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8228   echo $ac_n "(cached) $ac_c" 1>&6
8229 else
8230   ac_save_LIBS="$LIBS"
8231 LIBS="-ls  $LIBS"
8232 cat > conftest.$ac_ext <<EOF
8233 #line 8234 "configure"
8234 #include "confdefs.h"
8235 /* Override any gcc2 internal prototype to avoid an error.  */
8236 /* We use char because int might match the return type of a gcc2
8237     builtin and then its argument prototype would still apply.  */
8238 char afopen();
8239
8240 int main() {
8241 afopen()
8242 ; return 0; }
8243 EOF
8244 if { (eval echo configure:8245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8245   rm -rf conftest*
8246   eval "ac_cv_lib_$ac_lib_var=yes"
8247 else
8248   echo "configure: failed program was:" >&5
8249   cat conftest.$ac_ext >&5
8250   rm -rf conftest*
8251   eval "ac_cv_lib_$ac_lib_var=no"
8252 fi
8253 rm -f conftest*
8254 LIBS="$ac_save_LIBS"
8255
8256 fi
8257 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8258   echo "$ac_t""yes" 1>&6
8259   
8260         AUTH_LIBS=-ls
8261         cat >> confdefs.h <<\EOF
8262 #define HAVE_AIX_SECURITY 1
8263 EOF
8264
8265
8266 else
8267   echo "$ac_t""no" 1>&6
8268 fi
8269
8270
8271
8272 ol_link_modules=no
8273 if test $ol_enable_modules != no ; then
8274         for ac_hdr in ltdl.h
8275 do
8276 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8277 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8278 echo "configure:8279: checking for $ac_hdr" >&5
8279 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8280   echo $ac_n "(cached) $ac_c" 1>&6
8281 else
8282   cat > conftest.$ac_ext <<EOF
8283 #line 8284 "configure"
8284 #include "confdefs.h"
8285 #include <$ac_hdr>
8286 EOF
8287 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8288 { (eval echo configure:8289: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8289 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8290 if test -z "$ac_err"; then
8291   rm -rf conftest*
8292   eval "ac_cv_header_$ac_safe=yes"
8293 else
8294   echo "$ac_err" >&5
8295   echo "configure: failed program was:" >&5
8296   cat conftest.$ac_ext >&5
8297   rm -rf conftest*
8298   eval "ac_cv_header_$ac_safe=no"
8299 fi
8300 rm -f conftest*
8301 fi
8302 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8303   echo "$ac_t""yes" 1>&6
8304     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8305   cat >> confdefs.h <<EOF
8306 #define $ac_tr_hdr 1
8307 EOF
8308  
8309 else
8310   echo "$ac_t""no" 1>&6
8311 fi
8312 done
8313
8314
8315         if test $ac_cv_header_ltdl_h = no ; then
8316                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8317         fi
8318
8319         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8320 echo "configure:8321: checking for lt_dlinit in -lltdl" >&5
8321 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8322 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8323   echo $ac_n "(cached) $ac_c" 1>&6
8324 else
8325   ac_save_LIBS="$LIBS"
8326 LIBS="-lltdl  $LIBS"
8327 cat > conftest.$ac_ext <<EOF
8328 #line 8329 "configure"
8329 #include "confdefs.h"
8330 /* Override any gcc2 internal prototype to avoid an error.  */
8331 /* We use char because int might match the return type of a gcc2
8332     builtin and then its argument prototype would still apply.  */
8333 char lt_dlinit();
8334
8335 int main() {
8336 lt_dlinit()
8337 ; return 0; }
8338 EOF
8339 if { (eval echo configure:8340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8340   rm -rf conftest*
8341   eval "ac_cv_lib_$ac_lib_var=yes"
8342 else
8343   echo "configure: failed program was:" >&5
8344   cat conftest.$ac_ext >&5
8345   rm -rf conftest*
8346   eval "ac_cv_lib_$ac_lib_var=no"
8347 fi
8348 rm -f conftest*
8349 LIBS="$ac_save_LIBS"
8350
8351 fi
8352 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8353   echo "$ac_t""yes" 1>&6
8354   
8355                 MODULES_LIBS=-lltdl
8356                 cat >> confdefs.h <<\EOF
8357 #define HAVE_LIBLTDL 1
8358 EOF
8359
8360         
8361 else
8362   echo "$ac_t""no" 1>&6
8363 fi
8364
8365
8366         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8367                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8368         fi
8369         ol_link_modules=yes
8370 else
8371         ol_with_bdb_module=static
8372         ol_with_dnssrv_module=static
8373         ol_with_ldap_module=static
8374         ol_with_ldbm_module=static
8375         ol_with_meta_module=static
8376         ol_with_monitor_module=static
8377         ol_with_null_module=static
8378         ol_with_passwd_module=static
8379         ol_with_perl_module=static
8380         ol_with_shell_module=static
8381         ol_with_sql_module=static
8382 fi
8383
8384 # test for EBCDIC
8385 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8386 echo "configure:8387: checking for EBCDIC" >&5
8387 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8388   echo $ac_n "(cached) $ac_c" 1>&6
8389 else
8390   
8391         cat > conftest.$ac_ext <<EOF
8392 #line 8393 "configure"
8393 #include "confdefs.h"
8394
8395 #if !('M' == 0xd4)
8396 #include <__ASCII__/generate_error.h>
8397 #endif
8398
8399 EOF
8400 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8401 { (eval echo configure:8402: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8402 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8403 if test -z "$ac_err"; then
8404   rm -rf conftest*
8405   ol_cv_cpp_ebcdic=yes
8406 else
8407   echo "$ac_err" >&5
8408   echo "configure: failed program was:" >&5
8409   cat conftest.$ac_ext >&5
8410   rm -rf conftest*
8411   ol_cv_cpp_ebcdic=no
8412 fi
8413 rm -f conftest*
8414 fi
8415
8416 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8417 if test $ol_cv_cpp_ebcdic = yes ; then
8418         cat >> confdefs.h <<\EOF
8419 #define HAVE_EBCDIC 1
8420 EOF
8421
8422 fi
8423
8424 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8425 echo "configure:8426: checking for ANSI C header files" >&5
8426 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8427   echo $ac_n "(cached) $ac_c" 1>&6
8428 else
8429   cat > conftest.$ac_ext <<EOF
8430 #line 8431 "configure"
8431 #include "confdefs.h"
8432 #include <stdlib.h>
8433 #include <stdarg.h>
8434 #include <string.h>
8435 #include <float.h>
8436 EOF
8437 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8438 { (eval echo configure:8439: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8439 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8440 if test -z "$ac_err"; then
8441   rm -rf conftest*
8442   ol_cv_header_stdc=yes
8443 else
8444   echo "$ac_err" >&5
8445   echo "configure: failed program was:" >&5
8446   cat conftest.$ac_ext >&5
8447   rm -rf conftest*
8448   ol_cv_header_stdc=no
8449 fi
8450 rm -f conftest*
8451
8452 if test $ol_cv_header_stdc = yes; then
8453   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8454 cat > conftest.$ac_ext <<EOF
8455 #line 8456 "configure"
8456 #include "confdefs.h"
8457 #include <string.h>
8458 EOF
8459 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8460   egrep "memchr" >/dev/null 2>&1; then
8461   :
8462 else
8463   rm -rf conftest*
8464   ol_cv_header_stdc=no
8465 fi
8466 rm -f conftest*
8467
8468 fi
8469
8470 if test $ol_cv_header_stdc = yes; then
8471   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8472 cat > conftest.$ac_ext <<EOF
8473 #line 8474 "configure"
8474 #include "confdefs.h"
8475 #include <stdlib.h>
8476 EOF
8477 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8478   egrep "free" >/dev/null 2>&1; then
8479   :
8480 else
8481   rm -rf conftest*
8482   ol_cv_header_stdc=no
8483 fi
8484 rm -f conftest*
8485
8486 fi
8487
8488 if test $ol_cv_header_stdc = yes; then
8489   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8490 if test "$cross_compiling" = yes; then
8491   :
8492 else
8493   cat > conftest.$ac_ext <<EOF
8494 #line 8495 "configure"
8495 #include "confdefs.h"
8496 #include <ctype.h>
8497 #ifndef HAVE_EBCDIC
8498 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8499 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8500 #else
8501 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8502                 || ('j' <= (c) && (c) <= 'r') \
8503                 || ('s' <= (c) && (c) <= 'z'))
8504 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8505 #endif
8506 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8507 int main () { int i; for (i = 0; i < 256; i++)
8508 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8509 exit (0); }
8510
8511 EOF
8512 if { (eval echo configure:8513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8513 then
8514   :
8515 else
8516   echo "configure: failed program was:" >&5
8517   cat conftest.$ac_ext >&5
8518   rm -fr conftest*
8519   ol_cv_header_stdc=no
8520 fi
8521 rm -fr conftest*
8522 fi
8523
8524 fi
8525 fi
8526
8527 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8528 if test $ol_cv_header_stdc = yes; then
8529   cat >> confdefs.h <<\EOF
8530 #define STDC_HEADERS 1
8531 EOF
8532
8533 fi
8534 ac_cv_header_stdc=disable
8535
8536
8537 if test $ol_cv_header_stdc != yes; then
8538         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8539 fi
8540
8541 ac_header_dirent=no
8542 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8543 do
8544 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8545 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8546 echo "configure:8547: checking for $ac_hdr that defines DIR" >&5
8547 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8548   echo $ac_n "(cached) $ac_c" 1>&6
8549 else
8550   cat > conftest.$ac_ext <<EOF
8551 #line 8552 "configure"
8552 #include "confdefs.h"
8553 #include <sys/types.h>
8554 #include <$ac_hdr>
8555 int main() {
8556 DIR *dirp = 0;
8557 ; return 0; }
8558 EOF
8559 if { (eval echo configure:8560: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8560   rm -rf conftest*
8561   eval "ac_cv_header_dirent_$ac_safe=yes"
8562 else
8563   echo "configure: failed program was:" >&5
8564   cat conftest.$ac_ext >&5
8565   rm -rf conftest*
8566   eval "ac_cv_header_dirent_$ac_safe=no"
8567 fi
8568 rm -f conftest*
8569 fi
8570 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8571   echo "$ac_t""yes" 1>&6
8572     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8573   cat >> confdefs.h <<EOF
8574 #define $ac_tr_hdr 1
8575 EOF
8576  ac_header_dirent=$ac_hdr; break
8577 else
8578   echo "$ac_t""no" 1>&6
8579 fi
8580 done
8581 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8582 if test $ac_header_dirent = dirent.h; then
8583 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8584 echo "configure:8585: checking for opendir in -ldir" >&5
8585 ac_lib_var=`echo dir'_'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="-ldir  $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 -ldir"
8619 else
8620   echo "$ac_t""no" 1>&6
8621 fi
8622
8623 else
8624 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8625 echo "configure:8626: checking for opendir in -lx" >&5
8626 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8627 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8628   echo $ac_n "(cached) $ac_c" 1>&6
8629 else
8630   ac_save_LIBS="$LIBS"
8631 LIBS="-lx  $LIBS"
8632 cat > conftest.$ac_ext <<EOF
8633 #line 8634 "configure"
8634 #include "confdefs.h"
8635 /* Override any gcc2 internal prototype to avoid an error.  */
8636 /* We use char because int might match the return type of a gcc2
8637     builtin and then its argument prototype would still apply.  */
8638 char opendir();
8639
8640 int main() {
8641 opendir()
8642 ; return 0; }
8643 EOF
8644 if { (eval echo configure:8645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8645   rm -rf conftest*
8646   eval "ac_cv_lib_$ac_lib_var=yes"
8647 else
8648   echo "configure: failed program was:" >&5
8649   cat conftest.$ac_ext >&5
8650   rm -rf conftest*
8651   eval "ac_cv_lib_$ac_lib_var=no"
8652 fi
8653 rm -f conftest*
8654 LIBS="$ac_save_LIBS"
8655
8656 fi
8657 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8658   echo "$ac_t""yes" 1>&6
8659   LIBS="$LIBS -lx"
8660 else
8661   echo "$ac_t""no" 1>&6
8662 fi
8663
8664 fi
8665
8666 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8667 echo "configure:8668: checking for sys/wait.h that is POSIX.1 compatible" >&5
8668 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8669   echo $ac_n "(cached) $ac_c" 1>&6
8670 else
8671   cat > conftest.$ac_ext <<EOF
8672 #line 8673 "configure"
8673 #include "confdefs.h"
8674 #include <sys/types.h>
8675 #include <sys/wait.h>
8676 #ifndef WEXITSTATUS
8677 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8678 #endif
8679 #ifndef WIFEXITED
8680 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8681 #endif
8682 int main() {
8683 int s;
8684 wait (&s);
8685 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8686 ; return 0; }
8687 EOF
8688 if { (eval echo configure:8689: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8689   rm -rf conftest*
8690   ac_cv_header_sys_wait_h=yes
8691 else
8692   echo "configure: failed program was:" >&5
8693   cat conftest.$ac_ext >&5
8694   rm -rf conftest*
8695   ac_cv_header_sys_wait_h=no
8696 fi
8697 rm -f conftest*
8698 fi
8699
8700 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8701 if test $ac_cv_header_sys_wait_h = yes; then
8702   cat >> confdefs.h <<\EOF
8703 #define HAVE_SYS_WAIT_H 1
8704 EOF
8705
8706 fi
8707
8708 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8709 echo "configure:8710: checking POSIX termios" >&5
8710 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8711   echo $ac_n "(cached) $ac_c" 1>&6
8712 else
8713   cat > conftest.$ac_ext <<EOF
8714 #line 8715 "configure"
8715 #include "confdefs.h"
8716 #include <sys/types.h>
8717 #include <unistd.h>
8718 #include <termios.h>
8719 int main() {
8720 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8721    tcgetattr(0, 0);
8722 ; return 0; }
8723 EOF
8724 if { (eval echo configure:8725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8725   rm -rf conftest*
8726   am_cv_sys_posix_termios=yes
8727 else
8728   echo "configure: failed program was:" >&5
8729   cat conftest.$ac_ext >&5
8730   rm -rf conftest*
8731   am_cv_sys_posix_termios=no
8732 fi
8733 rm -f conftest*
8734 fi
8735
8736 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8737
8738
8739  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8740 echo "configure:8741: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8741 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8742   echo $ac_n "(cached) $ac_c" 1>&6
8743 else
8744   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8745
8746   gwinsz_in_termios_h=no
8747   if test $am_cv_sys_posix_termios = yes; then
8748     cat > conftest.$ac_ext <<EOF
8749 #line 8750 "configure"
8750 #include "confdefs.h"
8751 #include <sys/types.h>
8752 #     include <termios.h>
8753 #     ifdef TIOCGWINSZ
8754         yes
8755 #     endif
8756     
8757 EOF
8758 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8759   egrep "yes" >/dev/null 2>&1; then
8760   rm -rf conftest*
8761   gwinsz_in_termios_h=yes
8762 fi
8763 rm -f conftest*
8764
8765   fi
8766
8767   if test $gwinsz_in_termios_h = no; then
8768     cat > conftest.$ac_ext <<EOF
8769 #line 8770 "configure"
8770 #include "confdefs.h"
8771 #include <sys/types.h>
8772 #     include <sys/ioctl.h>
8773 #     ifdef TIOCGWINSZ
8774         yes
8775 #     endif
8776     
8777 EOF
8778 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8779   egrep "yes" >/dev/null 2>&1; then
8780   rm -rf conftest*
8781   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8782 fi
8783 rm -f conftest*
8784
8785   fi
8786   
8787 fi
8788
8789 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8790   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8791     cat >> confdefs.h <<\EOF
8792 #define GWINSZ_IN_SYS_IOCTL 1
8793 EOF
8794
8795   fi
8796
8797 if test $am_cv_sys_posix_termios = yes ; then
8798         cat >> confdefs.h <<\EOF
8799 #define HAVE_POSIX_TERMIOS 1
8800 EOF
8801
8802 fi
8803
8804 for ac_hdr in \
8805         arpa/inet.h             \
8806         arpa/nameser.h  \
8807         assert.h                \
8808         conio.h                 \
8809         crypt.h                 \
8810         direct.h                \
8811         errno.h                 \
8812         fcntl.h                 \
8813         filio.h                 \
8814         getopt.h                \
8815         grp.h                   \
8816         io.h                    \
8817         libutil.h               \
8818         limits.h                \
8819         locale.h                \
8820         netinet/tcp.h   \
8821         malloc.h                \
8822         memory.h                \
8823         psap.h                  \
8824         pwd.h                   \
8825         process.h               \
8826         resolv.h                \
8827         sgtty.h                 \
8828         shadow.h                \
8829         stddef.h                \
8830         string.h                \
8831         strings.h               \
8832         sysexits.h              \
8833         sys/file.h              \
8834         sys/filio.h             \
8835         sys/errno.h             \
8836         sys/ioctl.h             \
8837         sys/param.h             \
8838         sys/resource.h  \
8839         sys/select.h    \
8840         sys/socket.h    \
8841         sys/syslog.h    \
8842         sys/time.h              \
8843         sys/types.h             \
8844         syslog.h                \
8845         termios.h               \
8846         unistd.h                \
8847         winsock.h               \
8848         winsock2.h              \
8849
8850 do
8851 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8852 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8853 echo "configure:8854: checking for $ac_hdr" >&5
8854 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8855   echo $ac_n "(cached) $ac_c" 1>&6
8856 else
8857   cat > conftest.$ac_ext <<EOF
8858 #line 8859 "configure"
8859 #include "confdefs.h"
8860 #include <$ac_hdr>
8861 EOF
8862 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8863 { (eval echo configure:8864: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8864 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8865 if test -z "$ac_err"; then
8866   rm -rf conftest*
8867   eval "ac_cv_header_$ac_safe=yes"
8868 else
8869   echo "$ac_err" >&5
8870   echo "configure: failed program was:" >&5
8871   cat conftest.$ac_ext >&5
8872   rm -rf conftest*
8873   eval "ac_cv_header_$ac_safe=no"
8874 fi
8875 rm -f conftest*
8876 fi
8877 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8878   echo "$ac_t""yes" 1>&6
8879     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8880   cat >> confdefs.h <<EOF
8881 #define $ac_tr_hdr 1
8882 EOF
8883  
8884 else
8885   echo "$ac_t""no" 1>&6
8886 fi
8887 done
8888
8889
8890
8891
8892 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
8893 echo "configure:8894: checking for dlopen" >&5
8894 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
8895   echo $ac_n "(cached) $ac_c" 1>&6
8896 else
8897   cat > conftest.$ac_ext <<EOF
8898 #line 8899 "configure"
8899 #include "confdefs.h"
8900 /* System header to define __stub macros and hopefully few prototypes,
8901     which can conflict with char dlopen(); below.  */
8902 #include <assert.h>
8903 /* Override any gcc2 internal prototype to avoid an error.  */
8904 /* We use char because int might match the return type of a gcc2
8905     builtin and then its argument prototype would still apply.  */
8906 char dlopen();
8907 char (*f)();
8908
8909 int main() {
8910
8911 /* The GNU C library defines this for functions which it implements
8912     to always fail with ENOSYS.  Some functions are actually named
8913     something starting with __ and the normal name is an alias.  */
8914 #if defined (__stub_dlopen) || defined (__stub___dlopen)
8915 choke me
8916 #else
8917 f = dlopen;
8918 #endif
8919
8920 ; return 0; }
8921 EOF
8922 if { (eval echo configure:8923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8923   rm -rf conftest*
8924   eval "ac_cv_func_dlopen=yes"
8925 else
8926   echo "configure: failed program was:" >&5
8927   cat conftest.$ac_ext >&5
8928   rm -rf conftest*
8929   eval "ac_cv_func_dlopen=no"
8930 fi
8931 rm -f conftest*
8932 fi
8933
8934 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
8935   echo "$ac_t""yes" 1>&6
8936   :
8937 else
8938   echo "$ac_t""no" 1>&6
8939 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
8940 echo "configure:8941: checking for dlopen in -ldl" >&5
8941 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
8942 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8943   echo $ac_n "(cached) $ac_c" 1>&6
8944 else
8945   ac_save_LIBS="$LIBS"
8946 LIBS="-ldl  $LIBS"
8947 cat > conftest.$ac_ext <<EOF
8948 #line 8949 "configure"
8949 #include "confdefs.h"
8950 /* Override any gcc2 internal prototype to avoid an error.  */
8951 /* We use char because int might match the return type of a gcc2
8952     builtin and then its argument prototype would still apply.  */
8953 char dlopen();
8954
8955 int main() {
8956 dlopen()
8957 ; return 0; }
8958 EOF
8959 if { (eval echo configure:8960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8960   rm -rf conftest*
8961   eval "ac_cv_lib_$ac_lib_var=yes"
8962 else
8963   echo "configure: failed program was:" >&5
8964   cat conftest.$ac_ext >&5
8965   rm -rf conftest*
8966   eval "ac_cv_lib_$ac_lib_var=no"
8967 fi
8968 rm -f conftest*
8969 LIBS="$ac_save_LIBS"
8970
8971 fi
8972 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8973   echo "$ac_t""yes" 1>&6
8974     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8975     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8976   cat >> confdefs.h <<EOF
8977 #define $ac_tr_lib 1
8978 EOF
8979
8980   LIBS="-ldl $LIBS"
8981
8982 else
8983   echo "$ac_t""no" 1>&6
8984 fi
8985
8986 fi
8987
8988
8989 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
8990 echo "configure:8991: checking for sigset in -lV3" >&5
8991 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
8992 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8993   echo $ac_n "(cached) $ac_c" 1>&6
8994 else
8995   ac_save_LIBS="$LIBS"
8996 LIBS="-lV3  $LIBS"
8997 cat > conftest.$ac_ext <<EOF
8998 #line 8999 "configure"
8999 #include "confdefs.h"
9000 /* Override any gcc2 internal prototype to avoid an error.  */
9001 /* We use char because int might match the return type of a gcc2
9002     builtin and then its argument prototype would still apply.  */
9003 char sigset();
9004
9005 int main() {
9006 sigset()
9007 ; return 0; }
9008 EOF
9009 if { (eval echo configure:9010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9010   rm -rf conftest*
9011   eval "ac_cv_lib_$ac_lib_var=yes"
9012 else
9013   echo "configure: failed program was:" >&5
9014   cat conftest.$ac_ext >&5
9015   rm -rf conftest*
9016   eval "ac_cv_lib_$ac_lib_var=no"
9017 fi
9018 rm -f conftest*
9019 LIBS="$ac_save_LIBS"
9020
9021 fi
9022 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9023   echo "$ac_t""yes" 1>&6
9024     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9025     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9026   cat >> confdefs.h <<EOF
9027 #define $ac_tr_lib 1
9028 EOF
9029
9030   LIBS="-lV3 $LIBS"
9031
9032 else
9033   echo "$ac_t""no" 1>&6
9034 fi
9035
9036
9037 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9038 echo "configure:9039: checking for winsock" >&5
9039 save_LIBS="$LIBS"
9040 for curlib in ws2_32 wsock32; do
9041         LIBS="$LIBS -l$curlib"
9042         cat > conftest.$ac_ext <<EOF
9043 #line 9044 "configure"
9044 #include "confdefs.h"
9045
9046                         char socket@12();
9047                         char select@20();
9048                         char closesocket@4();
9049                         char gethostname@8();
9050                         
9051 int main() {
9052
9053                         socket@12();
9054                         select@20();
9055                         closesocket@4();
9056                         gethostname@8();
9057                         
9058 ; return 0; }
9059 EOF
9060 if { (eval echo configure:9061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9061   rm -rf conftest*
9062   have_winsock=yes
9063 else
9064   echo "configure: failed program was:" >&5
9065   cat conftest.$ac_ext >&5
9066   rm -rf conftest*
9067   have_winsock=no
9068 fi
9069 rm -f conftest*
9070
9071         if test $have_winsock = yes; then
9072                 cat >> confdefs.h <<\EOF
9073 #define HAVE_WINSOCK 1
9074 EOF
9075
9076                 ac_cv_func_socket=yes
9077                 ac_cv_func_select=yes
9078                 ac_cv_func_closesocket=yes
9079                 ac_cv_func_gethostname=yes
9080                 if test $curlib = ws2_32; then
9081                         have_winsock=winsock2
9082                         cat >> confdefs.h <<\EOF
9083 #define HAVE_WINSOCK2 1
9084 EOF
9085
9086                 fi
9087                 break
9088         fi
9089         LIBS="$save_LIBS"
9090 done
9091 echo "$ac_t""$have_winsock" 1>&6
9092
9093
9094 echo $ac_n "checking for socket""... $ac_c" 1>&6
9095 echo "configure:9096: checking for socket" >&5
9096 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9097   echo $ac_n "(cached) $ac_c" 1>&6
9098 else
9099   cat > conftest.$ac_ext <<EOF
9100 #line 9101 "configure"
9101 #include "confdefs.h"
9102 /* System header to define __stub macros and hopefully few prototypes,
9103     which can conflict with char socket(); below.  */
9104 #include <assert.h>
9105 /* Override any gcc2 internal prototype to avoid an error.  */
9106 /* We use char because int might match the return type of a gcc2
9107     builtin and then its argument prototype would still apply.  */
9108 char socket();
9109 char (*f)();
9110
9111 int main() {
9112
9113 /* The GNU C library defines this for functions which it implements
9114     to always fail with ENOSYS.  Some functions are actually named
9115     something starting with __ and the normal name is an alias.  */
9116 #if defined (__stub_socket) || defined (__stub___socket)
9117 choke me
9118 #else
9119 f = socket;
9120 #endif
9121
9122 ; return 0; }
9123 EOF
9124 if { (eval echo configure:9125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9125   rm -rf conftest*
9126   eval "ac_cv_func_socket=yes"
9127 else
9128   echo "configure: failed program was:" >&5
9129   cat conftest.$ac_ext >&5
9130   rm -rf conftest*
9131   eval "ac_cv_func_socket=no"
9132 fi
9133 rm -f conftest*
9134 fi
9135
9136 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9137   echo "$ac_t""yes" 1>&6
9138   :
9139 else
9140   echo "$ac_t""no" 1>&6
9141         
9142         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9143 echo "configure:9144: checking for main in -lsocket" >&5
9144 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9145 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9146   echo $ac_n "(cached) $ac_c" 1>&6
9147 else
9148   ac_save_LIBS="$LIBS"
9149 LIBS="-lsocket  $LIBS"
9150 cat > conftest.$ac_ext <<EOF
9151 #line 9152 "configure"
9152 #include "confdefs.h"
9153
9154 int main() {
9155 main()
9156 ; return 0; }
9157 EOF
9158 if { (eval echo configure:9159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9159   rm -rf conftest*
9160   eval "ac_cv_lib_$ac_lib_var=yes"
9161 else
9162   echo "configure: failed program was:" >&5
9163   cat conftest.$ac_ext >&5
9164   rm -rf conftest*
9165   eval "ac_cv_lib_$ac_lib_var=no"
9166 fi
9167 rm -f conftest*
9168 LIBS="$ac_save_LIBS"
9169
9170 fi
9171 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9172   echo "$ac_t""yes" 1>&6
9173     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9174     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9175   cat >> confdefs.h <<EOF
9176 #define $ac_tr_lib 1
9177 EOF
9178
9179   LIBS="-lsocket $LIBS"
9180
9181 else
9182   echo "$ac_t""no" 1>&6
9183 fi
9184
9185         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9186 echo "configure:9187: checking for main in -lnet" >&5
9187 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9188 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9189   echo $ac_n "(cached) $ac_c" 1>&6
9190 else
9191   ac_save_LIBS="$LIBS"
9192 LIBS="-lnet  $LIBS"
9193 cat > conftest.$ac_ext <<EOF
9194 #line 9195 "configure"
9195 #include "confdefs.h"
9196
9197 int main() {
9198 main()
9199 ; return 0; }
9200 EOF
9201 if { (eval echo configure:9202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9202   rm -rf conftest*
9203   eval "ac_cv_lib_$ac_lib_var=yes"
9204 else
9205   echo "configure: failed program was:" >&5
9206   cat conftest.$ac_ext >&5
9207   rm -rf conftest*
9208   eval "ac_cv_lib_$ac_lib_var=no"
9209 fi
9210 rm -f conftest*
9211 LIBS="$ac_save_LIBS"
9212
9213 fi
9214 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9215   echo "$ac_t""yes" 1>&6
9216     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9217     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9218   cat >> confdefs.h <<EOF
9219 #define $ac_tr_lib 1
9220 EOF
9221
9222   LIBS="-lnet $LIBS"
9223
9224 else
9225   echo "$ac_t""no" 1>&6
9226 fi
9227
9228         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9229 echo "configure:9230: checking for main in -lnsl_s" >&5
9230 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9231 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9232   echo $ac_n "(cached) $ac_c" 1>&6
9233 else
9234   ac_save_LIBS="$LIBS"
9235 LIBS="-lnsl_s  $LIBS"
9236 cat > conftest.$ac_ext <<EOF
9237 #line 9238 "configure"
9238 #include "confdefs.h"
9239
9240 int main() {
9241 main()
9242 ; return 0; }
9243 EOF
9244 if { (eval echo configure:9245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9245   rm -rf conftest*
9246   eval "ac_cv_lib_$ac_lib_var=yes"
9247 else
9248   echo "configure: failed program was:" >&5
9249   cat conftest.$ac_ext >&5
9250   rm -rf conftest*
9251   eval "ac_cv_lib_$ac_lib_var=no"
9252 fi
9253 rm -f conftest*
9254 LIBS="$ac_save_LIBS"
9255
9256 fi
9257 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9258   echo "$ac_t""yes" 1>&6
9259     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9260     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9261   cat >> confdefs.h <<EOF
9262 #define $ac_tr_lib 1
9263 EOF
9264
9265   LIBS="-lnsl_s $LIBS"
9266
9267 else
9268   echo "$ac_t""no" 1>&6
9269 fi
9270
9271         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9272 echo "configure:9273: checking for main in -lnsl" >&5
9273 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9274 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9275   echo $ac_n "(cached) $ac_c" 1>&6
9276 else
9277   ac_save_LIBS="$LIBS"
9278 LIBS="-lnsl  $LIBS"
9279 cat > conftest.$ac_ext <<EOF
9280 #line 9281 "configure"
9281 #include "confdefs.h"
9282
9283 int main() {
9284 main()
9285 ; return 0; }
9286 EOF
9287 if { (eval echo configure:9288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9288   rm -rf conftest*
9289   eval "ac_cv_lib_$ac_lib_var=yes"
9290 else
9291   echo "configure: failed program was:" >&5
9292   cat conftest.$ac_ext >&5
9293   rm -rf conftest*
9294   eval "ac_cv_lib_$ac_lib_var=no"
9295 fi
9296 rm -f conftest*
9297 LIBS="$ac_save_LIBS"
9298
9299 fi
9300 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9301   echo "$ac_t""yes" 1>&6
9302     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9303     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9304   cat >> confdefs.h <<EOF
9305 #define $ac_tr_lib 1
9306 EOF
9307
9308   LIBS="-lnsl $LIBS"
9309
9310 else
9311   echo "$ac_t""no" 1>&6
9312 fi
9313
9314         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9315 echo "configure:9316: checking for socket in -linet" >&5
9316 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9317 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9318   echo $ac_n "(cached) $ac_c" 1>&6
9319 else
9320   ac_save_LIBS="$LIBS"
9321 LIBS="-linet  $LIBS"
9322 cat > conftest.$ac_ext <<EOF
9323 #line 9324 "configure"
9324 #include "confdefs.h"
9325 /* Override any gcc2 internal prototype to avoid an error.  */
9326 /* We use char because int might match the return type of a gcc2
9327     builtin and then its argument prototype would still apply.  */
9328 char socket();
9329
9330 int main() {
9331 socket()
9332 ; return 0; }
9333 EOF
9334 if { (eval echo configure:9335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9335   rm -rf conftest*
9336   eval "ac_cv_lib_$ac_lib_var=yes"
9337 else
9338   echo "configure: failed program was:" >&5
9339   cat conftest.$ac_ext >&5
9340   rm -rf conftest*
9341   eval "ac_cv_lib_$ac_lib_var=no"
9342 fi
9343 rm -f conftest*
9344 LIBS="$ac_save_LIBS"
9345
9346 fi
9347 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9348   echo "$ac_t""yes" 1>&6
9349     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9350     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9351   cat >> confdefs.h <<EOF
9352 #define $ac_tr_lib 1
9353 EOF
9354
9355   LIBS="-linet $LIBS"
9356
9357 else
9358   echo "$ac_t""no" 1>&6
9359 fi
9360
9361         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9362 echo "configure:9363: checking for main in -lgen" >&5
9363 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9364 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9365   echo $ac_n "(cached) $ac_c" 1>&6
9366 else
9367   ac_save_LIBS="$LIBS"
9368 LIBS="-lgen  $LIBS"
9369 cat > conftest.$ac_ext <<EOF
9370 #line 9371 "configure"
9371 #include "confdefs.h"
9372
9373 int main() {
9374 main()
9375 ; return 0; }
9376 EOF
9377 if { (eval echo configure:9378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9378   rm -rf conftest*
9379   eval "ac_cv_lib_$ac_lib_var=yes"
9380 else
9381   echo "configure: failed program was:" >&5
9382   cat conftest.$ac_ext >&5
9383   rm -rf conftest*
9384   eval "ac_cv_lib_$ac_lib_var=no"
9385 fi
9386 rm -f conftest*
9387 LIBS="$ac_save_LIBS"
9388
9389 fi
9390 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9391   echo "$ac_t""yes" 1>&6
9392     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9393     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9394   cat >> confdefs.h <<EOF
9395 #define $ac_tr_lib 1
9396 EOF
9397
9398   LIBS="-lgen $LIBS"
9399
9400 else
9401   echo "$ac_t""no" 1>&6
9402 fi
9403
9404
9405 fi
9406
9407
9408 echo $ac_n "checking for select""... $ac_c" 1>&6
9409 echo "configure:9410: checking for select" >&5
9410 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9411   echo $ac_n "(cached) $ac_c" 1>&6
9412 else
9413   cat > conftest.$ac_ext <<EOF
9414 #line 9415 "configure"
9415 #include "confdefs.h"
9416 /* System header to define __stub macros and hopefully few prototypes,
9417     which can conflict with char select(); below.  */
9418 #include <assert.h>
9419 /* Override any gcc2 internal prototype to avoid an error.  */
9420 /* We use char because int might match the return type of a gcc2
9421     builtin and then its argument prototype would still apply.  */
9422 char select();
9423 char (*f)();
9424
9425 int main() {
9426
9427 /* The GNU C library defines this for functions which it implements
9428     to always fail with ENOSYS.  Some functions are actually named
9429     something starting with __ and the normal name is an alias.  */
9430 #if defined (__stub_select) || defined (__stub___select)
9431 choke me
9432 #else
9433 f = select;
9434 #endif
9435
9436 ; return 0; }
9437 EOF
9438 if { (eval echo configure:9439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9439   rm -rf conftest*
9440   eval "ac_cv_func_select=yes"
9441 else
9442   echo "configure: failed program was:" >&5
9443   cat conftest.$ac_ext >&5
9444   rm -rf conftest*
9445   eval "ac_cv_func_select=no"
9446 fi
9447 rm -f conftest*
9448 fi
9449
9450 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9451   echo "$ac_t""yes" 1>&6
9452   :
9453 else
9454   echo "$ac_t""no" 1>&6
9455 { echo "configure: error: select() required." 1>&2; exit 1; }
9456 fi
9457
9458
9459 if test "${ac_cv_header_winsock_h}" != yes; then
9460                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9461 echo "configure:9462: checking types of arguments for select()" >&5
9462  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9463   echo $ac_n "(cached) $ac_c" 1>&6
9464 else
9465    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9466   echo $ac_n "(cached) $ac_c" 1>&6
9467 else
9468     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9469   echo $ac_n "(cached) $ac_c" 1>&6
9470 else
9471      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9472      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9473       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9474        cat > conftest.$ac_ext <<EOF
9475 #line 9476 "configure"
9476 #include "confdefs.h"
9477 #ifdef HAVE_SYS_TYPES_H
9478 #include <sys/types.h>
9479 #endif
9480 #ifdef HAVE_SYS_TIME_H
9481 #include <sys/time.h>
9482 #endif
9483 #ifdef HAVE_SYS_SELECT_H
9484 #include <sys/select.h>
9485 #endif
9486 #ifdef HAVE_SYS_SOCKET_H
9487 #include <sys/socket.h>
9488 #endif
9489 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);
9490 int main() {
9491
9492 ; return 0; }
9493 EOF
9494 if { (eval echo configure:9495: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9495   rm -rf conftest*
9496           ac_not_found=no ; break 3
9497 else
9498   echo "configure: failed program was:" >&5
9499   cat conftest.$ac_ext >&5
9500   rm -rf conftest*
9501   ac_not_found=yes
9502 fi
9503 rm -f conftest*
9504       done
9505      done
9506     done
9507    
9508 fi
9509   
9510 fi
9511  
9512 fi
9513  if test "$ac_not_found" = yes; then
9514   ac_cv_func_select_arg1=int 
9515   ac_cv_func_select_arg234='int *' 
9516   ac_cv_func_select_arg5='struct timeval *'
9517  fi
9518  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9519  cat >> confdefs.h <<EOF
9520 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9521 EOF
9522
9523  cat >> confdefs.h <<EOF
9524 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9525 EOF
9526
9527  cat >> confdefs.h <<EOF
9528 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9529 EOF
9530
9531
9532 fi
9533
9534
9535 for ac_hdr in regex.h 
9536 do
9537 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9538 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9539 echo "configure:9540: checking for $ac_hdr" >&5
9540 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9541   echo $ac_n "(cached) $ac_c" 1>&6
9542 else
9543   cat > conftest.$ac_ext <<EOF
9544 #line 9545 "configure"
9545 #include "confdefs.h"
9546 #include <$ac_hdr>
9547 EOF
9548 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9549 { (eval echo configure:9550: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9550 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9551 if test -z "$ac_err"; then
9552   rm -rf conftest*
9553   eval "ac_cv_header_$ac_safe=yes"
9554 else
9555   echo "$ac_err" >&5
9556   echo "configure: failed program was:" >&5
9557   cat conftest.$ac_ext >&5
9558   rm -rf conftest*
9559   eval "ac_cv_header_$ac_safe=no"
9560 fi
9561 rm -f conftest*
9562 fi
9563 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9564   echo "$ac_t""yes" 1>&6
9565     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9566   cat >> confdefs.h <<EOF
9567 #define $ac_tr_hdr 1
9568 EOF
9569  
9570 else
9571   echo "$ac_t""no" 1>&6
9572 fi
9573 done
9574
9575 if test "$ac_cv_header_regex_h" != yes ; then
9576         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9577 fi
9578
9579 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9580 echo "configure:9581: checking for library containing regfree" >&5
9581 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9582   echo $ac_n "(cached) $ac_c" 1>&6
9583 else
9584   ac_func_search_save_LIBS="$LIBS"
9585 ac_cv_search_regfree="no"
9586 cat > conftest.$ac_ext <<EOF
9587 #line 9588 "configure"
9588 #include "confdefs.h"
9589 /* Override any gcc2 internal prototype to avoid an error.  */
9590 /* We use char because int might match the return type of a gcc2
9591     builtin and then its argument prototype would still apply.  */
9592 char regfree();
9593
9594 int main() {
9595 regfree()
9596 ; return 0; }
9597 EOF
9598 if { (eval echo configure:9599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9599   rm -rf conftest*
9600   ac_cv_search_regfree="none required"
9601 else
9602   echo "configure: failed program was:" >&5
9603   cat conftest.$ac_ext >&5
9604 fi
9605 rm -f conftest*
9606 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9607 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9608 cat > conftest.$ac_ext <<EOF
9609 #line 9610 "configure"
9610 #include "confdefs.h"
9611 /* Override any gcc2 internal prototype to avoid an error.  */
9612 /* We use char because int might match the return type of a gcc2
9613     builtin and then its argument prototype would still apply.  */
9614 char regfree();
9615
9616 int main() {
9617 regfree()
9618 ; return 0; }
9619 EOF
9620 if { (eval echo configure:9621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9621   rm -rf conftest*
9622   ac_cv_search_regfree="-l$ac_lib"
9623 break
9624 else
9625   echo "configure: failed program was:" >&5
9626   cat conftest.$ac_ext >&5
9627 fi
9628 rm -f conftest*
9629 done
9630 LIBS="$ac_func_search_save_LIBS"
9631 fi
9632
9633 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9634 if test "$ac_cv_search_regfree" != "no"; then
9635   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9636   :
9637 else :
9638   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9639 fi
9640
9641
9642 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9643 echo "configure:9644: checking for compatible POSIX regex" >&5
9644 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9645   echo $ac_n "(cached) $ac_c" 1>&6
9646 else
9647   
9648         if test "$cross_compiling" = yes; then
9649   ol_cv_c_posix_regex=cross
9650 else
9651   cat > conftest.$ac_ext <<EOF
9652 #line 9653 "configure"
9653 #include "confdefs.h"
9654
9655 #include <sys/types.h>
9656 #include <regex.h>
9657 static char *pattern, *string;
9658 main()
9659 {
9660         int rc;
9661         regex_t re;
9662
9663         pattern = "^A";
9664
9665         if(regcomp(&re, pattern, 0)) {
9666                 return -1;
9667         }
9668         
9669         string = "ALL MATCH";
9670         
9671         rc = regexec(&re, string, 0, (void*)0, 0);
9672
9673         regfree(&re);
9674
9675         return rc;
9676 }
9677 EOF
9678 if { (eval echo configure:9679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9679 then
9680   ol_cv_c_posix_regex=yes
9681 else
9682   echo "configure: failed program was:" >&5
9683   cat conftest.$ac_ext >&5
9684   rm -fr conftest*
9685   ol_cv_c_posix_regex=no
9686 fi
9687 rm -fr conftest*
9688 fi
9689
9690 fi
9691
9692 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9693
9694 if test "$ol_cv_c_posix_regex" = no ; then
9695         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9696 fi
9697
9698
9699 have_uuid=no
9700 for ac_hdr in sys/uuid.h
9701 do
9702 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9703 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9704 echo "configure:9705: checking for $ac_hdr" >&5
9705 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9706   echo $ac_n "(cached) $ac_c" 1>&6
9707 else
9708   cat > conftest.$ac_ext <<EOF
9709 #line 9710 "configure"
9710 #include "confdefs.h"
9711 #include <$ac_hdr>
9712 EOF
9713 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9714 { (eval echo configure:9715: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9715 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9716 if test -z "$ac_err"; then
9717   rm -rf conftest*
9718   eval "ac_cv_header_$ac_safe=yes"
9719 else
9720   echo "$ac_err" >&5
9721   echo "configure: failed program was:" >&5
9722   cat conftest.$ac_ext >&5
9723   rm -rf conftest*
9724   eval "ac_cv_header_$ac_safe=no"
9725 fi
9726 rm -f conftest*
9727 fi
9728 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9729   echo "$ac_t""yes" 1>&6
9730     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9731   cat >> confdefs.h <<EOF
9732 #define $ac_tr_hdr 1
9733 EOF
9734  
9735 else
9736   echo "$ac_t""no" 1>&6
9737 fi
9738 done
9739
9740 if test $ac_cv_header_sys_uuid_h = yes ; then
9741         save_LIBS="$LIBS"
9742         
9743 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9744 echo "configure:9745: checking for library containing uuid_to_str" >&5
9745 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9746   echo $ac_n "(cached) $ac_c" 1>&6
9747 else
9748   ac_func_search_save_LIBS="$LIBS"
9749 ac_cv_search_uuid_to_str="no"
9750 cat > conftest.$ac_ext <<EOF
9751 #line 9752 "configure"
9752 #include "confdefs.h"
9753 /* Override any gcc2 internal prototype to avoid an error.  */
9754 /* We use char because int might match the return type of a gcc2
9755     builtin and then its argument prototype would still apply.  */
9756 char uuid_to_str();
9757
9758 int main() {
9759 uuid_to_str()
9760 ; return 0; }
9761 EOF
9762 if { (eval echo configure:9763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9763   rm -rf conftest*
9764   ac_cv_search_uuid_to_str="none required"
9765 else
9766   echo "configure: failed program was:" >&5
9767   cat conftest.$ac_ext >&5
9768 fi
9769 rm -f conftest*
9770 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9771 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9772 cat > conftest.$ac_ext <<EOF
9773 #line 9774 "configure"
9774 #include "confdefs.h"
9775 /* Override any gcc2 internal prototype to avoid an error.  */
9776 /* We use char because int might match the return type of a gcc2
9777     builtin and then its argument prototype would still apply.  */
9778 char uuid_to_str();
9779
9780 int main() {
9781 uuid_to_str()
9782 ; return 0; }
9783 EOF
9784 if { (eval echo configure:9785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9785   rm -rf conftest*
9786   ac_cv_search_uuid_to_str="-l$ac_lib"
9787 break
9788 else
9789   echo "configure: failed program was:" >&5
9790   cat conftest.$ac_ext >&5
9791 fi
9792 rm -f conftest*
9793 done
9794 LIBS="$ac_func_search_save_LIBS"
9795 fi
9796
9797 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9798 if test "$ac_cv_search_uuid_to_str" != "no"; then
9799   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9800   have_uuid=yes
9801 else :
9802   :
9803 fi
9804         LIBS="$save_LIBS"
9805
9806         if test have_uuid = yes ; then
9807                 cat >> confdefs.h <<\EOF
9808 #define HAVE_UUID_TO_STR 1
9809 EOF
9810
9811
9812                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9813                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9814         fi
9815 fi
9816
9817 if test $have_uuid = no ; then
9818         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9819 echo "configure:9820: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9820         save_LIBS="$LIBS"
9821         LIBS="$LIBS -lrpcrt4"
9822         cat > conftest.$ac_ext <<EOF
9823 #line 9824 "configure"
9824 #include "confdefs.h"
9825
9826                 char UuidCreate@4();
9827                 char UuidToStringA@8();
9828                 
9829 int main() {
9830
9831                 UuidCreate@4();
9832                 UuidToStringA@8();
9833                 
9834 ; return 0; }
9835 EOF
9836 if { (eval echo configure:9837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9837   rm -rf conftest*
9838   need_rpcrt=yes
9839 else
9840   echo "configure: failed program was:" >&5
9841   cat conftest.$ac_ext >&5
9842   rm -rf conftest*
9843   need_rpcrt=no
9844 fi
9845 rm -f conftest*
9846         if test $need_rpcrt = yes; then
9847                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9848         fi
9849         LIBS="$save_LIBS"
9850         echo "$ac_t""$need_rpcrt" 1>&6
9851 fi
9852
9853 ol_link_dnssrv=no
9854 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9855 echo "configure:9856: checking for res_query" >&5
9856 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9857   echo $ac_n "(cached) $ac_c" 1>&6
9858 else
9859   cat > conftest.$ac_ext <<EOF
9860 #line 9861 "configure"
9861 #include "confdefs.h"
9862 /* System header to define __stub macros and hopefully few prototypes,
9863     which can conflict with char res_query(); below.  */
9864 #include <assert.h>
9865 /* Override any gcc2 internal prototype to avoid an error.  */
9866 /* We use char because int might match the return type of a gcc2
9867     builtin and then its argument prototype would still apply.  */
9868 char res_query();
9869 char (*f)();
9870
9871 int main() {
9872
9873 /* The GNU C library defines this for functions which it implements
9874     to always fail with ENOSYS.  Some functions are actually named
9875     something starting with __ and the normal name is an alias.  */
9876 #if defined (__stub_res_query) || defined (__stub___res_query)
9877 choke me
9878 #else
9879 f = res_query;
9880 #endif
9881
9882 ; return 0; }
9883 EOF
9884 if { (eval echo configure:9885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9885   rm -rf conftest*
9886   eval "ac_cv_func_res_query=yes"
9887 else
9888   echo "configure: failed program was:" >&5
9889   cat conftest.$ac_ext >&5
9890   rm -rf conftest*
9891   eval "ac_cv_func_res_query=no"
9892 fi
9893 rm -f conftest*
9894 fi
9895
9896 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9897   echo "$ac_t""yes" 1>&6
9898   :
9899 else
9900   echo "$ac_t""no" 1>&6
9901 fi
9902
9903 if test $ac_cv_func_res_query = no ; then 
9904         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9905 echo "configure:9906: checking for __res_query" >&5
9906 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9907   echo $ac_n "(cached) $ac_c" 1>&6
9908 else
9909   cat > conftest.$ac_ext <<EOF
9910 #line 9911 "configure"
9911 #include "confdefs.h"
9912 /* System header to define __stub macros and hopefully few prototypes,
9913     which can conflict with char __res_query(); below.  */
9914 #include <assert.h>
9915 /* Override any gcc2 internal prototype to avoid an error.  */
9916 /* We use char because int might match the return type of a gcc2
9917     builtin and then its argument prototype would still apply.  */
9918 char __res_query();
9919 char (*f)();
9920
9921 int main() {
9922
9923 /* The GNU C library defines this for functions which it implements
9924     to always fail with ENOSYS.  Some functions are actually named
9925     something starting with __ and the normal name is an alias.  */
9926 #if defined (__stub___res_query) || defined (__stub_____res_query)
9927 choke me
9928 #else
9929 f = __res_query;
9930 #endif
9931
9932 ; return 0; }
9933 EOF
9934 if { (eval echo configure:9935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9935   rm -rf conftest*
9936   eval "ac_cv_func___res_query=yes"
9937 else
9938   echo "configure: failed program was:" >&5
9939   cat conftest.$ac_ext >&5
9940   rm -rf conftest*
9941   eval "ac_cv_func___res_query=no"
9942 fi
9943 rm -f conftest*
9944 fi
9945
9946 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
9947   echo "$ac_t""yes" 1>&6
9948   :
9949 else
9950   echo "$ac_t""no" 1>&6
9951 fi
9952
9953         ac_cv_func_res_query=$ac_cv_func___res_query
9954 fi
9955
9956 if test $ac_cv_func_res_query = no ; then 
9957         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
9958 echo "configure:9959: checking for res_query in -lbind" >&5
9959 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
9960 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9961   echo $ac_n "(cached) $ac_c" 1>&6
9962 else
9963   ac_save_LIBS="$LIBS"
9964 LIBS="-lbind  $LIBS"
9965 cat > conftest.$ac_ext <<EOF
9966 #line 9967 "configure"
9967 #include "confdefs.h"
9968 /* Override any gcc2 internal prototype to avoid an error.  */
9969 /* We use char because int might match the return type of a gcc2
9970     builtin and then its argument prototype would still apply.  */
9971 char res_query();
9972
9973 int main() {
9974 res_query()
9975 ; return 0; }
9976 EOF
9977 if { (eval echo configure:9978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9978   rm -rf conftest*
9979   eval "ac_cv_lib_$ac_lib_var=yes"
9980 else
9981   echo "configure: failed program was:" >&5
9982   cat conftest.$ac_ext >&5
9983   rm -rf conftest*
9984   eval "ac_cv_lib_$ac_lib_var=no"
9985 fi
9986 rm -f conftest*
9987 LIBS="$ac_save_LIBS"
9988
9989 fi
9990 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9991   echo "$ac_t""yes" 1>&6
9992     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9993     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9994   cat >> confdefs.h <<EOF
9995 #define $ac_tr_lib 1
9996 EOF
9997
9998   LIBS="-lbind $LIBS"
9999
10000 else
10001   echo "$ac_t""no" 1>&6
10002 fi
10003
10004         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10005 fi
10006
10007 if test $ac_cv_func_res_query = no ; then 
10008         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10009 echo "configure:10010: checking for __res_query in -lbind" >&5
10010 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10011 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10012   echo $ac_n "(cached) $ac_c" 1>&6
10013 else
10014   ac_save_LIBS="$LIBS"
10015 LIBS="-lbind  $LIBS"
10016 cat > conftest.$ac_ext <<EOF
10017 #line 10018 "configure"
10018 #include "confdefs.h"
10019 /* Override any gcc2 internal prototype to avoid an error.  */
10020 /* We use char because int might match the return type of a gcc2
10021     builtin and then its argument prototype would still apply.  */
10022 char __res_query();
10023
10024 int main() {
10025 __res_query()
10026 ; return 0; }
10027 EOF
10028 if { (eval echo configure:10029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10029   rm -rf conftest*
10030   eval "ac_cv_lib_$ac_lib_var=yes"
10031 else
10032   echo "configure: failed program was:" >&5
10033   cat conftest.$ac_ext >&5
10034   rm -rf conftest*
10035   eval "ac_cv_lib_$ac_lib_var=no"
10036 fi
10037 rm -f conftest*
10038 LIBS="$ac_save_LIBS"
10039
10040 fi
10041 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10042   echo "$ac_t""yes" 1>&6
10043     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10044     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10045   cat >> confdefs.h <<EOF
10046 #define $ac_tr_lib 1
10047 EOF
10048
10049   LIBS="-lbind $LIBS"
10050
10051 else
10052   echo "$ac_t""no" 1>&6
10053 fi
10054
10055         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10056 fi
10057
10058 if test $ac_cv_func_res_query = no ; then 
10059         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10060 echo "configure:10061: checking for res_query in -lresolv" >&5
10061 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10062 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10063   echo $ac_n "(cached) $ac_c" 1>&6
10064 else
10065   ac_save_LIBS="$LIBS"
10066 LIBS="-lresolv  $LIBS"
10067 cat > conftest.$ac_ext <<EOF
10068 #line 10069 "configure"
10069 #include "confdefs.h"
10070 /* Override any gcc2 internal prototype to avoid an error.  */
10071 /* We use char because int might match the return type of a gcc2
10072     builtin and then its argument prototype would still apply.  */
10073 char res_query();
10074
10075 int main() {
10076 res_query()
10077 ; return 0; }
10078 EOF
10079 if { (eval echo configure:10080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10080   rm -rf conftest*
10081   eval "ac_cv_lib_$ac_lib_var=yes"
10082 else
10083   echo "configure: failed program was:" >&5
10084   cat conftest.$ac_ext >&5
10085   rm -rf conftest*
10086   eval "ac_cv_lib_$ac_lib_var=no"
10087 fi
10088 rm -f conftest*
10089 LIBS="$ac_save_LIBS"
10090
10091 fi
10092 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10093   echo "$ac_t""yes" 1>&6
10094     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10095     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10096   cat >> confdefs.h <<EOF
10097 #define $ac_tr_lib 1
10098 EOF
10099
10100   LIBS="-lresolv $LIBS"
10101
10102 else
10103   echo "$ac_t""no" 1>&6
10104 fi
10105
10106         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10107 fi
10108
10109 if test $ac_cv_func_res_query = no ; then 
10110         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10111 echo "configure:10112: checking for __res_query in -lresolv" >&5
10112 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10113 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10114   echo $ac_n "(cached) $ac_c" 1>&6
10115 else
10116   ac_save_LIBS="$LIBS"
10117 LIBS="-lresolv  $LIBS"
10118 cat > conftest.$ac_ext <<EOF
10119 #line 10120 "configure"
10120 #include "confdefs.h"
10121 /* Override any gcc2 internal prototype to avoid an error.  */
10122 /* We use char because int might match the return type of a gcc2
10123     builtin and then its argument prototype would still apply.  */
10124 char __res_query();
10125
10126 int main() {
10127 __res_query()
10128 ; return 0; }
10129 EOF
10130 if { (eval echo configure:10131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10131   rm -rf conftest*
10132   eval "ac_cv_lib_$ac_lib_var=yes"
10133 else
10134   echo "configure: failed program was:" >&5
10135   cat conftest.$ac_ext >&5
10136   rm -rf conftest*
10137   eval "ac_cv_lib_$ac_lib_var=no"
10138 fi
10139 rm -f conftest*
10140 LIBS="$ac_save_LIBS"
10141
10142 fi
10143 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10144   echo "$ac_t""yes" 1>&6
10145     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10146     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10147   cat >> confdefs.h <<EOF
10148 #define $ac_tr_lib 1
10149 EOF
10150
10151   LIBS="-lresolv $LIBS"
10152
10153 else
10154   echo "$ac_t""no" 1>&6
10155 fi
10156
10157         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10158 fi
10159
10160 if test "$ac_cv_func_res_query" = yes ; then
10161         cat >> confdefs.h <<\EOF
10162 #define HAVE_RES_QUERY 1
10163 EOF
10164
10165
10166         if test $ol_enable_dnssrv != no ; then
10167                 ol_link_dnssrv=yes
10168         fi
10169 fi
10170
10171 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10172         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10173 fi
10174
10175 for ac_func in getaddrinfo gai_strerror inet_ntop 
10176 do
10177 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10178 echo "configure:10179: checking for $ac_func" >&5
10179 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10180   echo $ac_n "(cached) $ac_c" 1>&6
10181 else
10182   cat > conftest.$ac_ext <<EOF
10183 #line 10184 "configure"
10184 #include "confdefs.h"
10185 /* System header to define __stub macros and hopefully few prototypes,
10186     which can conflict with char $ac_func(); below.  */
10187 #include <assert.h>
10188 /* Override any gcc2 internal prototype to avoid an error.  */
10189 /* We use char because int might match the return type of a gcc2
10190     builtin and then its argument prototype would still apply.  */
10191 char $ac_func();
10192 char (*f)();
10193
10194 int main() {
10195
10196 /* The GNU C library defines this for functions which it implements
10197     to always fail with ENOSYS.  Some functions are actually named
10198     something starting with __ and the normal name is an alias.  */
10199 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10200 choke me
10201 #else
10202 f = $ac_func;
10203 #endif
10204
10205 ; return 0; }
10206 EOF
10207 if { (eval echo configure:10208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10208   rm -rf conftest*
10209   eval "ac_cv_func_$ac_func=yes"
10210 else
10211   echo "configure: failed program was:" >&5
10212   cat conftest.$ac_ext >&5
10213   rm -rf conftest*
10214   eval "ac_cv_func_$ac_func=no"
10215 fi
10216 rm -f conftest*
10217 fi
10218
10219 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10220   echo "$ac_t""yes" 1>&6
10221     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10222   cat >> confdefs.h <<EOF
10223 #define $ac_tr_func 1
10224 EOF
10225  
10226 else
10227   echo "$ac_t""no" 1>&6
10228 fi
10229 done
10230
10231
10232 ol_link_ipv6=no
10233 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10234         if test $ol_enable_ipv6 = yes ; then
10235                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10236         fi
10237 elif test $ol_enable_ipv6 != no ; then
10238         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10239 echo "configure:10240: checking INET6_ADDRSTRLEN" >&5
10240 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10241   echo $ac_n "(cached) $ac_c" 1>&6
10242 else
10243   
10244                 cat > conftest.$ac_ext <<EOF
10245 #line 10246 "configure"
10246 #include "confdefs.h"
10247
10248 #                       include <netinet/in.h>
10249 #                       ifdef INET6_ADDRSTRLEN
10250                                 __has_inet6_addrstrlen__;
10251 #                       endif
10252                 
10253 EOF
10254 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10255   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10256   rm -rf conftest*
10257   ol_cv_inet6_addrstrlen=yes
10258 else
10259   rm -rf conftest*
10260   ol_cv_inet6_addrstrlen=no
10261 fi
10262 rm -f conftest*
10263
10264 fi
10265
10266 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10267
10268         if test $ol_cv_inet6_addrstrlen = yes ; then
10269                 ol_link_ipv6=yes
10270         elif test $ol_enable_ipv6 = yes ; then
10271                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10272         fi
10273 fi
10274
10275 if test $ol_enable_local != no ; then
10276         for ac_hdr in sys/un.h 
10277 do
10278 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10279 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10280 echo "configure:10281: checking for $ac_hdr" >&5
10281 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10282   echo $ac_n "(cached) $ac_c" 1>&6
10283 else
10284   cat > conftest.$ac_ext <<EOF
10285 #line 10286 "configure"
10286 #include "confdefs.h"
10287 #include <$ac_hdr>
10288 EOF
10289 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10290 { (eval echo configure:10291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10291 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10292 if test -z "$ac_err"; then
10293   rm -rf conftest*
10294   eval "ac_cv_header_$ac_safe=yes"
10295 else
10296   echo "$ac_err" >&5
10297   echo "configure: failed program was:" >&5
10298   cat conftest.$ac_ext >&5
10299   rm -rf conftest*
10300   eval "ac_cv_header_$ac_safe=no"
10301 fi
10302 rm -f conftest*
10303 fi
10304 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10305   echo "$ac_t""yes" 1>&6
10306     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10307   cat >> confdefs.h <<EOF
10308 #define $ac_tr_hdr 1
10309 EOF
10310  
10311 else
10312   echo "$ac_t""no" 1>&6
10313 fi
10314 done
10315
10316
10317         if test $ol_enable_local = auto ; then
10318                 ol_enable_local=$ac_cv_header_sys_un_h
10319         elif test $ac_cv_header_sys_un_h = no ; then
10320                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10321         fi
10322 fi
10323
10324 ol_link_kbind=no
10325 ol_link_kpasswd=no
10326 ol_link_krb5=no
10327 ol_link_krb4=no
10328
10329 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10330         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10331         -o $ol_with_kerberos = k425 ; then
10332
10333         for ac_hdr in krb5.h
10334 do
10335 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10336 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10337 echo "configure:10338: checking for $ac_hdr" >&5
10338 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10339   echo $ac_n "(cached) $ac_c" 1>&6
10340 else
10341   cat > conftest.$ac_ext <<EOF
10342 #line 10343 "configure"
10343 #include "confdefs.h"
10344 #include <$ac_hdr>
10345 EOF
10346 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10347 { (eval echo configure:10348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10348 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10349 if test -z "$ac_err"; then
10350   rm -rf conftest*
10351   eval "ac_cv_header_$ac_safe=yes"
10352 else
10353   echo "$ac_err" >&5
10354   echo "configure: failed program was:" >&5
10355   cat conftest.$ac_ext >&5
10356   rm -rf conftest*
10357   eval "ac_cv_header_$ac_safe=no"
10358 fi
10359 rm -f conftest*
10360 fi
10361 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10362   echo "$ac_t""yes" 1>&6
10363     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10364   cat >> confdefs.h <<EOF
10365 #define $ac_tr_hdr 1
10366 EOF
10367  
10368 else
10369   echo "$ac_t""no" 1>&6
10370 fi
10371 done
10372
10373
10374         if test $ac_cv_header_krb5_h = yes ; then
10375                                 for ac_hdr in heim_err.h
10376 do
10377 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10378 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10379 echo "configure:10380: checking for $ac_hdr" >&5
10380 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10381   echo $ac_n "(cached) $ac_c" 1>&6
10382 else
10383   cat > conftest.$ac_ext <<EOF
10384 #line 10385 "configure"
10385 #include "confdefs.h"
10386 #include <$ac_hdr>
10387 EOF
10388 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10389 { (eval echo configure:10390: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10390 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10391 if test -z "$ac_err"; then
10392   rm -rf conftest*
10393   eval "ac_cv_header_$ac_safe=yes"
10394 else
10395   echo "$ac_err" >&5
10396   echo "configure: failed program was:" >&5
10397   cat conftest.$ac_ext >&5
10398   rm -rf conftest*
10399   eval "ac_cv_header_$ac_safe=no"
10400 fi
10401 rm -f conftest*
10402 fi
10403 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10404   echo "$ac_t""yes" 1>&6
10405     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10406   cat >> confdefs.h <<EOF
10407 #define $ac_tr_hdr 1
10408 EOF
10409  
10410 else
10411   echo "$ac_t""no" 1>&6
10412 fi
10413 done
10414
10415                 if test $ac_cv_header_heim_err_h = yes ; then
10416                         krb5_impl=heimdal
10417                 else
10418                         krb5_impl=mit
10419                 fi
10420
10421                 if test $krb5_impl = mit; then
10422                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10423 echo "configure:10424: checking for main in -lk5crypto" >&5
10424 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10425 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10426   echo $ac_n "(cached) $ac_c" 1>&6
10427 else
10428   ac_save_LIBS="$LIBS"
10429 LIBS="-lk5crypto  $LIBS"
10430 cat > conftest.$ac_ext <<EOF
10431 #line 10432 "configure"
10432 #include "confdefs.h"
10433
10434 int main() {
10435 main()
10436 ; return 0; }
10437 EOF
10438 if { (eval echo configure:10439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10439   rm -rf conftest*
10440   eval "ac_cv_lib_$ac_lib_var=yes"
10441 else
10442   echo "configure: failed program was:" >&5
10443   cat conftest.$ac_ext >&5
10444   rm -rf conftest*
10445   eval "ac_cv_lib_$ac_lib_var=no"
10446 fi
10447 rm -f conftest*
10448 LIBS="$ac_save_LIBS"
10449
10450 fi
10451 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10452   echo "$ac_t""yes" 1>&6
10453   krb5crypto=k5crypto
10454 else
10455   echo "$ac_t""no" 1>&6
10456 krb5crypto=crypto
10457 fi
10458
10459
10460                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10461 echo "configure:10462: checking for main in -lkrb5" >&5
10462 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10463 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10464   echo $ac_n "(cached) $ac_c" 1>&6
10465 else
10466   ac_save_LIBS="$LIBS"
10467 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10468 cat > conftest.$ac_ext <<EOF
10469 #line 10470 "configure"
10470 #include "confdefs.h"
10471
10472 int main() {
10473 main()
10474 ; return 0; }
10475 EOF
10476 if { (eval echo configure:10477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10477   rm -rf conftest*
10478   eval "ac_cv_lib_$ac_lib_var=yes"
10479 else
10480   echo "configure: failed program was:" >&5
10481   cat conftest.$ac_ext >&5
10482   rm -rf conftest*
10483   eval "ac_cv_lib_$ac_lib_var=no"
10484 fi
10485 rm -f conftest*
10486 LIBS="$ac_save_LIBS"
10487
10488 fi
10489 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10490   echo "$ac_t""yes" 1>&6
10491   have_krb5=yes
10492                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10493 else
10494   echo "$ac_t""no" 1>&6
10495 have_krb5=no
10496 fi
10497
10498
10499                 elif test $krb5_impl = heimdal; then
10500                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10501 echo "configure:10502: checking for main in -ldes" >&5
10502 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10503 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10504   echo $ac_n "(cached) $ac_c" 1>&6
10505 else
10506   ac_save_LIBS="$LIBS"
10507 LIBS="-ldes  $LIBS"
10508 cat > conftest.$ac_ext <<EOF
10509 #line 10510 "configure"
10510 #include "confdefs.h"
10511
10512 int main() {
10513 main()
10514 ; return 0; }
10515 EOF
10516 if { (eval echo configure:10517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10517   rm -rf conftest*
10518   eval "ac_cv_lib_$ac_lib_var=yes"
10519 else
10520   echo "configure: failed program was:" >&5
10521   cat conftest.$ac_ext >&5
10522   rm -rf conftest*
10523   eval "ac_cv_lib_$ac_lib_var=no"
10524 fi
10525 rm -f conftest*
10526 LIBS="$ac_save_LIBS"
10527
10528 fi
10529 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10530   echo "$ac_t""yes" 1>&6
10531   krb5crypto=des
10532 else
10533   echo "$ac_t""no" 1>&6
10534 krb5crypto=crypto
10535 fi
10536
10537
10538                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10539 echo "configure:10540: checking for main in -lkrb5" >&5
10540 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10541 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10542   echo $ac_n "(cached) $ac_c" 1>&6
10543 else
10544   ac_save_LIBS="$LIBS"
10545 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10546 cat > conftest.$ac_ext <<EOF
10547 #line 10548 "configure"
10548 #include "confdefs.h"
10549
10550 int main() {
10551 main()
10552 ; return 0; }
10553 EOF
10554 if { (eval echo configure:10555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10555   rm -rf conftest*
10556   eval "ac_cv_lib_$ac_lib_var=yes"
10557 else
10558   echo "configure: failed program was:" >&5
10559   cat conftest.$ac_ext >&5
10560   rm -rf conftest*
10561   eval "ac_cv_lib_$ac_lib_var=no"
10562 fi
10563 rm -f conftest*
10564 LIBS="$ac_save_LIBS"
10565
10566 fi
10567 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10568   echo "$ac_t""yes" 1>&6
10569   have_krb5=yes
10570                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10571 else
10572   echo "$ac_t""no" 1>&6
10573 have_krb5=no
10574 fi
10575
10576
10577                         cat >> confdefs.h <<\EOF
10578 #define HAVE_HEIMDAL_KERBEROS 1
10579 EOF
10580
10581
10582                 else
10583                         have_krb5=no
10584                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
10585                 fi
10586
10587                 if test $have_krb5 = yes ; then
10588                         ol_link_krb5=yes
10589
10590                         cat >> confdefs.h <<\EOF
10591 #define HAVE_KRB5 1
10592 EOF
10593
10594
10595                         if test $ol_enable_kpasswd != no ; then
10596                                 ol_link_kpasswd=yes;
10597                         fi
10598
10599                         if test $ol_with_kerberos = k5only ; then
10600                                 ol_with_kerberos=found
10601                         fi
10602
10603                 elif test $ol_with_kerberos != auto ; then
10604                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10605                 fi
10606
10607         fi
10608 fi
10609
10610 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10611         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10612
10613         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10614 do
10615 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10616 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10617 echo "configure:10618: checking for $ac_hdr" >&5
10618 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10619   echo $ac_n "(cached) $ac_c" 1>&6
10620 else
10621   cat > conftest.$ac_ext <<EOF
10622 #line 10623 "configure"
10623 #include "confdefs.h"
10624 #include <$ac_hdr>
10625 EOF
10626 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10627 { (eval echo configure:10628: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10628 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10629 if test -z "$ac_err"; then
10630   rm -rf conftest*
10631   eval "ac_cv_header_$ac_safe=yes"
10632 else
10633   echo "$ac_err" >&5
10634   echo "configure: failed program was:" >&5
10635   cat conftest.$ac_ext >&5
10636   rm -rf conftest*
10637   eval "ac_cv_header_$ac_safe=no"
10638 fi
10639 rm -f conftest*
10640 fi
10641 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10642   echo "$ac_t""yes" 1>&6
10643     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10644   cat >> confdefs.h <<EOF
10645 #define $ac_tr_hdr 1
10646 EOF
10647  
10648 else
10649   echo "$ac_t""no" 1>&6
10650 fi
10651 done
10652
10653
10654         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10655                 if test $krb5_impl = mit; then
10656                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10657 echo "configure:10658: checking for main in -lkrb4" >&5
10658 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10659 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10660   echo $ac_n "(cached) $ac_c" 1>&6
10661 else
10662   ac_save_LIBS="$LIBS"
10663 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10664 cat > conftest.$ac_ext <<EOF
10665 #line 10666 "configure"
10666 #include "confdefs.h"
10667
10668 int main() {
10669 main()
10670 ; return 0; }
10671 EOF
10672 if { (eval echo configure:10673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10673   rm -rf conftest*
10674   eval "ac_cv_lib_$ac_lib_var=yes"
10675 else
10676   echo "configure: failed program was:" >&5
10677   cat conftest.$ac_ext >&5
10678   rm -rf conftest*
10679   eval "ac_cv_lib_$ac_lib_var=no"
10680 fi
10681 rm -f conftest*
10682 LIBS="$ac_save_LIBS"
10683
10684 fi
10685 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10686   echo "$ac_t""yes" 1>&6
10687   have_k425=yes
10688                                 KRB4_LIBS="-lkrb4 -ldes425"
10689 else
10690   echo "$ac_t""no" 1>&6
10691 have_k425=no
10692 fi
10693
10694
10695                 elif test $krb5_impl = heimdal; then
10696                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10697 echo "configure:10698: checking for main in -lkrb4" >&5
10698 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10699 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10700   echo $ac_n "(cached) $ac_c" 1>&6
10701 else
10702   ac_save_LIBS="$LIBS"
10703 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10704 cat > conftest.$ac_ext <<EOF
10705 #line 10706 "configure"
10706 #include "confdefs.h"
10707
10708 int main() {
10709 main()
10710 ; return 0; }
10711 EOF
10712 if { (eval echo configure:10713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10713   rm -rf conftest*
10714   eval "ac_cv_lib_$ac_lib_var=yes"
10715 else
10716   echo "configure: failed program was:" >&5
10717   cat conftest.$ac_ext >&5
10718   rm -rf conftest*
10719   eval "ac_cv_lib_$ac_lib_var=no"
10720 fi
10721 rm -f conftest*
10722 LIBS="$ac_save_LIBS"
10723
10724 fi
10725 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10726   echo "$ac_t""yes" 1>&6
10727   have_k425=yes
10728                                 KRB4_LIBS="-lkrb4"
10729 else
10730   echo "$ac_t""no" 1>&6
10731 have_k425=no
10732 fi
10733
10734
10735                 else
10736                         have_425=no
10737                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10738                 fi
10739
10740                 if test $have_k425 = yes ; then
10741                         ol_with_kerberos=found
10742                         ol_link_krb4=yes
10743
10744                         cat >> confdefs.h <<\EOF
10745 #define HAVE_KRB425 1
10746 EOF
10747
10748                         cat >> confdefs.h <<\EOF
10749 #define HAVE_KRB4 1
10750 EOF
10751
10752
10753                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10754 echo "configure:10755: checking for des_debug in Kerberos libraries" >&5
10755 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10756   echo $ac_n "(cached) $ac_c" 1>&6
10757 else
10758   
10759                                                                 save_LIBS="$LIBS"
10760                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10761                                 cat > conftest.$ac_ext <<EOF
10762 #line 10763 "configure"
10763 #include "confdefs.h"
10764
10765 #include <kerberosIV/krb.h>
10766 #include <kerberosIV/des.h>
10767 extern int des_debug;
10768
10769 int main() {
10770
10771 des_debug = 1;
10772
10773 ; return 0; }
10774 EOF
10775 if { (eval echo configure:10776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10776   rm -rf conftest*
10777   ol_cv_var_des_debug=yes
10778 else
10779   echo "configure: failed program was:" >&5
10780   cat conftest.$ac_ext >&5
10781   rm -rf conftest*
10782   ol_cv_var_des_debug=no
10783 fi
10784 rm -f conftest*
10785                                                                 LIBS="$save_LIBS"
10786                         
10787 fi
10788
10789 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10790
10791                         if test $ol_cv_var_des_debug = yes ; then
10792                                 cat >> confdefs.h <<\EOF
10793 #define HAVE_DES_DEBUG 1
10794 EOF
10795
10796                         fi
10797
10798                         LIBS="$save_LIBS"
10799                 fi
10800         fi
10801 fi
10802
10803 if test $ol_link_krb5 = yes ; then
10804         ol_with_kerberos=found
10805 fi
10806
10807 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10808         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10809
10810         for ac_hdr in krb.h des.h krb-archaeology.h 
10811 do
10812 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10813 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10814 echo "configure:10815: checking for $ac_hdr" >&5
10815 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10816   echo $ac_n "(cached) $ac_c" 1>&6
10817 else
10818   cat > conftest.$ac_ext <<EOF
10819 #line 10820 "configure"
10820 #include "confdefs.h"
10821 #include <$ac_hdr>
10822 EOF
10823 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10824 { (eval echo configure:10825: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10825 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10826 if test -z "$ac_err"; then
10827   rm -rf conftest*
10828   eval "ac_cv_header_$ac_safe=yes"
10829 else
10830   echo "$ac_err" >&5
10831   echo "configure: failed program was:" >&5
10832   cat conftest.$ac_ext >&5
10833   rm -rf conftest*
10834   eval "ac_cv_header_$ac_safe=no"
10835 fi
10836 rm -f conftest*
10837 fi
10838 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10839   echo "$ac_t""yes" 1>&6
10840     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10841   cat >> confdefs.h <<EOF
10842 #define $ac_tr_hdr 1
10843 EOF
10844  
10845 else
10846   echo "$ac_t""no" 1>&6
10847 fi
10848 done
10849
10850
10851         if test $ac_cv_header_krb_h = yes ; then
10852                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10853 echo "configure:10854: checking for main in -lkrb" >&5
10854 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10855 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10856   echo $ac_n "(cached) $ac_c" 1>&6
10857 else
10858   ac_save_LIBS="$LIBS"
10859 LIBS="-lkrb -ldes $LIBS"
10860 cat > conftest.$ac_ext <<EOF
10861 #line 10862 "configure"
10862 #include "confdefs.h"
10863
10864 int main() {
10865 main()
10866 ; return 0; }
10867 EOF
10868 if { (eval echo configure:10869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10869   rm -rf conftest*
10870   eval "ac_cv_lib_$ac_lib_var=yes"
10871 else
10872   echo "configure: failed program was:" >&5
10873   cat conftest.$ac_ext >&5
10874   rm -rf conftest*
10875   eval "ac_cv_lib_$ac_lib_var=no"
10876 fi
10877 rm -f conftest*
10878 LIBS="$ac_save_LIBS"
10879
10880 fi
10881 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10882   echo "$ac_t""yes" 1>&6
10883   have_k4=yes
10884 else
10885   echo "$ac_t""no" 1>&6
10886 have_k4=no
10887 fi
10888
10889
10890                 if test $have_k4 = yes ; then
10891                         ol_with_kerberos=found
10892                         ol_link_krb4=yes
10893
10894                         cat >> confdefs.h <<\EOF
10895 #define HAVE_KRB4 1
10896 EOF
10897
10898
10899                         KRB4_LIBS="-lkrb -ldes"
10900
10901                         if test $ac_cv_header_krb_archaeology_h = yes ; then
10902                                 cat >> confdefs.h <<\EOF
10903 #define HAVE_KTH_KERBEROS 1
10904 EOF
10905
10906                         fi
10907                 fi
10908         fi
10909 fi
10910
10911 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
10912         ol_link_kpasswd=yes
10913 fi
10914
10915 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
10916         ol_link_kbind=yes
10917
10918 elif test $ol_enable_kbind = yes ; then
10919         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
10920 fi
10921
10922 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
10923         cat >> confdefs.h <<\EOF
10924 #define HAVE_KERBEROS 1
10925 EOF
10926
10927
10928 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
10929         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
10930 fi
10931
10932 ol_link_tls=no
10933 if test $ol_with_tls != no ; then
10934         for ac_hdr in openssl/ssl.h ssl.h
10935 do
10936 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10937 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10938 echo "configure:10939: checking for $ac_hdr" >&5
10939 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10940   echo $ac_n "(cached) $ac_c" 1>&6
10941 else
10942   cat > conftest.$ac_ext <<EOF
10943 #line 10944 "configure"
10944 #include "confdefs.h"
10945 #include <$ac_hdr>
10946 EOF
10947 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10948 { (eval echo configure:10949: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10949 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10950 if test -z "$ac_err"; then
10951   rm -rf conftest*
10952   eval "ac_cv_header_$ac_safe=yes"
10953 else
10954   echo "$ac_err" >&5
10955   echo "configure: failed program was:" >&5
10956   cat conftest.$ac_ext >&5
10957   rm -rf conftest*
10958   eval "ac_cv_header_$ac_safe=no"
10959 fi
10960 rm -f conftest*
10961 fi
10962 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10963   echo "$ac_t""yes" 1>&6
10964     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10965   cat >> confdefs.h <<EOF
10966 #define $ac_tr_hdr 1
10967 EOF
10968  
10969 else
10970   echo "$ac_t""no" 1>&6
10971 fi
10972 done
10973
10974         
10975         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
10976                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
10977 echo "configure:10978: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
10978 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
10979 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10980   echo $ac_n "(cached) $ac_c" 1>&6
10981 else
10982   ac_save_LIBS="$LIBS"
10983 LIBS="-lssl -lcrypto $LIBS"
10984 cat > conftest.$ac_ext <<EOF
10985 #line 10986 "configure"
10986 #include "confdefs.h"
10987 /* Override any gcc2 internal prototype to avoid an error.  */
10988 /* We use char because int might match the return type of a gcc2
10989     builtin and then its argument prototype would still apply.  */
10990 char SSLeay_add_ssl_algorithms();
10991
10992 int main() {
10993 SSLeay_add_ssl_algorithms()
10994 ; return 0; }
10995 EOF
10996 if { (eval echo configure:10997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10997   rm -rf conftest*
10998   eval "ac_cv_lib_$ac_lib_var=yes"
10999 else
11000   echo "configure: failed program was:" >&5
11001   cat conftest.$ac_ext >&5
11002   rm -rf conftest*
11003   eval "ac_cv_lib_$ac_lib_var=no"
11004 fi
11005 rm -f conftest*
11006 LIBS="$ac_save_LIBS"
11007
11008 fi
11009 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11010   echo "$ac_t""yes" 1>&6
11011   have_ssleay=yes
11012                         need_rsaref=no
11013 else
11014   echo "$ac_t""no" 1>&6
11015 have_ssleay=no
11016 fi
11017
11018                         
11019                 if test $have_ssleay = no ; then
11020                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11021 echo "configure:11022: checking for SSL_library_init in -lssl" >&5
11022 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11023 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11024   echo $ac_n "(cached) $ac_c" 1>&6
11025 else
11026   ac_save_LIBS="$LIBS"
11027 LIBS="-lssl -lcrypto $LIBS"
11028 cat > conftest.$ac_ext <<EOF
11029 #line 11030 "configure"
11030 #include "confdefs.h"
11031 /* Override any gcc2 internal prototype to avoid an error.  */
11032 /* We use char because int might match the return type of a gcc2
11033     builtin and then its argument prototype would still apply.  */
11034 char SSL_library_init();
11035
11036 int main() {
11037 SSL_library_init()
11038 ; return 0; }
11039 EOF
11040 if { (eval echo configure:11041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11041   rm -rf conftest*
11042   eval "ac_cv_lib_$ac_lib_var=yes"
11043 else
11044   echo "configure: failed program was:" >&5
11045   cat conftest.$ac_ext >&5
11046   rm -rf conftest*
11047   eval "ac_cv_lib_$ac_lib_var=no"
11048 fi
11049 rm -f conftest*
11050 LIBS="$ac_save_LIBS"
11051
11052 fi
11053 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11054   echo "$ac_t""yes" 1>&6
11055   have_ssleay=yes
11056                                 need_rsaref=no
11057 else
11058   echo "$ac_t""no" 1>&6
11059 have_ssleay=no
11060 fi
11061
11062                 fi
11063
11064                 if test $have_ssleay = no ; then
11065                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11066 echo "configure:11067: checking for ssl3_accept in -lssl" >&5
11067 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11068 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11069   echo $ac_n "(cached) $ac_c" 1>&6
11070 else
11071   ac_save_LIBS="$LIBS"
11072 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11073 cat > conftest.$ac_ext <<EOF
11074 #line 11075 "configure"
11075 #include "confdefs.h"
11076 /* Override any gcc2 internal prototype to avoid an error.  */
11077 /* We use char because int might match the return type of a gcc2
11078     builtin and then its argument prototype would still apply.  */
11079 char ssl3_accept();
11080
11081 int main() {
11082 ssl3_accept()
11083 ; return 0; }
11084 EOF
11085 if { (eval echo configure:11086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11086   rm -rf conftest*
11087   eval "ac_cv_lib_$ac_lib_var=yes"
11088 else
11089   echo "configure: failed program was:" >&5
11090   cat conftest.$ac_ext >&5
11091   rm -rf conftest*
11092   eval "ac_cv_lib_$ac_lib_var=no"
11093 fi
11094 rm -f conftest*
11095 LIBS="$ac_save_LIBS"
11096
11097 fi
11098 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11099   echo "$ac_t""yes" 1>&6
11100   have_ssleay=yes
11101                                 need_rsaref=yes
11102 else
11103   echo "$ac_t""no" 1>&6
11104 have_ssleay=no
11105 fi
11106
11107                 fi
11108
11109                 if test $have_ssleay = yes ; then
11110                         ol_with_tls=found
11111                         ol_link_tls=yes
11112
11113                         cat >> confdefs.h <<\EOF
11114 #define HAVE_SSLEAY 1
11115 EOF
11116
11117
11118                         if test $need_rsaref = yes; then
11119                                 cat >> confdefs.h <<\EOF
11120 #define HAVE_RSAREF 1
11121 EOF
11122
11123
11124                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11125                         else
11126                                 TLS_LIBS="-lssl -lcrypto"
11127                         fi
11128                 fi
11129         fi
11130
11131 else
11132         echo "configure: warning: TLS data protection not supported!" 1>&2
11133 fi
11134
11135 if test $ol_link_tls = yes ; then
11136         cat >> confdefs.h <<\EOF
11137 #define HAVE_TLS 1
11138 EOF
11139
11140
11141 elif test $ol_with_tls = auto ; then
11142         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11143         echo "configure: warning: TLS data protection not supported!" 1>&2
11144
11145 elif test $ol_with_tls != no ; then
11146         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11147 fi
11148
11149 if test $ol_enable_lmpasswd != no; then
11150         if test $ol_link_tls != yes ; then
11151                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11152         fi
11153
11154         cat >> confdefs.h <<\EOF
11155 #define SLAPD_LMHASH 1
11156 EOF
11157
11158 fi
11159
11160 for ac_func in \
11161         ctime_r                 \
11162         gethostbyname_r gethostbyaddr_r \
11163
11164 do
11165 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11166 echo "configure:11167: checking for $ac_func" >&5
11167 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11168   echo $ac_n "(cached) $ac_c" 1>&6
11169 else
11170   cat > conftest.$ac_ext <<EOF
11171 #line 11172 "configure"
11172 #include "confdefs.h"
11173 /* System header to define __stub macros and hopefully few prototypes,
11174     which can conflict with char $ac_func(); below.  */
11175 #include <assert.h>
11176 /* Override any gcc2 internal prototype to avoid an error.  */
11177 /* We use char because int might match the return type of a gcc2
11178     builtin and then its argument prototype would still apply.  */
11179 char $ac_func();
11180 char (*f)();
11181
11182 int main() {
11183
11184 /* The GNU C library defines this for functions which it implements
11185     to always fail with ENOSYS.  Some functions are actually named
11186     something starting with __ and the normal name is an alias.  */
11187 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11188 choke me
11189 #else
11190 f = $ac_func;
11191 #endif
11192
11193 ; return 0; }
11194 EOF
11195 if { (eval echo configure:11196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11196   rm -rf conftest*
11197   eval "ac_cv_func_$ac_func=yes"
11198 else
11199   echo "configure: failed program was:" >&5
11200   cat conftest.$ac_ext >&5
11201   rm -rf conftest*
11202   eval "ac_cv_func_$ac_func=no"
11203 fi
11204 rm -f conftest*
11205 fi
11206
11207 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11208   echo "$ac_t""yes" 1>&6
11209     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11210   cat >> confdefs.h <<EOF
11211 #define $ac_tr_func 1
11212 EOF
11213  
11214 else
11215   echo "$ac_t""no" 1>&6
11216 fi
11217 done
11218
11219
11220 if test "$ac_cv_func_ctime_r" = no ; then
11221         ol_cv_func_ctime_r_nargs=0
11222 else
11223         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
11224 echo "configure:11225: checking number of arguments of ctime_r" >&5
11225 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
11226   echo $ac_n "(cached) $ac_c" 1>&6
11227 else
11228   cat > conftest.$ac_ext <<EOF
11229 #line 11230 "configure"
11230 #include "confdefs.h"
11231 #include <time.h>
11232 int main() {
11233 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
11234 ; return 0; }
11235 EOF
11236 if { (eval echo configure:11237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11237   rm -rf conftest*
11238   ol_cv_func_ctime_r_nargs3=yes
11239 else
11240   echo "configure: failed program was:" >&5
11241   cat conftest.$ac_ext >&5
11242   rm -rf conftest*
11243   ol_cv_func_ctime_r_nargs3=no
11244 fi
11245 rm -f conftest*
11246
11247         cat > conftest.$ac_ext <<EOF
11248 #line 11249 "configure"
11249 #include "confdefs.h"
11250 #include <time.h>
11251 int main() {
11252 time_t ti; char *buffer; ctime_r(&ti,buffer);
11253 ; return 0; }
11254 EOF
11255 if { (eval echo configure:11256: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11256   rm -rf conftest*
11257   ol_cv_func_ctime_r_nargs2=yes
11258 else
11259   echo "configure: failed program was:" >&5
11260   cat conftest.$ac_ext >&5
11261   rm -rf conftest*
11262   ol_cv_func_ctime_r_nargs2=no
11263 fi
11264 rm -f conftest*
11265
11266         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
11267                 $ol_cv_func_ctime_r_nargs2 = no ; then
11268
11269                 ol_cv_func_ctime_r_nargs=3
11270
11271         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
11272                 $ol_cv_func_ctime_r_nargs2 = yes ; then
11273
11274                 ol_cv_func_ctime_r_nargs=2
11275
11276         else
11277                 ol_cv_func_ctime_r_nargs=0
11278         fi
11279   
11280 fi
11281
11282 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
11283
11284   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
11285         cat >> confdefs.h <<EOF
11286 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
11287 EOF
11288
11289   fi
11290
11291 fi
11292
11293 if test "$ac_cv_func_gethostbyname_r" = yes ; then
11294         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
11295 echo "configure:11296: checking number of arguments of gethostbyname_r" >&5
11296 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
11297   echo $ac_n "(cached) $ac_c" 1>&6
11298 else
11299   cat > conftest.$ac_ext <<EOF
11300 #line 11301 "configure"
11301 #include "confdefs.h"
11302 #include <sys/types.h>
11303 #include <sys/socket.h>
11304 #include <netinet/in.h>
11305 #include <netdb.h>
11306 #define BUFSIZE (sizeof(struct hostent)+10)
11307 int main() {
11308 struct hostent hent; char buffer[BUFSIZE];
11309                 int bufsize=BUFSIZE;int h_errno;
11310                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
11311                         buffer, bufsize, &h_errno);
11312 ; return 0; }
11313 EOF
11314 if { (eval echo configure:11315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11315   rm -rf conftest*
11316   ol_cv_func_gethostbyname_r_nargs5=yes
11317 else
11318   echo "configure: failed program was:" >&5
11319   cat conftest.$ac_ext >&5
11320   rm -rf conftest*
11321   ol_cv_func_gethostbyname_r_nargs5=no
11322 fi
11323 rm -f conftest*
11324
11325         cat > conftest.$ac_ext <<EOF
11326 #line 11327 "configure"
11327 #include "confdefs.h"
11328 #include <sys/types.h>
11329 #include <sys/socket.h>
11330 #include <netinet/in.h>
11331 #include <netdb.h>
11332 #define BUFSIZE (sizeof(struct hostent)+10)
11333 int main() {
11334 struct hostent hent;struct hostent *rhent;
11335                 char buffer[BUFSIZE];
11336                 int bufsize=BUFSIZE;int h_errno;
11337                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
11338                         &rhent, &h_errno);
11339 ; return 0; }
11340 EOF
11341 if { (eval echo configure:11342: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11342   rm -rf conftest*
11343   ol_cv_func_gethostbyname_r_nargs6=yes
11344 else
11345   echo "configure: failed program was:" >&5
11346   cat conftest.$ac_ext >&5
11347   rm -rf conftest*
11348   ol_cv_func_gethostbyname_r_nargs6=no
11349 fi
11350 rm -f conftest*
11351
11352         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
11353                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
11354
11355                 ol_cv_func_gethostbyname_r_nargs=5
11356
11357         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
11358                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
11359
11360                 ol_cv_func_gethostbyname_r_nargs=6
11361
11362         else
11363                 ol_cv_func_gethostbyname_r_nargs=0
11364         fi
11365   
11366 fi
11367
11368 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
11369   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
11370         cat >> confdefs.h <<EOF
11371 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
11372 EOF
11373
11374   fi
11375
11376 else
11377         ol_cv_func_gethostbyname_r_nargs=0
11378 fi
11379  
11380 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
11381         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
11382 echo "configure:11383: checking number of arguments of gethostbyaddr_r" >&5
11383 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
11384   echo $ac_n "(cached) $ac_c" 1>&6
11385 else
11386   cat > conftest.$ac_ext <<EOF
11387 #line 11388 "configure"
11388 #include "confdefs.h"
11389 #include <sys/types.h>
11390 #include <sys/socket.h>
11391 #include <netinet/in.h>
11392 #include <netdb.h>
11393 #define BUFSIZE (sizeof(struct hostent)+10)
11394 int main() {
11395 struct hostent hent; char buffer[BUFSIZE]; 
11396             struct in_addr add;
11397             size_t alen=sizeof(struct in_addr);
11398             int bufsize=BUFSIZE;int h_errno;
11399                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
11400                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
11401 ; return 0; }
11402 EOF
11403 if { (eval echo configure:11404: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11404   rm -rf conftest*
11405   ol_cv_func_gethostbyaddr_r_nargs7=yes
11406 else
11407   echo "configure: failed program was:" >&5
11408   cat conftest.$ac_ext >&5
11409   rm -rf conftest*
11410   ol_cv_func_gethostbyaddr_r_nargs7=no
11411 fi
11412 rm -f conftest*
11413
11414         cat > conftest.$ac_ext <<EOF
11415 #line 11416 "configure"
11416 #include "confdefs.h"
11417 #include <sys/types.h>
11418 #include <sys/socket.h>
11419 #include <netinet/in.h>
11420 #include <netdb.h>
11421 #define BUFSIZE (sizeof(struct hostent)+10)
11422 int main() {
11423 struct hostent hent;
11424                 struct hostent *rhent; char buffer[BUFSIZE]; 
11425                 struct in_addr add;
11426                 size_t alen=sizeof(struct in_addr);
11427                 int bufsize=BUFSIZE;int h_errno;
11428                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
11429                         alen, AF_INET, &hent, buffer, bufsize, 
11430                         &rhent, &h_errno);
11431 ; return 0; }
11432 EOF
11433 if { (eval echo configure:11434: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11434   rm -rf conftest*
11435   ol_cv_func_gethostbyaddr_r_nargs8=yes
11436 else
11437   echo "configure: failed program was:" >&5
11438   cat conftest.$ac_ext >&5
11439   rm -rf conftest*
11440   ol_cv_func_gethostbyaddr_r_nargs8=no
11441 fi
11442 rm -f conftest*
11443
11444         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
11445                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
11446
11447                 ol_cv_func_gethostbyaddr_r_nargs=7
11448
11449         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
11450                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
11451
11452                 ol_cv_func_gethostbyaddr_r_nargs=8
11453
11454         else
11455                 ol_cv_func_gethostbyaddr_r_nargs=0
11456         fi
11457   
11458 fi
11459
11460 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
11461   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
11462     cat >> confdefs.h <<EOF
11463 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
11464 EOF
11465
11466   fi
11467
11468 else
11469         ol_cv_func_gethostbyaddr_r_nargs=0
11470 fi
11471
11472 if test "$ac_cv_func_ctime_r" = yes \
11473         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
11474         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
11475         -a "$ac_cv_func_gethostbyname_r" = yes \
11476         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
11477         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
11478         -a "$ac_cv_func_gethostbyaddr_r" = yes \
11479         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
11480         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
11481         ; then
11482  
11483         cat >> confdefs.h <<\EOF
11484 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
11485 EOF
11486
11487 fi
11488
11489 ol_link_threads=no
11490
11491 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11492         -o $ol_with_threads = nt ; then
11493
11494         
11495         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11496 echo "configure:11497: checking for _beginthread" >&5
11497 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11498   echo $ac_n "(cached) $ac_c" 1>&6
11499 else
11500   cat > conftest.$ac_ext <<EOF
11501 #line 11502 "configure"
11502 #include "confdefs.h"
11503 /* System header to define __stub macros and hopefully few prototypes,
11504     which can conflict with char _beginthread(); below.  */
11505 #include <assert.h>
11506 /* Override any gcc2 internal prototype to avoid an error.  */
11507 /* We use char because int might match the return type of a gcc2
11508     builtin and then its argument prototype would still apply.  */
11509 char _beginthread();
11510 char (*f)();
11511
11512 int main() {
11513
11514 /* The GNU C library defines this for functions which it implements
11515     to always fail with ENOSYS.  Some functions are actually named
11516     something starting with __ and the normal name is an alias.  */
11517 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11518 choke me
11519 #else
11520 f = _beginthread;
11521 #endif
11522
11523 ; return 0; }
11524 EOF
11525 if { (eval echo configure:11526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11526   rm -rf conftest*
11527   eval "ac_cv_func__beginthread=yes"
11528 else
11529   echo "configure: failed program was:" >&5
11530   cat conftest.$ac_ext >&5
11531   rm -rf conftest*
11532   eval "ac_cv_func__beginthread=no"
11533 fi
11534 rm -f conftest*
11535 fi
11536
11537 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11538   echo "$ac_t""yes" 1>&6
11539   :
11540 else
11541   echo "$ac_t""no" 1>&6
11542 fi
11543
11544
11545         if test $ac_cv_func__beginthread = yes ; then
11546                 cat >> confdefs.h <<\EOF
11547 #define HAVE_NT_THREADS 1
11548 EOF
11549
11550                 ol_cv_nt_threads=yes
11551         fi
11552
11553
11554         if test "$ol_cv_nt_threads" = yes ; then
11555                 ol_link_threads=nt
11556                 ol_with_threads=found
11557                 ol_with_yielding_select=yes
11558
11559                 cat >> confdefs.h <<\EOF
11560 #define HAVE_NT_SERVICE_MANAGER 1
11561 EOF
11562
11563                 cat >> confdefs.h <<\EOF
11564 #define HAVE_NT_EVENT_LOG 1
11565 EOF
11566
11567         fi
11568
11569         if test $ol_with_threads = nt ; then
11570                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11571         fi
11572 fi
11573
11574 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11575         -o $ol_with_threads = posix ; then
11576
11577         for ac_hdr in pthread.h
11578 do
11579 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11580 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11581 echo "configure:11582: checking for $ac_hdr" >&5
11582 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11583   echo $ac_n "(cached) $ac_c" 1>&6
11584 else
11585   cat > conftest.$ac_ext <<EOF
11586 #line 11587 "configure"
11587 #include "confdefs.h"
11588 #include <$ac_hdr>
11589 EOF
11590 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11591 { (eval echo configure:11592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11592 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11593 if test -z "$ac_err"; then
11594   rm -rf conftest*
11595   eval "ac_cv_header_$ac_safe=yes"
11596 else
11597   echo "$ac_err" >&5
11598   echo "configure: failed program was:" >&5
11599   cat conftest.$ac_ext >&5
11600   rm -rf conftest*
11601   eval "ac_cv_header_$ac_safe=no"
11602 fi
11603 rm -f conftest*
11604 fi
11605 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11606   echo "$ac_t""yes" 1>&6
11607     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11608   cat >> confdefs.h <<EOF
11609 #define $ac_tr_hdr 1
11610 EOF
11611  
11612 else
11613   echo "$ac_t""no" 1>&6
11614 fi
11615 done
11616
11617
11618         if test $ac_cv_header_pthread_h = yes ; then
11619                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11620 echo "configure:11621: checking POSIX thread version" >&5
11621 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11622   echo $ac_n "(cached) $ac_c" 1>&6
11623 else
11624   
11625         cat > conftest.$ac_ext <<EOF
11626 #line 11627 "configure"
11627 #include "confdefs.h"
11628
11629 #               include <pthread.h>
11630                 /* this check could be improved */
11631 #               ifdef PTHREAD_ONCE_INIT
11632                         pthread_version_final;
11633 #               endif
11634         
11635 EOF
11636 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11637   egrep "pthread_version_final" >/dev/null 2>&1; then
11638   rm -rf conftest*
11639   ol_pthread_final=yes
11640 else
11641   rm -rf conftest*
11642   ol_pthread_final=no
11643 fi
11644 rm -f conftest*
11645
11646
11647         cat > conftest.$ac_ext <<EOF
11648 #line 11649 "configure"
11649 #include "confdefs.h"
11650
11651 #               include <pthread.h>
11652                 /* this check could be improved */
11653 #               ifdef pthread_once_init
11654                         pthread_version_draft4;
11655 #               endif
11656         
11657 EOF
11658 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11659   egrep "pthread_version_draft4" >/dev/null 2>&1; then
11660   rm -rf conftest*
11661   ol_pthread_draft4=yes
11662 else
11663   rm -rf conftest*
11664   ol_pthread_draft4=no
11665 fi
11666 rm -f conftest*
11667
11668
11669         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
11670                 ol_cv_pthread_version=final
11671         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
11672                 ol_cv_pthread_version=draft4
11673         else
11674                 ol_cv_pthread_version=unknown
11675         fi
11676
11677 fi
11678
11679 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11680
11681
11682                 if test $ol_cv_pthread_version = final ; then
11683                         cat >> confdefs.h <<\EOF
11684 #define HAVE_PTHREADS_FINAL 1
11685 EOF
11686
11687                 elif test $ol_cv_pthread_version = draft4 ; then
11688                         cat >> confdefs.h <<\EOF
11689 #define HAVE_PTHREADS_D4 1
11690 EOF
11691
11692                 else
11693                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11694                 fi
11695
11696                 # consider threads found
11697                 ol_with_threads=found
11698
11699                 
11700         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11701 echo "configure:11702: checking for LinuxThreads pthread.h" >&5
11702 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11703   echo $ac_n "(cached) $ac_c" 1>&6
11704 else
11705   cat > conftest.$ac_ext <<EOF
11706 #line 11707 "configure"
11707 #include "confdefs.h"
11708 #include <pthread.h>
11709 EOF
11710 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11711   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11712   rm -rf conftest*
11713   ol_cv_header_linux_threads=yes
11714 else
11715   rm -rf conftest*
11716   ol_cv_header_linux_threads=no
11717 fi
11718 rm -f conftest*
11719
11720                 
11721 fi
11722
11723 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11724         if test $ol_cv_header_linux_threads = yes; then
11725                 cat >> confdefs.h <<\EOF
11726 #define HAVE_LINUX_THREADS 1
11727 EOF
11728
11729         fi
11730
11731                 
11732         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11733 echo "configure:11734: checking for GNU Pth pthread.h" >&5
11734 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11735   echo $ac_n "(cached) $ac_c" 1>&6
11736 else
11737   cat > conftest.$ac_ext <<EOF
11738 #line 11739 "configure"
11739 #include "confdefs.h"
11740 #include <pthread.h>
11741 #ifdef _POSIX_THREAD_IS_GNU_PTH
11742         __gnu_pth__;
11743 #endif
11744
11745 EOF
11746 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11747   egrep "__gnu_pth__" >/dev/null 2>&1; then
11748   rm -rf conftest*
11749   ol_cv_header_gnu_pth_pthread_h=yes
11750 else
11751   rm -rf conftest*
11752   ol_cv_header_gnu_pth_pthread_h=no
11753 fi
11754 rm -f conftest*
11755
11756                 
11757 fi
11758
11759 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11760
11761
11762                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11763                         for ac_hdr in sched.h
11764 do
11765 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11766 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11767 echo "configure:11768: checking for $ac_hdr" >&5
11768 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11769   echo $ac_n "(cached) $ac_c" 1>&6
11770 else
11771   cat > conftest.$ac_ext <<EOF
11772 #line 11773 "configure"
11773 #include "confdefs.h"
11774 #include <$ac_hdr>
11775 EOF
11776 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11777 { (eval echo configure:11778: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11778 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11779 if test -z "$ac_err"; then
11780   rm -rf conftest*
11781   eval "ac_cv_header_$ac_safe=yes"
11782 else
11783   echo "$ac_err" >&5
11784   echo "configure: failed program was:" >&5
11785   cat conftest.$ac_ext >&5
11786   rm -rf conftest*
11787   eval "ac_cv_header_$ac_safe=no"
11788 fi
11789 rm -f conftest*
11790 fi
11791 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11792   echo "$ac_t""yes" 1>&6
11793     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11794   cat >> confdefs.h <<EOF
11795 #define $ac_tr_hdr 1
11796 EOF
11797  
11798 else
11799   echo "$ac_t""no" 1>&6
11800 fi
11801 done
11802
11803                 fi
11804
11805                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11806                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11807 echo "configure:11808: checking for pthread_create in default libraries" >&5
11808 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11809   echo $ac_n "(cached) $ac_c" 1>&6
11810 else
11811   
11812                 if test "$cross_compiling" = yes; then
11813   cat > conftest.$ac_ext <<EOF
11814 #line 11815 "configure"
11815 #include "confdefs.h"
11816 /* pthread test headers */
11817 #include <pthread.h>
11818 #ifndef NULL
11819 #define NULL (void*)0
11820 #endif
11821
11822 static void *task(p)
11823         void *p;
11824 {
11825         return (void *) (p == NULL);
11826 }
11827
11828 int main() {
11829
11830         /* pthread test function */
11831         pthread_t t;
11832         int status;
11833         int detach = 1;
11834
11835 #ifdef HAVE_PTHREADS_FINAL
11836         /* Final pthreads */
11837         pthread_attr_t attr;
11838
11839         status = pthread_attr_init(&attr);
11840         if( status ) return status;
11841
11842 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11843         if( !detach ) {
11844 #if defined( PTHREAD_CREATE_JOINABLE )
11845                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11846 #else
11847                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11848 #endif
11849
11850 #ifdef PTHREAD_CREATE_DETACHED
11851         } else {
11852                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11853 #endif
11854         }
11855         if( status ) return status;
11856 #endif
11857
11858         status = pthread_create( &t, &attr, task, NULL );
11859         if( status ) return status;
11860
11861 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11862         if( detach ) {
11863                 /* give thread a chance to complete */
11864                 /* it should remain joinable and hence detachable */
11865                 sleep( 1 );
11866
11867                 status = pthread_detach( t );
11868                 if( status ) return status;
11869         }
11870 #endif
11871
11872 #else
11873         /* Draft 4 pthreads */
11874         status = pthread_create( &t, pthread_attr_default, task, NULL );
11875         if( status ) return status;
11876
11877         if( detach ) {
11878                 /* give thread a chance to complete */
11879                 /* it should remain joinable and hence detachable */
11880                 sleep( 1 );
11881
11882                 status = pthread_detach( &t );
11883                 if( status ) return status;
11884         }
11885 #endif
11886
11887 #ifdef HAVE_LINUX_THREADS
11888         pthread_kill_other_threads_np();
11889 #endif
11890
11891         return 0;
11892
11893 ; return 0; }
11894 EOF
11895 if { (eval echo configure:11896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11896   rm -rf conftest*
11897   ol_cv_pthread_create=yes
11898 else
11899   echo "configure: failed program was:" >&5
11900   cat conftest.$ac_ext >&5
11901   rm -rf conftest*
11902   ol_cv_pthread_create=no
11903 fi
11904 rm -f conftest*
11905 else
11906   cat > conftest.$ac_ext <<EOF
11907 #line 11908 "configure"
11908 #include "confdefs.h"
11909 /* pthread test headers */
11910 #include <pthread.h>
11911 #ifndef NULL
11912 #define NULL (void*)0
11913 #endif
11914
11915 static void *task(p)
11916         void *p;
11917 {
11918         return (void *) (p == NULL);
11919 }
11920
11921
11922 int main(argc, argv)
11923         int argc;
11924         char **argv;
11925 {
11926
11927         /* pthread test function */
11928         pthread_t t;
11929         int status;
11930         int detach = 1;
11931
11932 #ifdef HAVE_PTHREADS_FINAL
11933         /* Final pthreads */
11934         pthread_attr_t attr;
11935
11936         status = pthread_attr_init(&attr);
11937         if( status ) return status;
11938
11939 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11940         if( !detach ) {
11941 #if defined( PTHREAD_CREATE_JOINABLE )
11942                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11943 #else
11944                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11945 #endif
11946
11947 #ifdef PTHREAD_CREATE_DETACHED
11948         } else {
11949                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11950 #endif
11951         }
11952         if( status ) return status;
11953 #endif
11954
11955         status = pthread_create( &t, &attr, task, NULL );
11956         if( status ) return status;
11957
11958 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11959         if( detach ) {
11960                 /* give thread a chance to complete */
11961                 /* it should remain joinable and hence detachable */
11962                 sleep( 1 );
11963
11964                 status = pthread_detach( t );
11965                 if( status ) return status;
11966         }
11967 #endif
11968
11969 #else
11970         /* Draft 4 pthreads */
11971         status = pthread_create( &t, pthread_attr_default, task, NULL );
11972         if( status ) return status;
11973
11974         if( detach ) {
11975                 /* give thread a chance to complete */
11976                 /* it should remain joinable and hence detachable */
11977                 sleep( 1 );
11978
11979                 status = pthread_detach( &t );
11980                 if( status ) return status;
11981         }
11982 #endif
11983
11984 #ifdef HAVE_LINUX_THREADS
11985         pthread_kill_other_threads_np();
11986 #endif
11987
11988         return 0;
11989
11990 }
11991
11992 EOF
11993 if { (eval echo configure:11994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11994 then
11995   ol_cv_pthread_create=yes
11996 else
11997   echo "configure: failed program was:" >&5
11998   cat conftest.$ac_ext >&5
11999   rm -fr conftest*
12000   ol_cv_pthread_create=no
12001 fi
12002 rm -fr conftest*
12003 fi
12004
12005 fi
12006
12007 echo "$ac_t""$ol_cv_pthread_create" 1>&6
12008
12009                 if test $ol_cv_pthread_create != no ; then
12010                         ol_link_threads=posix
12011                         ol_link_pthreads=""
12012                 fi
12013                 
12014                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
12015 if test "$ol_link_threads" = no ; then
12016         # try -kthread
12017         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
12018 echo "configure:12019: checking for pthread link with -kthread" >&5
12019 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
12020   echo $ac_n "(cached) $ac_c" 1>&6
12021 else
12022   
12023                 # save the flags
12024                 ol_LIBS="$LIBS"
12025                 LIBS="-kthread $LIBS"
12026
12027                 if test "$cross_compiling" = yes; then
12028   cat > conftest.$ac_ext <<EOF
12029 #line 12030 "configure"
12030 #include "confdefs.h"
12031 /* pthread test headers */
12032 #include <pthread.h>
12033 #ifndef NULL
12034 #define NULL (void*)0
12035 #endif
12036
12037 static void *task(p)
12038         void *p;
12039 {
12040         return (void *) (p == NULL);
12041 }
12042
12043 int main() {
12044
12045         /* pthread test function */
12046         pthread_t t;
12047         int status;
12048         int detach = 1;
12049
12050 #ifdef HAVE_PTHREADS_FINAL
12051         /* Final pthreads */
12052         pthread_attr_t attr;
12053
12054         status = pthread_attr_init(&attr);
12055         if( status ) return status;
12056
12057 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12058         if( !detach ) {
12059 #if defined( PTHREAD_CREATE_JOINABLE )
12060                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12061 #else
12062                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12063 #endif
12064
12065 #ifdef PTHREAD_CREATE_DETACHED
12066         } else {
12067                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12068 #endif
12069         }
12070         if( status ) return status;
12071 #endif
12072
12073         status = pthread_create( &t, &attr, task, NULL );
12074         if( status ) return status;
12075
12076 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12077         if( detach ) {
12078                 /* give thread a chance to complete */
12079                 /* it should remain joinable and hence detachable */
12080                 sleep( 1 );
12081
12082                 status = pthread_detach( t );
12083                 if( status ) return status;
12084         }
12085 #endif
12086
12087 #else
12088         /* Draft 4 pthreads */
12089         status = pthread_create( &t, pthread_attr_default, task, NULL );
12090         if( status ) return status;
12091
12092         if( detach ) {
12093                 /* give thread a chance to complete */
12094                 /* it should remain joinable and hence detachable */
12095                 sleep( 1 );
12096
12097                 status = pthread_detach( &t );
12098                 if( status ) return status;
12099         }
12100 #endif
12101
12102 #ifdef HAVE_LINUX_THREADS
12103         pthread_kill_other_threads_np();
12104 #endif
12105
12106         return 0;
12107
12108 ; return 0; }
12109 EOF
12110 if { (eval echo configure:12111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12111   rm -rf conftest*
12112   ol_cv_pthread_kthread=yes
12113 else
12114   echo "configure: failed program was:" >&5
12115   cat conftest.$ac_ext >&5
12116   rm -rf conftest*
12117   ol_cv_pthread_kthread=no
12118 fi
12119 rm -f conftest*
12120 else
12121   cat > conftest.$ac_ext <<EOF
12122 #line 12123 "configure"
12123 #include "confdefs.h"
12124 /* pthread test headers */
12125 #include <pthread.h>
12126 #ifndef NULL
12127 #define NULL (void*)0
12128 #endif
12129
12130 static void *task(p)
12131         void *p;
12132 {
12133         return (void *) (p == NULL);
12134 }
12135
12136
12137 int main(argc, argv)
12138         int argc;
12139         char **argv;
12140 {
12141
12142         /* pthread test function */
12143         pthread_t t;
12144         int status;
12145         int detach = 1;
12146
12147 #ifdef HAVE_PTHREADS_FINAL
12148         /* Final pthreads */
12149         pthread_attr_t attr;
12150
12151         status = pthread_attr_init(&attr);
12152         if( status ) return status;
12153
12154 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12155         if( !detach ) {
12156 #if defined( PTHREAD_CREATE_JOINABLE )
12157                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12158 #else
12159                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12160 #endif
12161
12162 #ifdef PTHREAD_CREATE_DETACHED
12163         } else {
12164                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12165 #endif
12166         }
12167         if( status ) return status;
12168 #endif
12169
12170         status = pthread_create( &t, &attr, task, NULL );
12171         if( status ) return status;
12172
12173 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12174         if( detach ) {
12175                 /* give thread a chance to complete */
12176                 /* it should remain joinable and hence detachable */
12177                 sleep( 1 );
12178
12179                 status = pthread_detach( t );
12180                 if( status ) return status;
12181         }
12182 #endif
12183
12184 #else
12185         /* Draft 4 pthreads */
12186         status = pthread_create( &t, pthread_attr_default, task, NULL );
12187         if( status ) return status;
12188
12189         if( detach ) {
12190                 /* give thread a chance to complete */
12191                 /* it should remain joinable and hence detachable */
12192                 sleep( 1 );
12193
12194                 status = pthread_detach( &t );
12195                 if( status ) return status;
12196         }
12197 #endif
12198
12199 #ifdef HAVE_LINUX_THREADS
12200         pthread_kill_other_threads_np();
12201 #endif
12202
12203         return 0;
12204
12205 }
12206
12207 EOF
12208 if { (eval echo configure:12209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12209 then
12210   ol_cv_pthread_kthread=yes
12211 else
12212   echo "configure: failed program was:" >&5
12213   cat conftest.$ac_ext >&5
12214   rm -fr conftest*
12215   ol_cv_pthread_kthread=no
12216 fi
12217 rm -fr conftest*
12218 fi
12219
12220
12221                 # restore the LIBS
12222                 LIBS="$ol_LIBS"
12223         
12224 fi
12225
12226 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12227
12228         if test $ol_cv_pthread_kthread = yes ; then
12229                 ol_link_pthreads="-kthread"
12230                 ol_link_threads=posix
12231         fi
12232 fi
12233
12234                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12235 if test "$ol_link_threads" = no ; then
12236         # try -pthread
12237         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12238 echo "configure:12239: checking for pthread link with -pthread" >&5
12239 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12240   echo $ac_n "(cached) $ac_c" 1>&6
12241 else
12242   
12243                 # save the flags
12244                 ol_LIBS="$LIBS"
12245                 LIBS="-pthread $LIBS"
12246
12247                 if test "$cross_compiling" = yes; then
12248   cat > conftest.$ac_ext <<EOF
12249 #line 12250 "configure"
12250 #include "confdefs.h"
12251 /* pthread test headers */
12252 #include <pthread.h>
12253 #ifndef NULL
12254 #define NULL (void*)0
12255 #endif
12256
12257 static void *task(p)
12258         void *p;
12259 {
12260         return (void *) (p == NULL);
12261 }
12262
12263 int main() {
12264
12265         /* pthread test function */
12266         pthread_t t;
12267         int status;
12268         int detach = 1;
12269
12270 #ifdef HAVE_PTHREADS_FINAL
12271         /* Final pthreads */
12272         pthread_attr_t attr;
12273
12274         status = pthread_attr_init(&attr);
12275         if( status ) return status;
12276
12277 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12278         if( !detach ) {
12279 #if defined( PTHREAD_CREATE_JOINABLE )
12280                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12281 #else
12282                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12283 #endif
12284
12285 #ifdef PTHREAD_CREATE_DETACHED
12286         } else {
12287                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12288 #endif
12289         }
12290         if( status ) return status;
12291 #endif
12292
12293         status = pthread_create( &t, &attr, task, NULL );
12294         if( status ) return status;
12295
12296 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12297         if( detach ) {
12298                 /* give thread a chance to complete */
12299                 /* it should remain joinable and hence detachable */
12300                 sleep( 1 );
12301
12302                 status = pthread_detach( t );
12303                 if( status ) return status;
12304         }
12305 #endif
12306
12307 #else
12308         /* Draft 4 pthreads */
12309         status = pthread_create( &t, pthread_attr_default, task, NULL );
12310         if( status ) return status;
12311
12312         if( detach ) {
12313                 /* give thread a chance to complete */
12314                 /* it should remain joinable and hence detachable */
12315                 sleep( 1 );
12316
12317                 status = pthread_detach( &t );
12318                 if( status ) return status;
12319         }
12320 #endif
12321
12322 #ifdef HAVE_LINUX_THREADS
12323         pthread_kill_other_threads_np();
12324 #endif
12325
12326         return 0;
12327
12328 ; return 0; }
12329 EOF
12330 if { (eval echo configure:12331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12331   rm -rf conftest*
12332   ol_cv_pthread_pthread=yes
12333 else
12334   echo "configure: failed program was:" >&5
12335   cat conftest.$ac_ext >&5
12336   rm -rf conftest*
12337   ol_cv_pthread_pthread=no
12338 fi
12339 rm -f conftest*
12340 else
12341   cat > conftest.$ac_ext <<EOF
12342 #line 12343 "configure"
12343 #include "confdefs.h"
12344 /* pthread test headers */
12345 #include <pthread.h>
12346 #ifndef NULL
12347 #define NULL (void*)0
12348 #endif
12349
12350 static void *task(p)
12351         void *p;
12352 {
12353         return (void *) (p == NULL);
12354 }
12355
12356
12357 int main(argc, argv)
12358         int argc;
12359         char **argv;
12360 {
12361
12362         /* pthread test function */
12363         pthread_t t;
12364         int status;
12365         int detach = 1;
12366
12367 #ifdef HAVE_PTHREADS_FINAL
12368         /* Final pthreads */
12369         pthread_attr_t attr;
12370
12371         status = pthread_attr_init(&attr);
12372         if( status ) return status;
12373
12374 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12375         if( !detach ) {
12376 #if defined( PTHREAD_CREATE_JOINABLE )
12377                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12378 #else
12379                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12380 #endif
12381
12382 #ifdef PTHREAD_CREATE_DETACHED
12383         } else {
12384                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12385 #endif
12386         }
12387         if( status ) return status;
12388 #endif
12389
12390         status = pthread_create( &t, &attr, task, NULL );
12391         if( status ) return status;
12392
12393 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12394         if( detach ) {
12395                 /* give thread a chance to complete */
12396                 /* it should remain joinable and hence detachable */
12397                 sleep( 1 );
12398
12399                 status = pthread_detach( t );
12400                 if( status ) return status;
12401         }
12402 #endif
12403
12404 #else
12405         /* Draft 4 pthreads */
12406         status = pthread_create( &t, pthread_attr_default, task, NULL );
12407         if( status ) return status;
12408
12409         if( detach ) {
12410                 /* give thread a chance to complete */
12411                 /* it should remain joinable and hence detachable */
12412                 sleep( 1 );
12413
12414                 status = pthread_detach( &t );
12415                 if( status ) return status;
12416         }
12417 #endif
12418
12419 #ifdef HAVE_LINUX_THREADS
12420         pthread_kill_other_threads_np();
12421 #endif
12422
12423         return 0;
12424
12425 }
12426
12427 EOF
12428 if { (eval echo configure:12429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12429 then
12430   ol_cv_pthread_pthread=yes
12431 else
12432   echo "configure: failed program was:" >&5
12433   cat conftest.$ac_ext >&5
12434   rm -fr conftest*
12435   ol_cv_pthread_pthread=no
12436 fi
12437 rm -fr conftest*
12438 fi
12439
12440
12441                 # restore the LIBS
12442                 LIBS="$ol_LIBS"
12443         
12444 fi
12445
12446 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12447
12448         if test $ol_cv_pthread_pthread = yes ; then
12449                 ol_link_pthreads="-pthread"
12450                 ol_link_threads=posix
12451         fi
12452 fi
12453
12454                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12455 if test "$ol_link_threads" = no ; then
12456         # try -pthreads
12457         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12458 echo "configure:12459: checking for pthread link with -pthreads" >&5
12459 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12460   echo $ac_n "(cached) $ac_c" 1>&6
12461 else
12462   
12463                 # save the flags
12464                 ol_LIBS="$LIBS"
12465                 LIBS="-pthreads $LIBS"
12466
12467                 if test "$cross_compiling" = yes; then
12468   cat > conftest.$ac_ext <<EOF
12469 #line 12470 "configure"
12470 #include "confdefs.h"
12471 /* pthread test headers */
12472 #include <pthread.h>
12473 #ifndef NULL
12474 #define NULL (void*)0
12475 #endif
12476
12477 static void *task(p)
12478         void *p;
12479 {
12480         return (void *) (p == NULL);
12481 }
12482
12483 int main() {
12484
12485         /* pthread test function */
12486         pthread_t t;
12487         int status;
12488         int detach = 1;
12489
12490 #ifdef HAVE_PTHREADS_FINAL
12491         /* Final pthreads */
12492         pthread_attr_t attr;
12493
12494         status = pthread_attr_init(&attr);
12495         if( status ) return status;
12496
12497 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12498         if( !detach ) {
12499 #if defined( PTHREAD_CREATE_JOINABLE )
12500                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12501 #else
12502                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12503 #endif
12504
12505 #ifdef PTHREAD_CREATE_DETACHED
12506         } else {
12507                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12508 #endif
12509         }
12510         if( status ) return status;
12511 #endif
12512
12513         status = pthread_create( &t, &attr, task, NULL );
12514         if( status ) return status;
12515
12516 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12517         if( detach ) {
12518                 /* give thread a chance to complete */
12519                 /* it should remain joinable and hence detachable */
12520                 sleep( 1 );
12521
12522                 status = pthread_detach( t );
12523                 if( status ) return status;
12524         }
12525 #endif
12526
12527 #else
12528         /* Draft 4 pthreads */
12529         status = pthread_create( &t, pthread_attr_default, task, NULL );
12530         if( status ) return status;
12531
12532         if( detach ) {
12533                 /* give thread a chance to complete */
12534                 /* it should remain joinable and hence detachable */
12535                 sleep( 1 );
12536
12537                 status = pthread_detach( &t );
12538                 if( status ) return status;
12539         }
12540 #endif
12541
12542 #ifdef HAVE_LINUX_THREADS
12543         pthread_kill_other_threads_np();
12544 #endif
12545
12546         return 0;
12547
12548 ; return 0; }
12549 EOF
12550 if { (eval echo configure:12551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12551   rm -rf conftest*
12552   ol_cv_pthread_pthreads=yes
12553 else
12554   echo "configure: failed program was:" >&5
12555   cat conftest.$ac_ext >&5
12556   rm -rf conftest*
12557   ol_cv_pthread_pthreads=no
12558 fi
12559 rm -f conftest*
12560 else
12561   cat > conftest.$ac_ext <<EOF
12562 #line 12563 "configure"
12563 #include "confdefs.h"
12564 /* pthread test headers */
12565 #include <pthread.h>
12566 #ifndef NULL
12567 #define NULL (void*)0
12568 #endif
12569
12570 static void *task(p)
12571         void *p;
12572 {
12573         return (void *) (p == NULL);
12574 }
12575
12576
12577 int main(argc, argv)
12578         int argc;
12579         char **argv;
12580 {
12581
12582         /* pthread test function */
12583         pthread_t t;
12584         int status;
12585         int detach = 1;
12586
12587 #ifdef HAVE_PTHREADS_FINAL
12588         /* Final pthreads */
12589         pthread_attr_t attr;
12590
12591         status = pthread_attr_init(&attr);
12592         if( status ) return status;
12593
12594 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12595         if( !detach ) {
12596 #if defined( PTHREAD_CREATE_JOINABLE )
12597                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12598 #else
12599                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12600 #endif
12601
12602 #ifdef PTHREAD_CREATE_DETACHED
12603         } else {
12604                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12605 #endif
12606         }
12607         if( status ) return status;
12608 #endif
12609
12610         status = pthread_create( &t, &attr, task, NULL );
12611         if( status ) return status;
12612
12613 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12614         if( detach ) {
12615                 /* give thread a chance to complete */
12616                 /* it should remain joinable and hence detachable */
12617                 sleep( 1 );
12618
12619                 status = pthread_detach( t );
12620                 if( status ) return status;
12621         }
12622 #endif
12623
12624 #else
12625         /* Draft 4 pthreads */
12626         status = pthread_create( &t, pthread_attr_default, task, NULL );
12627         if( status ) return status;
12628
12629         if( detach ) {
12630                 /* give thread a chance to complete */
12631                 /* it should remain joinable and hence detachable */
12632                 sleep( 1 );
12633
12634                 status = pthread_detach( &t );
12635                 if( status ) return status;
12636         }
12637 #endif
12638
12639 #ifdef HAVE_LINUX_THREADS
12640         pthread_kill_other_threads_np();
12641 #endif
12642
12643         return 0;
12644
12645 }
12646
12647 EOF
12648 if { (eval echo configure:12649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12649 then
12650   ol_cv_pthread_pthreads=yes
12651 else
12652   echo "configure: failed program was:" >&5
12653   cat conftest.$ac_ext >&5
12654   rm -fr conftest*
12655   ol_cv_pthread_pthreads=no
12656 fi
12657 rm -fr conftest*
12658 fi
12659
12660
12661                 # restore the LIBS
12662                 LIBS="$ol_LIBS"
12663         
12664 fi
12665
12666 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12667
12668         if test $ol_cv_pthread_pthreads = yes ; then
12669                 ol_link_pthreads="-pthreads"
12670                 ol_link_threads=posix
12671         fi
12672 fi
12673
12674                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12675 if test "$ol_link_threads" = no ; then
12676         # try -mthreads
12677         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12678 echo "configure:12679: checking for pthread link with -mthreads" >&5
12679 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12680   echo $ac_n "(cached) $ac_c" 1>&6
12681 else
12682   
12683                 # save the flags
12684                 ol_LIBS="$LIBS"
12685                 LIBS="-mthreads $LIBS"
12686
12687                 if test "$cross_compiling" = yes; then
12688   cat > conftest.$ac_ext <<EOF
12689 #line 12690 "configure"
12690 #include "confdefs.h"
12691 /* pthread test headers */
12692 #include <pthread.h>
12693 #ifndef NULL
12694 #define NULL (void*)0
12695 #endif
12696
12697 static void *task(p)
12698         void *p;
12699 {
12700         return (void *) (p == NULL);
12701 }
12702
12703 int main() {
12704
12705         /* pthread test function */
12706         pthread_t t;
12707         int status;
12708         int detach = 1;
12709
12710 #ifdef HAVE_PTHREADS_FINAL
12711         /* Final pthreads */
12712         pthread_attr_t attr;
12713
12714         status = pthread_attr_init(&attr);
12715         if( status ) return status;
12716
12717 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12718         if( !detach ) {
12719 #if defined( PTHREAD_CREATE_JOINABLE )
12720                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12721 #else
12722                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12723 #endif
12724
12725 #ifdef PTHREAD_CREATE_DETACHED
12726         } else {
12727                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12728 #endif
12729         }
12730         if( status ) return status;
12731 #endif
12732
12733         status = pthread_create( &t, &attr, task, NULL );
12734         if( status ) return status;
12735
12736 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12737         if( detach ) {
12738                 /* give thread a chance to complete */
12739                 /* it should remain joinable and hence detachable */
12740                 sleep( 1 );
12741
12742                 status = pthread_detach( t );
12743                 if( status ) return status;
12744         }
12745 #endif
12746
12747 #else
12748         /* Draft 4 pthreads */
12749         status = pthread_create( &t, pthread_attr_default, task, NULL );
12750         if( status ) return status;
12751
12752         if( detach ) {
12753                 /* give thread a chance to complete */
12754                 /* it should remain joinable and hence detachable */
12755                 sleep( 1 );
12756
12757                 status = pthread_detach( &t );
12758                 if( status ) return status;
12759         }
12760 #endif
12761
12762 #ifdef HAVE_LINUX_THREADS
12763         pthread_kill_other_threads_np();
12764 #endif
12765
12766         return 0;
12767
12768 ; return 0; }
12769 EOF
12770 if { (eval echo configure:12771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12771   rm -rf conftest*
12772   ol_cv_pthread_mthreads=yes
12773 else
12774   echo "configure: failed program was:" >&5
12775   cat conftest.$ac_ext >&5
12776   rm -rf conftest*
12777   ol_cv_pthread_mthreads=no
12778 fi
12779 rm -f conftest*
12780 else
12781   cat > conftest.$ac_ext <<EOF
12782 #line 12783 "configure"
12783 #include "confdefs.h"
12784 /* pthread test headers */
12785 #include <pthread.h>
12786 #ifndef NULL
12787 #define NULL (void*)0
12788 #endif
12789
12790 static void *task(p)
12791         void *p;
12792 {
12793         return (void *) (p == NULL);
12794 }
12795
12796
12797 int main(argc, argv)
12798         int argc;
12799         char **argv;
12800 {
12801
12802         /* pthread test function */
12803         pthread_t t;
12804         int status;
12805         int detach = 1;
12806
12807 #ifdef HAVE_PTHREADS_FINAL
12808         /* Final pthreads */
12809         pthread_attr_t attr;
12810
12811         status = pthread_attr_init(&attr);
12812         if( status ) return status;
12813
12814 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12815         if( !detach ) {
12816 #if defined( PTHREAD_CREATE_JOINABLE )
12817                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12818 #else
12819                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12820 #endif
12821
12822 #ifdef PTHREAD_CREATE_DETACHED
12823         } else {
12824                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12825 #endif
12826         }
12827         if( status ) return status;
12828 #endif
12829
12830         status = pthread_create( &t, &attr, task, NULL );
12831         if( status ) return status;
12832
12833 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12834         if( detach ) {
12835                 /* give thread a chance to complete */
12836                 /* it should remain joinable and hence detachable */
12837                 sleep( 1 );
12838
12839                 status = pthread_detach( t );
12840                 if( status ) return status;
12841         }
12842 #endif
12843
12844 #else
12845         /* Draft 4 pthreads */
12846         status = pthread_create( &t, pthread_attr_default, task, NULL );
12847         if( status ) return status;
12848
12849         if( detach ) {
12850                 /* give thread a chance to complete */
12851                 /* it should remain joinable and hence detachable */
12852                 sleep( 1 );
12853
12854                 status = pthread_detach( &t );
12855                 if( status ) return status;
12856         }
12857 #endif
12858
12859 #ifdef HAVE_LINUX_THREADS
12860         pthread_kill_other_threads_np();
12861 #endif
12862
12863         return 0;
12864
12865 }
12866
12867 EOF
12868 if { (eval echo configure:12869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12869 then
12870   ol_cv_pthread_mthreads=yes
12871 else
12872   echo "configure: failed program was:" >&5
12873   cat conftest.$ac_ext >&5
12874   rm -fr conftest*
12875   ol_cv_pthread_mthreads=no
12876 fi
12877 rm -fr conftest*
12878 fi
12879
12880
12881                 # restore the LIBS
12882                 LIBS="$ol_LIBS"
12883         
12884 fi
12885
12886 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12887
12888         if test $ol_cv_pthread_mthreads = yes ; then
12889                 ol_link_pthreads="-mthreads"
12890                 ol_link_threads=posix
12891         fi
12892 fi
12893
12894                 # Pthread try link: -thread (ol_cv_pthread_thread)
12895 if test "$ol_link_threads" = no ; then
12896         # try -thread
12897         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12898 echo "configure:12899: checking for pthread link with -thread" >&5
12899 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12900   echo $ac_n "(cached) $ac_c" 1>&6
12901 else
12902   
12903                 # save the flags
12904                 ol_LIBS="$LIBS"
12905                 LIBS="-thread $LIBS"
12906
12907                 if test "$cross_compiling" = yes; then
12908   cat > conftest.$ac_ext <<EOF
12909 #line 12910 "configure"
12910 #include "confdefs.h"
12911 /* pthread test headers */
12912 #include <pthread.h>
12913 #ifndef NULL
12914 #define NULL (void*)0
12915 #endif
12916
12917 static void *task(p)
12918         void *p;
12919 {
12920         return (void *) (p == NULL);
12921 }
12922
12923 int main() {
12924
12925         /* pthread test function */
12926         pthread_t t;
12927         int status;
12928         int detach = 1;
12929
12930 #ifdef HAVE_PTHREADS_FINAL
12931         /* Final pthreads */
12932         pthread_attr_t attr;
12933
12934         status = pthread_attr_init(&attr);
12935         if( status ) return status;
12936
12937 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12938         if( !detach ) {
12939 #if defined( PTHREAD_CREATE_JOINABLE )
12940                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12941 #else
12942                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12943 #endif
12944
12945 #ifdef PTHREAD_CREATE_DETACHED
12946         } else {
12947                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12948 #endif
12949         }
12950         if( status ) return status;
12951 #endif
12952
12953         status = pthread_create( &t, &attr, task, NULL );
12954         if( status ) return status;
12955
12956 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12957         if( detach ) {
12958                 /* give thread a chance to complete */
12959                 /* it should remain joinable and hence detachable */
12960                 sleep( 1 );
12961
12962                 status = pthread_detach( t );
12963                 if( status ) return status;
12964         }
12965 #endif
12966
12967 #else
12968         /* Draft 4 pthreads */
12969         status = pthread_create( &t, pthread_attr_default, task, NULL );
12970         if( status ) return status;
12971
12972         if( detach ) {
12973                 /* give thread a chance to complete */
12974                 /* it should remain joinable and hence detachable */
12975                 sleep( 1 );
12976
12977                 status = pthread_detach( &t );
12978                 if( status ) return status;
12979         }
12980 #endif
12981
12982 #ifdef HAVE_LINUX_THREADS
12983         pthread_kill_other_threads_np();
12984 #endif
12985
12986         return 0;
12987
12988 ; return 0; }
12989 EOF
12990 if { (eval echo configure:12991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12991   rm -rf conftest*
12992   ol_cv_pthread_thread=yes
12993 else
12994   echo "configure: failed program was:" >&5
12995   cat conftest.$ac_ext >&5
12996   rm -rf conftest*
12997   ol_cv_pthread_thread=no
12998 fi
12999 rm -f conftest*
13000 else
13001   cat > conftest.$ac_ext <<EOF
13002 #line 13003 "configure"
13003 #include "confdefs.h"
13004 /* pthread test headers */
13005 #include <pthread.h>
13006 #ifndef NULL
13007 #define NULL (void*)0
13008 #endif
13009
13010 static void *task(p)
13011         void *p;
13012 {
13013         return (void *) (p == NULL);
13014 }
13015
13016
13017 int main(argc, argv)
13018         int argc;
13019         char **argv;
13020 {
13021
13022         /* pthread test function */
13023         pthread_t t;
13024         int status;
13025         int detach = 1;
13026
13027 #ifdef HAVE_PTHREADS_FINAL
13028         /* Final pthreads */
13029         pthread_attr_t attr;
13030
13031         status = pthread_attr_init(&attr);
13032         if( status ) return status;
13033
13034 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13035         if( !detach ) {
13036 #if defined( PTHREAD_CREATE_JOINABLE )
13037                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13038 #else
13039                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13040 #endif
13041
13042 #ifdef PTHREAD_CREATE_DETACHED
13043         } else {
13044                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13045 #endif
13046         }
13047         if( status ) return status;
13048 #endif
13049
13050         status = pthread_create( &t, &attr, task, NULL );
13051         if( status ) return status;
13052
13053 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13054         if( detach ) {
13055                 /* give thread a chance to complete */
13056                 /* it should remain joinable and hence detachable */
13057                 sleep( 1 );
13058
13059                 status = pthread_detach( t );
13060                 if( status ) return status;
13061         }
13062 #endif
13063
13064 #else
13065         /* Draft 4 pthreads */
13066         status = pthread_create( &t, pthread_attr_default, task, NULL );
13067         if( status ) return status;
13068
13069         if( detach ) {
13070                 /* give thread a chance to complete */
13071                 /* it should remain joinable and hence detachable */
13072                 sleep( 1 );
13073
13074                 status = pthread_detach( &t );
13075                 if( status ) return status;
13076         }
13077 #endif
13078
13079 #ifdef HAVE_LINUX_THREADS
13080         pthread_kill_other_threads_np();
13081 #endif
13082
13083         return 0;
13084
13085 }
13086
13087 EOF
13088 if { (eval echo configure:13089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13089 then
13090   ol_cv_pthread_thread=yes
13091 else
13092   echo "configure: failed program was:" >&5
13093   cat conftest.$ac_ext >&5
13094   rm -fr conftest*
13095   ol_cv_pthread_thread=no
13096 fi
13097 rm -fr conftest*
13098 fi
13099
13100
13101                 # restore the LIBS
13102                 LIBS="$ol_LIBS"
13103         
13104 fi
13105
13106 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
13107
13108         if test $ol_cv_pthread_thread = yes ; then
13109                 ol_link_pthreads="-thread"
13110                 ol_link_threads=posix
13111         fi
13112 fi
13113
13114
13115                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
13116 if test "$ol_link_threads" = no ; then
13117         # try -lpthread -lmach -lexc -lc_r
13118         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
13119 echo "configure:13120: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
13120 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
13121   echo $ac_n "(cached) $ac_c" 1>&6
13122 else
13123   
13124                 # save the flags
13125                 ol_LIBS="$LIBS"
13126                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
13127
13128                 if test "$cross_compiling" = yes; then
13129   cat > conftest.$ac_ext <<EOF
13130 #line 13131 "configure"
13131 #include "confdefs.h"
13132 /* pthread test headers */
13133 #include <pthread.h>
13134 #ifndef NULL
13135 #define NULL (void*)0
13136 #endif
13137
13138 static void *task(p)
13139         void *p;
13140 {
13141         return (void *) (p == NULL);
13142 }
13143
13144 int main() {
13145
13146         /* pthread test function */
13147         pthread_t t;
13148         int status;
13149         int detach = 1;
13150
13151 #ifdef HAVE_PTHREADS_FINAL
13152         /* Final pthreads */
13153         pthread_attr_t attr;
13154
13155         status = pthread_attr_init(&attr);
13156         if( status ) return status;
13157
13158 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13159         if( !detach ) {
13160 #if defined( PTHREAD_CREATE_JOINABLE )
13161                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13162 #else
13163                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13164 #endif
13165
13166 #ifdef PTHREAD_CREATE_DETACHED
13167         } else {
13168                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13169 #endif
13170         }
13171         if( status ) return status;
13172 #endif
13173
13174         status = pthread_create( &t, &attr, task, NULL );
13175         if( status ) return status;
13176
13177 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13178         if( detach ) {
13179                 /* give thread a chance to complete */
13180                 /* it should remain joinable and hence detachable */
13181                 sleep( 1 );
13182
13183                 status = pthread_detach( t );
13184                 if( status ) return status;
13185         }
13186 #endif
13187
13188 #else
13189         /* Draft 4 pthreads */
13190         status = pthread_create( &t, pthread_attr_default, task, NULL );
13191         if( status ) return status;
13192
13193         if( detach ) {
13194                 /* give thread a chance to complete */
13195                 /* it should remain joinable and hence detachable */
13196                 sleep( 1 );
13197
13198                 status = pthread_detach( &t );
13199                 if( status ) return status;
13200         }
13201 #endif
13202
13203 #ifdef HAVE_LINUX_THREADS
13204         pthread_kill_other_threads_np();
13205 #endif
13206
13207         return 0;
13208
13209 ; return 0; }
13210 EOF
13211 if { (eval echo configure:13212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13212   rm -rf conftest*
13213   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13214 else
13215   echo "configure: failed program was:" >&5
13216   cat conftest.$ac_ext >&5
13217   rm -rf conftest*
13218   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13219 fi
13220 rm -f conftest*
13221 else
13222   cat > conftest.$ac_ext <<EOF
13223 #line 13224 "configure"
13224 #include "confdefs.h"
13225 /* pthread test headers */
13226 #include <pthread.h>
13227 #ifndef NULL
13228 #define NULL (void*)0
13229 #endif
13230
13231 static void *task(p)
13232         void *p;
13233 {
13234         return (void *) (p == NULL);
13235 }
13236
13237
13238 int main(argc, argv)
13239         int argc;
13240         char **argv;
13241 {
13242
13243         /* pthread test function */
13244         pthread_t t;
13245         int status;
13246         int detach = 1;
13247
13248 #ifdef HAVE_PTHREADS_FINAL
13249         /* Final pthreads */
13250         pthread_attr_t attr;
13251
13252         status = pthread_attr_init(&attr);
13253         if( status ) return status;
13254
13255 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13256         if( !detach ) {
13257 #if defined( PTHREAD_CREATE_JOINABLE )
13258                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13259 #else
13260                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13261 #endif
13262
13263 #ifdef PTHREAD_CREATE_DETACHED
13264         } else {
13265                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13266 #endif
13267         }
13268         if( status ) return status;
13269 #endif
13270
13271         status = pthread_create( &t, &attr, task, NULL );
13272         if( status ) return status;
13273
13274 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13275         if( detach ) {
13276                 /* give thread a chance to complete */
13277                 /* it should remain joinable and hence detachable */
13278                 sleep( 1 );
13279
13280                 status = pthread_detach( t );
13281                 if( status ) return status;
13282         }
13283 #endif
13284
13285 #else
13286         /* Draft 4 pthreads */
13287         status = pthread_create( &t, pthread_attr_default, task, NULL );
13288         if( status ) return status;
13289
13290         if( detach ) {
13291                 /* give thread a chance to complete */
13292                 /* it should remain joinable and hence detachable */
13293                 sleep( 1 );
13294
13295                 status = pthread_detach( &t );
13296                 if( status ) return status;
13297         }
13298 #endif
13299
13300 #ifdef HAVE_LINUX_THREADS
13301         pthread_kill_other_threads_np();
13302 #endif
13303
13304         return 0;
13305
13306 }
13307
13308 EOF
13309 if { (eval echo configure:13310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13310 then
13311   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13312 else
13313   echo "configure: failed program was:" >&5
13314   cat conftest.$ac_ext >&5
13315   rm -fr conftest*
13316   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13317 fi
13318 rm -fr conftest*
13319 fi
13320
13321
13322                 # restore the LIBS
13323                 LIBS="$ol_LIBS"
13324         
13325 fi
13326
13327 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13328
13329         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13330                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13331                 ol_link_threads=posix
13332         fi
13333 fi
13334
13335                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13336 if test "$ol_link_threads" = no ; then
13337         # try -lpthread -lmach -lexc
13338         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13339 echo "configure:13340: checking for pthread link with -lpthread -lmach -lexc" >&5
13340 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13341   echo $ac_n "(cached) $ac_c" 1>&6
13342 else
13343   
13344                 # save the flags
13345                 ol_LIBS="$LIBS"
13346                 LIBS="-lpthread -lmach -lexc $LIBS"
13347
13348                 if test "$cross_compiling" = yes; then
13349   cat > conftest.$ac_ext <<EOF
13350 #line 13351 "configure"
13351 #include "confdefs.h"
13352 /* pthread test headers */
13353 #include <pthread.h>
13354 #ifndef NULL
13355 #define NULL (void*)0
13356 #endif
13357
13358 static void *task(p)
13359         void *p;
13360 {
13361         return (void *) (p == NULL);
13362 }
13363
13364 int main() {
13365
13366         /* pthread test function */
13367         pthread_t t;
13368         int status;
13369         int detach = 1;
13370
13371 #ifdef HAVE_PTHREADS_FINAL
13372         /* Final pthreads */
13373         pthread_attr_t attr;
13374
13375         status = pthread_attr_init(&attr);
13376         if( status ) return status;
13377
13378 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13379         if( !detach ) {
13380 #if defined( PTHREAD_CREATE_JOINABLE )
13381                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13382 #else
13383                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13384 #endif
13385
13386 #ifdef PTHREAD_CREATE_DETACHED
13387         } else {
13388                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13389 #endif
13390         }
13391         if( status ) return status;
13392 #endif
13393
13394         status = pthread_create( &t, &attr, task, NULL );
13395         if( status ) return status;
13396
13397 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13398         if( detach ) {
13399                 /* give thread a chance to complete */
13400                 /* it should remain joinable and hence detachable */
13401                 sleep( 1 );
13402
13403                 status = pthread_detach( t );
13404                 if( status ) return status;
13405         }
13406 #endif
13407
13408 #else
13409         /* Draft 4 pthreads */
13410         status = pthread_create( &t, pthread_attr_default, task, NULL );
13411         if( status ) return status;
13412
13413         if( detach ) {
13414                 /* give thread a chance to complete */
13415                 /* it should remain joinable and hence detachable */
13416                 sleep( 1 );
13417
13418                 status = pthread_detach( &t );
13419                 if( status ) return status;
13420         }
13421 #endif
13422
13423 #ifdef HAVE_LINUX_THREADS
13424         pthread_kill_other_threads_np();
13425 #endif
13426
13427         return 0;
13428
13429 ; return 0; }
13430 EOF
13431 if { (eval echo configure:13432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13432   rm -rf conftest*
13433   ol_cv_pthread_lpthread_lmach_lexc=yes
13434 else
13435   echo "configure: failed program was:" >&5
13436   cat conftest.$ac_ext >&5
13437   rm -rf conftest*
13438   ol_cv_pthread_lpthread_lmach_lexc=no
13439 fi
13440 rm -f conftest*
13441 else
13442   cat > conftest.$ac_ext <<EOF
13443 #line 13444 "configure"
13444 #include "confdefs.h"
13445 /* pthread test headers */
13446 #include <pthread.h>
13447 #ifndef NULL
13448 #define NULL (void*)0
13449 #endif
13450
13451 static void *task(p)
13452         void *p;
13453 {
13454         return (void *) (p == NULL);
13455 }
13456
13457
13458 int main(argc, argv)
13459         int argc;
13460         char **argv;
13461 {
13462
13463         /* pthread test function */
13464         pthread_t t;
13465         int status;
13466         int detach = 1;
13467
13468 #ifdef HAVE_PTHREADS_FINAL
13469         /* Final pthreads */
13470         pthread_attr_t attr;
13471
13472         status = pthread_attr_init(&attr);
13473         if( status ) return status;
13474
13475 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13476         if( !detach ) {
13477 #if defined( PTHREAD_CREATE_JOINABLE )
13478                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13479 #else
13480                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13481 #endif
13482
13483 #ifdef PTHREAD_CREATE_DETACHED
13484         } else {
13485                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13486 #endif
13487         }
13488         if( status ) return status;
13489 #endif
13490
13491         status = pthread_create( &t, &attr, task, NULL );
13492         if( status ) return status;
13493
13494 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13495         if( detach ) {
13496                 /* give thread a chance to complete */
13497                 /* it should remain joinable and hence detachable */
13498                 sleep( 1 );
13499
13500                 status = pthread_detach( t );
13501                 if( status ) return status;
13502         }
13503 #endif
13504
13505 #else
13506         /* Draft 4 pthreads */
13507         status = pthread_create( &t, pthread_attr_default, task, NULL );
13508         if( status ) return status;
13509
13510         if( detach ) {
13511                 /* give thread a chance to complete */
13512                 /* it should remain joinable and hence detachable */
13513                 sleep( 1 );
13514
13515                 status = pthread_detach( &t );
13516                 if( status ) return status;
13517         }
13518 #endif
13519
13520 #ifdef HAVE_LINUX_THREADS
13521         pthread_kill_other_threads_np();
13522 #endif
13523
13524         return 0;
13525
13526 }
13527
13528 EOF
13529 if { (eval echo configure:13530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13530 then
13531   ol_cv_pthread_lpthread_lmach_lexc=yes
13532 else
13533   echo "configure: failed program was:" >&5
13534   cat conftest.$ac_ext >&5
13535   rm -fr conftest*
13536   ol_cv_pthread_lpthread_lmach_lexc=no
13537 fi
13538 rm -fr conftest*
13539 fi
13540
13541
13542                 # restore the LIBS
13543                 LIBS="$ol_LIBS"
13544         
13545 fi
13546
13547 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13548
13549         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13550                 ol_link_pthreads="-lpthread -lmach -lexc"
13551                 ol_link_threads=posix
13552         fi
13553 fi
13554
13555
13556                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13557 if test "$ol_link_threads" = no ; then
13558         # try -lpthread -Wl,-woff,85
13559         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13560 echo "configure:13561: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13561 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13562   echo $ac_n "(cached) $ac_c" 1>&6
13563 else
13564   
13565                 # save the flags
13566                 ol_LIBS="$LIBS"
13567                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13568
13569                 if test "$cross_compiling" = yes; then
13570   cat > conftest.$ac_ext <<EOF
13571 #line 13572 "configure"
13572 #include "confdefs.h"
13573 /* pthread test headers */
13574 #include <pthread.h>
13575 #ifndef NULL
13576 #define NULL (void*)0
13577 #endif
13578
13579 static void *task(p)
13580         void *p;
13581 {
13582         return (void *) (p == NULL);
13583 }
13584
13585 int main() {
13586
13587         /* pthread test function */
13588         pthread_t t;
13589         int status;
13590         int detach = 1;
13591
13592 #ifdef HAVE_PTHREADS_FINAL
13593         /* Final pthreads */
13594         pthread_attr_t attr;
13595
13596         status = pthread_attr_init(&attr);
13597         if( status ) return status;
13598
13599 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13600         if( !detach ) {
13601 #if defined( PTHREAD_CREATE_JOINABLE )
13602                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13603 #else
13604                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13605 #endif
13606
13607 #ifdef PTHREAD_CREATE_DETACHED
13608         } else {
13609                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13610 #endif
13611         }
13612         if( status ) return status;
13613 #endif
13614
13615         status = pthread_create( &t, &attr, task, NULL );
13616         if( status ) return status;
13617
13618 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13619         if( detach ) {
13620                 /* give thread a chance to complete */
13621                 /* it should remain joinable and hence detachable */
13622                 sleep( 1 );
13623
13624                 status = pthread_detach( t );
13625                 if( status ) return status;
13626         }
13627 #endif
13628
13629 #else
13630         /* Draft 4 pthreads */
13631         status = pthread_create( &t, pthread_attr_default, task, NULL );
13632         if( status ) return status;
13633
13634         if( detach ) {
13635                 /* give thread a chance to complete */
13636                 /* it should remain joinable and hence detachable */
13637                 sleep( 1 );
13638
13639                 status = pthread_detach( &t );
13640                 if( status ) return status;
13641         }
13642 #endif
13643
13644 #ifdef HAVE_LINUX_THREADS
13645         pthread_kill_other_threads_np();
13646 #endif
13647
13648         return 0;
13649
13650 ; return 0; }
13651 EOF
13652 if { (eval echo configure:13653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13653   rm -rf conftest*
13654   ol_cv_pthread_lib_lpthread_woff=yes
13655 else
13656   echo "configure: failed program was:" >&5
13657   cat conftest.$ac_ext >&5
13658   rm -rf conftest*
13659   ol_cv_pthread_lib_lpthread_woff=no
13660 fi
13661 rm -f conftest*
13662 else
13663   cat > conftest.$ac_ext <<EOF
13664 #line 13665 "configure"
13665 #include "confdefs.h"
13666 /* pthread test headers */
13667 #include <pthread.h>
13668 #ifndef NULL
13669 #define NULL (void*)0
13670 #endif
13671
13672 static void *task(p)
13673         void *p;
13674 {
13675         return (void *) (p == NULL);
13676 }
13677
13678
13679 int main(argc, argv)
13680         int argc;
13681         char **argv;
13682 {
13683
13684         /* pthread test function */
13685         pthread_t t;
13686         int status;
13687         int detach = 1;
13688
13689 #ifdef HAVE_PTHREADS_FINAL
13690         /* Final pthreads */
13691         pthread_attr_t attr;
13692
13693         status = pthread_attr_init(&attr);
13694         if( status ) return status;
13695
13696 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13697         if( !detach ) {
13698 #if defined( PTHREAD_CREATE_JOINABLE )
13699                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13700 #else
13701                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13702 #endif
13703
13704 #ifdef PTHREAD_CREATE_DETACHED
13705         } else {
13706                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13707 #endif
13708         }
13709         if( status ) return status;
13710 #endif
13711
13712         status = pthread_create( &t, &attr, task, NULL );
13713         if( status ) return status;
13714
13715 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13716         if( detach ) {
13717                 /* give thread a chance to complete */
13718                 /* it should remain joinable and hence detachable */
13719                 sleep( 1 );
13720
13721                 status = pthread_detach( t );
13722                 if( status ) return status;
13723         }
13724 #endif
13725
13726 #else
13727         /* Draft 4 pthreads */
13728         status = pthread_create( &t, pthread_attr_default, task, NULL );
13729         if( status ) return status;
13730
13731         if( detach ) {
13732                 /* give thread a chance to complete */
13733                 /* it should remain joinable and hence detachable */
13734                 sleep( 1 );
13735
13736                 status = pthread_detach( &t );
13737                 if( status ) return status;
13738         }
13739 #endif
13740
13741 #ifdef HAVE_LINUX_THREADS
13742         pthread_kill_other_threads_np();
13743 #endif
13744
13745         return 0;
13746
13747 }
13748
13749 EOF
13750 if { (eval echo configure:13751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13751 then
13752   ol_cv_pthread_lib_lpthread_woff=yes
13753 else
13754   echo "configure: failed program was:" >&5
13755   cat conftest.$ac_ext >&5
13756   rm -fr conftest*
13757   ol_cv_pthread_lib_lpthread_woff=no
13758 fi
13759 rm -fr conftest*
13760 fi
13761
13762
13763                 # restore the LIBS
13764                 LIBS="$ol_LIBS"
13765         
13766 fi
13767
13768 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13769
13770         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13771                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13772                 ol_link_threads=posix
13773         fi
13774 fi
13775
13776
13777                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13778 if test "$ol_link_threads" = no ; then
13779         # try -lpthread
13780         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13781 echo "configure:13782: checking for pthread link with -lpthread" >&5
13782 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13783   echo $ac_n "(cached) $ac_c" 1>&6
13784 else
13785   
13786                 # save the flags
13787                 ol_LIBS="$LIBS"
13788                 LIBS="-lpthread $LIBS"
13789
13790                 if test "$cross_compiling" = yes; then
13791   cat > conftest.$ac_ext <<EOF
13792 #line 13793 "configure"
13793 #include "confdefs.h"
13794 /* pthread test headers */
13795 #include <pthread.h>
13796 #ifndef NULL
13797 #define NULL (void*)0
13798 #endif
13799
13800 static void *task(p)
13801         void *p;
13802 {
13803         return (void *) (p == NULL);
13804 }
13805
13806 int main() {
13807
13808         /* pthread test function */
13809         pthread_t t;
13810         int status;
13811         int detach = 1;
13812
13813 #ifdef HAVE_PTHREADS_FINAL
13814         /* Final pthreads */
13815         pthread_attr_t attr;
13816
13817         status = pthread_attr_init(&attr);
13818         if( status ) return status;
13819
13820 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13821         if( !detach ) {
13822 #if defined( PTHREAD_CREATE_JOINABLE )
13823                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13824 #else
13825                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13826 #endif
13827
13828 #ifdef PTHREAD_CREATE_DETACHED
13829         } else {
13830                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13831 #endif
13832         }
13833         if( status ) return status;
13834 #endif
13835
13836         status = pthread_create( &t, &attr, task, NULL );
13837         if( status ) return status;
13838
13839 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13840         if( detach ) {
13841                 /* give thread a chance to complete */
13842                 /* it should remain joinable and hence detachable */
13843                 sleep( 1 );
13844
13845                 status = pthread_detach( t );
13846                 if( status ) return status;
13847         }
13848 #endif
13849
13850 #else
13851         /* Draft 4 pthreads */
13852         status = pthread_create( &t, pthread_attr_default, task, NULL );
13853         if( status ) return status;
13854
13855         if( detach ) {
13856                 /* give thread a chance to complete */
13857                 /* it should remain joinable and hence detachable */
13858                 sleep( 1 );
13859
13860                 status = pthread_detach( &t );
13861                 if( status ) return status;
13862         }
13863 #endif
13864
13865 #ifdef HAVE_LINUX_THREADS
13866         pthread_kill_other_threads_np();
13867 #endif
13868
13869         return 0;
13870
13871 ; return 0; }
13872 EOF
13873 if { (eval echo configure:13874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13874   rm -rf conftest*
13875   ol_cv_pthread_lpthread=yes
13876 else
13877   echo "configure: failed program was:" >&5
13878   cat conftest.$ac_ext >&5
13879   rm -rf conftest*
13880   ol_cv_pthread_lpthread=no
13881 fi
13882 rm -f conftest*
13883 else
13884   cat > conftest.$ac_ext <<EOF
13885 #line 13886 "configure"
13886 #include "confdefs.h"
13887 /* pthread test headers */
13888 #include <pthread.h>
13889 #ifndef NULL
13890 #define NULL (void*)0
13891 #endif
13892
13893 static void *task(p)
13894         void *p;
13895 {
13896         return (void *) (p == NULL);
13897 }
13898
13899
13900 int main(argc, argv)
13901         int argc;
13902         char **argv;
13903 {
13904
13905         /* pthread test function */
13906         pthread_t t;
13907         int status;
13908         int detach = 1;
13909
13910 #ifdef HAVE_PTHREADS_FINAL
13911         /* Final pthreads */
13912         pthread_attr_t attr;
13913
13914         status = pthread_attr_init(&attr);
13915         if( status ) return status;
13916
13917 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13918         if( !detach ) {
13919 #if defined( PTHREAD_CREATE_JOINABLE )
13920                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13921 #else
13922                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13923 #endif
13924
13925 #ifdef PTHREAD_CREATE_DETACHED
13926         } else {
13927                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13928 #endif
13929         }
13930         if( status ) return status;
13931 #endif
13932
13933         status = pthread_create( &t, &attr, task, NULL );
13934         if( status ) return status;
13935
13936 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13937         if( detach ) {
13938                 /* give thread a chance to complete */
13939                 /* it should remain joinable and hence detachable */
13940                 sleep( 1 );
13941
13942                 status = pthread_detach( t );
13943                 if( status ) return status;
13944         }
13945 #endif
13946
13947 #else
13948         /* Draft 4 pthreads */
13949         status = pthread_create( &t, pthread_attr_default, task, NULL );
13950         if( status ) return status;
13951
13952         if( detach ) {
13953                 /* give thread a chance to complete */
13954                 /* it should remain joinable and hence detachable */
13955                 sleep( 1 );
13956
13957                 status = pthread_detach( &t );
13958                 if( status ) return status;
13959         }
13960 #endif
13961
13962 #ifdef HAVE_LINUX_THREADS
13963         pthread_kill_other_threads_np();
13964 #endif
13965
13966         return 0;
13967
13968 }
13969
13970 EOF
13971 if { (eval echo configure:13972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13972 then
13973   ol_cv_pthread_lpthread=yes
13974 else
13975   echo "configure: failed program was:" >&5
13976   cat conftest.$ac_ext >&5
13977   rm -fr conftest*
13978   ol_cv_pthread_lpthread=no
13979 fi
13980 rm -fr conftest*
13981 fi
13982
13983
13984                 # restore the LIBS
13985                 LIBS="$ol_LIBS"
13986         
13987 fi
13988
13989 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13990
13991         if test $ol_cv_pthread_lpthread = yes ; then
13992                 ol_link_pthreads="-lpthread"
13993                 ol_link_threads=posix
13994         fi
13995 fi
13996
13997                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13998 if test "$ol_link_threads" = no ; then
13999         # try -lc_r
14000         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
14001 echo "configure:14002: checking for pthread link with -lc_r" >&5
14002 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
14003   echo $ac_n "(cached) $ac_c" 1>&6
14004 else
14005   
14006                 # save the flags
14007                 ol_LIBS="$LIBS"
14008                 LIBS="-lc_r $LIBS"
14009
14010                 if test "$cross_compiling" = yes; then
14011   cat > conftest.$ac_ext <<EOF
14012 #line 14013 "configure"
14013 #include "confdefs.h"
14014 /* pthread test headers */
14015 #include <pthread.h>
14016 #ifndef NULL
14017 #define NULL (void*)0
14018 #endif
14019
14020 static void *task(p)
14021         void *p;
14022 {
14023         return (void *) (p == NULL);
14024 }
14025
14026 int main() {
14027
14028         /* pthread test function */
14029         pthread_t t;
14030         int status;
14031         int detach = 1;
14032
14033 #ifdef HAVE_PTHREADS_FINAL
14034         /* Final pthreads */
14035         pthread_attr_t attr;
14036
14037         status = pthread_attr_init(&attr);
14038         if( status ) return status;
14039
14040 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14041         if( !detach ) {
14042 #if defined( PTHREAD_CREATE_JOINABLE )
14043                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14044 #else
14045                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14046 #endif
14047
14048 #ifdef PTHREAD_CREATE_DETACHED
14049         } else {
14050                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14051 #endif
14052         }
14053         if( status ) return status;
14054 #endif
14055
14056         status = pthread_create( &t, &attr, task, NULL );
14057         if( status ) return status;
14058
14059 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14060         if( detach ) {
14061                 /* give thread a chance to complete */
14062                 /* it should remain joinable and hence detachable */
14063                 sleep( 1 );
14064
14065                 status = pthread_detach( t );
14066                 if( status ) return status;
14067         }
14068 #endif
14069
14070 #else
14071         /* Draft 4 pthreads */
14072         status = pthread_create( &t, pthread_attr_default, task, NULL );
14073         if( status ) return status;
14074
14075         if( detach ) {
14076                 /* give thread a chance to complete */
14077                 /* it should remain joinable and hence detachable */
14078                 sleep( 1 );
14079
14080                 status = pthread_detach( &t );
14081                 if( status ) return status;
14082         }
14083 #endif
14084
14085 #ifdef HAVE_LINUX_THREADS
14086         pthread_kill_other_threads_np();
14087 #endif
14088
14089         return 0;
14090
14091 ; return 0; }
14092 EOF
14093 if { (eval echo configure:14094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14094   rm -rf conftest*
14095   ol_cv_pthread_lc_r=yes
14096 else
14097   echo "configure: failed program was:" >&5
14098   cat conftest.$ac_ext >&5
14099   rm -rf conftest*
14100   ol_cv_pthread_lc_r=no
14101 fi
14102 rm -f conftest*
14103 else
14104   cat > conftest.$ac_ext <<EOF
14105 #line 14106 "configure"
14106 #include "confdefs.h"
14107 /* pthread test headers */
14108 #include <pthread.h>
14109 #ifndef NULL
14110 #define NULL (void*)0
14111 #endif
14112
14113 static void *task(p)
14114         void *p;
14115 {
14116         return (void *) (p == NULL);
14117 }
14118
14119
14120 int main(argc, argv)
14121         int argc;
14122         char **argv;
14123 {
14124
14125         /* pthread test function */
14126         pthread_t t;
14127         int status;
14128         int detach = 1;
14129
14130 #ifdef HAVE_PTHREADS_FINAL
14131         /* Final pthreads */
14132         pthread_attr_t attr;
14133
14134         status = pthread_attr_init(&attr);
14135         if( status ) return status;
14136
14137 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14138         if( !detach ) {
14139 #if defined( PTHREAD_CREATE_JOINABLE )
14140                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14141 #else
14142                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14143 #endif
14144
14145 #ifdef PTHREAD_CREATE_DETACHED
14146         } else {
14147                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14148 #endif
14149         }
14150         if( status ) return status;
14151 #endif
14152
14153         status = pthread_create( &t, &attr, task, NULL );
14154         if( status ) return status;
14155
14156 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14157         if( detach ) {
14158                 /* give thread a chance to complete */
14159                 /* it should remain joinable and hence detachable */
14160                 sleep( 1 );
14161
14162                 status = pthread_detach( t );
14163                 if( status ) return status;
14164         }
14165 #endif
14166
14167 #else
14168         /* Draft 4 pthreads */
14169         status = pthread_create( &t, pthread_attr_default, task, NULL );
14170         if( status ) return status;
14171
14172         if( detach ) {
14173                 /* give thread a chance to complete */
14174                 /* it should remain joinable and hence detachable */
14175                 sleep( 1 );
14176
14177                 status = pthread_detach( &t );
14178                 if( status ) return status;
14179         }
14180 #endif
14181
14182 #ifdef HAVE_LINUX_THREADS
14183         pthread_kill_other_threads_np();
14184 #endif
14185
14186         return 0;
14187
14188 }
14189
14190 EOF
14191 if { (eval echo configure:14192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14192 then
14193   ol_cv_pthread_lc_r=yes
14194 else
14195   echo "configure: failed program was:" >&5
14196   cat conftest.$ac_ext >&5
14197   rm -fr conftest*
14198   ol_cv_pthread_lc_r=no
14199 fi
14200 rm -fr conftest*
14201 fi
14202
14203
14204                 # restore the LIBS
14205                 LIBS="$ol_LIBS"
14206         
14207 fi
14208
14209 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
14210
14211         if test $ol_cv_pthread_lc_r = yes ; then
14212                 ol_link_pthreads="-lc_r"
14213                 ol_link_threads=posix
14214         fi
14215 fi
14216
14217
14218                 # Pthread try link: -threads (ol_cv_pthread_threads)
14219 if test "$ol_link_threads" = no ; then
14220         # try -threads
14221         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
14222 echo "configure:14223: checking for pthread link with -threads" >&5
14223 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
14224   echo $ac_n "(cached) $ac_c" 1>&6
14225 else
14226   
14227                 # save the flags
14228                 ol_LIBS="$LIBS"
14229                 LIBS="-threads $LIBS"
14230
14231                 if test "$cross_compiling" = yes; then
14232   cat > conftest.$ac_ext <<EOF
14233 #line 14234 "configure"
14234 #include "confdefs.h"
14235 /* pthread test headers */
14236 #include <pthread.h>
14237 #ifndef NULL
14238 #define NULL (void*)0
14239 #endif
14240
14241 static void *task(p)
14242         void *p;
14243 {
14244         return (void *) (p == NULL);
14245 }
14246
14247 int main() {
14248
14249         /* pthread test function */
14250         pthread_t t;
14251         int status;
14252         int detach = 1;
14253
14254 #ifdef HAVE_PTHREADS_FINAL
14255         /* Final pthreads */
14256         pthread_attr_t attr;
14257
14258         status = pthread_attr_init(&attr);
14259         if( status ) return status;
14260
14261 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14262         if( !detach ) {
14263 #if defined( PTHREAD_CREATE_JOINABLE )
14264                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14265 #else
14266                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14267 #endif
14268
14269 #ifdef PTHREAD_CREATE_DETACHED
14270         } else {
14271                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14272 #endif
14273         }
14274         if( status ) return status;
14275 #endif
14276
14277         status = pthread_create( &t, &attr, task, NULL );
14278         if( status ) return status;
14279
14280 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14281         if( detach ) {
14282                 /* give thread a chance to complete */
14283                 /* it should remain joinable and hence detachable */
14284                 sleep( 1 );
14285
14286                 status = pthread_detach( t );
14287                 if( status ) return status;
14288         }
14289 #endif
14290
14291 #else
14292         /* Draft 4 pthreads */
14293         status = pthread_create( &t, pthread_attr_default, task, NULL );
14294         if( status ) return status;
14295
14296         if( detach ) {
14297                 /* give thread a chance to complete */
14298                 /* it should remain joinable and hence detachable */
14299                 sleep( 1 );
14300
14301                 status = pthread_detach( &t );
14302                 if( status ) return status;
14303         }
14304 #endif
14305
14306 #ifdef HAVE_LINUX_THREADS
14307         pthread_kill_other_threads_np();
14308 #endif
14309
14310         return 0;
14311
14312 ; return 0; }
14313 EOF
14314 if { (eval echo configure:14315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14315   rm -rf conftest*
14316   ol_cv_pthread_threads=yes
14317 else
14318   echo "configure: failed program was:" >&5
14319   cat conftest.$ac_ext >&5
14320   rm -rf conftest*
14321   ol_cv_pthread_threads=no
14322 fi
14323 rm -f conftest*
14324 else
14325   cat > conftest.$ac_ext <<EOF
14326 #line 14327 "configure"
14327 #include "confdefs.h"
14328 /* pthread test headers */
14329 #include <pthread.h>
14330 #ifndef NULL
14331 #define NULL (void*)0
14332 #endif
14333
14334 static void *task(p)
14335         void *p;
14336 {
14337         return (void *) (p == NULL);
14338 }
14339
14340
14341 int main(argc, argv)
14342         int argc;
14343         char **argv;
14344 {
14345
14346         /* pthread test function */
14347         pthread_t t;
14348         int status;
14349         int detach = 1;
14350
14351 #ifdef HAVE_PTHREADS_FINAL
14352         /* Final pthreads */
14353         pthread_attr_t attr;
14354
14355         status = pthread_attr_init(&attr);
14356         if( status ) return status;
14357
14358 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14359         if( !detach ) {
14360 #if defined( PTHREAD_CREATE_JOINABLE )
14361                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14362 #else
14363                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14364 #endif
14365
14366 #ifdef PTHREAD_CREATE_DETACHED
14367         } else {
14368                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14369 #endif
14370         }
14371         if( status ) return status;
14372 #endif
14373
14374         status = pthread_create( &t, &attr, task, NULL );
14375         if( status ) return status;
14376
14377 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14378         if( detach ) {
14379                 /* give thread a chance to complete */
14380                 /* it should remain joinable and hence detachable */
14381                 sleep( 1 );
14382
14383                 status = pthread_detach( t );
14384                 if( status ) return status;
14385         }
14386 #endif
14387
14388 #else
14389         /* Draft 4 pthreads */
14390         status = pthread_create( &t, pthread_attr_default, task, NULL );
14391         if( status ) return status;
14392
14393         if( detach ) {
14394                 /* give thread a chance to complete */
14395                 /* it should remain joinable and hence detachable */
14396                 sleep( 1 );
14397
14398                 status = pthread_detach( &t );
14399                 if( status ) return status;
14400         }
14401 #endif
14402
14403 #ifdef HAVE_LINUX_THREADS
14404         pthread_kill_other_threads_np();
14405 #endif
14406
14407         return 0;
14408
14409 }
14410
14411 EOF
14412 if { (eval echo configure:14413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14413 then
14414   ol_cv_pthread_threads=yes
14415 else
14416   echo "configure: failed program was:" >&5
14417   cat conftest.$ac_ext >&5
14418   rm -fr conftest*
14419   ol_cv_pthread_threads=no
14420 fi
14421 rm -fr conftest*
14422 fi
14423
14424
14425                 # restore the LIBS
14426                 LIBS="$ol_LIBS"
14427         
14428 fi
14429
14430 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14431
14432         if test $ol_cv_pthread_threads = yes ; then
14433                 ol_link_pthreads="-threads"
14434                 ol_link_threads=posix
14435         fi
14436 fi
14437
14438
14439                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14440 if test "$ol_link_threads" = no ; then
14441         # try -lpthreads -lmach -lexc -lc_r
14442         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14443 echo "configure:14444: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14444 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14445   echo $ac_n "(cached) $ac_c" 1>&6
14446 else
14447   
14448                 # save the flags
14449                 ol_LIBS="$LIBS"
14450                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14451
14452                 if test "$cross_compiling" = yes; then
14453   cat > conftest.$ac_ext <<EOF
14454 #line 14455 "configure"
14455 #include "confdefs.h"
14456 /* pthread test headers */
14457 #include <pthread.h>
14458 #ifndef NULL
14459 #define NULL (void*)0
14460 #endif
14461
14462 static void *task(p)
14463         void *p;
14464 {
14465         return (void *) (p == NULL);
14466 }
14467
14468 int main() {
14469
14470         /* pthread test function */
14471         pthread_t t;
14472         int status;
14473         int detach = 1;
14474
14475 #ifdef HAVE_PTHREADS_FINAL
14476         /* Final pthreads */
14477         pthread_attr_t attr;
14478
14479         status = pthread_attr_init(&attr);
14480         if( status ) return status;
14481
14482 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14483         if( !detach ) {
14484 #if defined( PTHREAD_CREATE_JOINABLE )
14485                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14486 #else
14487                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14488 #endif
14489
14490 #ifdef PTHREAD_CREATE_DETACHED
14491         } else {
14492                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14493 #endif
14494         }
14495         if( status ) return status;
14496 #endif
14497
14498         status = pthread_create( &t, &attr, task, NULL );
14499         if( status ) return status;
14500
14501 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14502         if( detach ) {
14503                 /* give thread a chance to complete */
14504                 /* it should remain joinable and hence detachable */
14505                 sleep( 1 );
14506
14507                 status = pthread_detach( t );
14508                 if( status ) return status;
14509         }
14510 #endif
14511
14512 #else
14513         /* Draft 4 pthreads */
14514         status = pthread_create( &t, pthread_attr_default, task, NULL );
14515         if( status ) return status;
14516
14517         if( detach ) {
14518                 /* give thread a chance to complete */
14519                 /* it should remain joinable and hence detachable */
14520                 sleep( 1 );
14521
14522                 status = pthread_detach( &t );
14523                 if( status ) return status;
14524         }
14525 #endif
14526
14527 #ifdef HAVE_LINUX_THREADS
14528         pthread_kill_other_threads_np();
14529 #endif
14530
14531         return 0;
14532
14533 ; return 0; }
14534 EOF
14535 if { (eval echo configure:14536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14536   rm -rf conftest*
14537   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14538 else
14539   echo "configure: failed program was:" >&5
14540   cat conftest.$ac_ext >&5
14541   rm -rf conftest*
14542   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14543 fi
14544 rm -f conftest*
14545 else
14546   cat > conftest.$ac_ext <<EOF
14547 #line 14548 "configure"
14548 #include "confdefs.h"
14549 /* pthread test headers */
14550 #include <pthread.h>
14551 #ifndef NULL
14552 #define NULL (void*)0
14553 #endif
14554
14555 static void *task(p)
14556         void *p;
14557 {
14558         return (void *) (p == NULL);
14559 }
14560
14561
14562 int main(argc, argv)
14563         int argc;
14564         char **argv;
14565 {
14566
14567         /* pthread test function */
14568         pthread_t t;
14569         int status;
14570         int detach = 1;
14571
14572 #ifdef HAVE_PTHREADS_FINAL
14573         /* Final pthreads */
14574         pthread_attr_t attr;
14575
14576         status = pthread_attr_init(&attr);
14577         if( status ) return status;
14578
14579 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14580         if( !detach ) {
14581 #if defined( PTHREAD_CREATE_JOINABLE )
14582                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14583 #else
14584                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14585 #endif
14586
14587 #ifdef PTHREAD_CREATE_DETACHED
14588         } else {
14589                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14590 #endif
14591         }
14592         if( status ) return status;
14593 #endif
14594
14595         status = pthread_create( &t, &attr, task, NULL );
14596         if( status ) return status;
14597
14598 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14599         if( detach ) {
14600                 /* give thread a chance to complete */
14601                 /* it should remain joinable and hence detachable */
14602                 sleep( 1 );
14603
14604                 status = pthread_detach( t );
14605                 if( status ) return status;
14606         }
14607 #endif
14608
14609 #else
14610         /* Draft 4 pthreads */
14611         status = pthread_create( &t, pthread_attr_default, task, NULL );
14612         if( status ) return status;
14613
14614         if( detach ) {
14615                 /* give thread a chance to complete */
14616                 /* it should remain joinable and hence detachable */
14617                 sleep( 1 );
14618
14619                 status = pthread_detach( &t );
14620                 if( status ) return status;
14621         }
14622 #endif
14623
14624 #ifdef HAVE_LINUX_THREADS
14625         pthread_kill_other_threads_np();
14626 #endif
14627
14628         return 0;
14629
14630 }
14631
14632 EOF
14633 if { (eval echo configure:14634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14634 then
14635   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14636 else
14637   echo "configure: failed program was:" >&5
14638   cat conftest.$ac_ext >&5
14639   rm -fr conftest*
14640   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14641 fi
14642 rm -fr conftest*
14643 fi
14644
14645
14646                 # restore the LIBS
14647                 LIBS="$ol_LIBS"
14648         
14649 fi
14650
14651 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14652
14653         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14654                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14655                 ol_link_threads=posix
14656         fi
14657 fi
14658
14659                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14660 if test "$ol_link_threads" = no ; then
14661         # try -lpthreads -lmach -lexc
14662         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14663 echo "configure:14664: checking for pthread link with -lpthreads -lmach -lexc" >&5
14664 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14665   echo $ac_n "(cached) $ac_c" 1>&6
14666 else
14667   
14668                 # save the flags
14669                 ol_LIBS="$LIBS"
14670                 LIBS="-lpthreads -lmach -lexc $LIBS"
14671
14672                 if test "$cross_compiling" = yes; then
14673   cat > conftest.$ac_ext <<EOF
14674 #line 14675 "configure"
14675 #include "confdefs.h"
14676 /* pthread test headers */
14677 #include <pthread.h>
14678 #ifndef NULL
14679 #define NULL (void*)0
14680 #endif
14681
14682 static void *task(p)
14683         void *p;
14684 {
14685         return (void *) (p == NULL);
14686 }
14687
14688 int main() {
14689
14690         /* pthread test function */
14691         pthread_t t;
14692         int status;
14693         int detach = 1;
14694
14695 #ifdef HAVE_PTHREADS_FINAL
14696         /* Final pthreads */
14697         pthread_attr_t attr;
14698
14699         status = pthread_attr_init(&attr);
14700         if( status ) return status;
14701
14702 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14703         if( !detach ) {
14704 #if defined( PTHREAD_CREATE_JOINABLE )
14705                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14706 #else
14707                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14708 #endif
14709
14710 #ifdef PTHREAD_CREATE_DETACHED
14711         } else {
14712                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14713 #endif
14714         }
14715         if( status ) return status;
14716 #endif
14717
14718         status = pthread_create( &t, &attr, task, NULL );
14719         if( status ) return status;
14720
14721 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14722         if( detach ) {
14723                 /* give thread a chance to complete */
14724                 /* it should remain joinable and hence detachable */
14725                 sleep( 1 );
14726
14727                 status = pthread_detach( t );
14728                 if( status ) return status;
14729         }
14730 #endif
14731
14732 #else
14733         /* Draft 4 pthreads */
14734         status = pthread_create( &t, pthread_attr_default, task, NULL );
14735         if( status ) return status;
14736
14737         if( detach ) {
14738                 /* give thread a chance to complete */
14739                 /* it should remain joinable and hence detachable */
14740                 sleep( 1 );
14741
14742                 status = pthread_detach( &t );
14743                 if( status ) return status;
14744         }
14745 #endif
14746
14747 #ifdef HAVE_LINUX_THREADS
14748         pthread_kill_other_threads_np();
14749 #endif
14750
14751         return 0;
14752
14753 ; return 0; }
14754 EOF
14755 if { (eval echo configure:14756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14756   rm -rf conftest*
14757   ol_cv_pthread_lpthreads_lmach_lexc=yes
14758 else
14759   echo "configure: failed program was:" >&5
14760   cat conftest.$ac_ext >&5
14761   rm -rf conftest*
14762   ol_cv_pthread_lpthreads_lmach_lexc=no
14763 fi
14764 rm -f conftest*
14765 else
14766   cat > conftest.$ac_ext <<EOF
14767 #line 14768 "configure"
14768 #include "confdefs.h"
14769 /* pthread test headers */
14770 #include <pthread.h>
14771 #ifndef NULL
14772 #define NULL (void*)0
14773 #endif
14774
14775 static void *task(p)
14776         void *p;
14777 {
14778         return (void *) (p == NULL);
14779 }
14780
14781
14782 int main(argc, argv)
14783         int argc;
14784         char **argv;
14785 {
14786
14787         /* pthread test function */
14788         pthread_t t;
14789         int status;
14790         int detach = 1;
14791
14792 #ifdef HAVE_PTHREADS_FINAL
14793         /* Final pthreads */
14794         pthread_attr_t attr;
14795
14796         status = pthread_attr_init(&attr);
14797         if( status ) return status;
14798
14799 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14800         if( !detach ) {
14801 #if defined( PTHREAD_CREATE_JOINABLE )
14802                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14803 #else
14804                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14805 #endif
14806
14807 #ifdef PTHREAD_CREATE_DETACHED
14808         } else {
14809                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14810 #endif
14811         }
14812         if( status ) return status;
14813 #endif
14814
14815         status = pthread_create( &t, &attr, task, NULL );
14816         if( status ) return status;
14817
14818 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14819         if( detach ) {
14820                 /* give thread a chance to complete */
14821                 /* it should remain joinable and hence detachable */
14822                 sleep( 1 );
14823
14824                 status = pthread_detach( t );
14825                 if( status ) return status;
14826         }
14827 #endif
14828
14829 #else
14830         /* Draft 4 pthreads */
14831         status = pthread_create( &t, pthread_attr_default, task, NULL );
14832         if( status ) return status;
14833
14834         if( detach ) {
14835                 /* give thread a chance to complete */
14836                 /* it should remain joinable and hence detachable */
14837                 sleep( 1 );
14838
14839                 status = pthread_detach( &t );
14840                 if( status ) return status;
14841         }
14842 #endif
14843
14844 #ifdef HAVE_LINUX_THREADS
14845         pthread_kill_other_threads_np();
14846 #endif
14847
14848         return 0;
14849
14850 }
14851
14852 EOF
14853 if { (eval echo configure:14854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14854 then
14855   ol_cv_pthread_lpthreads_lmach_lexc=yes
14856 else
14857   echo "configure: failed program was:" >&5
14858   cat conftest.$ac_ext >&5
14859   rm -fr conftest*
14860   ol_cv_pthread_lpthreads_lmach_lexc=no
14861 fi
14862 rm -fr conftest*
14863 fi
14864
14865
14866                 # restore the LIBS
14867                 LIBS="$ol_LIBS"
14868         
14869 fi
14870
14871 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14872
14873         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14874                 ol_link_pthreads="-lpthreads -lmach -lexc"
14875                 ol_link_threads=posix
14876         fi
14877 fi
14878
14879                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14880 if test "$ol_link_threads" = no ; then
14881         # try -lpthreads -lexc
14882         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14883 echo "configure:14884: checking for pthread link with -lpthreads -lexc" >&5
14884 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14885   echo $ac_n "(cached) $ac_c" 1>&6
14886 else
14887   
14888                 # save the flags
14889                 ol_LIBS="$LIBS"
14890                 LIBS="-lpthreads -lexc $LIBS"
14891
14892                 if test "$cross_compiling" = yes; then
14893   cat > conftest.$ac_ext <<EOF
14894 #line 14895 "configure"
14895 #include "confdefs.h"
14896 /* pthread test headers */
14897 #include <pthread.h>
14898 #ifndef NULL
14899 #define NULL (void*)0
14900 #endif
14901
14902 static void *task(p)
14903         void *p;
14904 {
14905         return (void *) (p == NULL);
14906 }
14907
14908 int main() {
14909
14910         /* pthread test function */
14911         pthread_t t;
14912         int status;
14913         int detach = 1;
14914
14915 #ifdef HAVE_PTHREADS_FINAL
14916         /* Final pthreads */
14917         pthread_attr_t attr;
14918
14919         status = pthread_attr_init(&attr);
14920         if( status ) return status;
14921
14922 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14923         if( !detach ) {
14924 #if defined( PTHREAD_CREATE_JOINABLE )
14925                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14926 #else
14927                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14928 #endif
14929
14930 #ifdef PTHREAD_CREATE_DETACHED
14931         } else {
14932                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14933 #endif
14934         }
14935         if( status ) return status;
14936 #endif
14937
14938         status = pthread_create( &t, &attr, task, NULL );
14939         if( status ) return status;
14940
14941 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14942         if( detach ) {
14943                 /* give thread a chance to complete */
14944                 /* it should remain joinable and hence detachable */
14945                 sleep( 1 );
14946
14947                 status = pthread_detach( t );
14948                 if( status ) return status;
14949         }
14950 #endif
14951
14952 #else
14953         /* Draft 4 pthreads */
14954         status = pthread_create( &t, pthread_attr_default, task, NULL );
14955         if( status ) return status;
14956
14957         if( detach ) {
14958                 /* give thread a chance to complete */
14959                 /* it should remain joinable and hence detachable */
14960                 sleep( 1 );
14961
14962                 status = pthread_detach( &t );
14963                 if( status ) return status;
14964         }
14965 #endif
14966
14967 #ifdef HAVE_LINUX_THREADS
14968         pthread_kill_other_threads_np();
14969 #endif
14970
14971         return 0;
14972
14973 ; return 0; }
14974 EOF
14975 if { (eval echo configure:14976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14976   rm -rf conftest*
14977   ol_cv_pthread_lpthreads_lexc=yes
14978 else
14979   echo "configure: failed program was:" >&5
14980   cat conftest.$ac_ext >&5
14981   rm -rf conftest*
14982   ol_cv_pthread_lpthreads_lexc=no
14983 fi
14984 rm -f conftest*
14985 else
14986   cat > conftest.$ac_ext <<EOF
14987 #line 14988 "configure"
14988 #include "confdefs.h"
14989 /* pthread test headers */
14990 #include <pthread.h>
14991 #ifndef NULL
14992 #define NULL (void*)0
14993 #endif
14994
14995 static void *task(p)
14996         void *p;
14997 {
14998         return (void *) (p == NULL);
14999 }
15000
15001
15002 int main(argc, argv)
15003         int argc;
15004         char **argv;
15005 {
15006
15007         /* pthread test function */
15008         pthread_t t;
15009         int status;
15010         int detach = 1;
15011
15012 #ifdef HAVE_PTHREADS_FINAL
15013         /* Final pthreads */
15014         pthread_attr_t attr;
15015
15016         status = pthread_attr_init(&attr);
15017         if( status ) return status;
15018
15019 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15020         if( !detach ) {
15021 #if defined( PTHREAD_CREATE_JOINABLE )
15022                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15023 #else
15024                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15025 #endif
15026
15027 #ifdef PTHREAD_CREATE_DETACHED
15028         } else {
15029                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15030 #endif
15031         }
15032         if( status ) return status;
15033 #endif
15034
15035         status = pthread_create( &t, &attr, task, NULL );
15036         if( status ) return status;
15037
15038 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15039         if( detach ) {
15040                 /* give thread a chance to complete */
15041                 /* it should remain joinable and hence detachable */
15042                 sleep( 1 );
15043
15044                 status = pthread_detach( t );
15045                 if( status ) return status;
15046         }
15047 #endif
15048
15049 #else
15050         /* Draft 4 pthreads */
15051         status = pthread_create( &t, pthread_attr_default, task, NULL );
15052         if( status ) return status;
15053
15054         if( detach ) {
15055                 /* give thread a chance to complete */
15056                 /* it should remain joinable and hence detachable */
15057                 sleep( 1 );
15058
15059                 status = pthread_detach( &t );
15060                 if( status ) return status;
15061         }
15062 #endif
15063
15064 #ifdef HAVE_LINUX_THREADS
15065         pthread_kill_other_threads_np();
15066 #endif
15067
15068         return 0;
15069
15070 }
15071
15072 EOF
15073 if { (eval echo configure:15074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15074 then
15075   ol_cv_pthread_lpthreads_lexc=yes
15076 else
15077   echo "configure: failed program was:" >&5
15078   cat conftest.$ac_ext >&5
15079   rm -fr conftest*
15080   ol_cv_pthread_lpthreads_lexc=no
15081 fi
15082 rm -fr conftest*
15083 fi
15084
15085
15086                 # restore the LIBS
15087                 LIBS="$ol_LIBS"
15088         
15089 fi
15090
15091 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
15092
15093         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
15094                 ol_link_pthreads="-lpthreads -lexc"
15095                 ol_link_threads=posix
15096         fi
15097 fi
15098
15099
15100                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
15101 if test "$ol_link_threads" = no ; then
15102         # try -lpthreads
15103         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
15104 echo "configure:15105: checking for pthread link with -lpthreads" >&5
15105 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
15106   echo $ac_n "(cached) $ac_c" 1>&6
15107 else
15108   
15109                 # save the flags
15110                 ol_LIBS="$LIBS"
15111                 LIBS="-lpthreads $LIBS"
15112
15113                 if test "$cross_compiling" = yes; then
15114   cat > conftest.$ac_ext <<EOF
15115 #line 15116 "configure"
15116 #include "confdefs.h"
15117 /* pthread test headers */
15118 #include <pthread.h>
15119 #ifndef NULL
15120 #define NULL (void*)0
15121 #endif
15122
15123 static void *task(p)
15124         void *p;
15125 {
15126         return (void *) (p == NULL);
15127 }
15128
15129 int main() {
15130
15131         /* pthread test function */
15132         pthread_t t;
15133         int status;
15134         int detach = 1;
15135
15136 #ifdef HAVE_PTHREADS_FINAL
15137         /* Final pthreads */
15138         pthread_attr_t attr;
15139
15140         status = pthread_attr_init(&attr);
15141         if( status ) return status;
15142
15143 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15144         if( !detach ) {
15145 #if defined( PTHREAD_CREATE_JOINABLE )
15146                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15147 #else
15148                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15149 #endif
15150
15151 #ifdef PTHREAD_CREATE_DETACHED
15152         } else {
15153                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15154 #endif
15155         }
15156         if( status ) return status;
15157 #endif
15158
15159         status = pthread_create( &t, &attr, task, NULL );
15160         if( status ) return status;
15161
15162 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15163         if( detach ) {
15164                 /* give thread a chance to complete */
15165                 /* it should remain joinable and hence detachable */
15166                 sleep( 1 );
15167
15168                 status = pthread_detach( t );
15169                 if( status ) return status;
15170         }
15171 #endif
15172
15173 #else
15174         /* Draft 4 pthreads */
15175         status = pthread_create( &t, pthread_attr_default, task, NULL );
15176         if( status ) return status;
15177
15178         if( detach ) {
15179                 /* give thread a chance to complete */
15180                 /* it should remain joinable and hence detachable */
15181                 sleep( 1 );
15182
15183                 status = pthread_detach( &t );
15184                 if( status ) return status;
15185         }
15186 #endif
15187
15188 #ifdef HAVE_LINUX_THREADS
15189         pthread_kill_other_threads_np();
15190 #endif
15191
15192         return 0;
15193
15194 ; return 0; }
15195 EOF
15196 if { (eval echo configure:15197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15197   rm -rf conftest*
15198   ol_cv_pthread_lib_lpthreads=yes
15199 else
15200   echo "configure: failed program was:" >&5
15201   cat conftest.$ac_ext >&5
15202   rm -rf conftest*
15203   ol_cv_pthread_lib_lpthreads=no
15204 fi
15205 rm -f conftest*
15206 else
15207   cat > conftest.$ac_ext <<EOF
15208 #line 15209 "configure"
15209 #include "confdefs.h"
15210 /* pthread test headers */
15211 #include <pthread.h>
15212 #ifndef NULL
15213 #define NULL (void*)0
15214 #endif
15215
15216 static void *task(p)
15217         void *p;
15218 {
15219         return (void *) (p == NULL);
15220 }
15221
15222
15223 int main(argc, argv)
15224         int argc;
15225         char **argv;
15226 {
15227
15228         /* pthread test function */
15229         pthread_t t;
15230         int status;
15231         int detach = 1;
15232
15233 #ifdef HAVE_PTHREADS_FINAL
15234         /* Final pthreads */
15235         pthread_attr_t attr;
15236
15237         status = pthread_attr_init(&attr);
15238         if( status ) return status;
15239
15240 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15241         if( !detach ) {
15242 #if defined( PTHREAD_CREATE_JOINABLE )
15243                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15244 #else
15245                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15246 #endif
15247
15248 #ifdef PTHREAD_CREATE_DETACHED
15249         } else {
15250                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15251 #endif
15252         }
15253         if( status ) return status;
15254 #endif
15255
15256         status = pthread_create( &t, &attr, task, NULL );
15257         if( status ) return status;
15258
15259 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15260         if( detach ) {
15261                 /* give thread a chance to complete */
15262                 /* it should remain joinable and hence detachable */
15263                 sleep( 1 );
15264
15265                 status = pthread_detach( t );
15266                 if( status ) return status;
15267         }
15268 #endif
15269
15270 #else
15271         /* Draft 4 pthreads */
15272         status = pthread_create( &t, pthread_attr_default, task, NULL );
15273         if( status ) return status;
15274
15275         if( detach ) {
15276                 /* give thread a chance to complete */
15277                 /* it should remain joinable and hence detachable */
15278                 sleep( 1 );
15279
15280                 status = pthread_detach( &t );
15281                 if( status ) return status;
15282         }
15283 #endif
15284
15285 #ifdef HAVE_LINUX_THREADS
15286         pthread_kill_other_threads_np();
15287 #endif
15288
15289         return 0;
15290
15291 }
15292
15293 EOF
15294 if { (eval echo configure:15295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15295 then
15296   ol_cv_pthread_lib_lpthreads=yes
15297 else
15298   echo "configure: failed program was:" >&5
15299   cat conftest.$ac_ext >&5
15300   rm -fr conftest*
15301   ol_cv_pthread_lib_lpthreads=no
15302 fi
15303 rm -fr conftest*
15304 fi
15305
15306
15307                 # restore the LIBS
15308                 LIBS="$ol_LIBS"
15309         
15310 fi
15311
15312 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
15313
15314         if test $ol_cv_pthread_lib_lpthreads = yes ; then
15315                 ol_link_pthreads="-lpthreads"
15316                 ol_link_threads=posix
15317         fi
15318 fi
15319
15320
15321                 if test $ol_link_threads != no ; then
15322                         cat >> confdefs.h <<\EOF
15323 #define HAVE_PTHREADS 1
15324 EOF
15325
15326
15327                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
15328
15329                                                 save_CPPFLAGS="$CPPFLAGS"
15330                         save_LIBS="$LIBS"
15331                         LIBS="$LTHREAD_LIBS $LIBS"
15332
15333                                                                                                 for ac_func in sched_yield pthread_yield
15334 do
15335 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15336 echo "configure:15337: checking for $ac_func" >&5
15337 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15338   echo $ac_n "(cached) $ac_c" 1>&6
15339 else
15340   cat > conftest.$ac_ext <<EOF
15341 #line 15342 "configure"
15342 #include "confdefs.h"
15343 /* System header to define __stub macros and hopefully few prototypes,
15344     which can conflict with char $ac_func(); below.  */
15345 #include <assert.h>
15346 /* Override any gcc2 internal prototype to avoid an error.  */
15347 /* We use char because int might match the return type of a gcc2
15348     builtin and then its argument prototype would still apply.  */
15349 char $ac_func();
15350 char (*f)();
15351
15352 int main() {
15353
15354 /* The GNU C library defines this for functions which it implements
15355     to always fail with ENOSYS.  Some functions are actually named
15356     something starting with __ and the normal name is an alias.  */
15357 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15358 choke me
15359 #else
15360 f = $ac_func;
15361 #endif
15362
15363 ; return 0; }
15364 EOF
15365 if { (eval echo configure:15366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15366   rm -rf conftest*
15367   eval "ac_cv_func_$ac_func=yes"
15368 else
15369   echo "configure: failed program was:" >&5
15370   cat conftest.$ac_ext >&5
15371   rm -rf conftest*
15372   eval "ac_cv_func_$ac_func=no"
15373 fi
15374 rm -f conftest*
15375 fi
15376
15377 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15378   echo "$ac_t""yes" 1>&6
15379     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15380   cat >> confdefs.h <<EOF
15381 #define $ac_tr_func 1
15382 EOF
15383  
15384 else
15385   echo "$ac_t""no" 1>&6
15386 fi
15387 done
15388
15389
15390                         if test $ac_cv_func_sched_yield = no -a \
15391                                 $ac_cv_func_pthread_yield = no ; then
15392                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
15393 echo "configure:15394: checking for sched_yield in -lrt" >&5
15394 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
15395 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15396   echo $ac_n "(cached) $ac_c" 1>&6
15397 else
15398   ac_save_LIBS="$LIBS"
15399 LIBS="-lrt  $LIBS"
15400 cat > conftest.$ac_ext <<EOF
15401 #line 15402 "configure"
15402 #include "confdefs.h"
15403 /* Override any gcc2 internal prototype to avoid an error.  */
15404 /* We use char because int might match the return type of a gcc2
15405     builtin and then its argument prototype would still apply.  */
15406 char sched_yield();
15407
15408 int main() {
15409 sched_yield()
15410 ; return 0; }
15411 EOF
15412 if { (eval echo configure:15413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15413   rm -rf conftest*
15414   eval "ac_cv_lib_$ac_lib_var=yes"
15415 else
15416   echo "configure: failed program was:" >&5
15417   cat conftest.$ac_ext >&5
15418   rm -rf conftest*
15419   eval "ac_cv_lib_$ac_lib_var=no"
15420 fi
15421 rm -f conftest*
15422 LIBS="$ac_save_LIBS"
15423
15424 fi
15425 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15426   echo "$ac_t""yes" 1>&6
15427   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
15428                                         cat >> confdefs.h <<\EOF
15429 #define HAVE_SCHED_YIELD 1
15430 EOF
15431
15432                                         ac_cv_func_sched_yield=yes
15433 else
15434   echo "$ac_t""no" 1>&6
15435 ac_cv_func_sched_yield=no
15436 fi
15437
15438                         fi
15439                         if test $ac_cv_func_sched_yield = no -a \
15440                                 $ac_cv_func_pthread_yield = no ; then
15441                                                                                                 for ac_func in thr_yield
15442 do
15443 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15444 echo "configure:15445: checking for $ac_func" >&5
15445 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15446   echo $ac_n "(cached) $ac_c" 1>&6
15447 else
15448   cat > conftest.$ac_ext <<EOF
15449 #line 15450 "configure"
15450 #include "confdefs.h"
15451 /* System header to define __stub macros and hopefully few prototypes,
15452     which can conflict with char $ac_func(); below.  */
15453 #include <assert.h>
15454 /* Override any gcc2 internal prototype to avoid an error.  */
15455 /* We use char because int might match the return type of a gcc2
15456     builtin and then its argument prototype would still apply.  */
15457 char $ac_func();
15458 char (*f)();
15459
15460 int main() {
15461
15462 /* The GNU C library defines this for functions which it implements
15463     to always fail with ENOSYS.  Some functions are actually named
15464     something starting with __ and the normal name is an alias.  */
15465 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15466 choke me
15467 #else
15468 f = $ac_func;
15469 #endif
15470
15471 ; return 0; }
15472 EOF
15473 if { (eval echo configure:15474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15474   rm -rf conftest*
15475   eval "ac_cv_func_$ac_func=yes"
15476 else
15477   echo "configure: failed program was:" >&5
15478   cat conftest.$ac_ext >&5
15479   rm -rf conftest*
15480   eval "ac_cv_func_$ac_func=no"
15481 fi
15482 rm -f conftest*
15483 fi
15484
15485 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15486   echo "$ac_t""yes" 1>&6
15487     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15488   cat >> confdefs.h <<EOF
15489 #define $ac_tr_func 1
15490 EOF
15491  
15492 else
15493   echo "$ac_t""no" 1>&6
15494 fi
15495 done
15496
15497                         fi
15498                         if test $ac_cv_func_sched_yield = no -a \
15499                                 $ac_cv_func_pthread_yield = no -a \
15500                                 "$ac_cv_func_thr_yield" = no ; then
15501                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
15502                         fi
15503
15504                                                 for ac_func in pthread_kill pthread_rwlock_destroy
15505 do
15506 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15507 echo "configure:15508: checking for $ac_func" >&5
15508 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15509   echo $ac_n "(cached) $ac_c" 1>&6
15510 else
15511   cat > conftest.$ac_ext <<EOF
15512 #line 15513 "configure"
15513 #include "confdefs.h"
15514 /* System header to define __stub macros and hopefully few prototypes,
15515     which can conflict with char $ac_func(); below.  */
15516 #include <assert.h>
15517 /* Override any gcc2 internal prototype to avoid an error.  */
15518 /* We use char because int might match the return type of a gcc2
15519     builtin and then its argument prototype would still apply.  */
15520 char $ac_func();
15521 char (*f)();
15522
15523 int main() {
15524
15525 /* The GNU C library defines this for functions which it implements
15526     to always fail with ENOSYS.  Some functions are actually named
15527     something starting with __ and the normal name is an alias.  */
15528 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15529 choke me
15530 #else
15531 f = $ac_func;
15532 #endif
15533
15534 ; return 0; }
15535 EOF
15536 if { (eval echo configure:15537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15537   rm -rf conftest*
15538   eval "ac_cv_func_$ac_func=yes"
15539 else
15540   echo "configure: failed program was:" >&5
15541   cat conftest.$ac_ext >&5
15542   rm -rf conftest*
15543   eval "ac_cv_func_$ac_func=no"
15544 fi
15545 rm -f conftest*
15546 fi
15547
15548 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15549   echo "$ac_t""yes" 1>&6
15550     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15551   cat >> confdefs.h <<EOF
15552 #define $ac_tr_func 1
15553 EOF
15554  
15555 else
15556   echo "$ac_t""no" 1>&6
15557 fi
15558 done
15559
15560
15561                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
15562 echo "configure:15563: checking for pthread_detach with <pthread.h>" >&5
15563 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
15564   echo $ac_n "(cached) $ac_c" 1>&6
15565 else
15566   
15567                                                                 cat > conftest.$ac_ext <<EOF
15568 #line 15569 "configure"
15569 #include "confdefs.h"
15570
15571 #include <pthread.h>
15572 #ifndef NULL
15573 #define NULL (void*)0
15574 #endif
15575
15576 int main() {
15577 pthread_detach(NULL);
15578 ; return 0; }
15579 EOF
15580 if { (eval echo configure:15581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15581   rm -rf conftest*
15582   ol_cv_func_pthread_detach=yes
15583 else
15584   echo "configure: failed program was:" >&5
15585   cat conftest.$ac_ext >&5
15586   rm -rf conftest*
15587   ol_cv_func_pthread_detach=no
15588 fi
15589 rm -f conftest*
15590                         
15591 fi
15592
15593 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15594
15595                         if test $ol_cv_func_pthread_detach = no ; then
15596                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15597                         fi
15598
15599                         cat >> confdefs.h <<\EOF
15600 #define HAVE_PTHREAD_DETACH 1
15601 EOF
15602
15603
15604                                                 for ac_func in \
15605                                 pthread_setconcurrency \
15606                                 pthread_getconcurrency \
15607                                 thr_setconcurrency \
15608                                 thr_getconcurrency \
15609                         
15610 do
15611 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15612 echo "configure:15613: checking for $ac_func" >&5
15613 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15614   echo $ac_n "(cached) $ac_c" 1>&6
15615 else
15616   cat > conftest.$ac_ext <<EOF
15617 #line 15618 "configure"
15618 #include "confdefs.h"
15619 /* System header to define __stub macros and hopefully few prototypes,
15620     which can conflict with char $ac_func(); below.  */
15621 #include <assert.h>
15622 /* Override any gcc2 internal prototype to avoid an error.  */
15623 /* We use char because int might match the return type of a gcc2
15624     builtin and then its argument prototype would still apply.  */
15625 char $ac_func();
15626 char (*f)();
15627
15628 int main() {
15629
15630 /* The GNU C library defines this for functions which it implements
15631     to always fail with ENOSYS.  Some functions are actually named
15632     something starting with __ and the normal name is an alias.  */
15633 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15634 choke me
15635 #else
15636 f = $ac_func;
15637 #endif
15638
15639 ; return 0; }
15640 EOF
15641 if { (eval echo configure:15642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15642   rm -rf conftest*
15643   eval "ac_cv_func_$ac_func=yes"
15644 else
15645   echo "configure: failed program was:" >&5
15646   cat conftest.$ac_ext >&5
15647   rm -rf conftest*
15648   eval "ac_cv_func_$ac_func=no"
15649 fi
15650 rm -f conftest*
15651 fi
15652
15653 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15654   echo "$ac_t""yes" 1>&6
15655     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15656   cat >> confdefs.h <<EOF
15657 #define $ac_tr_func 1
15658 EOF
15659  
15660 else
15661   echo "$ac_t""no" 1>&6
15662 fi
15663 done
15664
15665
15666                         
15667         for ac_func in pthread_kill_other_threads_np
15668 do
15669 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15670 echo "configure:15671: checking for $ac_func" >&5
15671 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15672   echo $ac_n "(cached) $ac_c" 1>&6
15673 else
15674   cat > conftest.$ac_ext <<EOF
15675 #line 15676 "configure"
15676 #include "confdefs.h"
15677 /* System header to define __stub macros and hopefully few prototypes,
15678     which can conflict with char $ac_func(); below.  */
15679 #include <assert.h>
15680 /* Override any gcc2 internal prototype to avoid an error.  */
15681 /* We use char because int might match the return type of a gcc2
15682     builtin and then its argument prototype would still apply.  */
15683 char $ac_func();
15684 char (*f)();
15685
15686 int main() {
15687
15688 /* The GNU C library defines this for functions which it implements
15689     to always fail with ENOSYS.  Some functions are actually named
15690     something starting with __ and the normal name is an alias.  */
15691 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15692 choke me
15693 #else
15694 f = $ac_func;
15695 #endif
15696
15697 ; return 0; }
15698 EOF
15699 if { (eval echo configure:15700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15700   rm -rf conftest*
15701   eval "ac_cv_func_$ac_func=yes"
15702 else
15703   echo "configure: failed program was:" >&5
15704   cat conftest.$ac_ext >&5
15705   rm -rf conftest*
15706   eval "ac_cv_func_$ac_func=no"
15707 fi
15708 rm -f conftest*
15709 fi
15710
15711 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15712   echo "$ac_t""yes" 1>&6
15713     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15714   cat >> confdefs.h <<EOF
15715 #define $ac_tr_func 1
15716 EOF
15717  
15718 else
15719   echo "$ac_t""no" 1>&6
15720 fi
15721 done
15722
15723         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15724 echo "configure:15725: checking for LinuxThreads implementation" >&5
15725 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15726   echo $ac_n "(cached) $ac_c" 1>&6
15727 else
15728   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15729 fi
15730
15731 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15732
15733                         
15734         
15735         
15736         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15737 echo "configure:15738: checking for LinuxThreads consistency" >&5
15738 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15739   echo $ac_n "(cached) $ac_c" 1>&6
15740 else
15741   
15742                 if test $ol_cv_header_linux_threads = yes -a \
15743                         $ol_cv_sys_linux_threads = yes; then
15744                         ol_cv_linux_threads=yes
15745                 elif test $ol_cv_header_linux_threads = no -a \
15746                         $ol_cv_sys_linux_threads = no; then
15747                         ol_cv_linux_threads=no
15748                 else
15749                         ol_cv_linux_threads=error
15750                 fi
15751         
15752 fi
15753
15754 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15755
15756
15757                         if test $ol_cv_linux_threads = error; then
15758                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15759                         fi
15760
15761                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15762 echo "configure:15763: checking if pthread_create() works" >&5
15763 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15764   echo $ac_n "(cached) $ac_c" 1>&6
15765 else
15766   
15767                         if test "$cross_compiling" = yes; then
15768                                 ol_cv_pthread_create_works=yes
15769 else
15770   cat > conftest.$ac_ext <<EOF
15771 #line 15772 "configure"
15772 #include "confdefs.h"
15773 /* pthread test headers */
15774 #include <pthread.h>
15775 #ifndef NULL
15776 #define NULL (void*)0
15777 #endif
15778
15779 static void *task(p)
15780         void *p;
15781 {
15782         return (void *) (p == NULL);
15783 }
15784
15785
15786 int main(argc, argv)
15787         int argc;
15788         char **argv;
15789 {
15790
15791         /* pthread test function */
15792         pthread_t t;
15793         int status;
15794         int detach = 1;
15795
15796 #ifdef HAVE_PTHREADS_FINAL
15797         /* Final pthreads */
15798         pthread_attr_t attr;
15799
15800         status = pthread_attr_init(&attr);
15801         if( status ) return status;
15802
15803 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15804         if( !detach ) {
15805 #if defined( PTHREAD_CREATE_JOINABLE )
15806                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15807 #else
15808                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15809 #endif
15810
15811 #ifdef PTHREAD_CREATE_DETACHED
15812         } else {
15813                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15814 #endif
15815         }
15816         if( status ) return status;
15817 #endif
15818
15819         status = pthread_create( &t, &attr, task, NULL );
15820         if( status ) return status;
15821
15822 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15823         if( detach ) {
15824                 /* give thread a chance to complete */
15825                 /* it should remain joinable and hence detachable */
15826                 sleep( 1 );
15827
15828                 status = pthread_detach( t );
15829                 if( status ) return status;
15830         }
15831 #endif
15832
15833 #else
15834         /* Draft 4 pthreads */
15835         status = pthread_create( &t, pthread_attr_default, task, NULL );
15836         if( status ) return status;
15837
15838         if( detach ) {
15839                 /* give thread a chance to complete */
15840                 /* it should remain joinable and hence detachable */
15841                 sleep( 1 );
15842
15843                 status = pthread_detach( &t );
15844                 if( status ) return status;
15845         }
15846 #endif
15847
15848 #ifdef HAVE_LINUX_THREADS
15849         pthread_kill_other_threads_np();
15850 #endif
15851
15852         return 0;
15853
15854 }
15855
15856 EOF
15857 if { (eval echo configure:15858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15858 then
15859   ol_cv_pthread_create_works=yes
15860 else
15861   echo "configure: failed program was:" >&5
15862   cat conftest.$ac_ext >&5
15863   rm -fr conftest*
15864   ol_cv_pthread_create_works=no
15865 fi
15866 rm -fr conftest*
15867 fi
15868
15869 fi
15870
15871 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15872
15873                         if test $ol_cv_pthread_create_works = no ; then
15874                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15875                         fi
15876
15877                                                 if test $ol_with_yielding_select = auto ; then
15878                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15879 echo "configure:15880: checking if select yields when using pthreads" >&5
15880 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15881   echo $ac_n "(cached) $ac_c" 1>&6
15882 else
15883   
15884                                 if test "$cross_compiling" = yes; then
15885   ol_cv_pthread_select_yields=cross
15886 else
15887   cat > conftest.$ac_ext <<EOF
15888 #line 15889 "configure"
15889 #include "confdefs.h"
15890
15891 #include <sys/types.h>
15892 #include <sys/time.h>
15893 #include <unistd.h>
15894 #include <pthread.h>
15895 #ifndef NULL
15896 #define NULL (void*) 0
15897 #endif
15898
15899 static int fildes[2];
15900
15901 static void *task(p)
15902         void *p;
15903 {
15904         int i;
15905         struct timeval tv;
15906
15907         fd_set rfds;
15908
15909         tv.tv_sec=10;
15910         tv.tv_usec=0;
15911
15912         FD_ZERO(&rfds);
15913         FD_SET(fildes[0], &rfds);
15914
15915         /* we're not interested in any fds */
15916         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15917
15918         if(i < 0) {
15919                 perror("select");
15920                 exit(10);
15921         }
15922
15923         exit(0); /* if we exit here, the select blocked the whole process */
15924 }
15925
15926 int main(argc, argv)
15927         int argc;
15928         char **argv;
15929 {
15930         pthread_t t;
15931
15932         /* create a pipe to select */
15933         if(pipe(&fildes[0])) {
15934                 perror("select");
15935                 exit(1);
15936         }
15937
15938 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15939         (void) pthread_setconcurrency(2);
15940 #else
15941 #ifdef HAVE_THR_SETCONCURRENCY
15942         /* Set Solaris LWP concurrency to 2 */
15943         thr_setconcurrency(2);
15944 #endif
15945 #endif
15946
15947 #if HAVE_PTHREADS_D4
15948         pthread_create(&t, pthread_attr_default, task, NULL);
15949 #else
15950         pthread_create(&t, NULL, task, NULL);
15951 #endif
15952
15953 #if HAVE_SCHED_YIELD
15954         sched_yield();  /* make sure task runs first */
15955 #else
15956 #ifdef HAVE_PTHREAD_YIELD
15957         pthread_yield();        /* make sure task runs first */
15958 #endif
15959 #endif
15960
15961         exit(2);
15962 }
15963 EOF
15964 if { (eval echo configure:15965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15965 then
15966   ol_cv_pthread_select_yields=no
15967 else
15968   echo "configure: failed program was:" >&5
15969   cat conftest.$ac_ext >&5
15970   rm -fr conftest*
15971   ol_cv_pthread_select_yields=yes
15972 fi
15973 rm -fr conftest*
15974 fi
15975
15976 fi
15977
15978 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15979
15980                                 if test $ol_cv_pthread_select_yields = cross ; then
15981                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15982                                 fi
15983
15984                                 if test $ol_cv_pthread_select_yields = yes ; then
15985                                         ol_with_yielding_select=yes
15986                                 fi
15987                         fi
15988
15989                                                 CPPFLAGS="$save_CPPFLAGS"
15990                         LIBS="$save_LIBS"
15991                 else
15992                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15993                 fi
15994         fi
15995
15996         if test $ol_with_threads = posix ; then
15997                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15998         fi
15999 fi
16000
16001 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16002         -o $ol_with_threads = mach ; then
16003
16004                 for ac_hdr in mach/cthreads.h cthreads.h
16005 do
16006 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16007 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16008 echo "configure:16009: checking for $ac_hdr" >&5
16009 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16010   echo $ac_n "(cached) $ac_c" 1>&6
16011 else
16012   cat > conftest.$ac_ext <<EOF
16013 #line 16014 "configure"
16014 #include "confdefs.h"
16015 #include <$ac_hdr>
16016 EOF
16017 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16018 { (eval echo configure:16019: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16019 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16020 if test -z "$ac_err"; then
16021   rm -rf conftest*
16022   eval "ac_cv_header_$ac_safe=yes"
16023 else
16024   echo "$ac_err" >&5
16025   echo "configure: failed program was:" >&5
16026   cat conftest.$ac_ext >&5
16027   rm -rf conftest*
16028   eval "ac_cv_header_$ac_safe=no"
16029 fi
16030 rm -f conftest*
16031 fi
16032 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16033   echo "$ac_t""yes" 1>&6
16034     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16035   cat >> confdefs.h <<EOF
16036 #define $ac_tr_hdr 1
16037 EOF
16038  
16039 else
16040   echo "$ac_t""no" 1>&6
16041 fi
16042 done
16043
16044         if test $ac_cv_header_mach_cthreads_h = yes ; then
16045                 ol_with_threads=found
16046
16047                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
16048 echo "configure:16049: checking for cthread_fork" >&5
16049 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
16050   echo $ac_n "(cached) $ac_c" 1>&6
16051 else
16052   cat > conftest.$ac_ext <<EOF
16053 #line 16054 "configure"
16054 #include "confdefs.h"
16055 /* System header to define __stub macros and hopefully few prototypes,
16056     which can conflict with char cthread_fork(); below.  */
16057 #include <assert.h>
16058 /* Override any gcc2 internal prototype to avoid an error.  */
16059 /* We use char because int might match the return type of a gcc2
16060     builtin and then its argument prototype would still apply.  */
16061 char cthread_fork();
16062 char (*f)();
16063
16064 int main() {
16065
16066 /* The GNU C library defines this for functions which it implements
16067     to always fail with ENOSYS.  Some functions are actually named
16068     something starting with __ and the normal name is an alias.  */
16069 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
16070 choke me
16071 #else
16072 f = cthread_fork;
16073 #endif
16074
16075 ; return 0; }
16076 EOF
16077 if { (eval echo configure:16078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16078   rm -rf conftest*
16079   eval "ac_cv_func_cthread_fork=yes"
16080 else
16081   echo "configure: failed program was:" >&5
16082   cat conftest.$ac_ext >&5
16083   rm -rf conftest*
16084   eval "ac_cv_func_cthread_fork=no"
16085 fi
16086 rm -f conftest*
16087 fi
16088
16089 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
16090   echo "$ac_t""yes" 1>&6
16091   ol_link_threads=yes
16092 else
16093   echo "$ac_t""no" 1>&6
16094 fi
16095
16096
16097                 if test $ol_link_threads = no ; then
16098                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
16099 echo "configure:16100: checking for cthread_fork with -all_load" >&5
16100 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
16101   echo $ac_n "(cached) $ac_c" 1>&6
16102 else
16103   
16104                                                                 save_LIBS="$LIBS"
16105                                 LIBS="-all_load $LIBS"
16106                                 cat > conftest.$ac_ext <<EOF
16107 #line 16108 "configure"
16108 #include "confdefs.h"
16109 #include <mach/cthreads.h>
16110 int main() {
16111
16112                                         cthread_fork((void *)0, (void *)0);
16113                                         
16114 ; return 0; }
16115 EOF
16116 if { (eval echo configure:16117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16117   rm -rf conftest*
16118   ol_cv_cthread_all_load=yes
16119 else
16120   echo "configure: failed program was:" >&5
16121   cat conftest.$ac_ext >&5
16122   rm -rf conftest*
16123   ol_cv_cthread_all_load=no
16124 fi
16125 rm -f conftest*
16126                                                                 LIBS="$save_LIBS"
16127                         
16128 fi
16129
16130 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
16131
16132                         if test $ol_cv_cthread_all_load = yes ; then
16133                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
16134                                 ol_link_threads=mach
16135                                 ol_with_threads=found
16136                         fi
16137                 fi
16138
16139         elif test $ac_cv_header_cthreads_h = yes ; then
16140                                 
16141                 ol_with_threads=found
16142  
16143                                 save_LIBS="$LIBS"
16144                 LIBS="$LIBS -lthreads"
16145                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
16146 echo "configure:16147: checking for cthread_fork" >&5
16147 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
16148   echo $ac_n "(cached) $ac_c" 1>&6
16149 else
16150   cat > conftest.$ac_ext <<EOF
16151 #line 16152 "configure"
16152 #include "confdefs.h"
16153 /* System header to define __stub macros and hopefully few prototypes,
16154     which can conflict with char cthread_fork(); below.  */
16155 #include <assert.h>
16156 /* Override any gcc2 internal prototype to avoid an error.  */
16157 /* We use char because int might match the return type of a gcc2
16158     builtin and then its argument prototype would still apply.  */
16159 char cthread_fork();
16160 char (*f)();
16161
16162 int main() {
16163
16164 /* The GNU C library defines this for functions which it implements
16165     to always fail with ENOSYS.  Some functions are actually named
16166     something starting with __ and the normal name is an alias.  */
16167 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
16168 choke me
16169 #else
16170 f = cthread_fork;
16171 #endif
16172
16173 ; return 0; }
16174 EOF
16175 if { (eval echo configure:16176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16176   rm -rf conftest*
16177   eval "ac_cv_func_cthread_fork=yes"
16178 else
16179   echo "configure: failed program was:" >&5
16180   cat conftest.$ac_ext >&5
16181   rm -rf conftest*
16182   eval "ac_cv_func_cthread_fork=no"
16183 fi
16184 rm -f conftest*
16185 fi
16186
16187 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
16188   echo "$ac_t""yes" 1>&6
16189   ol_link_threads=yes
16190 else
16191   echo "$ac_t""no" 1>&6
16192 fi
16193
16194                 LIBS="$save_LIBS"
16195
16196                 if test $ol_link_threads = yes ; then
16197                         LTHREAD_LIBS="-lthreads"
16198                         ol_link_threads=mach
16199                         ol_with_threads=found
16200                 else
16201                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
16202                 fi
16203
16204         elif test $ol_with_threads = mach ; then
16205                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
16206         fi
16207
16208         if test $ol_link_threads = mach ; then
16209                 cat >> confdefs.h <<\EOF
16210 #define HAVE_MACH_CTHREADS 1
16211 EOF
16212
16213         elif test $ol_with_threads = found ; then
16214                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
16215         fi
16216 fi
16217
16218 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16219         -o $ol_with_threads = pth ; then
16220
16221         for ac_hdr in pth.h
16222 do
16223 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16224 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16225 echo "configure:16226: checking for $ac_hdr" >&5
16226 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16227   echo $ac_n "(cached) $ac_c" 1>&6
16228 else
16229   cat > conftest.$ac_ext <<EOF
16230 #line 16231 "configure"
16231 #include "confdefs.h"
16232 #include <$ac_hdr>
16233 EOF
16234 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16235 { (eval echo configure:16236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16236 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16237 if test -z "$ac_err"; then
16238   rm -rf conftest*
16239   eval "ac_cv_header_$ac_safe=yes"
16240 else
16241   echo "$ac_err" >&5
16242   echo "configure: failed program was:" >&5
16243   cat conftest.$ac_ext >&5
16244   rm -rf conftest*
16245   eval "ac_cv_header_$ac_safe=no"
16246 fi
16247 rm -f conftest*
16248 fi
16249 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16250   echo "$ac_t""yes" 1>&6
16251     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16252   cat >> confdefs.h <<EOF
16253 #define $ac_tr_hdr 1
16254 EOF
16255  
16256 else
16257   echo "$ac_t""no" 1>&6
16258 fi
16259 done
16260
16261
16262         if test $ac_cv_header_pth_h = yes ; then
16263                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
16264 echo "configure:16265: checking for pth_version in -lpth" >&5
16265 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
16266 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16267   echo $ac_n "(cached) $ac_c" 1>&6
16268 else
16269   ac_save_LIBS="$LIBS"
16270 LIBS="-lpth  $LIBS"
16271 cat > conftest.$ac_ext <<EOF
16272 #line 16273 "configure"
16273 #include "confdefs.h"
16274 /* Override any gcc2 internal prototype to avoid an error.  */
16275 /* We use char because int might match the return type of a gcc2
16276     builtin and then its argument prototype would still apply.  */
16277 char pth_version();
16278
16279 int main() {
16280 pth_version()
16281 ; return 0; }
16282 EOF
16283 if { (eval echo configure:16284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16284   rm -rf conftest*
16285   eval "ac_cv_lib_$ac_lib_var=yes"
16286 else
16287   echo "configure: failed program was:" >&5
16288   cat conftest.$ac_ext >&5
16289   rm -rf conftest*
16290   eval "ac_cv_lib_$ac_lib_var=no"
16291 fi
16292 rm -f conftest*
16293 LIBS="$ac_save_LIBS"
16294
16295 fi
16296 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16297   echo "$ac_t""yes" 1>&6
16298   have_pth=yes
16299 else
16300   echo "$ac_t""no" 1>&6
16301 have_pth=no
16302 fi
16303
16304
16305                 if test $have_pth = yes ; then
16306                         cat >> confdefs.h <<\EOF
16307 #define HAVE_GNU_PTH 1
16308 EOF
16309
16310                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
16311                         ol_link_threads=pth
16312                         ol_with_threads=found
16313
16314                         if test $ol_with_yielding_select = auto ; then
16315                                 ol_with_yielding_select=yes
16316                         fi
16317                 fi
16318         fi
16319 fi
16320
16321 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16322         -o $ol_with_threads = lwp ; then
16323
16324                 for ac_hdr in thread.h synch.h
16325 do
16326 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16327 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16328 echo "configure:16329: checking for $ac_hdr" >&5
16329 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16330   echo $ac_n "(cached) $ac_c" 1>&6
16331 else
16332   cat > conftest.$ac_ext <<EOF
16333 #line 16334 "configure"
16334 #include "confdefs.h"
16335 #include <$ac_hdr>
16336 EOF
16337 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16338 { (eval echo configure:16339: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16339 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16340 if test -z "$ac_err"; then
16341   rm -rf conftest*
16342   eval "ac_cv_header_$ac_safe=yes"
16343 else
16344   echo "$ac_err" >&5
16345   echo "configure: failed program was:" >&5
16346   cat conftest.$ac_ext >&5
16347   rm -rf conftest*
16348   eval "ac_cv_header_$ac_safe=no"
16349 fi
16350 rm -f conftest*
16351 fi
16352 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16353   echo "$ac_t""yes" 1>&6
16354     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16355   cat >> confdefs.h <<EOF
16356 #define $ac_tr_hdr 1
16357 EOF
16358  
16359 else
16360   echo "$ac_t""no" 1>&6
16361 fi
16362 done
16363
16364         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
16365                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
16366 echo "configure:16367: checking for thr_create in -lthread" >&5
16367 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
16368 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16369   echo $ac_n "(cached) $ac_c" 1>&6
16370 else
16371   ac_save_LIBS="$LIBS"
16372 LIBS="-lthread  $LIBS"
16373 cat > conftest.$ac_ext <<EOF
16374 #line 16375 "configure"
16375 #include "confdefs.h"
16376 /* Override any gcc2 internal prototype to avoid an error.  */
16377 /* We use char because int might match the return type of a gcc2
16378     builtin and then its argument prototype would still apply.  */
16379 char thr_create();
16380
16381 int main() {
16382 thr_create()
16383 ; return 0; }
16384 EOF
16385 if { (eval echo configure:16386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16386   rm -rf conftest*
16387   eval "ac_cv_lib_$ac_lib_var=yes"
16388 else
16389   echo "configure: failed program was:" >&5
16390   cat conftest.$ac_ext >&5
16391   rm -rf conftest*
16392   eval "ac_cv_lib_$ac_lib_var=no"
16393 fi
16394 rm -f conftest*
16395 LIBS="$ac_save_LIBS"
16396
16397 fi
16398 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16399   echo "$ac_t""yes" 1>&6
16400   have_thr=yes
16401 else
16402   echo "$ac_t""no" 1>&6
16403 have_thr=no
16404 fi
16405
16406
16407                 if test $have_thr = yes ; then
16408                         cat >> confdefs.h <<\EOF
16409 #define HAVE_THR 1
16410 EOF
16411
16412                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
16413                         ol_link_threads=thr
16414
16415                         if test $ol_with_yielding_select = auto ; then
16416                                 ol_with_yielding_select=yes
16417                         fi
16418
16419                                                 for ac_func in \
16420                                 thr_setconcurrency \
16421                                 thr_getconcurrency \
16422                         
16423 do
16424 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16425 echo "configure:16426: checking for $ac_func" >&5
16426 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16427   echo $ac_n "(cached) $ac_c" 1>&6
16428 else
16429   cat > conftest.$ac_ext <<EOF
16430 #line 16431 "configure"
16431 #include "confdefs.h"
16432 /* System header to define __stub macros and hopefully few prototypes,
16433     which can conflict with char $ac_func(); below.  */
16434 #include <assert.h>
16435 /* Override any gcc2 internal prototype to avoid an error.  */
16436 /* We use char because int might match the return type of a gcc2
16437     builtin and then its argument prototype would still apply.  */
16438 char $ac_func();
16439 char (*f)();
16440
16441 int main() {
16442
16443 /* The GNU C library defines this for functions which it implements
16444     to always fail with ENOSYS.  Some functions are actually named
16445     something starting with __ and the normal name is an alias.  */
16446 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16447 choke me
16448 #else
16449 f = $ac_func;
16450 #endif
16451
16452 ; return 0; }
16453 EOF
16454 if { (eval echo configure:16455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16455   rm -rf conftest*
16456   eval "ac_cv_func_$ac_func=yes"
16457 else
16458   echo "configure: failed program was:" >&5
16459   cat conftest.$ac_ext >&5
16460   rm -rf conftest*
16461   eval "ac_cv_func_$ac_func=no"
16462 fi
16463 rm -f conftest*
16464 fi
16465
16466 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16467   echo "$ac_t""yes" 1>&6
16468     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16469   cat >> confdefs.h <<EOF
16470 #define $ac_tr_func 1
16471 EOF
16472  
16473 else
16474   echo "$ac_t""no" 1>&6
16475 fi
16476 done
16477
16478                 fi
16479         fi
16480
16481                 for ac_hdr in lwp/lwp.h
16482 do
16483 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16484 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16485 echo "configure:16486: checking for $ac_hdr" >&5
16486 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16487   echo $ac_n "(cached) $ac_c" 1>&6
16488 else
16489   cat > conftest.$ac_ext <<EOF
16490 #line 16491 "configure"
16491 #include "confdefs.h"
16492 #include <$ac_hdr>
16493 EOF
16494 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16495 { (eval echo configure:16496: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16496 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16497 if test -z "$ac_err"; then
16498   rm -rf conftest*
16499   eval "ac_cv_header_$ac_safe=yes"
16500 else
16501   echo "$ac_err" >&5
16502   echo "configure: failed program was:" >&5
16503   cat conftest.$ac_ext >&5
16504   rm -rf conftest*
16505   eval "ac_cv_header_$ac_safe=no"
16506 fi
16507 rm -f conftest*
16508 fi
16509 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16510   echo "$ac_t""yes" 1>&6
16511     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16512   cat >> confdefs.h <<EOF
16513 #define $ac_tr_hdr 1
16514 EOF
16515  
16516 else
16517   echo "$ac_t""no" 1>&6
16518 fi
16519 done
16520
16521         if test $ac_cv_header_lwp_lwp_h = yes ; then
16522                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
16523 echo "configure:16524: checking for lwp_create in -llwp" >&5
16524 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
16525 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16526   echo $ac_n "(cached) $ac_c" 1>&6
16527 else
16528   ac_save_LIBS="$LIBS"
16529 LIBS="-llwp  $LIBS"
16530 cat > conftest.$ac_ext <<EOF
16531 #line 16532 "configure"
16532 #include "confdefs.h"
16533 /* Override any gcc2 internal prototype to avoid an error.  */
16534 /* We use char because int might match the return type of a gcc2
16535     builtin and then its argument prototype would still apply.  */
16536 char lwp_create();
16537
16538 int main() {
16539 lwp_create()
16540 ; return 0; }
16541 EOF
16542 if { (eval echo configure:16543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16543   rm -rf conftest*
16544   eval "ac_cv_lib_$ac_lib_var=yes"
16545 else
16546   echo "configure: failed program was:" >&5
16547   cat conftest.$ac_ext >&5
16548   rm -rf conftest*
16549   eval "ac_cv_lib_$ac_lib_var=no"
16550 fi
16551 rm -f conftest*
16552 LIBS="$ac_save_LIBS"
16553
16554 fi
16555 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16556   echo "$ac_t""yes" 1>&6
16557   have_lwp=yes
16558 else
16559   echo "$ac_t""no" 1>&6
16560 have_lwp=no
16561 fi
16562
16563
16564                 if test $have_lwp = yes ; then
16565                         cat >> confdefs.h <<\EOF
16566 #define HAVE_LWP 1
16567 EOF
16568
16569                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
16570                         ol_link_threads=lwp
16571
16572                         if test $ol_with_yielding_select = auto ; then
16573                                 ol_with_yielding_select=no
16574                         fi
16575                 fi
16576         fi
16577 fi
16578
16579 if test $ol_with_yielding_select = yes ; then
16580         cat >> confdefs.h <<\EOF
16581 #define HAVE_YIELDING_SELECT 1
16582 EOF
16583
16584 fi
16585
16586 if test $ol_with_threads = manual ; then
16587                 ol_link_threads=yes
16588
16589         echo "configure: warning: thread defines and link options must be set manually" 1>&2
16590
16591         for ac_hdr in pthread.h sched.h
16592 do
16593 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16594 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16595 echo "configure:16596: checking for $ac_hdr" >&5
16596 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16597   echo $ac_n "(cached) $ac_c" 1>&6
16598 else
16599   cat > conftest.$ac_ext <<EOF
16600 #line 16601 "configure"
16601 #include "confdefs.h"
16602 #include <$ac_hdr>
16603 EOF
16604 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16605 { (eval echo configure:16606: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16606 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16607 if test -z "$ac_err"; then
16608   rm -rf conftest*
16609   eval "ac_cv_header_$ac_safe=yes"
16610 else
16611   echo "$ac_err" >&5
16612   echo "configure: failed program was:" >&5
16613   cat conftest.$ac_ext >&5
16614   rm -rf conftest*
16615   eval "ac_cv_header_$ac_safe=no"
16616 fi
16617 rm -f conftest*
16618 fi
16619 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16620   echo "$ac_t""yes" 1>&6
16621     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16622   cat >> confdefs.h <<EOF
16623 #define $ac_tr_hdr 1
16624 EOF
16625  
16626 else
16627   echo "$ac_t""no" 1>&6
16628 fi
16629 done
16630
16631         for ac_func in sched_yield pthread_yield
16632 do
16633 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16634 echo "configure:16635: checking for $ac_func" >&5
16635 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16636   echo $ac_n "(cached) $ac_c" 1>&6
16637 else
16638   cat > conftest.$ac_ext <<EOF
16639 #line 16640 "configure"
16640 #include "confdefs.h"
16641 /* System header to define __stub macros and hopefully few prototypes,
16642     which can conflict with char $ac_func(); below.  */
16643 #include <assert.h>
16644 /* Override any gcc2 internal prototype to avoid an error.  */
16645 /* We use char because int might match the return type of a gcc2
16646     builtin and then its argument prototype would still apply.  */
16647 char $ac_func();
16648 char (*f)();
16649
16650 int main() {
16651
16652 /* The GNU C library defines this for functions which it implements
16653     to always fail with ENOSYS.  Some functions are actually named
16654     something starting with __ and the normal name is an alias.  */
16655 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16656 choke me
16657 #else
16658 f = $ac_func;
16659 #endif
16660
16661 ; return 0; }
16662 EOF
16663 if { (eval echo configure:16664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16664   rm -rf conftest*
16665   eval "ac_cv_func_$ac_func=yes"
16666 else
16667   echo "configure: failed program was:" >&5
16668   cat conftest.$ac_ext >&5
16669   rm -rf conftest*
16670   eval "ac_cv_func_$ac_func=no"
16671 fi
16672 rm -f conftest*
16673 fi
16674
16675 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16676   echo "$ac_t""yes" 1>&6
16677     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16678   cat >> confdefs.h <<EOF
16679 #define $ac_tr_func 1
16680 EOF
16681  
16682 else
16683   echo "$ac_t""no" 1>&6
16684 fi
16685 done
16686
16687         
16688         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16689 echo "configure:16690: checking for LinuxThreads pthread.h" >&5
16690 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16691   echo $ac_n "(cached) $ac_c" 1>&6
16692 else
16693   cat > conftest.$ac_ext <<EOF
16694 #line 16695 "configure"
16695 #include "confdefs.h"
16696 #include <pthread.h>
16697 EOF
16698 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16699   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16700   rm -rf conftest*
16701   ol_cv_header_linux_threads=yes
16702 else
16703   rm -rf conftest*
16704   ol_cv_header_linux_threads=no
16705 fi
16706 rm -f conftest*
16707
16708                 
16709 fi
16710
16711 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16712         if test $ol_cv_header_linux_threads = yes; then
16713                 cat >> confdefs.h <<\EOF
16714 #define HAVE_LINUX_THREADS 1
16715 EOF
16716
16717         fi
16718
16719
16720         for ac_hdr in mach/cthreads.h
16721 do
16722 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16723 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16724 echo "configure:16725: checking for $ac_hdr" >&5
16725 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16726   echo $ac_n "(cached) $ac_c" 1>&6
16727 else
16728   cat > conftest.$ac_ext <<EOF
16729 #line 16730 "configure"
16730 #include "confdefs.h"
16731 #include <$ac_hdr>
16732 EOF
16733 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16734 { (eval echo configure:16735: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16735 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16736 if test -z "$ac_err"; then
16737   rm -rf conftest*
16738   eval "ac_cv_header_$ac_safe=yes"
16739 else
16740   echo "$ac_err" >&5
16741   echo "configure: failed program was:" >&5
16742   cat conftest.$ac_ext >&5
16743   rm -rf conftest*
16744   eval "ac_cv_header_$ac_safe=no"
16745 fi
16746 rm -f conftest*
16747 fi
16748 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16749   echo "$ac_t""yes" 1>&6
16750     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16751   cat >> confdefs.h <<EOF
16752 #define $ac_tr_hdr 1
16753 EOF
16754  
16755 else
16756   echo "$ac_t""no" 1>&6
16757 fi
16758 done
16759
16760         for ac_hdr in lwp/lwp.h
16761 do
16762 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16763 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16764 echo "configure:16765: checking for $ac_hdr" >&5
16765 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16766   echo $ac_n "(cached) $ac_c" 1>&6
16767 else
16768   cat > conftest.$ac_ext <<EOF
16769 #line 16770 "configure"
16770 #include "confdefs.h"
16771 #include <$ac_hdr>
16772 EOF
16773 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16774 { (eval echo configure:16775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16775 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16776 if test -z "$ac_err"; then
16777   rm -rf conftest*
16778   eval "ac_cv_header_$ac_safe=yes"
16779 else
16780   echo "$ac_err" >&5
16781   echo "configure: failed program was:" >&5
16782   cat conftest.$ac_ext >&5
16783   rm -rf conftest*
16784   eval "ac_cv_header_$ac_safe=no"
16785 fi
16786 rm -f conftest*
16787 fi
16788 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16789   echo "$ac_t""yes" 1>&6
16790     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16791   cat >> confdefs.h <<EOF
16792 #define $ac_tr_hdr 1
16793 EOF
16794  
16795 else
16796   echo "$ac_t""no" 1>&6
16797 fi
16798 done
16799
16800         for ac_hdr in thread.h synch.h
16801 do
16802 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16803 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16804 echo "configure:16805: checking for $ac_hdr" >&5
16805 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16806   echo $ac_n "(cached) $ac_c" 1>&6
16807 else
16808   cat > conftest.$ac_ext <<EOF
16809 #line 16810 "configure"
16810 #include "confdefs.h"
16811 #include <$ac_hdr>
16812 EOF
16813 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16814 { (eval echo configure:16815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16815 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16816 if test -z "$ac_err"; then
16817   rm -rf conftest*
16818   eval "ac_cv_header_$ac_safe=yes"
16819 else
16820   echo "$ac_err" >&5
16821   echo "configure: failed program was:" >&5
16822   cat conftest.$ac_ext >&5
16823   rm -rf conftest*
16824   eval "ac_cv_header_$ac_safe=no"
16825 fi
16826 rm -f conftest*
16827 fi
16828 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16829   echo "$ac_t""yes" 1>&6
16830     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16831   cat >> confdefs.h <<EOF
16832 #define $ac_tr_hdr 1
16833 EOF
16834  
16835 else
16836   echo "$ac_t""no" 1>&6
16837 fi
16838 done
16839
16840 fi
16841
16842 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16843                         cat >> confdefs.h <<\EOF
16844 #define REENTRANT 1
16845 EOF
16846
16847         cat >> confdefs.h <<\EOF
16848 #define _REENTRANT 1
16849 EOF
16850
16851         cat >> confdefs.h <<\EOF
16852 #define THREAD_SAFE 1
16853 EOF
16854
16855         cat >> confdefs.h <<\EOF
16856 #define _THREAD_SAFE 1
16857 EOF
16858
16859         cat >> confdefs.h <<\EOF
16860 #define THREADSAFE 1
16861 EOF
16862
16863         cat >> confdefs.h <<\EOF
16864 #define _THREADSAFE 1
16865 EOF
16866
16867         cat >> confdefs.h <<\EOF
16868 #define _SGI_MP_SOURCE 1
16869 EOF
16870
16871
16872                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16873 echo "configure:16874: checking for thread specific errno" >&5
16874 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16875   echo $ac_n "(cached) $ac_c" 1>&6
16876 else
16877   
16878                 cat > conftest.$ac_ext <<EOF
16879 #line 16880 "configure"
16880 #include "confdefs.h"
16881 #include <errno.h>
16882 int main() {
16883 errno = 0;
16884 ; return 0; }
16885 EOF
16886 if { (eval echo configure:16887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16887   rm -rf conftest*
16888   ol_cv_errno_thread_specific=yes
16889 else
16890   echo "configure: failed program was:" >&5
16891   cat conftest.$ac_ext >&5
16892   rm -rf conftest*
16893   ol_cv_errno_thread_specific=no
16894 fi
16895 rm -f conftest*
16896         
16897 fi
16898
16899 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16900
16901                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16902 echo "configure:16903: checking for thread specific h_errno" >&5
16903 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16904   echo $ac_n "(cached) $ac_c" 1>&6
16905 else
16906   
16907                 cat > conftest.$ac_ext <<EOF
16908 #line 16909 "configure"
16909 #include "confdefs.h"
16910 #include <netdb.h>
16911 int main() {
16912 h_errno = 0;
16913 ; return 0; }
16914 EOF
16915 if { (eval echo configure:16916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16916   rm -rf conftest*
16917   ol_cv_h_errno_thread_specific=yes
16918 else
16919   echo "configure: failed program was:" >&5
16920   cat conftest.$ac_ext >&5
16921   rm -rf conftest*
16922   ol_cv_h_errno_thread_specific=no
16923 fi
16924 rm -f conftest*
16925         
16926 fi
16927
16928 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16929
16930         if test $ol_cv_errno_thread_specific != yes \
16931                 -o $ol_cv_h_errno_thread_specific != yes ; then
16932                 LIBS="$LTHREAD_LIBS $LIBS"
16933                 LTHREAD_LIBS=""
16934         fi
16935
16936 fi  
16937
16938 if test $ol_link_threads = no ; then
16939         if test $ol_with_threads = yes ; then
16940                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16941         fi
16942
16943         if test $ol_with_threads = auto ; then
16944                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16945                 ol_with_threads=no
16946         fi
16947
16948         cat >> confdefs.h <<\EOF
16949 #define NO_THREADS 1
16950 EOF
16951
16952         LTHREAD_LIBS=""
16953 fi
16954
16955 if test $ol_link_threads != no ; then
16956         cat >> confdefs.h <<\EOF
16957 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16958 EOF
16959
16960 fi
16961
16962 ol_link_ldbm=no 
16963
16964 if test $ol_with_ldbm_api = auto \
16965         -o $ol_with_ldbm_api = berkeley \
16966         -o $ol_with_ldbm_api = bcompat ; then
16967
16968         if test $ol_with_ldbm_api = bcompat; then \
16969                 for ac_hdr in db_185.h db.h
16970 do
16971 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16972 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16973 echo "configure:16974: checking for $ac_hdr" >&5
16974 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16975   echo $ac_n "(cached) $ac_c" 1>&6
16976 else
16977   cat > conftest.$ac_ext <<EOF
16978 #line 16979 "configure"
16979 #include "confdefs.h"
16980 #include <$ac_hdr>
16981 EOF
16982 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16983 { (eval echo configure:16984: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16984 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16985 if test -z "$ac_err"; then
16986   rm -rf conftest*
16987   eval "ac_cv_header_$ac_safe=yes"
16988 else
16989   echo "$ac_err" >&5
16990   echo "configure: failed program was:" >&5
16991   cat conftest.$ac_ext >&5
16992   rm -rf conftest*
16993   eval "ac_cv_header_$ac_safe=no"
16994 fi
16995 rm -f conftest*
16996 fi
16997 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16998   echo "$ac_t""yes" 1>&6
16999     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17000   cat >> confdefs.h <<EOF
17001 #define $ac_tr_hdr 1
17002 EOF
17003  
17004 else
17005   echo "$ac_t""no" 1>&6
17006 fi
17007 done
17008
17009 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
17010         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
17011 echo "configure:17012: checking if Berkeley DB header compatibility" >&5
17012 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
17013   echo $ac_n "(cached) $ac_c" 1>&6
17014 else
17015   
17016                 cat > conftest.$ac_ext <<EOF
17017 #line 17018 "configure"
17018 #include "confdefs.h"
17019
17020 #if HAVE_DB_185_H
17021 #       include <db_185.h>
17022 #else
17023 #       include <db.h>
17024 #endif
17025
17026  /* this check could be improved */
17027 #ifndef DB_VERSION_MAJOR
17028 #       define DB_VERSION_MAJOR 1
17029 #endif
17030
17031 #if DB_VERSION_MAJOR == 1 
17032         __db_version_1
17033 #endif
17034
17035 EOF
17036 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17037   egrep "__db_version_1" >/dev/null 2>&1; then
17038   rm -rf conftest*
17039   ol_cv_header_db1=yes
17040 else
17041   rm -rf conftest*
17042   ol_cv_header_db1=no
17043 fi
17044 rm -f conftest*
17045
17046 fi
17047
17048 echo "$ac_t""$ol_cv_header_db1" 1>&6
17049
17050         if test $ol_cv_header_db1 = yes ; then
17051                 ol_cv_lib_db=no
17052 if test $ol_cv_lib_db = no ; then
17053         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17054 echo "configure:17055: checking for Berkeley DB link (default)" >&5
17055 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17056   echo $ac_n "(cached) $ac_c" 1>&6
17057 else
17058   
17059         ol_DB_LIB=
17060         ol_LIBS=$LIBS
17061         LIBS="$ol_DB_LIB $LIBS"
17062
17063         cat > conftest.$ac_ext <<EOF
17064 #line 17065 "configure"
17065 #include "confdefs.h"
17066
17067 #ifdef HAVE_DB_185_H
17068 # include <db_185.h>
17069 #else
17070 # include <db.h>
17071 #endif
17072
17073 #ifndef DB_VERSION_MAJOR
17074 # define DB_VERSION_MAJOR 1
17075 #endif
17076
17077 #ifndef NULL
17078 #define NULL ((void*)0)
17079 #endif
17080
17081 int main() {
17082
17083 #if DB_VERSION_MAJOR > 1
17084         {
17085                 char *version;
17086                 int major, minor, patch;
17087
17088                 version = db_version( &major, &minor, &patch );
17089
17090                 if( major != DB_VERSION_MAJOR ||
17091                         minor < DB_VERSION_MINOR )
17092                 {
17093                         printf("Berkeley DB version mismatch\n"
17094                                 "\texpected: %s\n\tgot: %s\n",
17095                                 DB_VERSION_STRING, version);
17096                         return 1;
17097                 }
17098         }
17099 #endif
17100
17101 #if DB_VERSION_MAJOR > 2
17102         db_env_create( NULL, 0 );
17103 #elif DB_VERSION_MAJOR > 1
17104         db_appexit( NULL );
17105 #else
17106         (void) dbopen( NULL, 0, 0, 0, NULL);
17107 #endif
17108
17109 ; return 0; }
17110 EOF
17111 if { (eval echo configure:17112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17112   rm -rf conftest*
17113   ol_cv_db_none=yes
17114 else
17115   echo "configure: failed program was:" >&5
17116   cat conftest.$ac_ext >&5
17117   rm -rf conftest*
17118   ol_cv_db_none=no
17119 fi
17120 rm -f conftest*
17121
17122         LIBS="$ol_LIBS"
17123
17124 fi
17125
17126 echo "$ac_t""$ol_cv_db_none" 1>&6
17127
17128         if test $ol_cv_db_none = yes ; then
17129                 ol_cv_lib_db=yes
17130         fi
17131 fi
17132
17133 if test $ol_cv_lib_db = no ; then
17134         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17135 echo "configure:17136: checking for Berkeley DB link (-ldb4)" >&5
17136 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17137   echo $ac_n "(cached) $ac_c" 1>&6
17138 else
17139   
17140         ol_DB_LIB=-ldb4
17141         ol_LIBS=$LIBS
17142         LIBS="$ol_DB_LIB $LIBS"
17143
17144         cat > conftest.$ac_ext <<EOF
17145 #line 17146 "configure"
17146 #include "confdefs.h"
17147
17148 #ifdef HAVE_DB_185_H
17149 # include <db_185.h>
17150 #else
17151 # include <db.h>
17152 #endif
17153
17154 #ifndef DB_VERSION_MAJOR
17155 # define DB_VERSION_MAJOR 1
17156 #endif
17157
17158 #ifndef NULL
17159 #define NULL ((void*)0)
17160 #endif
17161
17162 int main() {
17163
17164 #if DB_VERSION_MAJOR > 1
17165         {
17166                 char *version;
17167                 int major, minor, patch;
17168
17169                 version = db_version( &major, &minor, &patch );
17170
17171                 if( major != DB_VERSION_MAJOR ||
17172                         minor < DB_VERSION_MINOR )
17173                 {
17174                         printf("Berkeley DB version mismatch\n"
17175                                 "\texpected: %s\n\tgot: %s\n",
17176                                 DB_VERSION_STRING, version);
17177                         return 1;
17178                 }
17179         }
17180 #endif
17181
17182 #if DB_VERSION_MAJOR > 2
17183         db_env_create( NULL, 0 );
17184 #elif DB_VERSION_MAJOR > 1
17185         db_appexit( NULL );
17186 #else
17187         (void) dbopen( NULL, 0, 0, 0, NULL);
17188 #endif
17189
17190 ; return 0; }
17191 EOF
17192 if { (eval echo configure:17193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17193   rm -rf conftest*
17194   ol_cv_db_db4=yes
17195 else
17196   echo "configure: failed program was:" >&5
17197   cat conftest.$ac_ext >&5
17198   rm -rf conftest*
17199   ol_cv_db_db4=no
17200 fi
17201 rm -f conftest*
17202
17203         LIBS="$ol_LIBS"
17204
17205 fi
17206
17207 echo "$ac_t""$ol_cv_db_db4" 1>&6
17208
17209         if test $ol_cv_db_db4 = yes ; then
17210                 ol_cv_lib_db=-ldb4
17211         fi
17212 fi
17213
17214 if test $ol_cv_lib_db = no ; then
17215         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17216 echo "configure:17217: checking for Berkeley DB link (-ldb-4)" >&5
17217 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17218   echo $ac_n "(cached) $ac_c" 1>&6
17219 else
17220   
17221         ol_DB_LIB=-ldb-4
17222         ol_LIBS=$LIBS
17223         LIBS="$ol_DB_LIB $LIBS"
17224
17225         cat > conftest.$ac_ext <<EOF
17226 #line 17227 "configure"
17227 #include "confdefs.h"
17228
17229 #ifdef HAVE_DB_185_H
17230 # include <db_185.h>
17231 #else
17232 # include <db.h>
17233 #endif
17234
17235 #ifndef DB_VERSION_MAJOR
17236 # define DB_VERSION_MAJOR 1
17237 #endif
17238
17239 #ifndef NULL
17240 #define NULL ((void*)0)
17241 #endif
17242
17243 int main() {
17244
17245 #if DB_VERSION_MAJOR > 1
17246         {
17247                 char *version;
17248                 int major, minor, patch;
17249
17250                 version = db_version( &major, &minor, &patch );
17251
17252                 if( major != DB_VERSION_MAJOR ||
17253                         minor < DB_VERSION_MINOR )
17254                 {
17255                         printf("Berkeley DB version mismatch\n"
17256                                 "\texpected: %s\n\tgot: %s\n",
17257                                 DB_VERSION_STRING, version);
17258                         return 1;
17259                 }
17260         }
17261 #endif
17262
17263 #if DB_VERSION_MAJOR > 2
17264         db_env_create( NULL, 0 );
17265 #elif DB_VERSION_MAJOR > 1
17266         db_appexit( NULL );
17267 #else
17268         (void) dbopen( NULL, 0, 0, 0, NULL);
17269 #endif
17270
17271 ; return 0; }
17272 EOF
17273 if { (eval echo configure:17274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17274   rm -rf conftest*
17275   ol_cv_db_db_4=yes
17276 else
17277   echo "configure: failed program was:" >&5
17278   cat conftest.$ac_ext >&5
17279   rm -rf conftest*
17280   ol_cv_db_db_4=no
17281 fi
17282 rm -f conftest*
17283
17284         LIBS="$ol_LIBS"
17285
17286 fi
17287
17288 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17289
17290         if test $ol_cv_db_db_4 = yes ; then
17291                 ol_cv_lib_db=-ldb-4
17292         fi
17293 fi
17294
17295 if test $ol_cv_lib_db = no ; then
17296         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17297 echo "configure:17298: checking for Berkeley DB link (-ldb)" >&5
17298 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17299   echo $ac_n "(cached) $ac_c" 1>&6
17300 else
17301   
17302         ol_DB_LIB=-ldb
17303         ol_LIBS=$LIBS
17304         LIBS="$ol_DB_LIB $LIBS"
17305
17306         cat > conftest.$ac_ext <<EOF
17307 #line 17308 "configure"
17308 #include "confdefs.h"
17309
17310 #ifdef HAVE_DB_185_H
17311 # include <db_185.h>
17312 #else
17313 # include <db.h>
17314 #endif
17315
17316 #ifndef DB_VERSION_MAJOR
17317 # define DB_VERSION_MAJOR 1
17318 #endif
17319
17320 #ifndef NULL
17321 #define NULL ((void*)0)
17322 #endif
17323
17324 int main() {
17325
17326 #if DB_VERSION_MAJOR > 1
17327         {
17328                 char *version;
17329                 int major, minor, patch;
17330
17331                 version = db_version( &major, &minor, &patch );
17332
17333                 if( major != DB_VERSION_MAJOR ||
17334                         minor < DB_VERSION_MINOR )
17335                 {
17336                         printf("Berkeley DB version mismatch\n"
17337                                 "\texpected: %s\n\tgot: %s\n",
17338                                 DB_VERSION_STRING, version);
17339                         return 1;
17340                 }
17341         }
17342 #endif
17343
17344 #if DB_VERSION_MAJOR > 2
17345         db_env_create( NULL, 0 );
17346 #elif DB_VERSION_MAJOR > 1
17347         db_appexit( NULL );
17348 #else
17349         (void) dbopen( NULL, 0, 0, 0, NULL);
17350 #endif
17351
17352 ; return 0; }
17353 EOF
17354 if { (eval echo configure:17355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17355   rm -rf conftest*
17356   ol_cv_db_db=yes
17357 else
17358   echo "configure: failed program was:" >&5
17359   cat conftest.$ac_ext >&5
17360   rm -rf conftest*
17361   ol_cv_db_db=no
17362 fi
17363 rm -f conftest*
17364
17365         LIBS="$ol_LIBS"
17366
17367 fi
17368
17369 echo "$ac_t""$ol_cv_db_db" 1>&6
17370
17371         if test $ol_cv_db_db = yes ; then
17372                 ol_cv_lib_db=-ldb
17373         fi
17374 fi
17375
17376 if test $ol_cv_lib_db = no ; then
17377         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17378 echo "configure:17379: checking for Berkeley DB link (-ldb3)" >&5
17379 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17380   echo $ac_n "(cached) $ac_c" 1>&6
17381 else
17382   
17383         ol_DB_LIB=-ldb3
17384         ol_LIBS=$LIBS
17385         LIBS="$ol_DB_LIB $LIBS"
17386
17387         cat > conftest.$ac_ext <<EOF
17388 #line 17389 "configure"
17389 #include "confdefs.h"
17390
17391 #ifdef HAVE_DB_185_H
17392 # include <db_185.h>
17393 #else
17394 # include <db.h>
17395 #endif
17396
17397 #ifndef DB_VERSION_MAJOR
17398 # define DB_VERSION_MAJOR 1
17399 #endif
17400
17401 #ifndef NULL
17402 #define NULL ((void*)0)
17403 #endif
17404
17405 int main() {
17406
17407 #if DB_VERSION_MAJOR > 1
17408         {
17409                 char *version;
17410                 int major, minor, patch;
17411
17412                 version = db_version( &major, &minor, &patch );
17413
17414                 if( major != DB_VERSION_MAJOR ||
17415                         minor < DB_VERSION_MINOR )
17416                 {
17417                         printf("Berkeley DB version mismatch\n"
17418                                 "\texpected: %s\n\tgot: %s\n",
17419                                 DB_VERSION_STRING, version);
17420                         return 1;
17421                 }
17422         }
17423 #endif
17424
17425 #if DB_VERSION_MAJOR > 2
17426         db_env_create( NULL, 0 );
17427 #elif DB_VERSION_MAJOR > 1
17428         db_appexit( NULL );
17429 #else
17430         (void) dbopen( NULL, 0, 0, 0, NULL);
17431 #endif
17432
17433 ; return 0; }
17434 EOF
17435 if { (eval echo configure:17436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17436   rm -rf conftest*
17437   ol_cv_db_db3=yes
17438 else
17439   echo "configure: failed program was:" >&5
17440   cat conftest.$ac_ext >&5
17441   rm -rf conftest*
17442   ol_cv_db_db3=no
17443 fi
17444 rm -f conftest*
17445
17446         LIBS="$ol_LIBS"
17447
17448 fi
17449
17450 echo "$ac_t""$ol_cv_db_db3" 1>&6
17451
17452         if test $ol_cv_db_db3 = yes ; then
17453                 ol_cv_lib_db=-ldb3
17454         fi
17455 fi
17456
17457 if test $ol_cv_lib_db = no ; then
17458         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17459 echo "configure:17460: checking for Berkeley DB link (-ldb-3)" >&5
17460 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17461   echo $ac_n "(cached) $ac_c" 1>&6
17462 else
17463   
17464         ol_DB_LIB=-ldb-3
17465         ol_LIBS=$LIBS
17466         LIBS="$ol_DB_LIB $LIBS"
17467
17468         cat > conftest.$ac_ext <<EOF
17469 #line 17470 "configure"
17470 #include "confdefs.h"
17471
17472 #ifdef HAVE_DB_185_H
17473 # include <db_185.h>
17474 #else
17475 # include <db.h>
17476 #endif
17477
17478 #ifndef DB_VERSION_MAJOR
17479 # define DB_VERSION_MAJOR 1
17480 #endif
17481
17482 #ifndef NULL
17483 #define NULL ((void*)0)
17484 #endif
17485
17486 int main() {
17487
17488 #if DB_VERSION_MAJOR > 1
17489         {
17490                 char *version;
17491                 int major, minor, patch;
17492
17493                 version = db_version( &major, &minor, &patch );
17494
17495                 if( major != DB_VERSION_MAJOR ||
17496                         minor < DB_VERSION_MINOR )
17497                 {
17498                         printf("Berkeley DB version mismatch\n"
17499                                 "\texpected: %s\n\tgot: %s\n",
17500                                 DB_VERSION_STRING, version);
17501                         return 1;
17502                 }
17503         }
17504 #endif
17505
17506 #if DB_VERSION_MAJOR > 2
17507         db_env_create( NULL, 0 );
17508 #elif DB_VERSION_MAJOR > 1
17509         db_appexit( NULL );
17510 #else
17511         (void) dbopen( NULL, 0, 0, 0, NULL);
17512 #endif
17513
17514 ; return 0; }
17515 EOF
17516 if { (eval echo configure:17517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17517   rm -rf conftest*
17518   ol_cv_db_db_3=yes
17519 else
17520   echo "configure: failed program was:" >&5
17521   cat conftest.$ac_ext >&5
17522   rm -rf conftest*
17523   ol_cv_db_db_3=no
17524 fi
17525 rm -f conftest*
17526
17527         LIBS="$ol_LIBS"
17528
17529 fi
17530
17531 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17532
17533         if test $ol_cv_db_db_3 = yes ; then
17534                 ol_cv_lib_db=-ldb-3
17535         fi
17536 fi
17537
17538 if test $ol_cv_lib_db = no ; then
17539         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17540 echo "configure:17541: checking for Berkeley DB link (-ldb2)" >&5
17541 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17542   echo $ac_n "(cached) $ac_c" 1>&6
17543 else
17544   
17545         ol_DB_LIB=-ldb2
17546         ol_LIBS=$LIBS
17547         LIBS="$ol_DB_LIB $LIBS"
17548
17549         cat > conftest.$ac_ext <<EOF
17550 #line 17551 "configure"
17551 #include "confdefs.h"
17552
17553 #ifdef HAVE_DB_185_H
17554 # include <db_185.h>
17555 #else
17556 # include <db.h>
17557 #endif
17558
17559 #ifndef DB_VERSION_MAJOR
17560 # define DB_VERSION_MAJOR 1
17561 #endif
17562
17563 #ifndef NULL
17564 #define NULL ((void*)0)
17565 #endif
17566
17567 int main() {
17568
17569 #if DB_VERSION_MAJOR > 1
17570         {
17571                 char *version;
17572                 int major, minor, patch;
17573
17574                 version = db_version( &major, &minor, &patch );
17575
17576                 if( major != DB_VERSION_MAJOR ||
17577                         minor < DB_VERSION_MINOR )
17578                 {
17579                         printf("Berkeley DB version mismatch\n"
17580                                 "\texpected: %s\n\tgot: %s\n",
17581                                 DB_VERSION_STRING, version);
17582                         return 1;
17583                 }
17584         }
17585 #endif
17586
17587 #if DB_VERSION_MAJOR > 2
17588         db_env_create( NULL, 0 );
17589 #elif DB_VERSION_MAJOR > 1
17590         db_appexit( NULL );
17591 #else
17592         (void) dbopen( NULL, 0, 0, 0, NULL);
17593 #endif
17594
17595 ; return 0; }
17596 EOF
17597 if { (eval echo configure:17598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17598   rm -rf conftest*
17599   ol_cv_db_db2=yes
17600 else
17601   echo "configure: failed program was:" >&5
17602   cat conftest.$ac_ext >&5
17603   rm -rf conftest*
17604   ol_cv_db_db2=no
17605 fi
17606 rm -f conftest*
17607
17608         LIBS="$ol_LIBS"
17609
17610 fi
17611
17612 echo "$ac_t""$ol_cv_db_db2" 1>&6
17613
17614         if test $ol_cv_db_db2 = yes ; then
17615                 ol_cv_lib_db=-ldb2
17616         fi
17617 fi
17618
17619 if test $ol_cv_lib_db = no ; then
17620         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17621 echo "configure:17622: checking for Berkeley DB link (-ldb-2)" >&5
17622 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17623   echo $ac_n "(cached) $ac_c" 1>&6
17624 else
17625   
17626         ol_DB_LIB=-ldb-2
17627         ol_LIBS=$LIBS
17628         LIBS="$ol_DB_LIB $LIBS"
17629
17630         cat > conftest.$ac_ext <<EOF
17631 #line 17632 "configure"
17632 #include "confdefs.h"
17633
17634 #ifdef HAVE_DB_185_H
17635 # include <db_185.h>
17636 #else
17637 # include <db.h>
17638 #endif
17639
17640 #ifndef DB_VERSION_MAJOR
17641 # define DB_VERSION_MAJOR 1
17642 #endif
17643
17644 #ifndef NULL
17645 #define NULL ((void*)0)
17646 #endif
17647
17648 int main() {
17649
17650 #if DB_VERSION_MAJOR > 1
17651         {
17652                 char *version;
17653                 int major, minor, patch;
17654
17655                 version = db_version( &major, &minor, &patch );
17656
17657                 if( major != DB_VERSION_MAJOR ||
17658                         minor < DB_VERSION_MINOR )
17659                 {
17660                         printf("Berkeley DB version mismatch\n"
17661                                 "\texpected: %s\n\tgot: %s\n",
17662                                 DB_VERSION_STRING, version);
17663                         return 1;
17664                 }
17665         }
17666 #endif
17667
17668 #if DB_VERSION_MAJOR > 2
17669         db_env_create( NULL, 0 );
17670 #elif DB_VERSION_MAJOR > 1
17671         db_appexit( NULL );
17672 #else
17673         (void) dbopen( NULL, 0, 0, 0, NULL);
17674 #endif
17675
17676 ; return 0; }
17677 EOF
17678 if { (eval echo configure:17679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17679   rm -rf conftest*
17680   ol_cv_db_db_2=yes
17681 else
17682   echo "configure: failed program was:" >&5
17683   cat conftest.$ac_ext >&5
17684   rm -rf conftest*
17685   ol_cv_db_db_2=no
17686 fi
17687 rm -f conftest*
17688
17689         LIBS="$ol_LIBS"
17690
17691 fi
17692
17693 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17694
17695         if test $ol_cv_db_db_2 = yes ; then
17696                 ol_cv_lib_db=-ldb-2
17697         fi
17698 fi
17699
17700 if test $ol_cv_lib_db = no ; then
17701         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17702 echo "configure:17703: checking for Berkeley DB link (-ldb1)" >&5
17703 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17704   echo $ac_n "(cached) $ac_c" 1>&6
17705 else
17706   
17707         ol_DB_LIB=-ldb1
17708         ol_LIBS=$LIBS
17709         LIBS="$ol_DB_LIB $LIBS"
17710
17711         cat > conftest.$ac_ext <<EOF
17712 #line 17713 "configure"
17713 #include "confdefs.h"
17714
17715 #ifdef HAVE_DB_185_H
17716 # include <db_185.h>
17717 #else
17718 # include <db.h>
17719 #endif
17720
17721 #ifndef DB_VERSION_MAJOR
17722 # define DB_VERSION_MAJOR 1
17723 #endif
17724
17725 #ifndef NULL
17726 #define NULL ((void*)0)
17727 #endif
17728
17729 int main() {
17730
17731 #if DB_VERSION_MAJOR > 1
17732         {
17733                 char *version;
17734                 int major, minor, patch;
17735
17736                 version = db_version( &major, &minor, &patch );
17737
17738                 if( major != DB_VERSION_MAJOR ||
17739                         minor < DB_VERSION_MINOR )
17740                 {
17741                         printf("Berkeley DB version mismatch\n"
17742                                 "\texpected: %s\n\tgot: %s\n",
17743                                 DB_VERSION_STRING, version);
17744                         return 1;
17745                 }
17746         }
17747 #endif
17748
17749 #if DB_VERSION_MAJOR > 2
17750         db_env_create( NULL, 0 );
17751 #elif DB_VERSION_MAJOR > 1
17752         db_appexit( NULL );
17753 #else
17754         (void) dbopen( NULL, 0, 0, 0, NULL);
17755 #endif
17756
17757 ; return 0; }
17758 EOF
17759 if { (eval echo configure:17760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17760   rm -rf conftest*
17761   ol_cv_db_db1=yes
17762 else
17763   echo "configure: failed program was:" >&5
17764   cat conftest.$ac_ext >&5
17765   rm -rf conftest*
17766   ol_cv_db_db1=no
17767 fi
17768 rm -f conftest*
17769
17770         LIBS="$ol_LIBS"
17771
17772 fi
17773
17774 echo "$ac_t""$ol_cv_db_db1" 1>&6
17775
17776         if test $ol_cv_db_db1 = yes ; then
17777                 ol_cv_lib_db=-ldb1
17778         fi
17779 fi
17780
17781 if test $ol_cv_lib_db = no ; then
17782         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
17783 echo "configure:17784: checking for Berkeley DB link (-ldb-1)" >&5
17784 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
17785   echo $ac_n "(cached) $ac_c" 1>&6
17786 else
17787   
17788         ol_DB_LIB=-ldb-1
17789         ol_LIBS=$LIBS
17790         LIBS="$ol_DB_LIB $LIBS"
17791
17792         cat > conftest.$ac_ext <<EOF
17793 #line 17794 "configure"
17794 #include "confdefs.h"
17795
17796 #ifdef HAVE_DB_185_H
17797 # include <db_185.h>
17798 #else
17799 # include <db.h>
17800 #endif
17801
17802 #ifndef DB_VERSION_MAJOR
17803 # define DB_VERSION_MAJOR 1
17804 #endif
17805
17806 #ifndef NULL
17807 #define NULL ((void*)0)
17808 #endif
17809
17810 int main() {
17811
17812 #if DB_VERSION_MAJOR > 1
17813         {
17814                 char *version;
17815                 int major, minor, patch;
17816
17817                 version = db_version( &major, &minor, &patch );
17818
17819                 if( major != DB_VERSION_MAJOR ||
17820                         minor < DB_VERSION_MINOR )
17821                 {
17822                         printf("Berkeley DB version mismatch\n"
17823                                 "\texpected: %s\n\tgot: %s\n",
17824                                 DB_VERSION_STRING, version);
17825                         return 1;
17826                 }
17827         }
17828 #endif
17829
17830 #if DB_VERSION_MAJOR > 2
17831         db_env_create( NULL, 0 );
17832 #elif DB_VERSION_MAJOR > 1
17833         db_appexit( NULL );
17834 #else
17835         (void) dbopen( NULL, 0, 0, 0, NULL);
17836 #endif
17837
17838 ; return 0; }
17839 EOF
17840 if { (eval echo configure:17841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17841   rm -rf conftest*
17842   ol_cv_db_db_1=yes
17843 else
17844   echo "configure: failed program was:" >&5
17845   cat conftest.$ac_ext >&5
17846   rm -rf conftest*
17847   ol_cv_db_db_1=no
17848 fi
17849 rm -f conftest*
17850
17851         LIBS="$ol_LIBS"
17852
17853 fi
17854
17855 echo "$ac_t""$ol_cv_db_db_1" 1>&6
17856
17857         if test $ol_cv_db_db_1 = yes ; then
17858                 ol_cv_lib_db=-ldb-1
17859         fi
17860 fi
17861
17862
17863                 if test "$ol_cv_lib_db" != no ; then
17864                         ol_cv_berkeley_db=yes
17865                 fi
17866         fi
17867 fi
17868
17869         else
17870                 ol_cv_berkeley_db=no
17871 for ac_hdr in db.h
17872 do
17873 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17874 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17875 echo "configure:17876: checking for $ac_hdr" >&5
17876 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17877   echo $ac_n "(cached) $ac_c" 1>&6
17878 else
17879   cat > conftest.$ac_ext <<EOF
17880 #line 17881 "configure"
17881 #include "confdefs.h"
17882 #include <$ac_hdr>
17883 EOF
17884 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17885 { (eval echo configure:17886: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17886 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17887 if test -z "$ac_err"; then
17888   rm -rf conftest*
17889   eval "ac_cv_header_$ac_safe=yes"
17890 else
17891   echo "$ac_err" >&5
17892   echo "configure: failed program was:" >&5
17893   cat conftest.$ac_ext >&5
17894   rm -rf conftest*
17895   eval "ac_cv_header_$ac_safe=no"
17896 fi
17897 rm -f conftest*
17898 fi
17899 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17900   echo "$ac_t""yes" 1>&6
17901     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17902   cat >> confdefs.h <<EOF
17903 #define $ac_tr_hdr 1
17904 EOF
17905  
17906 else
17907   echo "$ac_t""no" 1>&6
17908 fi
17909 done
17910
17911 if test $ac_cv_header_db_h = yes; then
17912         ol_cv_lib_db=no
17913 if test $ol_cv_lib_db = no ; then
17914         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17915 echo "configure:17916: checking for Berkeley DB link (default)" >&5
17916 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17917   echo $ac_n "(cached) $ac_c" 1>&6
17918 else
17919   
17920         ol_DB_LIB=
17921         ol_LIBS=$LIBS
17922         LIBS="$ol_DB_LIB $LIBS"
17923
17924         cat > conftest.$ac_ext <<EOF
17925 #line 17926 "configure"
17926 #include "confdefs.h"
17927
17928 #ifdef HAVE_DB_185_H
17929 # include <db_185.h>
17930 #else
17931 # include <db.h>
17932 #endif
17933
17934 #ifndef DB_VERSION_MAJOR
17935 # define DB_VERSION_MAJOR 1
17936 #endif
17937
17938 #ifndef NULL
17939 #define NULL ((void*)0)
17940 #endif
17941
17942 int main() {
17943
17944 #if DB_VERSION_MAJOR > 1
17945         {
17946                 char *version;
17947                 int major, minor, patch;
17948
17949                 version = db_version( &major, &minor, &patch );
17950
17951                 if( major != DB_VERSION_MAJOR ||
17952                         minor < DB_VERSION_MINOR )
17953                 {
17954                         printf("Berkeley DB version mismatch\n"
17955                                 "\texpected: %s\n\tgot: %s\n",
17956                                 DB_VERSION_STRING, version);
17957                         return 1;
17958                 }
17959         }
17960 #endif
17961
17962 #if DB_VERSION_MAJOR > 2
17963         db_env_create( NULL, 0 );
17964 #elif DB_VERSION_MAJOR > 1
17965         db_appexit( NULL );
17966 #else
17967         (void) dbopen( NULL, 0, 0, 0, NULL);
17968 #endif
17969
17970 ; return 0; }
17971 EOF
17972 if { (eval echo configure:17973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17973   rm -rf conftest*
17974   ol_cv_db_none=yes
17975 else
17976   echo "configure: failed program was:" >&5
17977   cat conftest.$ac_ext >&5
17978   rm -rf conftest*
17979   ol_cv_db_none=no
17980 fi
17981 rm -f conftest*
17982
17983         LIBS="$ol_LIBS"
17984
17985 fi
17986
17987 echo "$ac_t""$ol_cv_db_none" 1>&6
17988
17989         if test $ol_cv_db_none = yes ; then
17990                 ol_cv_lib_db=yes
17991         fi
17992 fi
17993
17994 if test $ol_cv_lib_db = no ; then
17995         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17996 echo "configure:17997: checking for Berkeley DB link (-ldb4)" >&5
17997 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17998   echo $ac_n "(cached) $ac_c" 1>&6
17999 else
18000   
18001         ol_DB_LIB=-ldb4
18002         ol_LIBS=$LIBS
18003         LIBS="$ol_DB_LIB $LIBS"
18004
18005         cat > conftest.$ac_ext <<EOF
18006 #line 18007 "configure"
18007 #include "confdefs.h"
18008
18009 #ifdef HAVE_DB_185_H
18010 # include <db_185.h>
18011 #else
18012 # include <db.h>
18013 #endif
18014
18015 #ifndef DB_VERSION_MAJOR
18016 # define DB_VERSION_MAJOR 1
18017 #endif
18018
18019 #ifndef NULL
18020 #define NULL ((void*)0)
18021 #endif
18022
18023 int main() {
18024
18025 #if DB_VERSION_MAJOR > 1
18026         {
18027                 char *version;
18028                 int major, minor, patch;
18029
18030                 version = db_version( &major, &minor, &patch );
18031
18032                 if( major != DB_VERSION_MAJOR ||
18033                         minor < DB_VERSION_MINOR )
18034                 {
18035                         printf("Berkeley DB version mismatch\n"
18036                                 "\texpected: %s\n\tgot: %s\n",
18037                                 DB_VERSION_STRING, version);
18038                         return 1;
18039                 }
18040         }
18041 #endif
18042
18043 #if DB_VERSION_MAJOR > 2
18044         db_env_create( NULL, 0 );
18045 #elif DB_VERSION_MAJOR > 1
18046         db_appexit( NULL );
18047 #else
18048         (void) dbopen( NULL, 0, 0, 0, NULL);
18049 #endif
18050
18051 ; return 0; }
18052 EOF
18053 if { (eval echo configure:18054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18054   rm -rf conftest*
18055   ol_cv_db_db4=yes
18056 else
18057   echo "configure: failed program was:" >&5
18058   cat conftest.$ac_ext >&5
18059   rm -rf conftest*
18060   ol_cv_db_db4=no
18061 fi
18062 rm -f conftest*
18063
18064         LIBS="$ol_LIBS"
18065
18066 fi
18067
18068 echo "$ac_t""$ol_cv_db_db4" 1>&6
18069
18070         if test $ol_cv_db_db4 = yes ; then
18071                 ol_cv_lib_db=-ldb4
18072         fi
18073 fi
18074
18075 if test $ol_cv_lib_db = no ; then
18076         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18077 echo "configure:18078: checking for Berkeley DB link (-ldb-4)" >&5
18078 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18079   echo $ac_n "(cached) $ac_c" 1>&6
18080 else
18081   
18082         ol_DB_LIB=-ldb-4
18083         ol_LIBS=$LIBS
18084         LIBS="$ol_DB_LIB $LIBS"
18085
18086         cat > conftest.$ac_ext <<EOF
18087 #line 18088 "configure"
18088 #include "confdefs.h"
18089
18090 #ifdef HAVE_DB_185_H
18091 # include <db_185.h>
18092 #else
18093 # include <db.h>
18094 #endif
18095
18096 #ifndef DB_VERSION_MAJOR
18097 # define DB_VERSION_MAJOR 1
18098 #endif
18099
18100 #ifndef NULL
18101 #define NULL ((void*)0)
18102 #endif
18103
18104 int main() {
18105
18106 #if DB_VERSION_MAJOR > 1
18107         {
18108                 char *version;
18109                 int major, minor, patch;
18110
18111                 version = db_version( &major, &minor, &patch );
18112
18113                 if( major != DB_VERSION_MAJOR ||
18114                         minor < DB_VERSION_MINOR )
18115                 {
18116                         printf("Berkeley DB version mismatch\n"
18117                                 "\texpected: %s\n\tgot: %s\n",
18118                                 DB_VERSION_STRING, version);
18119                         return 1;
18120                 }
18121         }
18122 #endif
18123
18124 #if DB_VERSION_MAJOR > 2
18125         db_env_create( NULL, 0 );
18126 #elif DB_VERSION_MAJOR > 1
18127         db_appexit( NULL );
18128 #else
18129         (void) dbopen( NULL, 0, 0, 0, NULL);
18130 #endif
18131
18132 ; return 0; }
18133 EOF
18134 if { (eval echo configure:18135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18135   rm -rf conftest*
18136   ol_cv_db_db_4=yes
18137 else
18138   echo "configure: failed program was:" >&5
18139   cat conftest.$ac_ext >&5
18140   rm -rf conftest*
18141   ol_cv_db_db_4=no
18142 fi
18143 rm -f conftest*
18144
18145         LIBS="$ol_LIBS"
18146
18147 fi
18148
18149 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18150
18151         if test $ol_cv_db_db_4 = yes ; then
18152                 ol_cv_lib_db=-ldb-4
18153         fi
18154 fi
18155
18156 if test $ol_cv_lib_db = no ; then
18157         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18158 echo "configure:18159: checking for Berkeley DB link (-ldb)" >&5
18159 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18160   echo $ac_n "(cached) $ac_c" 1>&6
18161 else
18162   
18163         ol_DB_LIB=-ldb
18164         ol_LIBS=$LIBS
18165         LIBS="$ol_DB_LIB $LIBS"
18166
18167         cat > conftest.$ac_ext <<EOF
18168 #line 18169 "configure"
18169 #include "confdefs.h"
18170
18171 #ifdef HAVE_DB_185_H
18172 # include <db_185.h>
18173 #else
18174 # include <db.h>
18175 #endif
18176
18177 #ifndef DB_VERSION_MAJOR
18178 # define DB_VERSION_MAJOR 1
18179 #endif
18180
18181 #ifndef NULL
18182 #define NULL ((void*)0)
18183 #endif
18184
18185 int main() {
18186
18187 #if DB_VERSION_MAJOR > 1
18188         {
18189                 char *version;
18190                 int major, minor, patch;
18191
18192                 version = db_version( &major, &minor, &patch );
18193
18194                 if( major != DB_VERSION_MAJOR ||
18195                         minor < DB_VERSION_MINOR )
18196                 {
18197                         printf("Berkeley DB version mismatch\n"
18198                                 "\texpected: %s\n\tgot: %s\n",
18199                                 DB_VERSION_STRING, version);
18200                         return 1;
18201                 }
18202         }
18203 #endif
18204
18205 #if DB_VERSION_MAJOR > 2
18206         db_env_create( NULL, 0 );
18207 #elif DB_VERSION_MAJOR > 1
18208         db_appexit( NULL );
18209 #else
18210         (void) dbopen( NULL, 0, 0, 0, NULL);
18211 #endif
18212
18213 ; return 0; }
18214 EOF
18215 if { (eval echo configure:18216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18216   rm -rf conftest*
18217   ol_cv_db_db=yes
18218 else
18219   echo "configure: failed program was:" >&5
18220   cat conftest.$ac_ext >&5
18221   rm -rf conftest*
18222   ol_cv_db_db=no
18223 fi
18224 rm -f conftest*
18225
18226         LIBS="$ol_LIBS"
18227
18228 fi
18229
18230 echo "$ac_t""$ol_cv_db_db" 1>&6
18231
18232         if test $ol_cv_db_db = yes ; then
18233                 ol_cv_lib_db=-ldb
18234         fi
18235 fi
18236
18237 if test $ol_cv_lib_db = no ; then
18238         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
18239 echo "configure:18240: checking for Berkeley DB link (-ldb3)" >&5
18240 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
18241   echo $ac_n "(cached) $ac_c" 1>&6
18242 else
18243   
18244         ol_DB_LIB=-ldb3
18245         ol_LIBS=$LIBS
18246         LIBS="$ol_DB_LIB $LIBS"
18247
18248         cat > conftest.$ac_ext <<EOF
18249 #line 18250 "configure"
18250 #include "confdefs.h"
18251
18252 #ifdef HAVE_DB_185_H
18253 # include <db_185.h>
18254 #else
18255 # include <db.h>
18256 #endif
18257
18258 #ifndef DB_VERSION_MAJOR
18259 # define DB_VERSION_MAJOR 1
18260 #endif
18261
18262 #ifndef NULL
18263 #define NULL ((void*)0)
18264 #endif
18265
18266 int main() {
18267
18268 #if DB_VERSION_MAJOR > 1
18269         {
18270                 char *version;
18271                 int major, minor, patch;
18272
18273                 version = db_version( &major, &minor, &patch );
18274
18275                 if( major != DB_VERSION_MAJOR ||
18276                         minor < DB_VERSION_MINOR )
18277                 {
18278                         printf("Berkeley DB version mismatch\n"
18279                                 "\texpected: %s\n\tgot: %s\n",
18280                                 DB_VERSION_STRING, version);
18281                         return 1;
18282                 }
18283         }
18284 #endif
18285
18286 #if DB_VERSION_MAJOR > 2
18287         db_env_create( NULL, 0 );
18288 #elif DB_VERSION_MAJOR > 1
18289         db_appexit( NULL );
18290 #else
18291         (void) dbopen( NULL, 0, 0, 0, NULL);
18292 #endif
18293
18294 ; return 0; }
18295 EOF
18296 if { (eval echo configure:18297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18297   rm -rf conftest*
18298   ol_cv_db_db3=yes
18299 else
18300   echo "configure: failed program was:" >&5
18301   cat conftest.$ac_ext >&5
18302   rm -rf conftest*
18303   ol_cv_db_db3=no
18304 fi
18305 rm -f conftest*
18306
18307         LIBS="$ol_LIBS"
18308
18309 fi
18310
18311 echo "$ac_t""$ol_cv_db_db3" 1>&6
18312
18313         if test $ol_cv_db_db3 = yes ; then
18314                 ol_cv_lib_db=-ldb3
18315         fi
18316 fi
18317
18318 if test $ol_cv_lib_db = no ; then
18319         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
18320 echo "configure:18321: checking for Berkeley DB link (-ldb-3)" >&5
18321 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
18322   echo $ac_n "(cached) $ac_c" 1>&6
18323 else
18324   
18325         ol_DB_LIB=-ldb-3
18326         ol_LIBS=$LIBS
18327         LIBS="$ol_DB_LIB $LIBS"
18328
18329         cat > conftest.$ac_ext <<EOF
18330 #line 18331 "configure"
18331 #include "confdefs.h"
18332
18333 #ifdef HAVE_DB_185_H
18334 # include <db_185.h>
18335 #else
18336 # include <db.h>
18337 #endif
18338
18339 #ifndef DB_VERSION_MAJOR
18340 # define DB_VERSION_MAJOR 1
18341 #endif
18342
18343 #ifndef NULL
18344 #define NULL ((void*)0)
18345 #endif
18346
18347 int main() {
18348
18349 #if DB_VERSION_MAJOR > 1
18350         {
18351                 char *version;
18352                 int major, minor, patch;
18353
18354                 version = db_version( &major, &minor, &patch );
18355
18356                 if( major != DB_VERSION_MAJOR ||
18357                         minor < DB_VERSION_MINOR )
18358                 {
18359                         printf("Berkeley DB version mismatch\n"
18360                                 "\texpected: %s\n\tgot: %s\n",
18361                                 DB_VERSION_STRING, version);
18362                         return 1;
18363                 }
18364         }
18365 #endif
18366
18367 #if DB_VERSION_MAJOR > 2
18368         db_env_create( NULL, 0 );
18369 #elif DB_VERSION_MAJOR > 1
18370         db_appexit( NULL );
18371 #else
18372         (void) dbopen( NULL, 0, 0, 0, NULL);
18373 #endif
18374
18375 ; return 0; }
18376 EOF
18377 if { (eval echo configure:18378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18378   rm -rf conftest*
18379   ol_cv_db_db_3=yes
18380 else
18381   echo "configure: failed program was:" >&5
18382   cat conftest.$ac_ext >&5
18383   rm -rf conftest*
18384   ol_cv_db_db_3=no
18385 fi
18386 rm -f conftest*
18387
18388         LIBS="$ol_LIBS"
18389
18390 fi
18391
18392 echo "$ac_t""$ol_cv_db_db_3" 1>&6
18393
18394         if test $ol_cv_db_db_3 = yes ; then
18395                 ol_cv_lib_db=-ldb-3
18396         fi
18397 fi
18398
18399 if test $ol_cv_lib_db = no ; then
18400         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
18401 echo "configure:18402: checking for Berkeley DB link (-ldb2)" >&5
18402 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
18403   echo $ac_n "(cached) $ac_c" 1>&6
18404 else
18405   
18406         ol_DB_LIB=-ldb2
18407         ol_LIBS=$LIBS
18408         LIBS="$ol_DB_LIB $LIBS"
18409
18410         cat > conftest.$ac_ext <<EOF
18411 #line 18412 "configure"
18412 #include "confdefs.h"
18413
18414 #ifdef HAVE_DB_185_H
18415 # include <db_185.h>
18416 #else
18417 # include <db.h>
18418 #endif
18419
18420 #ifndef DB_VERSION_MAJOR
18421 # define DB_VERSION_MAJOR 1
18422 #endif
18423
18424 #ifndef NULL
18425 #define NULL ((void*)0)
18426 #endif
18427
18428 int main() {
18429
18430 #if DB_VERSION_MAJOR > 1
18431         {
18432                 char *version;
18433                 int major, minor, patch;
18434
18435                 version = db_version( &major, &minor, &patch );
18436
18437                 if( major != DB_VERSION_MAJOR ||
18438                         minor < DB_VERSION_MINOR )
18439                 {
18440                         printf("Berkeley DB version mismatch\n"
18441                                 "\texpected: %s\n\tgot: %s\n",
18442                                 DB_VERSION_STRING, version);
18443                         return 1;
18444                 }
18445         }
18446 #endif
18447
18448 #if DB_VERSION_MAJOR > 2
18449         db_env_create( NULL, 0 );
18450 #elif DB_VERSION_MAJOR > 1
18451         db_appexit( NULL );
18452 #else
18453         (void) dbopen( NULL, 0, 0, 0, NULL);
18454 #endif
18455
18456 ; return 0; }
18457 EOF
18458 if { (eval echo configure:18459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18459   rm -rf conftest*
18460   ol_cv_db_db2=yes
18461 else
18462   echo "configure: failed program was:" >&5
18463   cat conftest.$ac_ext >&5
18464   rm -rf conftest*
18465   ol_cv_db_db2=no
18466 fi
18467 rm -f conftest*
18468
18469         LIBS="$ol_LIBS"
18470
18471 fi
18472
18473 echo "$ac_t""$ol_cv_db_db2" 1>&6
18474
18475         if test $ol_cv_db_db2 = yes ; then
18476                 ol_cv_lib_db=-ldb2
18477         fi
18478 fi
18479
18480 if test $ol_cv_lib_db = no ; then
18481         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18482 echo "configure:18483: checking for Berkeley DB link (-ldb-2)" >&5
18483 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18484   echo $ac_n "(cached) $ac_c" 1>&6
18485 else
18486   
18487         ol_DB_LIB=-ldb-2
18488         ol_LIBS=$LIBS
18489         LIBS="$ol_DB_LIB $LIBS"
18490
18491         cat > conftest.$ac_ext <<EOF
18492 #line 18493 "configure"
18493 #include "confdefs.h"
18494
18495 #ifdef HAVE_DB_185_H
18496 # include <db_185.h>
18497 #else
18498 # include <db.h>
18499 #endif
18500
18501 #ifndef DB_VERSION_MAJOR
18502 # define DB_VERSION_MAJOR 1
18503 #endif
18504
18505 #ifndef NULL
18506 #define NULL ((void*)0)
18507 #endif
18508
18509 int main() {
18510
18511 #if DB_VERSION_MAJOR > 1
18512         {
18513                 char *version;
18514                 int major, minor, patch;
18515
18516                 version = db_version( &major, &minor, &patch );
18517
18518                 if( major != DB_VERSION_MAJOR ||
18519                         minor < DB_VERSION_MINOR )
18520                 {
18521                         printf("Berkeley DB version mismatch\n"
18522                                 "\texpected: %s\n\tgot: %s\n",
18523                                 DB_VERSION_STRING, version);
18524                         return 1;
18525                 }
18526         }
18527 #endif
18528
18529 #if DB_VERSION_MAJOR > 2
18530         db_env_create( NULL, 0 );
18531 #elif DB_VERSION_MAJOR > 1
18532         db_appexit( NULL );
18533 #else
18534         (void) dbopen( NULL, 0, 0, 0, NULL);
18535 #endif
18536
18537 ; return 0; }
18538 EOF
18539 if { (eval echo configure:18540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18540   rm -rf conftest*
18541   ol_cv_db_db_2=yes
18542 else
18543   echo "configure: failed program was:" >&5
18544   cat conftest.$ac_ext >&5
18545   rm -rf conftest*
18546   ol_cv_db_db_2=no
18547 fi
18548 rm -f conftest*
18549
18550         LIBS="$ol_LIBS"
18551
18552 fi
18553
18554 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18555
18556         if test $ol_cv_db_db_2 = yes ; then
18557                 ol_cv_lib_db=-ldb-2
18558         fi
18559 fi
18560
18561 if test $ol_cv_lib_db = no ; then
18562         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18563 echo "configure:18564: checking for Berkeley DB link (-ldb1)" >&5
18564 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18565   echo $ac_n "(cached) $ac_c" 1>&6
18566 else
18567   
18568         ol_DB_LIB=-ldb1
18569         ol_LIBS=$LIBS
18570         LIBS="$ol_DB_LIB $LIBS"
18571
18572         cat > conftest.$ac_ext <<EOF
18573 #line 18574 "configure"
18574 #include "confdefs.h"
18575
18576 #ifdef HAVE_DB_185_H
18577 # include <db_185.h>
18578 #else
18579 # include <db.h>
18580 #endif
18581
18582 #ifndef DB_VERSION_MAJOR
18583 # define DB_VERSION_MAJOR 1
18584 #endif
18585
18586 #ifndef NULL
18587 #define NULL ((void*)0)
18588 #endif
18589
18590 int main() {
18591
18592 #if DB_VERSION_MAJOR > 1
18593         {
18594                 char *version;
18595                 int major, minor, patch;
18596
18597                 version = db_version( &major, &minor, &patch );
18598
18599                 if( major != DB_VERSION_MAJOR ||
18600                         minor < DB_VERSION_MINOR )
18601                 {
18602                         printf("Berkeley DB version mismatch\n"
18603                                 "\texpected: %s\n\tgot: %s\n",
18604                                 DB_VERSION_STRING, version);
18605                         return 1;
18606                 }
18607         }
18608 #endif
18609
18610 #if DB_VERSION_MAJOR > 2
18611         db_env_create( NULL, 0 );
18612 #elif DB_VERSION_MAJOR > 1
18613         db_appexit( NULL );
18614 #else
18615         (void) dbopen( NULL, 0, 0, 0, NULL);
18616 #endif
18617
18618 ; return 0; }
18619 EOF
18620 if { (eval echo configure:18621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18621   rm -rf conftest*
18622   ol_cv_db_db1=yes
18623 else
18624   echo "configure: failed program was:" >&5
18625   cat conftest.$ac_ext >&5
18626   rm -rf conftest*
18627   ol_cv_db_db1=no
18628 fi
18629 rm -f conftest*
18630
18631         LIBS="$ol_LIBS"
18632
18633 fi
18634
18635 echo "$ac_t""$ol_cv_db_db1" 1>&6
18636
18637         if test $ol_cv_db_db1 = yes ; then
18638                 ol_cv_lib_db=-ldb1
18639         fi
18640 fi
18641
18642 if test $ol_cv_lib_db = no ; then
18643         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18644 echo "configure:18645: checking for Berkeley DB link (-ldb-1)" >&5
18645 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18646   echo $ac_n "(cached) $ac_c" 1>&6
18647 else
18648   
18649         ol_DB_LIB=-ldb-1
18650         ol_LIBS=$LIBS
18651         LIBS="$ol_DB_LIB $LIBS"
18652
18653         cat > conftest.$ac_ext <<EOF
18654 #line 18655 "configure"
18655 #include "confdefs.h"
18656
18657 #ifdef HAVE_DB_185_H
18658 # include <db_185.h>
18659 #else
18660 # include <db.h>
18661 #endif
18662
18663 #ifndef DB_VERSION_MAJOR
18664 # define DB_VERSION_MAJOR 1
18665 #endif
18666
18667 #ifndef NULL
18668 #define NULL ((void*)0)
18669 #endif
18670
18671 int main() {
18672
18673 #if DB_VERSION_MAJOR > 1
18674         {
18675                 char *version;
18676                 int major, minor, patch;
18677
18678                 version = db_version( &major, &minor, &patch );
18679
18680                 if( major != DB_VERSION_MAJOR ||
18681                         minor < DB_VERSION_MINOR )
18682                 {
18683                         printf("Berkeley DB version mismatch\n"
18684                                 "\texpected: %s\n\tgot: %s\n",
18685                                 DB_VERSION_STRING, version);
18686                         return 1;
18687                 }
18688         }
18689 #endif
18690
18691 #if DB_VERSION_MAJOR > 2
18692         db_env_create( NULL, 0 );
18693 #elif DB_VERSION_MAJOR > 1
18694         db_appexit( NULL );
18695 #else
18696         (void) dbopen( NULL, 0, 0, 0, NULL);
18697 #endif
18698
18699 ; return 0; }
18700 EOF
18701 if { (eval echo configure:18702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18702   rm -rf conftest*
18703   ol_cv_db_db_1=yes
18704 else
18705   echo "configure: failed program was:" >&5
18706   cat conftest.$ac_ext >&5
18707   rm -rf conftest*
18708   ol_cv_db_db_1=no
18709 fi
18710 rm -f conftest*
18711
18712         LIBS="$ol_LIBS"
18713
18714 fi
18715
18716 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18717
18718         if test $ol_cv_db_db_1 = yes ; then
18719                 ol_cv_lib_db=-ldb-1
18720         fi
18721 fi
18722
18723
18724         if test "$ol_cv_lib_db" != no ; then
18725                 ol_cv_berkeley_db=yes
18726                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
18727 echo "configure:18728: checking for Berkeley DB thread support" >&5
18728 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
18729   echo $ac_n "(cached) $ac_c" 1>&6
18730 else
18731   
18732         ol_LIBS="$LIBS"
18733         if test $ol_cv_lib_db != yes ; then
18734                 LIBS="$ol_cv_lib_db"
18735         fi
18736
18737         if test "$cross_compiling" = yes; then
18738   ol_cv_berkeley_db_thread=cross
18739 else
18740   cat > conftest.$ac_ext <<EOF
18741 #line 18742 "configure"
18742 #include "confdefs.h"
18743
18744 #ifdef HAVE_DB_185_H
18745         choke me;
18746 #else
18747 #include <db.h>
18748 #endif
18749 #ifndef NULL
18750 #define NULL ((void *)0)
18751 #endif
18752 main()
18753 {
18754         int rc;
18755         u_int32_t flags = DB_CREATE |
18756 #ifdef DB_PRIVATE
18757                 DB_PRIVATE |
18758 #endif
18759                 DB_THREAD;
18760
18761 #if DB_VERSION_MAJOR > 2
18762         DB_ENV *env = NULL;
18763
18764         rc = db_env_create( &env, 0 );
18765
18766         flags |= DB_INIT_MPOOL;
18767 #ifdef DB_MPOOL_PRIVATE
18768         flags |= DB_MPOOL_PRIVATE;
18769 #endif
18770
18771         if( rc ) {
18772                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18773                 return rc;
18774         }
18775
18776 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
18777         rc = env->open( env, NULL, flags, 0 );
18778 #else
18779         rc = env->open( env, NULL, NULL, flags, 0 );
18780 #endif
18781
18782         if ( rc == 0 ) {
18783                 rc = env->close( env, 0 );
18784         }
18785
18786         if( rc ) {
18787                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18788                 return rc;
18789         }
18790
18791 #else
18792         DB_ENV env;
18793         memset( &env, '\0', sizeof(env) );
18794
18795         rc = db_appinit( NULL, NULL, &env, flags );
18796
18797         if( rc == 0 ) {
18798                 db_appexit( &env );
18799         }
18800
18801         unlink("__db_mpool.share");
18802         unlink("__db_lock.share");
18803 #endif
18804
18805         return rc;
18806 }
18807 EOF
18808 if { (eval echo configure:18809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
18809 then
18810   ol_cv_berkeley_db_thread=yes
18811 else
18812   echo "configure: failed program was:" >&5
18813   cat conftest.$ac_ext >&5
18814   rm -fr conftest*
18815   ol_cv_berkeley_db_thread=no
18816 fi
18817 rm -fr conftest*
18818 fi
18819
18820
18821         LIBS="$ol_LIBS"
18822
18823         if test $ol_cv_berkeley_db_thread != no ; then
18824                 cat >> confdefs.h <<\EOF
18825 #define HAVE_BERKELEY_DB_THREAD 1
18826 EOF
18827
18828         fi
18829
18830 fi
18831
18832 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
18833         fi
18834 fi
18835
18836         fi
18837
18838         if test $ol_cv_berkeley_db != no ; then
18839                 cat >> confdefs.h <<\EOF
18840 #define HAVE_BERKELEY_DB 1
18841 EOF
18842
18843
18844                 ol_link_ldbm=berkeley
18845                 ol_with_ldbm_api=berkeley
18846
18847                 if test $ol_with_ldbm_type = hash ; then
18848                         cat >> confdefs.h <<\EOF
18849 #define LDBM_USE_DBHASH 1
18850 EOF
18851
18852                 else
18853                         cat >> confdefs.h <<\EOF
18854 #define LDBM_USE_DBBTREE 1
18855 EOF
18856
18857                 fi
18858
18859                                                 if test $ol_cv_lib_db != yes ; then
18860                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
18861                 fi
18862         fi
18863 fi
18864
18865 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
18866         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
18867 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
18868         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
18869 echo "configure:18870: checking Berkeley DB version for BDB backend" >&5
18870 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
18871   echo $ac_n "(cached) $ac_c" 1>&6
18872 else
18873   
18874         cat > conftest.$ac_ext <<EOF
18875 #line 18876 "configure"
18876 #include "confdefs.h"
18877
18878 #include <db.h>
18879
18880  /* this check could be improved */
18881 #ifndef DB_VERSION_MAJOR
18882 #       define DB_VERSION_MAJOR 1
18883 #endif
18884
18885 /* require 4.0 or later */
18886 #if DB_VERSION_MAJOR >= 4 
18887         __db_version_compat
18888 #endif
18889         
18890 EOF
18891 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18892   egrep "__db_version_compat" >/dev/null 2>&1; then
18893   rm -rf conftest*
18894   ol_cv_bdb_compat=yes
18895 else
18896   rm -rf conftest*
18897   ol_cv_bdb_compat=no
18898 fi
18899 rm -f conftest*
18900
18901 fi
18902
18903 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
18904
18905
18906         if test $ol_cv_bdb_compat = yes ; then
18907                 ol_enable_bdb=yes
18908         elif test $ol_enable_bdb = yes ; then
18909                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
18910         else
18911                 ol_enable_bdb=no
18912         fi
18913 fi
18914
18915 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
18916         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
18917         ol_with_ldbm_api=none
18918 fi
18919
18920 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
18921         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
18922 echo "configure:18923: checking for MDBM library" >&5
18923 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
18924   echo $ac_n "(cached) $ac_c" 1>&6
18925 else
18926         ol_LIBS="$LIBS"
18927         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
18928 echo "configure:18929: checking for mdbm_set_chain" >&5
18929 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
18930   echo $ac_n "(cached) $ac_c" 1>&6
18931 else
18932   cat > conftest.$ac_ext <<EOF
18933 #line 18934 "configure"
18934 #include "confdefs.h"
18935 /* System header to define __stub macros and hopefully few prototypes,
18936     which can conflict with char mdbm_set_chain(); below.  */
18937 #include <assert.h>
18938 /* Override any gcc2 internal prototype to avoid an error.  */
18939 /* We use char because int might match the return type of a gcc2
18940     builtin and then its argument prototype would still apply.  */
18941 char mdbm_set_chain();
18942 char (*f)();
18943
18944 int main() {
18945
18946 /* The GNU C library defines this for functions which it implements
18947     to always fail with ENOSYS.  Some functions are actually named
18948     something starting with __ and the normal name is an alias.  */
18949 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
18950 choke me
18951 #else
18952 f = mdbm_set_chain;
18953 #endif
18954
18955 ; return 0; }
18956 EOF
18957 if { (eval echo configure:18958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18958   rm -rf conftest*
18959   eval "ac_cv_func_mdbm_set_chain=yes"
18960 else
18961   echo "configure: failed program was:" >&5
18962   cat conftest.$ac_ext >&5
18963   rm -rf conftest*
18964   eval "ac_cv_func_mdbm_set_chain=no"
18965 fi
18966 rm -f conftest*
18967 fi
18968
18969 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
18970   echo "$ac_t""yes" 1>&6
18971   ol_cv_lib_mdbm=yes
18972 else
18973   echo "$ac_t""no" 1>&6
18974
18975                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
18976 echo "configure:18977: checking for mdbm_set_chain in -lmdbm" >&5
18977 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
18978 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18979   echo $ac_n "(cached) $ac_c" 1>&6
18980 else
18981   ac_save_LIBS="$LIBS"
18982 LIBS="-lmdbm  $LIBS"
18983 cat > conftest.$ac_ext <<EOF
18984 #line 18985 "configure"
18985 #include "confdefs.h"
18986 /* Override any gcc2 internal prototype to avoid an error.  */
18987 /* We use char because int might match the return type of a gcc2
18988     builtin and then its argument prototype would still apply.  */
18989 char mdbm_set_chain();
18990
18991 int main() {
18992 mdbm_set_chain()
18993 ; return 0; }
18994 EOF
18995 if { (eval echo configure:18996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18996   rm -rf conftest*
18997   eval "ac_cv_lib_$ac_lib_var=yes"
18998 else
18999   echo "configure: failed program was:" >&5
19000   cat conftest.$ac_ext >&5
19001   rm -rf conftest*
19002   eval "ac_cv_lib_$ac_lib_var=no"
19003 fi
19004 rm -f conftest*
19005 LIBS="$ac_save_LIBS"
19006
19007 fi
19008 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19009   echo "$ac_t""yes" 1>&6
19010   ol_cv_lib_mdbm=-lmdbm
19011 else
19012   echo "$ac_t""no" 1>&6
19013 ol_cv_lib_mdbm=no
19014 fi
19015
19016         
19017 fi
19018
19019         LIBS="$ol_LIBS"
19020
19021 fi
19022
19023 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
19024
19025
19026  for ac_hdr in mdbm.h
19027 do
19028 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19029 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19030 echo "configure:19031: checking for $ac_hdr" >&5
19031 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19032   echo $ac_n "(cached) $ac_c" 1>&6
19033 else
19034   cat > conftest.$ac_ext <<EOF
19035 #line 19036 "configure"
19036 #include "confdefs.h"
19037 #include <$ac_hdr>
19038 EOF
19039 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19040 { (eval echo configure:19041: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19041 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19042 if test -z "$ac_err"; then
19043   rm -rf conftest*
19044   eval "ac_cv_header_$ac_safe=yes"
19045 else
19046   echo "$ac_err" >&5
19047   echo "configure: failed program was:" >&5
19048   cat conftest.$ac_ext >&5
19049   rm -rf conftest*
19050   eval "ac_cv_header_$ac_safe=no"
19051 fi
19052 rm -f conftest*
19053 fi
19054 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19055   echo "$ac_t""yes" 1>&6
19056     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19057   cat >> confdefs.h <<EOF
19058 #define $ac_tr_hdr 1
19059 EOF
19060  
19061 else
19062   echo "$ac_t""no" 1>&6
19063 fi
19064 done
19065
19066  echo $ac_n "checking for db""... $ac_c" 1>&6
19067 echo "configure:19068: checking for db" >&5
19068 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
19069   echo $ac_n "(cached) $ac_c" 1>&6
19070 else
19071   
19072         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
19073                 ol_cv_mdbm=no
19074         else
19075                 ol_cv_mdbm=yes
19076         fi
19077
19078 fi
19079
19080 echo "$ac_t""$ol_cv_mdbm" 1>&6
19081  if test $ol_cv_mdbm = yes ; then
19082         cat >> confdefs.h <<\EOF
19083 #define HAVE_MDBM 1
19084 EOF
19085
19086  fi
19087
19088
19089         if test $ol_cv_mdbm = yes ; then
19090                 ol_link_ldbm=mdbm
19091                 ol_with_ldbm_api=mdbm
19092                 if test $ol_cv_lib_mdbm != yes ; then
19093                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
19094                 fi
19095         fi
19096 fi
19097
19098 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
19099         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
19100 echo "configure:19101: checking for GDBM library" >&5
19101 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
19102   echo $ac_n "(cached) $ac_c" 1>&6
19103 else
19104         ol_LIBS="$LIBS"
19105         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
19106 echo "configure:19107: checking for gdbm_open" >&5
19107 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
19108   echo $ac_n "(cached) $ac_c" 1>&6
19109 else
19110   cat > conftest.$ac_ext <<EOF
19111 #line 19112 "configure"
19112 #include "confdefs.h"
19113 /* System header to define __stub macros and hopefully few prototypes,
19114     which can conflict with char gdbm_open(); below.  */
19115 #include <assert.h>
19116 /* Override any gcc2 internal prototype to avoid an error.  */
19117 /* We use char because int might match the return type of a gcc2
19118     builtin and then its argument prototype would still apply.  */
19119 char gdbm_open();
19120 char (*f)();
19121
19122 int main() {
19123
19124 /* The GNU C library defines this for functions which it implements
19125     to always fail with ENOSYS.  Some functions are actually named
19126     something starting with __ and the normal name is an alias.  */
19127 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
19128 choke me
19129 #else
19130 f = gdbm_open;
19131 #endif
19132
19133 ; return 0; }
19134 EOF
19135 if { (eval echo configure:19136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19136   rm -rf conftest*
19137   eval "ac_cv_func_gdbm_open=yes"
19138 else
19139   echo "configure: failed program was:" >&5
19140   cat conftest.$ac_ext >&5
19141   rm -rf conftest*
19142   eval "ac_cv_func_gdbm_open=no"
19143 fi
19144 rm -f conftest*
19145 fi
19146
19147 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
19148   echo "$ac_t""yes" 1>&6
19149   ol_cv_lib_gdbm=yes
19150 else
19151   echo "$ac_t""no" 1>&6
19152
19153                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
19154 echo "configure:19155: checking for gdbm_open in -lgdbm" >&5
19155 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
19156 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19157   echo $ac_n "(cached) $ac_c" 1>&6
19158 else
19159   ac_save_LIBS="$LIBS"
19160 LIBS="-lgdbm  $LIBS"
19161 cat > conftest.$ac_ext <<EOF
19162 #line 19163 "configure"
19163 #include "confdefs.h"
19164 /* Override any gcc2 internal prototype to avoid an error.  */
19165 /* We use char because int might match the return type of a gcc2
19166     builtin and then its argument prototype would still apply.  */
19167 char gdbm_open();
19168
19169 int main() {
19170 gdbm_open()
19171 ; return 0; }
19172 EOF
19173 if { (eval echo configure:19174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19174   rm -rf conftest*
19175   eval "ac_cv_lib_$ac_lib_var=yes"
19176 else
19177   echo "configure: failed program was:" >&5
19178   cat conftest.$ac_ext >&5
19179   rm -rf conftest*
19180   eval "ac_cv_lib_$ac_lib_var=no"
19181 fi
19182 rm -f conftest*
19183 LIBS="$ac_save_LIBS"
19184
19185 fi
19186 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19187   echo "$ac_t""yes" 1>&6
19188   ol_cv_lib_gdbm=-lgdbm
19189 else
19190   echo "$ac_t""no" 1>&6
19191 ol_cv_lib_gdbm=no
19192 fi
19193
19194         
19195 fi
19196
19197         LIBS="$ol_LIBS"
19198
19199 fi
19200
19201 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
19202
19203
19204  for ac_hdr in gdbm.h
19205 do
19206 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19207 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19208 echo "configure:19209: checking for $ac_hdr" >&5
19209 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19210   echo $ac_n "(cached) $ac_c" 1>&6
19211 else
19212   cat > conftest.$ac_ext <<EOF
19213 #line 19214 "configure"
19214 #include "confdefs.h"
19215 #include <$ac_hdr>
19216 EOF
19217 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19218 { (eval echo configure:19219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19219 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19220 if test -z "$ac_err"; then
19221   rm -rf conftest*
19222   eval "ac_cv_header_$ac_safe=yes"
19223 else
19224   echo "$ac_err" >&5
19225   echo "configure: failed program was:" >&5
19226   cat conftest.$ac_ext >&5
19227   rm -rf conftest*
19228   eval "ac_cv_header_$ac_safe=no"
19229 fi
19230 rm -f conftest*
19231 fi
19232 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19233   echo "$ac_t""yes" 1>&6
19234     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19235   cat >> confdefs.h <<EOF
19236 #define $ac_tr_hdr 1
19237 EOF
19238  
19239 else
19240   echo "$ac_t""no" 1>&6
19241 fi
19242 done
19243
19244  echo $ac_n "checking for db""... $ac_c" 1>&6
19245 echo "configure:19246: checking for db" >&5
19246 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
19247   echo $ac_n "(cached) $ac_c" 1>&6
19248 else
19249   
19250         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
19251                 ol_cv_gdbm=no
19252         else
19253                 ol_cv_gdbm=yes
19254         fi
19255
19256 fi
19257
19258 echo "$ac_t""$ol_cv_gdbm" 1>&6
19259  if test $ol_cv_gdbm = yes ; then
19260         cat >> confdefs.h <<\EOF
19261 #define HAVE_GDBM 1
19262 EOF
19263
19264  fi
19265
19266
19267         if test $ol_cv_gdbm = yes ; then
19268                 ol_link_ldbm=gdbm
19269                 ol_with_ldbm_api=gdbm
19270
19271                 if test $ol_cv_lib_gdbm != yes ; then
19272                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
19273                 fi
19274         fi
19275 fi
19276
19277 if test $ol_with_ldbm_api = ndbm ; then
19278         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
19279 echo "configure:19280: checking for NDBM library" >&5
19280 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
19281   echo $ac_n "(cached) $ac_c" 1>&6
19282 else
19283         ol_LIBS="$LIBS"
19284         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
19285 echo "configure:19286: checking for dbm_open" >&5
19286 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
19287   echo $ac_n "(cached) $ac_c" 1>&6
19288 else
19289   cat > conftest.$ac_ext <<EOF
19290 #line 19291 "configure"
19291 #include "confdefs.h"
19292 /* System header to define __stub macros and hopefully few prototypes,
19293     which can conflict with char dbm_open(); below.  */
19294 #include <assert.h>
19295 /* Override any gcc2 internal prototype to avoid an error.  */
19296 /* We use char because int might match the return type of a gcc2
19297     builtin and then its argument prototype would still apply.  */
19298 char dbm_open();
19299 char (*f)();
19300
19301 int main() {
19302
19303 /* The GNU C library defines this for functions which it implements
19304     to always fail with ENOSYS.  Some functions are actually named
19305     something starting with __ and the normal name is an alias.  */
19306 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
19307 choke me
19308 #else
19309 f = dbm_open;
19310 #endif
19311
19312 ; return 0; }
19313 EOF
19314 if { (eval echo configure:19315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19315   rm -rf conftest*
19316   eval "ac_cv_func_dbm_open=yes"
19317 else
19318   echo "configure: failed program was:" >&5
19319   cat conftest.$ac_ext >&5
19320   rm -rf conftest*
19321   eval "ac_cv_func_dbm_open=no"
19322 fi
19323 rm -f conftest*
19324 fi
19325
19326 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
19327   echo "$ac_t""yes" 1>&6
19328   ol_cv_lib_ndbm=yes
19329 else
19330   echo "$ac_t""no" 1>&6
19331
19332                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
19333 echo "configure:19334: checking for dbm_open in -lndbm" >&5
19334 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19335 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19336   echo $ac_n "(cached) $ac_c" 1>&6
19337 else
19338   ac_save_LIBS="$LIBS"
19339 LIBS="-lndbm  $LIBS"
19340 cat > conftest.$ac_ext <<EOF
19341 #line 19342 "configure"
19342 #include "confdefs.h"
19343 /* Override any gcc2 internal prototype to avoid an error.  */
19344 /* We use char because int might match the return type of a gcc2
19345     builtin and then its argument prototype would still apply.  */
19346 char dbm_open();
19347
19348 int main() {
19349 dbm_open()
19350 ; return 0; }
19351 EOF
19352 if { (eval echo configure:19353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19353   rm -rf conftest*
19354   eval "ac_cv_lib_$ac_lib_var=yes"
19355 else
19356   echo "configure: failed program was:" >&5
19357   cat conftest.$ac_ext >&5
19358   rm -rf conftest*
19359   eval "ac_cv_lib_$ac_lib_var=no"
19360 fi
19361 rm -f conftest*
19362 LIBS="$ac_save_LIBS"
19363
19364 fi
19365 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19366   echo "$ac_t""yes" 1>&6
19367   ol_cv_lib_ndbm=-lndbm
19368 else
19369   echo "$ac_t""no" 1>&6
19370
19371                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
19372 echo "configure:19373: checking for dbm_open in -ldbm" >&5
19373 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19374 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19375   echo $ac_n "(cached) $ac_c" 1>&6
19376 else
19377   ac_save_LIBS="$LIBS"
19378 LIBS="-ldbm  $LIBS"
19379 cat > conftest.$ac_ext <<EOF
19380 #line 19381 "configure"
19381 #include "confdefs.h"
19382 /* Override any gcc2 internal prototype to avoid an error.  */
19383 /* We use char because int might match the return type of a gcc2
19384     builtin and then its argument prototype would still apply.  */
19385 char dbm_open();
19386
19387 int main() {
19388 dbm_open()
19389 ; return 0; }
19390 EOF
19391 if { (eval echo configure:19392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19392   rm -rf conftest*
19393   eval "ac_cv_lib_$ac_lib_var=yes"
19394 else
19395   echo "configure: failed program was:" >&5
19396   cat conftest.$ac_ext >&5
19397   rm -rf conftest*
19398   eval "ac_cv_lib_$ac_lib_var=no"
19399 fi
19400 rm -f conftest*
19401 LIBS="$ac_save_LIBS"
19402
19403 fi
19404 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19405   echo "$ac_t""yes" 1>&6
19406   ol_cv_lib_ndbm=-ldbm
19407 else
19408   echo "$ac_t""no" 1>&6
19409 ol_cv_lib_ndbm=no
19410 fi
19411                 
19412 fi
19413
19414         
19415 fi
19416
19417         LIBS="$ol_LIBS"
19418
19419 fi
19420
19421 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
19422
19423
19424  for ac_hdr in ndbm.h
19425 do
19426 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19427 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19428 echo "configure:19429: checking for $ac_hdr" >&5
19429 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19430   echo $ac_n "(cached) $ac_c" 1>&6
19431 else
19432   cat > conftest.$ac_ext <<EOF
19433 #line 19434 "configure"
19434 #include "confdefs.h"
19435 #include <$ac_hdr>
19436 EOF
19437 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19438 { (eval echo configure:19439: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19439 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19440 if test -z "$ac_err"; then
19441   rm -rf conftest*
19442   eval "ac_cv_header_$ac_safe=yes"
19443 else
19444   echo "$ac_err" >&5
19445   echo "configure: failed program was:" >&5
19446   cat conftest.$ac_ext >&5
19447   rm -rf conftest*
19448   eval "ac_cv_header_$ac_safe=no"
19449 fi
19450 rm -f conftest*
19451 fi
19452 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19453   echo "$ac_t""yes" 1>&6
19454     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19455   cat >> confdefs.h <<EOF
19456 #define $ac_tr_hdr 1
19457 EOF
19458  
19459 else
19460   echo "$ac_t""no" 1>&6
19461 fi
19462 done
19463
19464  echo $ac_n "checking for db""... $ac_c" 1>&6
19465 echo "configure:19466: checking for db" >&5
19466 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
19467   echo $ac_n "(cached) $ac_c" 1>&6
19468 else
19469   
19470         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
19471                 ol_cv_ndbm=no
19472         else
19473                 ol_cv_ndbm=yes
19474         fi
19475
19476 fi
19477
19478 echo "$ac_t""$ol_cv_ndbm" 1>&6
19479  if test $ol_cv_ndbm = yes ; then
19480         cat >> confdefs.h <<\EOF
19481 #define HAVE_NDBM 1
19482 EOF
19483
19484  fi
19485
19486
19487         if test $ol_cv_ndbm = yes ; then
19488                 ol_link_ldbm=ndbm
19489                 ol_with_ldbm_api=ndbm
19490
19491                 if test $ol_cv_lib_ndbm != yes ; then
19492                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
19493                 fi
19494         fi
19495 fi
19496
19497 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
19498         echo "configure: warning: could not find suitable LDBM backend" 1>&2
19499         if test $ol_enable_ldbm = yes ; then
19500                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
19501         fi
19502
19503         echo "configure: warning: disabling LDBM" 1>&2
19504         ol_enable_ldbm=no
19505 fi
19506
19507 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
19508         BUILD_LIBS_DYNAMIC=shared
19509         cat >> confdefs.h <<\EOF
19510 #define LDAP_LIBS_DYNAMIC 1
19511 EOF
19512
19513 else
19514         BUILD_LIBS_DYNAMIC=static
19515 fi
19516
19517 if test $ol_enable_wrappers != no ; then
19518         for ac_hdr in tcpd.h
19519 do
19520 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19521 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19522 echo "configure:19523: checking for $ac_hdr" >&5
19523 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19524   echo $ac_n "(cached) $ac_c" 1>&6
19525 else
19526   cat > conftest.$ac_ext <<EOF
19527 #line 19528 "configure"
19528 #include "confdefs.h"
19529 #include <$ac_hdr>
19530 EOF
19531 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19532 { (eval echo configure:19533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19533 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19534 if test -z "$ac_err"; then
19535   rm -rf conftest*
19536   eval "ac_cv_header_$ac_safe=yes"
19537 else
19538   echo "$ac_err" >&5
19539   echo "configure: failed program was:" >&5
19540   cat conftest.$ac_ext >&5
19541   rm -rf conftest*
19542   eval "ac_cv_header_$ac_safe=no"
19543 fi
19544 rm -f conftest*
19545 fi
19546 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19547   echo "$ac_t""yes" 1>&6
19548     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19549   cat >> confdefs.h <<EOF
19550 #define $ac_tr_hdr 1
19551 EOF
19552  
19553                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
19554 echo "configure:19555: checking for TCP wrappers library" >&5
19555                 save_LIBS="$LIBS"
19556                 LIBS="$LIBS -lwrap"
19557                 cat > conftest.$ac_ext <<EOF
19558 #line 19559 "configure"
19559 #include "confdefs.h"
19560
19561 #include <tcpd.h>
19562 int allow_severity = 0;
19563 int deny_severity  = 0;
19564
19565 struct request_info *req;
19566                 
19567 int main() {
19568
19569 hosts_access(req)
19570                 
19571 ; return 0; }
19572 EOF
19573 if { (eval echo configure:19574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19574   rm -rf conftest*
19575   echo "$ac_t""-lwrap" 1>&6
19576                 have_wrappers=yes
19577                 LIBS="$save_LIBS"
19578 else
19579   echo "configure: failed program was:" >&5
19580   cat conftest.$ac_ext >&5
19581   rm -rf conftest*
19582   
19583                                 LIBS="$LIBS -lnsl"
19584                 cat > conftest.$ac_ext <<EOF
19585 #line 19586 "configure"
19586 #include "confdefs.h"
19587
19588 #include <tcpd.h>
19589 int allow_severity = 0;
19590 int deny_severity  = 0;
19591
19592 struct request_info *req;
19593                 
19594 int main() {
19595
19596 hosts_access(req)
19597                 
19598 ; return 0; }
19599 EOF
19600 if { (eval echo configure:19601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19601   rm -rf conftest*
19602   echo "$ac_t""-lwrap -lnsl" 1>&6
19603                 have_wrappers=yes
19604                 LIBS="$save_LIBS -lnsl"
19605 else
19606   echo "configure: failed program was:" >&5
19607   cat conftest.$ac_ext >&5
19608   rm -rf conftest*
19609   
19610                 echo "$ac_t""no" 1>&6
19611                 have_wrappers=no
19612                 LIBS=$save_LIBS
19613 fi
19614 rm -f conftest*
19615 fi
19616 rm -f conftest*
19617 else
19618   echo "$ac_t""no" 1>&6
19619 have_wrappers=no
19620 fi
19621 done
19622
19623
19624         if test $have_wrappers = yes ; then
19625                 cat >> confdefs.h <<\EOF
19626 #define HAVE_TCPD 1
19627 EOF
19628
19629                 WRAP_LIBS="-lwrap"
19630         elif test $ol_enable_wrappers = yes ; then
19631                 { echo "configure: error: could not find TCP wrappers, select apppropriate options ore disable" 1>&2; exit 1; }
19632         else
19633                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
19634                 WRAP_LIBS=""
19635         fi
19636 fi
19637
19638 if test $ol_enable_syslog != no ; then
19639         echo $ac_n "checking for openlog""... $ac_c" 1>&6
19640 echo "configure:19641: checking for openlog" >&5
19641 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
19642   echo $ac_n "(cached) $ac_c" 1>&6
19643 else
19644   cat > conftest.$ac_ext <<EOF
19645 #line 19646 "configure"
19646 #include "confdefs.h"
19647 /* System header to define __stub macros and hopefully few prototypes,
19648     which can conflict with char openlog(); below.  */
19649 #include <assert.h>
19650 /* Override any gcc2 internal prototype to avoid an error.  */
19651 /* We use char because int might match the return type of a gcc2
19652     builtin and then its argument prototype would still apply.  */
19653 char openlog();
19654 char (*f)();
19655
19656 int main() {
19657
19658 /* The GNU C library defines this for functions which it implements
19659     to always fail with ENOSYS.  Some functions are actually named
19660     something starting with __ and the normal name is an alias.  */
19661 #if defined (__stub_openlog) || defined (__stub___openlog)
19662 choke me
19663 #else
19664 f = openlog;
19665 #endif
19666
19667 ; return 0; }
19668 EOF
19669 if { (eval echo configure:19670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19670   rm -rf conftest*
19671   eval "ac_cv_func_openlog=yes"
19672 else
19673   echo "configure: failed program was:" >&5
19674   cat conftest.$ac_ext >&5
19675   rm -rf conftest*
19676   eval "ac_cv_func_openlog=no"
19677 fi
19678 rm -f conftest*
19679 fi
19680
19681 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
19682   echo "$ac_t""yes" 1>&6
19683   :
19684 else
19685   echo "$ac_t""no" 1>&6
19686 fi
19687
19688         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
19689                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
19690         fi
19691         ol_enable_syslog=$ac_cv_func_openlog
19692 fi
19693
19694
19695 ol_link_sql=no
19696 if test $ol_enable_sql != no ; then
19697         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
19698 echo "configure:19699: checking for SQLDriverConnect in -liodbc" >&5
19699 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19700 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19701   echo $ac_n "(cached) $ac_c" 1>&6
19702 else
19703   ac_save_LIBS="$LIBS"
19704 LIBS="-liodbc  $LIBS"
19705 cat > conftest.$ac_ext <<EOF
19706 #line 19707 "configure"
19707 #include "confdefs.h"
19708 /* Override any gcc2 internal prototype to avoid an error.  */
19709 /* We use char because int might match the return type of a gcc2
19710     builtin and then its argument prototype would still apply.  */
19711 char SQLDriverConnect();
19712
19713 int main() {
19714 SQLDriverConnect()
19715 ; return 0; }
19716 EOF
19717 if { (eval echo configure:19718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19718   rm -rf conftest*
19719   eval "ac_cv_lib_$ac_lib_var=yes"
19720 else
19721   echo "configure: failed program was:" >&5
19722   cat conftest.$ac_ext >&5
19723   rm -rf conftest*
19724   eval "ac_cv_lib_$ac_lib_var=no"
19725 fi
19726 rm -f conftest*
19727 LIBS="$ac_save_LIBS"
19728
19729 fi
19730 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19731   echo "$ac_t""yes" 1>&6
19732   have_iodbc=yes
19733 else
19734   echo "$ac_t""no" 1>&6
19735 have_iodbc=no
19736 fi
19737
19738         if test $have_iodbc = yes ; then
19739                 ol_link_sql="-liodbc"
19740         else
19741                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
19742 echo "configure:19743: checking for SQLDriverConnect in -lodbc" >&5
19743 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19744 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19745   echo $ac_n "(cached) $ac_c" 1>&6
19746 else
19747   ac_save_LIBS="$LIBS"
19748 LIBS="-lodbc  $LIBS"
19749 cat > conftest.$ac_ext <<EOF
19750 #line 19751 "configure"
19751 #include "confdefs.h"
19752 /* Override any gcc2 internal prototype to avoid an error.  */
19753 /* We use char because int might match the return type of a gcc2
19754     builtin and then its argument prototype would still apply.  */
19755 char SQLDriverConnect();
19756
19757 int main() {
19758 SQLDriverConnect()
19759 ; return 0; }
19760 EOF
19761 if { (eval echo configure:19762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19762   rm -rf conftest*
19763   eval "ac_cv_lib_$ac_lib_var=yes"
19764 else
19765   echo "configure: failed program was:" >&5
19766   cat conftest.$ac_ext >&5
19767   rm -rf conftest*
19768   eval "ac_cv_lib_$ac_lib_var=no"
19769 fi
19770 rm -f conftest*
19771 LIBS="$ac_save_LIBS"
19772
19773 fi
19774 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19775   echo "$ac_t""yes" 1>&6
19776   have_odbc=yes
19777 else
19778   echo "$ac_t""no" 1>&6
19779 have_odbc=no
19780 fi
19781
19782                 if test $have_odbc = yes ; then
19783                         ol_link_sql="-lodbc"
19784                 fi
19785         fi
19786
19787         if test $ol_link_sql != no ; then
19788                 SLAPD_SQL_LIBS="$ol_link_sql"
19789
19790         elif test $ol_enable_sql != auto ; then
19791                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
19792         fi
19793 fi
19794
19795 ol_link_termcap=no
19796 for ac_hdr in termcap.h ncurses.h
19797 do
19798 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19799 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19800 echo "configure:19801: checking for $ac_hdr" >&5
19801 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19802   echo $ac_n "(cached) $ac_c" 1>&6
19803 else
19804   cat > conftest.$ac_ext <<EOF
19805 #line 19806 "configure"
19806 #include "confdefs.h"
19807 #include <$ac_hdr>
19808 EOF
19809 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19810 { (eval echo configure:19811: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19811 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19812 if test -z "$ac_err"; then
19813   rm -rf conftest*
19814   eval "ac_cv_header_$ac_safe=yes"
19815 else
19816   echo "$ac_err" >&5
19817   echo "configure: failed program was:" >&5
19818   cat conftest.$ac_ext >&5
19819   rm -rf conftest*
19820   eval "ac_cv_header_$ac_safe=no"
19821 fi
19822 rm -f conftest*
19823 fi
19824 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19825   echo "$ac_t""yes" 1>&6
19826     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19827   cat >> confdefs.h <<EOF
19828 #define $ac_tr_hdr 1
19829 EOF
19830  
19831 else
19832   echo "$ac_t""no" 1>&6
19833 fi
19834 done
19835
19836
19837 if test $ol_link_termcap = no ; then
19838         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
19839 echo "configure:19840: checking for tputs in -ltermcap" >&5
19840 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
19841 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19842   echo $ac_n "(cached) $ac_c" 1>&6
19843 else
19844   ac_save_LIBS="$LIBS"
19845 LIBS="-ltermcap  $LIBS"
19846 cat > conftest.$ac_ext <<EOF
19847 #line 19848 "configure"
19848 #include "confdefs.h"
19849 /* Override any gcc2 internal prototype to avoid an error.  */
19850 /* We use char because int might match the return type of a gcc2
19851     builtin and then its argument prototype would still apply.  */
19852 char tputs();
19853
19854 int main() {
19855 tputs()
19856 ; return 0; }
19857 EOF
19858 if { (eval echo configure:19859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19859   rm -rf conftest*
19860   eval "ac_cv_lib_$ac_lib_var=yes"
19861 else
19862   echo "configure: failed program was:" >&5
19863   cat conftest.$ac_ext >&5
19864   rm -rf conftest*
19865   eval "ac_cv_lib_$ac_lib_var=no"
19866 fi
19867 rm -f conftest*
19868 LIBS="$ac_save_LIBS"
19869
19870 fi
19871 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19872   echo "$ac_t""yes" 1>&6
19873   have_termcap=yes
19874 else
19875   echo "$ac_t""no" 1>&6
19876 have_termcap=no
19877 fi
19878
19879         if test $have_termcap = yes ; then
19880                 cat >> confdefs.h <<\EOF
19881 #define HAVE_TERMCAP 1
19882 EOF
19883
19884                 ol_link_termcap=yes
19885                 TERMCAP_LIBS=-ltermcap
19886         fi
19887 fi
19888
19889 if test $ol_link_termcap = no ; then
19890         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
19891 echo "configure:19892: checking for initscr in -lncurses" >&5
19892 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
19893 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19894   echo $ac_n "(cached) $ac_c" 1>&6
19895 else
19896   ac_save_LIBS="$LIBS"
19897 LIBS="-lncurses  $LIBS"
19898 cat > conftest.$ac_ext <<EOF
19899 #line 19900 "configure"
19900 #include "confdefs.h"
19901 /* Override any gcc2 internal prototype to avoid an error.  */
19902 /* We use char because int might match the return type of a gcc2
19903     builtin and then its argument prototype would still apply.  */
19904 char initscr();
19905
19906 int main() {
19907 initscr()
19908 ; return 0; }
19909 EOF
19910 if { (eval echo configure:19911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19911   rm -rf conftest*
19912   eval "ac_cv_lib_$ac_lib_var=yes"
19913 else
19914   echo "configure: failed program was:" >&5
19915   cat conftest.$ac_ext >&5
19916   rm -rf conftest*
19917   eval "ac_cv_lib_$ac_lib_var=no"
19918 fi
19919 rm -f conftest*
19920 LIBS="$ac_save_LIBS"
19921
19922 fi
19923 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19924   echo "$ac_t""yes" 1>&6
19925   have_ncurses=yes
19926 else
19927   echo "$ac_t""no" 1>&6
19928 have_ncurses=no
19929 fi
19930
19931         if test $have_ncurses = yes ; then
19932                 cat >> confdefs.h <<\EOF
19933 #define HAVE_NCURSES 1
19934 EOF
19935
19936                 ol_link_termcap=yes
19937                 TERMCAP_LIBS=-lncurses
19938         fi
19939 fi
19940
19941 if test $ol_link_termcap = no ; then
19942         cat >> confdefs.h <<\EOF
19943 #define NO_TERMCAP 1
19944 EOF
19945
19946         TERMCAP_LIBS=
19947 fi
19948
19949 ol_link_sasl=no
19950 ol_link_spasswd=no
19951 if test $ol_with_cyrus_sasl != no ; then
19952         for ac_hdr in sasl/sasl.h sasl.h
19953 do
19954 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19955 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19956 echo "configure:19957: checking for $ac_hdr" >&5
19957 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19958   echo $ac_n "(cached) $ac_c" 1>&6
19959 else
19960   cat > conftest.$ac_ext <<EOF
19961 #line 19962 "configure"
19962 #include "confdefs.h"
19963 #include <$ac_hdr>
19964 EOF
19965 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19966 { (eval echo configure:19967: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19967 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19968 if test -z "$ac_err"; then
19969   rm -rf conftest*
19970   eval "ac_cv_header_$ac_safe=yes"
19971 else
19972   echo "$ac_err" >&5
19973   echo "configure: failed program was:" >&5
19974   cat conftest.$ac_ext >&5
19975   rm -rf conftest*
19976   eval "ac_cv_header_$ac_safe=no"
19977 fi
19978 rm -f conftest*
19979 fi
19980 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19981   echo "$ac_t""yes" 1>&6
19982     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19983   cat >> confdefs.h <<EOF
19984 #define $ac_tr_hdr 1
19985 EOF
19986  
19987 else
19988   echo "$ac_t""no" 1>&6
19989 fi
19990 done
19991
19992
19993         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
19994                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
19995 echo "configure:19996: checking for sasl_client_init in -lsasl2" >&5
19996 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
19997 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19998   echo $ac_n "(cached) $ac_c" 1>&6
19999 else
20000   ac_save_LIBS="$LIBS"
20001 LIBS="-lsasl2  $LIBS"
20002 cat > conftest.$ac_ext <<EOF
20003 #line 20004 "configure"
20004 #include "confdefs.h"
20005 /* Override any gcc2 internal prototype to avoid an error.  */
20006 /* We use char because int might match the return type of a gcc2
20007     builtin and then its argument prototype would still apply.  */
20008 char sasl_client_init();
20009
20010 int main() {
20011 sasl_client_init()
20012 ; return 0; }
20013 EOF
20014 if { (eval echo configure:20015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20015   rm -rf conftest*
20016   eval "ac_cv_lib_$ac_lib_var=yes"
20017 else
20018   echo "configure: failed program was:" >&5
20019   cat conftest.$ac_ext >&5
20020   rm -rf conftest*
20021   eval "ac_cv_lib_$ac_lib_var=no"
20022 fi
20023 rm -f conftest*
20024 LIBS="$ac_save_LIBS"
20025
20026 fi
20027 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20028   echo "$ac_t""yes" 1>&6
20029   ol_link_sasl="-lsasl2"
20030 else
20031   echo "$ac_t""no" 1>&6
20032 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
20033 echo "configure:20034: checking for sasl_client_init in -lsasl" >&5
20034 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20035 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20036   echo $ac_n "(cached) $ac_c" 1>&6
20037 else
20038   ac_save_LIBS="$LIBS"
20039 LIBS="-lsasl  $LIBS"
20040 cat > conftest.$ac_ext <<EOF
20041 #line 20042 "configure"
20042 #include "confdefs.h"
20043 /* Override any gcc2 internal prototype to avoid an error.  */
20044 /* We use char because int might match the return type of a gcc2
20045     builtin and then its argument prototype would still apply.  */
20046 char sasl_client_init();
20047
20048 int main() {
20049 sasl_client_init()
20050 ; return 0; }
20051 EOF
20052 if { (eval echo configure:20053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20053   rm -rf conftest*
20054   eval "ac_cv_lib_$ac_lib_var=yes"
20055 else
20056   echo "configure: failed program was:" >&5
20057   cat conftest.$ac_ext >&5
20058   rm -rf conftest*
20059   eval "ac_cv_lib_$ac_lib_var=no"
20060 fi
20061 rm -f conftest*
20062 LIBS="$ac_save_LIBS"
20063
20064 fi
20065 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20066   echo "$ac_t""yes" 1>&6
20067   ol_link_sasl="-lsasl"
20068 else
20069   echo "$ac_t""no" 1>&6
20070 fi
20071
20072 fi
20073
20074         fi
20075
20076         if test $ol_link_sasl = no ; then
20077                 if test $ol_with_cyrus_sasl != auto ; then
20078                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
20079                 else
20080                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
20081                         echo "configure: warning: SASL authentication not supported!" 1>&2
20082                         if test $ol_link_tls = no ; then
20083                                 echo "configure: warning: Strong authentication not supported!" 1>&2
20084                         fi
20085                 fi
20086         else
20087                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
20088 echo "configure:20089: checking Cyrus SASL library version" >&5
20089 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
20090   echo $ac_n "(cached) $ac_c" 1>&6
20091 else
20092   
20093         cat > conftest.$ac_ext <<EOF
20094 #line 20095 "configure"
20095 #include "confdefs.h"
20096
20097 #ifdef HAVE_SASL_SASL_H
20098 #include <sasl/sasl.h>
20099 #else
20100 #include <sasl.h>
20101 #endif
20102
20103 /* require 2.1.3 or later */
20104 #if SASL_VERSION_MAJOR == 1  && SASL_VERSION_MINOR >= 5
20105         char *__sasl_compat = "1.5.x okay";
20106 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
20107         __sasl_compat "2.2+ or better okay (we guess)";
20108 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
20109         && SASL_VERSION_STEP >=3
20110         __sasl_compat = "2.1.3+ or better okay";
20111 #endif
20112         
20113 EOF
20114 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20115   egrep "__sasl_compat" >/dev/null 2>&1; then
20116   rm -rf conftest*
20117   ol_cv_sasl_compat=yes
20118 else
20119   rm -rf conftest*
20120   ol_cv_sasl_compat=no
20121 fi
20122 rm -f conftest*
20123
20124 fi
20125
20126 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
20127
20128                 if test $ol_cv_sasl_compat = no ; then
20129                         ol_link_sasl=no
20130                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
20131                 fi
20132
20133                 cat >> confdefs.h <<\EOF
20134 #define HAVE_CYRUS_SASL 1
20135 EOF
20136
20137                 SASL_LIBS="$ol_link_sasl"
20138                 if test $ol_enable_spasswd != no ; then
20139                         ol_link_spasswd=yes
20140                 fi
20141         fi
20142
20143 else
20144         echo "configure: warning: SASL authentication not supported!" 1>&2
20145         if test $ol_link_tls = no ; then
20146                 echo "configure: warning: Strong authentication not supported!" 1>&2
20147         fi
20148 fi
20149
20150 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
20151         dev=no
20152         if test -r /dev/urandom ; then
20153                 dev="/dev/urandom";
20154         elif test -r /idev/urandom ; then
20155                 dev="/idev/urandom";
20156         elif test -r /dev/srandom ; then
20157                 dev="/dev/srandom";
20158         elif test -r /dev/random ; then
20159                 dev="/dev/random";
20160         elif test -r /idev/random ; then
20161                 dev="/idev/random";
20162         fi
20163
20164         if test $dev != no ; then
20165                 cat >> confdefs.h <<EOF
20166 #define URANDOM_DEVICE "$dev"
20167 EOF
20168
20169         fi
20170 fi
20171
20172 ol_link_fetch=no
20173 if test $ol_with_fetch != no ; then
20174         ol_LIBS=$LIBS
20175 LIBS="-lfetch -lcom_err $LIBS"
20176 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
20177 echo "configure:20178: checking fetch(3) library" >&5
20178 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
20179   echo $ac_n "(cached) $ac_c" 1>&6
20180 else
20181   
20182         cat > conftest.$ac_ext <<EOF
20183 #line 20184 "configure"
20184 #include "confdefs.h"
20185
20186 #include <sys/param.h>
20187 #include <stdio.h>
20188 #include <fetch.h>
20189 int main() {
20190 struct url *u = fetchParseURL("file:///"); 
20191 ; return 0; }
20192 EOF
20193 if { (eval echo configure:20194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20194   rm -rf conftest*
20195   ol_cv_lib_fetch=yes
20196 else
20197   echo "configure: failed program was:" >&5
20198   cat conftest.$ac_ext >&5
20199   rm -rf conftest*
20200   ol_cv_lib_fetch=no
20201 fi
20202 rm -f conftest*
20203 fi
20204
20205 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
20206 LIBS=$ol_LIBS
20207 if test $ol_cv_lib_fetch != no ; then
20208         ol_link_fetch="-lfetch -lcom_err"
20209         cat >> confdefs.h <<\EOF
20210 #define HAVE_FETCH 1
20211 EOF
20212
20213 fi
20214
20215
20216         if test $ol_cv_lib_fetch != no ; then
20217                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
20218                 ol_link_fetch=freebsd
20219
20220         elif test $ol_with_fetch != auto ; then
20221                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
20222         fi 
20223 fi
20224
20225 ol_link_readline=no
20226 if test $ol_with_readline != no ; then
20227         for ac_hdr in readline/readline.h readline/history.h
20228 do
20229 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20230 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20231 echo "configure:20232: checking for $ac_hdr" >&5
20232 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20233   echo $ac_n "(cached) $ac_c" 1>&6
20234 else
20235   cat > conftest.$ac_ext <<EOF
20236 #line 20237 "configure"
20237 #include "confdefs.h"
20238 #include <$ac_hdr>
20239 EOF
20240 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20241 { (eval echo configure:20242: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20242 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20243 if test -z "$ac_err"; then
20244   rm -rf conftest*
20245   eval "ac_cv_header_$ac_safe=yes"
20246 else
20247   echo "$ac_err" >&5
20248   echo "configure: failed program was:" >&5
20249   cat conftest.$ac_ext >&5
20250   rm -rf conftest*
20251   eval "ac_cv_header_$ac_safe=no"
20252 fi
20253 rm -f conftest*
20254 fi
20255 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20256   echo "$ac_t""yes" 1>&6
20257     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20258   cat >> confdefs.h <<EOF
20259 #define $ac_tr_hdr 1
20260 EOF
20261  
20262 else
20263   echo "$ac_t""no" 1>&6
20264 fi
20265 done
20266
20267
20268         if test $ac_cv_header_readline_readline_h = yes ; then
20269                 save_LIBS="$LIBS"
20270                 LIBS="$TERMCAP_LIBS $LIBS"
20271                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
20272 echo "configure:20273: checking for readline in -lreadline" >&5
20273 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
20274 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20275   echo $ac_n "(cached) $ac_c" 1>&6
20276 else
20277   ac_save_LIBS="$LIBS"
20278 LIBS="-lreadline  $LIBS"
20279 cat > conftest.$ac_ext <<EOF
20280 #line 20281 "configure"
20281 #include "confdefs.h"
20282 /* Override any gcc2 internal prototype to avoid an error.  */
20283 /* We use char because int might match the return type of a gcc2
20284     builtin and then its argument prototype would still apply.  */
20285 char readline();
20286
20287 int main() {
20288 readline()
20289 ; return 0; }
20290 EOF
20291 if { (eval echo configure:20292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20292   rm -rf conftest*
20293   eval "ac_cv_lib_$ac_lib_var=yes"
20294 else
20295   echo "configure: failed program was:" >&5
20296   cat conftest.$ac_ext >&5
20297   rm -rf conftest*
20298   eval "ac_cv_lib_$ac_lib_var=no"
20299 fi
20300 rm -f conftest*
20301 LIBS="$ac_save_LIBS"
20302
20303 fi
20304 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20305   echo "$ac_t""yes" 1>&6
20306   have_readline=yes
20307 else
20308   echo "$ac_t""no" 1>&6
20309 have_readline=no
20310 fi
20311
20312                 LIBS="$save_LIBS"
20313                         
20314                 if test $have_readline = yes ; then
20315                         ol_with_readline=found
20316                         ol_link_readline=yes
20317
20318                         READLINE_LIBS="-lreadline"
20319                 fi
20320         fi
20321 fi
20322
20323 if test $ol_link_readline = yes ; then
20324         cat >> confdefs.h <<\EOF
20325 #define HAVE_READLINE 1
20326 EOF
20327
20328 fi
20329
20330
20331 if test $ol_enable_crypt != no ; then
20332         echo $ac_n "checking for crypt""... $ac_c" 1>&6
20333 echo "configure:20334: checking for crypt" >&5
20334 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
20335   echo $ac_n "(cached) $ac_c" 1>&6
20336 else
20337   cat > conftest.$ac_ext <<EOF
20338 #line 20339 "configure"
20339 #include "confdefs.h"
20340 /* System header to define __stub macros and hopefully few prototypes,
20341     which can conflict with char crypt(); below.  */
20342 #include <assert.h>
20343 /* Override any gcc2 internal prototype to avoid an error.  */
20344 /* We use char because int might match the return type of a gcc2
20345     builtin and then its argument prototype would still apply.  */
20346 char crypt();
20347 char (*f)();
20348
20349 int main() {
20350
20351 /* The GNU C library defines this for functions which it implements
20352     to always fail with ENOSYS.  Some functions are actually named
20353     something starting with __ and the normal name is an alias.  */
20354 #if defined (__stub_crypt) || defined (__stub___crypt)
20355 choke me
20356 #else
20357 f = crypt;
20358 #endif
20359
20360 ; return 0; }
20361 EOF
20362 if { (eval echo configure:20363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20363   rm -rf conftest*
20364   eval "ac_cv_func_crypt=yes"
20365 else
20366   echo "configure: failed program was:" >&5
20367   cat conftest.$ac_ext >&5
20368   rm -rf conftest*
20369   eval "ac_cv_func_crypt=no"
20370 fi
20371 rm -f conftest*
20372 fi
20373
20374 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
20375   echo "$ac_t""yes" 1>&6
20376   have_crypt=yes
20377 else
20378   echo "$ac_t""no" 1>&6
20379
20380                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
20381 echo "configure:20382: checking for crypt in -lcrypt" >&5
20382 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
20383 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20384   echo $ac_n "(cached) $ac_c" 1>&6
20385 else
20386   ac_save_LIBS="$LIBS"
20387 LIBS="-lcrypt  $LIBS"
20388 cat > conftest.$ac_ext <<EOF
20389 #line 20390 "configure"
20390 #include "confdefs.h"
20391 /* Override any gcc2 internal prototype to avoid an error.  */
20392 /* We use char because int might match the return type of a gcc2
20393     builtin and then its argument prototype would still apply.  */
20394 char crypt();
20395
20396 int main() {
20397 crypt()
20398 ; return 0; }
20399 EOF
20400 if { (eval echo configure:20401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20401   rm -rf conftest*
20402   eval "ac_cv_lib_$ac_lib_var=yes"
20403 else
20404   echo "configure: failed program was:" >&5
20405   cat conftest.$ac_ext >&5
20406   rm -rf conftest*
20407   eval "ac_cv_lib_$ac_lib_var=no"
20408 fi
20409 rm -f conftest*
20410 LIBS="$ac_save_LIBS"
20411
20412 fi
20413 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20414   echo "$ac_t""yes" 1>&6
20415   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
20416                         have_crypt=yes
20417 else
20418   echo "$ac_t""no" 1>&6
20419 have_crypt=no
20420 fi
20421
20422 fi
20423
20424
20425         if test $have_crypt = yes ; then
20426                 cat >> confdefs.h <<\EOF
20427 #define HAVE_CRYPT 1
20428 EOF
20429
20430         else
20431                 echo "configure: warning: could not find crypt" 1>&2
20432                 if test $ol_enable_crypt = yes ; then
20433                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
20434                 fi
20435
20436                 echo "configure: warning: disabling crypt support" 1>&2
20437                 ol_enable_crypt=no
20438         fi
20439 fi
20440
20441 if test $ol_enable_proctitle != no ; then
20442         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
20443 echo "configure:20444: checking for setproctitle" >&5
20444 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
20445   echo $ac_n "(cached) $ac_c" 1>&6
20446 else
20447   cat > conftest.$ac_ext <<EOF
20448 #line 20449 "configure"
20449 #include "confdefs.h"
20450 /* System header to define __stub macros and hopefully few prototypes,
20451     which can conflict with char setproctitle(); below.  */
20452 #include <assert.h>
20453 /* Override any gcc2 internal prototype to avoid an error.  */
20454 /* We use char because int might match the return type of a gcc2
20455     builtin and then its argument prototype would still apply.  */
20456 char setproctitle();
20457 char (*f)();
20458
20459 int main() {
20460
20461 /* The GNU C library defines this for functions which it implements
20462     to always fail with ENOSYS.  Some functions are actually named
20463     something starting with __ and the normal name is an alias.  */
20464 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
20465 choke me
20466 #else
20467 f = setproctitle;
20468 #endif
20469
20470 ; return 0; }
20471 EOF
20472 if { (eval echo configure:20473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20473   rm -rf conftest*
20474   eval "ac_cv_func_setproctitle=yes"
20475 else
20476   echo "configure: failed program was:" >&5
20477   cat conftest.$ac_ext >&5
20478   rm -rf conftest*
20479   eval "ac_cv_func_setproctitle=no"
20480 fi
20481 rm -f conftest*
20482 fi
20483
20484 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
20485   echo "$ac_t""yes" 1>&6
20486   have_setproctitle=yes
20487 else
20488   echo "$ac_t""no" 1>&6
20489
20490                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
20491 echo "configure:20492: checking for setproctitle in -lutil" >&5
20492 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
20493 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20494   echo $ac_n "(cached) $ac_c" 1>&6
20495 else
20496   ac_save_LIBS="$LIBS"
20497 LIBS="-lutil  $LIBS"
20498 cat > conftest.$ac_ext <<EOF
20499 #line 20500 "configure"
20500 #include "confdefs.h"
20501 /* Override any gcc2 internal prototype to avoid an error.  */
20502 /* We use char because int might match the return type of a gcc2
20503     builtin and then its argument prototype would still apply.  */
20504 char setproctitle();
20505
20506 int main() {
20507 setproctitle()
20508 ; return 0; }
20509 EOF
20510 if { (eval echo configure:20511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20511   rm -rf conftest*
20512   eval "ac_cv_lib_$ac_lib_var=yes"
20513 else
20514   echo "configure: failed program was:" >&5
20515   cat conftest.$ac_ext >&5
20516   rm -rf conftest*
20517   eval "ac_cv_lib_$ac_lib_var=no"
20518 fi
20519 rm -f conftest*
20520 LIBS="$ac_save_LIBS"
20521
20522 fi
20523 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20524   echo "$ac_t""yes" 1>&6
20525   have_setproctitle=yes
20526                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
20527 else
20528   echo "$ac_t""no" 1>&6
20529 have_setproctitle=no
20530                         LIBOBJS="$LIBOBJS setproctitle.o"
20531                         LIBSRCS="$LIBSRCS setproctitle.c"
20532 fi
20533
20534 fi
20535
20536
20537         if test $have_setproctitle = yes ; then
20538                 cat >> confdefs.h <<\EOF
20539 #define HAVE_SETPROCTITLE 1
20540 EOF
20541
20542         fi
20543 fi
20544
20545 if test $ol_enable_slp != no ; then
20546         for ac_hdr in slp.h 
20547 do
20548 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20549 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20550 echo "configure:20551: checking for $ac_hdr" >&5
20551 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20552   echo $ac_n "(cached) $ac_c" 1>&6
20553 else
20554   cat > conftest.$ac_ext <<EOF
20555 #line 20556 "configure"
20556 #include "confdefs.h"
20557 #include <$ac_hdr>
20558 EOF
20559 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20560 { (eval echo configure:20561: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20561 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20562 if test -z "$ac_err"; then
20563   rm -rf conftest*
20564   eval "ac_cv_header_$ac_safe=yes"
20565 else
20566   echo "$ac_err" >&5
20567   echo "configure: failed program was:" >&5
20568   cat conftest.$ac_ext >&5
20569   rm -rf conftest*
20570   eval "ac_cv_header_$ac_safe=no"
20571 fi
20572 rm -f conftest*
20573 fi
20574 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20575   echo "$ac_t""yes" 1>&6
20576     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20577   cat >> confdefs.h <<EOF
20578 #define $ac_tr_hdr 1
20579 EOF
20580  
20581 else
20582   echo "$ac_t""no" 1>&6
20583 fi
20584 done
20585
20586
20587         if test $ac_cv_header_slp_h = yes ; then
20588                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
20589 echo "configure:20590: checking for SLPOpen in -lslp" >&5
20590 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
20591 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20592   echo $ac_n "(cached) $ac_c" 1>&6
20593 else
20594   ac_save_LIBS="$LIBS"
20595 LIBS="-lslp  $LIBS"
20596 cat > conftest.$ac_ext <<EOF
20597 #line 20598 "configure"
20598 #include "confdefs.h"
20599 /* Override any gcc2 internal prototype to avoid an error.  */
20600 /* We use char because int might match the return type of a gcc2
20601     builtin and then its argument prototype would still apply.  */
20602 char SLPOpen();
20603
20604 int main() {
20605 SLPOpen()
20606 ; return 0; }
20607 EOF
20608 if { (eval echo configure:20609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20609   rm -rf conftest*
20610   eval "ac_cv_lib_$ac_lib_var=yes"
20611 else
20612   echo "configure: failed program was:" >&5
20613   cat conftest.$ac_ext >&5
20614   rm -rf conftest*
20615   eval "ac_cv_lib_$ac_lib_var=no"
20616 fi
20617 rm -f conftest*
20618 LIBS="$ac_save_LIBS"
20619
20620 fi
20621 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20622   echo "$ac_t""yes" 1>&6
20623   have_slp=yes
20624 else
20625   echo "$ac_t""no" 1>&6
20626 have_slp=no
20627 fi
20628
20629                 if test $have_slp = yes ; then
20630                         cat >> confdefs.h <<\EOF
20631 #define HAVE_SLP 1
20632 EOF
20633
20634                         SLAPD_SLP_LIBS=-lslp
20635                 fi
20636
20637         elif test $ol_enable_slp = yes ; then
20638                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
20639         fi
20640 fi
20641
20642 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
20643 echo "configure:20644: checking for ANSI C header files" >&5
20644 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
20645   echo $ac_n "(cached) $ac_c" 1>&6
20646 else
20647   cat > conftest.$ac_ext <<EOF
20648 #line 20649 "configure"
20649 #include "confdefs.h"
20650 #include <stdlib.h>
20651 #include <stdarg.h>
20652 #include <string.h>
20653 #include <float.h>
20654 EOF
20655 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20656 { (eval echo configure:20657: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20657 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20658 if test -z "$ac_err"; then
20659   rm -rf conftest*
20660   ac_cv_header_stdc=yes
20661 else
20662   echo "$ac_err" >&5
20663   echo "configure: failed program was:" >&5
20664   cat conftest.$ac_ext >&5
20665   rm -rf conftest*
20666   ac_cv_header_stdc=no
20667 fi
20668 rm -f conftest*
20669
20670 if test $ac_cv_header_stdc = yes; then
20671   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
20672 cat > conftest.$ac_ext <<EOF
20673 #line 20674 "configure"
20674 #include "confdefs.h"
20675 #include <string.h>
20676 EOF
20677 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20678   egrep "memchr" >/dev/null 2>&1; then
20679   :
20680 else
20681   rm -rf conftest*
20682   ac_cv_header_stdc=no
20683 fi
20684 rm -f conftest*
20685
20686 fi
20687
20688 if test $ac_cv_header_stdc = yes; then
20689   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
20690 cat > conftest.$ac_ext <<EOF
20691 #line 20692 "configure"
20692 #include "confdefs.h"
20693 #include <stdlib.h>
20694 EOF
20695 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20696   egrep "free" >/dev/null 2>&1; then
20697   :
20698 else
20699   rm -rf conftest*
20700   ac_cv_header_stdc=no
20701 fi
20702 rm -f conftest*
20703
20704 fi
20705
20706 if test $ac_cv_header_stdc = yes; then
20707   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
20708 if test "$cross_compiling" = yes; then
20709   :
20710 else
20711   cat > conftest.$ac_ext <<EOF
20712 #line 20713 "configure"
20713 #include "confdefs.h"
20714 #include <ctype.h>
20715 #if ((' ' & 0x0FF) == 0x020)
20716 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
20717 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
20718 #else
20719 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
20720  || ('j' <= (c) && (c) <= 'r') \
20721  || ('s' <= (c) && (c) <= 'z'))
20722 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
20723 #endif
20724 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
20725 int main () { int i; for (i = 0; i < 256; i++)
20726 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
20727 exit (0); }
20728
20729 EOF
20730 if { (eval echo configure:20731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20731 then
20732   :
20733 else
20734   echo "configure: failed program was:" >&5
20735   cat conftest.$ac_ext >&5
20736   rm -fr conftest*
20737   ac_cv_header_stdc=no
20738 fi
20739 rm -fr conftest*
20740 fi
20741
20742 fi
20743 fi
20744
20745 echo "$ac_t""$ac_cv_header_stdc" 1>&6
20746 if test $ac_cv_header_stdc = yes; then
20747   cat >> confdefs.h <<\EOF
20748 #define STDC_HEADERS 1
20749 EOF
20750
20751 fi
20752
20753 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
20754 echo "configure:20755: checking for mode_t" >&5
20755 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
20756   echo $ac_n "(cached) $ac_c" 1>&6
20757 else
20758   cat > conftest.$ac_ext <<EOF
20759 #line 20760 "configure"
20760 #include "confdefs.h"
20761 #include <sys/types.h>
20762 #if STDC_HEADERS
20763 #include <stdlib.h>
20764 #include <stddef.h>
20765 #endif
20766
20767 EOF
20768 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20769   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20770   rm -rf conftest*
20771   eval "ac_cv_type_mode_t=yes"
20772 else
20773   rm -rf conftest*
20774   eval "ac_cv_type_mode_t=no"
20775 fi
20776 rm -f conftest*
20777
20778 fi
20779 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
20780   echo "$ac_t""yes" 1>&6
20781 else
20782   echo "$ac_t""no" 1>&6
20783   cat >> confdefs.h <<EOF
20784 #define mode_t int
20785 EOF
20786
20787 fi
20788
20789 echo $ac_n "checking for off_t""... $ac_c" 1>&6
20790 echo "configure:20791: checking for off_t" >&5
20791 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
20792   echo $ac_n "(cached) $ac_c" 1>&6
20793 else
20794   cat > conftest.$ac_ext <<EOF
20795 #line 20796 "configure"
20796 #include "confdefs.h"
20797 #include <sys/types.h>
20798 #if STDC_HEADERS
20799 #include <stdlib.h>
20800 #include <stddef.h>
20801 #endif
20802
20803 EOF
20804 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20805   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20806   rm -rf conftest*
20807   eval "ac_cv_type_off_t=yes"
20808 else
20809   rm -rf conftest*
20810   eval "ac_cv_type_off_t=no"
20811 fi
20812 rm -f conftest*
20813
20814 fi
20815 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
20816   echo "$ac_t""yes" 1>&6
20817 else
20818   echo "$ac_t""no" 1>&6
20819   cat >> confdefs.h <<EOF
20820 #define off_t long
20821 EOF
20822
20823 fi
20824
20825 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
20826 echo "configure:20827: checking for pid_t" >&5
20827 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
20828   echo $ac_n "(cached) $ac_c" 1>&6
20829 else
20830   cat > conftest.$ac_ext <<EOF
20831 #line 20832 "configure"
20832 #include "confdefs.h"
20833 #include <sys/types.h>
20834 #if STDC_HEADERS
20835 #include <stdlib.h>
20836 #include <stddef.h>
20837 #endif
20838
20839 EOF
20840 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20841   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20842   rm -rf conftest*
20843   eval "ac_cv_type_pid_t=yes"
20844 else
20845   rm -rf conftest*
20846   eval "ac_cv_type_pid_t=no"
20847 fi
20848 rm -f conftest*
20849
20850 fi
20851 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
20852   echo "$ac_t""yes" 1>&6
20853 else
20854   echo "$ac_t""no" 1>&6
20855   cat >> confdefs.h <<EOF
20856 #define pid_t int
20857 EOF
20858
20859 fi
20860
20861 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
20862 echo "configure:20863: checking for ptrdiff_t" >&5
20863 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
20864   echo $ac_n "(cached) $ac_c" 1>&6
20865 else
20866   cat > conftest.$ac_ext <<EOF
20867 #line 20868 "configure"
20868 #include "confdefs.h"
20869 #include <stddef.h>
20870 int main() {
20871 ptrdiff_t p
20872 ; return 0; }
20873 EOF
20874 if { (eval echo configure:20875: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20875   rm -rf conftest*
20876   am_cv_type_ptrdiff_t=yes
20877 else
20878   echo "configure: failed program was:" >&5
20879   cat conftest.$ac_ext >&5
20880   rm -rf conftest*
20881   am_cv_type_ptrdiff_t=no
20882 fi
20883 rm -f conftest*
20884 fi
20885
20886 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
20887    if test $am_cv_type_ptrdiff_t = yes; then
20888      cat >> confdefs.h <<\EOF
20889 #define HAVE_PTRDIFF_T 1
20890 EOF
20891
20892    fi
20893
20894 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
20895 echo "configure:20896: checking return type of signal handlers" >&5
20896 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
20897   echo $ac_n "(cached) $ac_c" 1>&6
20898 else
20899   cat > conftest.$ac_ext <<EOF
20900 #line 20901 "configure"
20901 #include "confdefs.h"
20902 #include <sys/types.h>
20903 #include <signal.h>
20904 #ifdef signal
20905 #undef signal
20906 #endif
20907 #ifdef __cplusplus
20908 extern "C" void (*signal (int, void (*)(int)))(int);
20909 #else
20910 void (*signal ()) ();
20911 #endif
20912
20913 int main() {
20914 int i;
20915 ; return 0; }
20916 EOF
20917 if { (eval echo configure:20918: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20918   rm -rf conftest*
20919   ac_cv_type_signal=void
20920 else
20921   echo "configure: failed program was:" >&5
20922   cat conftest.$ac_ext >&5
20923   rm -rf conftest*
20924   ac_cv_type_signal=int
20925 fi
20926 rm -f conftest*
20927 fi
20928
20929 echo "$ac_t""$ac_cv_type_signal" 1>&6
20930 cat >> confdefs.h <<EOF
20931 #define RETSIGTYPE $ac_cv_type_signal
20932 EOF
20933
20934
20935 echo $ac_n "checking for size_t""... $ac_c" 1>&6
20936 echo "configure:20937: checking for size_t" >&5
20937 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
20938   echo $ac_n "(cached) $ac_c" 1>&6
20939 else
20940   cat > conftest.$ac_ext <<EOF
20941 #line 20942 "configure"
20942 #include "confdefs.h"
20943 #include <sys/types.h>
20944 #if STDC_HEADERS
20945 #include <stdlib.h>
20946 #include <stddef.h>
20947 #endif
20948
20949 EOF
20950 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20951   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20952   rm -rf conftest*
20953   eval "ac_cv_type_size_t=yes"
20954 else
20955   rm -rf conftest*
20956   eval "ac_cv_type_size_t=no"
20957 fi
20958 rm -f conftest*
20959
20960 fi
20961 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
20962   echo "$ac_t""yes" 1>&6
20963 else
20964   echo "$ac_t""no" 1>&6
20965   cat >> confdefs.h <<EOF
20966 #define size_t unsigned
20967 EOF
20968
20969 fi
20970
20971
20972 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
20973 echo "configure:20974: checking for ssize_t" >&5
20974 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
20975   echo $ac_n "(cached) $ac_c" 1>&6
20976 else
20977   cat > conftest.$ac_ext <<EOF
20978 #line 20979 "configure"
20979 #include "confdefs.h"
20980 #include <sys/types.h>
20981 #if STDC_HEADERS
20982 #include <stdlib.h>
20983 #include <stddef.h>
20984 #endif
20985
20986 EOF
20987 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20988   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20989   rm -rf conftest*
20990   eval "ac_cv_type_ssize_t=yes"
20991 else
20992   rm -rf conftest*
20993   eval "ac_cv_type_ssize_t=no"
20994 fi
20995 rm -f conftest*
20996
20997 fi
20998 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
20999   echo "$ac_t""yes" 1>&6
21000 else
21001   echo "$ac_t""no" 1>&6
21002   cat >> confdefs.h <<EOF
21003 #define ssize_t signed int
21004 EOF
21005
21006 fi
21007
21008 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
21009 echo "configure:21010: checking for caddr_t" >&5
21010 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
21011   echo $ac_n "(cached) $ac_c" 1>&6
21012 else
21013   cat > conftest.$ac_ext <<EOF
21014 #line 21015 "configure"
21015 #include "confdefs.h"
21016 #include <sys/types.h>
21017 #if STDC_HEADERS
21018 #include <stdlib.h>
21019 #include <stddef.h>
21020 #endif
21021
21022 EOF
21023 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21024   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21025   rm -rf conftest*
21026   eval "ac_cv_type_caddr_t=yes"
21027 else
21028   rm -rf conftest*
21029   eval "ac_cv_type_caddr_t=no"
21030 fi
21031 rm -f conftest*
21032
21033 fi
21034 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
21035   echo "$ac_t""yes" 1>&6
21036 else
21037   echo "$ac_t""no" 1>&6
21038   cat >> confdefs.h <<EOF
21039 #define caddr_t char *
21040 EOF
21041
21042 fi
21043
21044
21045 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
21046 echo "configure:21047: checking for socklen_t" >&5
21047 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
21048   echo $ac_n "(cached) $ac_c" 1>&6
21049 else
21050   cat > conftest.$ac_ext <<EOF
21051 #line 21052 "configure"
21052 #include "confdefs.h"
21053
21054 #ifdef HAVE_SYS_TYPES_H
21055 #include <sys/types.h>
21056 #endif
21057 #ifdef HAVE_SYS_SOCKET_H
21058 #include <sys/socket.h>
21059 #endif
21060
21061 int main() {
21062 socklen_t len;
21063 ; return 0; }
21064 EOF
21065 if { (eval echo configure:21066: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21066   rm -rf conftest*
21067   ol_cv_type_socklen_t=yes
21068 else
21069   echo "configure: failed program was:" >&5
21070   cat conftest.$ac_ext >&5
21071   rm -rf conftest*
21072   ol_cv_type_socklen_t=no
21073 fi
21074 rm -f conftest*
21075 fi
21076
21077 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
21078   if test $ol_cv_type_socklen_t = no; then
21079     cat >> confdefs.h <<\EOF
21080 #define socklen_t int
21081 EOF
21082
21083   fi
21084  
21085 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
21086 echo "configure:21087: checking for member st_blksize in aggregate type struct stat" >&5
21087 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
21088   echo $ac_n "(cached) $ac_c" 1>&6
21089 else
21090   cat > conftest.$ac_ext <<EOF
21091 #line 21092 "configure"
21092 #include "confdefs.h"
21093 #include <sys/types.h>
21094 #include <sys/stat.h>
21095 int main() {
21096 struct stat foo; foo.st_blksize;
21097 ; return 0; }
21098 EOF
21099 if { (eval echo configure:21100: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21100   rm -rf conftest*
21101   ac_cv_c_struct_member_st_blksize=yes
21102 else
21103   echo "configure: failed program was:" >&5
21104   cat conftest.$ac_ext >&5
21105   rm -rf conftest*
21106   ac_cv_c_struct_member_st_blksize=no
21107 fi
21108 rm -f conftest*
21109 fi
21110
21111 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
21112 st_blksize="$ac_cv_c_struct_member_st_blksize"
21113 if test $ac_cv_c_struct_member_st_blksize = yes; then
21114   cat >> confdefs.h <<\EOF
21115 #define HAVE_ST_BLKSIZE 1
21116 EOF
21117
21118 fi
21119
21120 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
21121 echo "configure:21122: checking whether time.h and sys/time.h may both be included" >&5
21122 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
21123   echo $ac_n "(cached) $ac_c" 1>&6
21124 else
21125   cat > conftest.$ac_ext <<EOF
21126 #line 21127 "configure"
21127 #include "confdefs.h"
21128 #include <sys/types.h>
21129 #include <sys/time.h>
21130 #include <time.h>
21131 int main() {
21132 struct tm *tp;
21133 ; return 0; }
21134 EOF
21135 if { (eval echo configure:21136: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21136   rm -rf conftest*
21137   ac_cv_header_time=yes
21138 else
21139   echo "configure: failed program was:" >&5
21140   cat conftest.$ac_ext >&5
21141   rm -rf conftest*
21142   ac_cv_header_time=no
21143 fi
21144 rm -f conftest*
21145 fi
21146
21147 echo "$ac_t""$ac_cv_header_time" 1>&6
21148 if test $ac_cv_header_time = yes; then
21149   cat >> confdefs.h <<\EOF
21150 #define TIME_WITH_SYS_TIME 1
21151 EOF
21152
21153 fi
21154
21155 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
21156 echo "configure:21157: checking whether struct tm is in sys/time.h or time.h" >&5
21157 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
21158   echo $ac_n "(cached) $ac_c" 1>&6
21159 else
21160   cat > conftest.$ac_ext <<EOF
21161 #line 21162 "configure"
21162 #include "confdefs.h"
21163 #include <sys/types.h>
21164 #include <time.h>
21165 int main() {
21166 struct tm *tp; tp->tm_sec;
21167 ; return 0; }
21168 EOF
21169 if { (eval echo configure:21170: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21170   rm -rf conftest*
21171   ac_cv_struct_tm=time.h
21172 else
21173   echo "configure: failed program was:" >&5
21174   cat conftest.$ac_ext >&5
21175   rm -rf conftest*
21176   ac_cv_struct_tm=sys/time.h
21177 fi
21178 rm -f conftest*
21179 fi
21180
21181 echo "$ac_t""$ac_cv_struct_tm" 1>&6
21182 if test $ac_cv_struct_tm = sys/time.h; then
21183   cat >> confdefs.h <<\EOF
21184 #define TM_IN_SYS_TIME 1
21185 EOF
21186
21187 fi
21188
21189 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
21190 echo "configure:21191: checking for uid_t in sys/types.h" >&5
21191 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
21192   echo $ac_n "(cached) $ac_c" 1>&6
21193 else
21194   cat > conftest.$ac_ext <<EOF
21195 #line 21196 "configure"
21196 #include "confdefs.h"
21197 #include <sys/types.h>
21198 EOF
21199 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21200   egrep "uid_t" >/dev/null 2>&1; then
21201   rm -rf conftest*
21202   ac_cv_type_uid_t=yes
21203 else
21204   rm -rf conftest*
21205   ac_cv_type_uid_t=no
21206 fi
21207 rm -f conftest*
21208
21209 fi
21210
21211 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
21212 if test $ac_cv_type_uid_t = no; then
21213   cat >> confdefs.h <<\EOF
21214 #define uid_t int
21215 EOF
21216
21217   cat >> confdefs.h <<\EOF
21218 #define gid_t int
21219 EOF
21220
21221 fi
21222
21223 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
21224 echo "configure:21225: checking for sig_atomic_t" >&5
21225 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
21226   echo $ac_n "(cached) $ac_c" 1>&6
21227 else
21228   cat > conftest.$ac_ext <<EOF
21229 #line 21230 "configure"
21230 #include "confdefs.h"
21231 #include <signal.h>
21232 int main() {
21233 sig_atomic_t atomic;
21234 ; return 0; }
21235 EOF
21236 if { (eval echo configure:21237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21237   rm -rf conftest*
21238   ol_cv_type_sig_atomic_t=yes
21239 else
21240   echo "configure: failed program was:" >&5
21241   cat conftest.$ac_ext >&5
21242   rm -rf conftest*
21243   ol_cv_type_sig_atomic_t=no
21244 fi
21245 rm -f conftest*
21246 fi
21247
21248 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
21249   if test $ol_cv_type_sig_atomic_t = no; then
21250     cat >> confdefs.h <<\EOF
21251 #define sig_atomic_t int
21252 EOF
21253
21254   fi
21255  
21256
21257
21258 # test for pw_gecos in struct passwd
21259 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
21260 echo "configure:21261: checking struct passwd for pw_gecos" >&5
21261 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
21262   echo $ac_n "(cached) $ac_c" 1>&6
21263 else
21264   
21265         cat > conftest.$ac_ext <<EOF
21266 #line 21267 "configure"
21267 #include "confdefs.h"
21268 #include <pwd.h>
21269 int main() {
21270
21271         struct passwd pwd;
21272         pwd.pw_gecos = pwd.pw_name;
21273
21274 ; return 0; }
21275 EOF
21276 if { (eval echo configure:21277: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21277   rm -rf conftest*
21278   ol_cv_struct_passwd_pw_gecos=yes
21279 else
21280   echo "configure: failed program was:" >&5
21281   cat conftest.$ac_ext >&5
21282   rm -rf conftest*
21283   ol_cv_struct_passwd_pw_gecos=no
21284 fi
21285 rm -f conftest*
21286 fi
21287
21288 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
21289 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
21290         cat >> confdefs.h <<\EOF
21291 #define HAVE_PW_GECOS 1
21292 EOF
21293
21294 fi
21295
21296 # test for pw_passwd in struct passwd
21297 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
21298 echo "configure:21299: checking struct passwd for pw_passwd" >&5
21299 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
21300   echo $ac_n "(cached) $ac_c" 1>&6
21301 else
21302   
21303         cat > conftest.$ac_ext <<EOF
21304 #line 21305 "configure"
21305 #include "confdefs.h"
21306 #include <pwd.h>
21307 int main() {
21308
21309         struct passwd pwd;
21310         pwd.pw_passwd = pwd.pw_name;
21311
21312 ; return 0; }
21313 EOF
21314 if { (eval echo configure:21315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21315   rm -rf conftest*
21316   ol_cv_struct_passwd_pw_passwd=yes
21317 else
21318   echo "configure: failed program was:" >&5
21319   cat conftest.$ac_ext >&5
21320   rm -rf conftest*
21321   ol_cv_struct_passwd_pw_passwd=no
21322 fi
21323 rm -f conftest*
21324 fi
21325
21326 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
21327 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
21328         cat >> confdefs.h <<\EOF
21329 #define HAVE_PW_PASSWD 1
21330 EOF
21331
21332 fi
21333
21334
21335 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
21336 echo "configure:21337: checking if toupper() requires islower()" >&5
21337 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
21338   echo $ac_n "(cached) $ac_c" 1>&6
21339 else
21340   
21341         if test "$cross_compiling" = yes; then
21342   ol_cv_c_upper_lower=safe
21343 else
21344   cat > conftest.$ac_ext <<EOF
21345 #line 21346 "configure"
21346 #include "confdefs.h"
21347
21348 #include <ctype.h>
21349 main()
21350 {
21351         if ('C' == toupper('C'))
21352                 exit(0);
21353         else
21354                 exit(1);
21355 }
21356 EOF
21357 if { (eval echo configure:21358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21358 then
21359   ol_cv_c_upper_lower=no
21360 else
21361   echo "configure: failed program was:" >&5
21362   cat conftest.$ac_ext >&5
21363   rm -fr conftest*
21364   ol_cv_c_upper_lower=yes
21365 fi
21366 rm -fr conftest*
21367 fi
21368
21369 fi
21370
21371 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
21372 if test $ol_cv_c_upper_lower != no ; then
21373         cat >> confdefs.h <<\EOF
21374 #define C_UPPER_LOWER 1
21375 EOF
21376
21377 fi
21378
21379 echo $ac_n "checking for working const""... $ac_c" 1>&6
21380 echo "configure:21381: checking for working const" >&5
21381 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
21382   echo $ac_n "(cached) $ac_c" 1>&6
21383 else
21384   cat > conftest.$ac_ext <<EOF
21385 #line 21386 "configure"
21386 #include "confdefs.h"
21387
21388 int main() {
21389
21390 /* Ultrix mips cc rejects this.  */
21391 typedef int charset[2]; const charset x;
21392 /* SunOS 4.1.1 cc rejects this.  */
21393 char const *const *ccp;
21394 char **p;
21395 /* NEC SVR4.0.2 mips cc rejects this.  */
21396 struct point {int x, y;};
21397 static struct point const zero = {0,0};
21398 /* AIX XL C 1.02.0.0 rejects this.
21399    It does not let you subtract one const X* pointer from another in an arm
21400    of an if-expression whose if-part is not a constant expression */
21401 const char *g = "string";
21402 ccp = &g + (g ? g-g : 0);
21403 /* HPUX 7.0 cc rejects these. */
21404 ++ccp;
21405 p = (char**) ccp;
21406 ccp = (char const *const *) p;
21407 { /* SCO 3.2v4 cc rejects this.  */
21408   char *t;
21409   char const *s = 0 ? (char *) 0 : (char const *) 0;
21410
21411   *t++ = 0;
21412 }
21413 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
21414   int x[] = {25, 17};
21415   const int *foo = &x[0];
21416   ++foo;
21417 }
21418 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21419   typedef const int *iptr;
21420   iptr p = 0;
21421   ++p;
21422 }
21423 { /* AIX XL C 1.02.0.0 rejects this saying
21424      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21425   struct s { int j; const int *ap[3]; };
21426   struct s *b; b->j = 5;
21427 }
21428 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21429   const int foo = 10;
21430 }
21431
21432 ; return 0; }
21433 EOF
21434 if { (eval echo configure:21435: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21435   rm -rf conftest*
21436   ac_cv_c_const=yes
21437 else
21438   echo "configure: failed program was:" >&5
21439   cat conftest.$ac_ext >&5
21440   rm -rf conftest*
21441   ac_cv_c_const=no
21442 fi
21443 rm -f conftest*
21444 fi
21445
21446 echo "$ac_t""$ac_cv_c_const" 1>&6
21447 if test $ac_cv_c_const = no; then
21448   cat >> confdefs.h <<\EOF
21449 #define const 
21450 EOF
21451
21452 fi
21453
21454 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
21455 echo "configure:21456: checking if compiler understands volatile" >&5
21456 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
21457   echo $ac_n "(cached) $ac_c" 1>&6
21458 else
21459   cat > conftest.$ac_ext <<EOF
21460 #line 21461 "configure"
21461 #include "confdefs.h"
21462 int x, y, z;
21463 int main() {
21464 volatile int a; int * volatile b = x ? &y : &z;
21465       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
21466       *b = 0;
21467 ; return 0; }
21468 EOF
21469 if { (eval echo configure:21470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21470   rm -rf conftest*
21471   ol_cv_c_volatile=yes
21472 else
21473   echo "configure: failed program was:" >&5
21474   cat conftest.$ac_ext >&5
21475   rm -rf conftest*
21476   ol_cv_c_volatile=no
21477 fi
21478 rm -f conftest*
21479 fi
21480
21481 echo "$ac_t""$ol_cv_c_volatile" 1>&6
21482   if test $ol_cv_c_volatile = yes; then
21483     : 
21484   else
21485     cat >> confdefs.h <<\EOF
21486 #define volatile 
21487 EOF
21488
21489   fi
21490  
21491
21492 if test $cross_compiling = yes ; then
21493         cat >> confdefs.h <<\EOF
21494 #define CROSS_COMPILING 1
21495 EOF
21496
21497 else
21498         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
21499 echo "configure:21500: checking whether byte ordering is bigendian" >&5
21500 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
21501   echo $ac_n "(cached) $ac_c" 1>&6
21502 else
21503   ac_cv_c_bigendian=unknown
21504 # See if sys/param.h defines the BYTE_ORDER macro.
21505 cat > conftest.$ac_ext <<EOF
21506 #line 21507 "configure"
21507 #include "confdefs.h"
21508 #include <sys/types.h>
21509 #include <sys/param.h>
21510 int main() {
21511
21512 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
21513  bogus endian macros
21514 #endif
21515 ; return 0; }
21516 EOF
21517 if { (eval echo configure:21518: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21518   rm -rf conftest*
21519   # It does; now see whether it defined to BIG_ENDIAN or not.
21520 cat > conftest.$ac_ext <<EOF
21521 #line 21522 "configure"
21522 #include "confdefs.h"
21523 #include <sys/types.h>
21524 #include <sys/param.h>
21525 int main() {
21526
21527 #if BYTE_ORDER != BIG_ENDIAN
21528  not big endian
21529 #endif
21530 ; return 0; }
21531 EOF
21532 if { (eval echo configure:21533: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21533   rm -rf conftest*
21534   ac_cv_c_bigendian=yes
21535 else
21536   echo "configure: failed program was:" >&5
21537   cat conftest.$ac_ext >&5
21538   rm -rf conftest*
21539   ac_cv_c_bigendian=no
21540 fi
21541 rm -f conftest*
21542 else
21543   echo "configure: failed program was:" >&5
21544   cat conftest.$ac_ext >&5
21545 fi
21546 rm -f conftest*
21547 if test $ac_cv_c_bigendian = unknown; then
21548 if test "$cross_compiling" = yes; then
21549     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
21550 else
21551   cat > conftest.$ac_ext <<EOF
21552 #line 21553 "configure"
21553 #include "confdefs.h"
21554 main () {
21555   /* Are we little or big endian?  From Harbison&Steele.  */
21556   union
21557   {
21558     long l;
21559     char c[sizeof (long)];
21560   } u;
21561   u.l = 1;
21562   exit (u.c[sizeof (long) - 1] == 1);
21563 }
21564 EOF
21565 if { (eval echo configure:21566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21566 then
21567   ac_cv_c_bigendian=no
21568 else
21569   echo "configure: failed program was:" >&5
21570   cat conftest.$ac_ext >&5
21571   rm -fr conftest*
21572   ac_cv_c_bigendian=yes
21573 fi
21574 rm -fr conftest*
21575 fi
21576
21577 fi
21578 fi
21579
21580 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
21581 if test $ac_cv_c_bigendian = yes; then
21582   cat >> confdefs.h <<\EOF
21583 #define WORDS_BIGENDIAN 1
21584 EOF
21585
21586 fi
21587
21588 fi
21589
21590 echo $ac_n "checking size of short""... $ac_c" 1>&6
21591 echo "configure:21592: checking size of short" >&5 
21592 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
21593   echo $ac_n "(cached) $ac_c" 1>&6
21594 else
21595   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21596   cat > conftest.$ac_ext <<EOF
21597 #line 21598 "configure"
21598 #include "confdefs.h"
21599 #include "confdefs.h" 
21600 #include <sys/types.h> 
21601  
21602
21603 int main() {
21604 switch (0) case 0: case (sizeof (short) == $ac_size):;
21605 ; return 0; }
21606 EOF
21607 if { (eval echo configure:21608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21608   rm -rf conftest*
21609   ac_cv_sizeof_short=$ac_size
21610 else
21611   echo "configure: failed program was:" >&5
21612   cat conftest.$ac_ext >&5
21613 fi
21614 rm -f conftest* 
21615   if test x$ac_cv_sizeof_short != x ; then break; fi 
21616 done 
21617
21618 fi
21619  
21620 if test x$ac_cv_sizeof_short = x ; then 
21621   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
21622 fi 
21623 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
21624 cat >> confdefs.h <<EOF
21625 #define SIZEOF_SHORT $ac_cv_sizeof_short
21626 EOF
21627  
21628  
21629 echo $ac_n "checking size of int""... $ac_c" 1>&6
21630 echo "configure:21631: checking size of int" >&5 
21631 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
21632   echo $ac_n "(cached) $ac_c" 1>&6
21633 else
21634   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21635   cat > conftest.$ac_ext <<EOF
21636 #line 21637 "configure"
21637 #include "confdefs.h"
21638 #include "confdefs.h" 
21639 #include <sys/types.h> 
21640  
21641
21642 int main() {
21643 switch (0) case 0: case (sizeof (int) == $ac_size):;
21644 ; return 0; }
21645 EOF
21646 if { (eval echo configure:21647: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21647   rm -rf conftest*
21648   ac_cv_sizeof_int=$ac_size
21649 else
21650   echo "configure: failed program was:" >&5
21651   cat conftest.$ac_ext >&5
21652 fi
21653 rm -f conftest* 
21654   if test x$ac_cv_sizeof_int != x ; then break; fi 
21655 done 
21656
21657 fi
21658  
21659 if test x$ac_cv_sizeof_int = x ; then 
21660   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
21661 fi 
21662 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
21663 cat >> confdefs.h <<EOF
21664 #define SIZEOF_INT $ac_cv_sizeof_int
21665 EOF
21666  
21667  
21668 echo $ac_n "checking size of long""... $ac_c" 1>&6
21669 echo "configure:21670: checking size of long" >&5 
21670 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
21671   echo $ac_n "(cached) $ac_c" 1>&6
21672 else
21673   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21674   cat > conftest.$ac_ext <<EOF
21675 #line 21676 "configure"
21676 #include "confdefs.h"
21677 #include "confdefs.h" 
21678 #include <sys/types.h> 
21679  
21680
21681 int main() {
21682 switch (0) case 0: case (sizeof (long) == $ac_size):;
21683 ; return 0; }
21684 EOF
21685 if { (eval echo configure:21686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21686   rm -rf conftest*
21687   ac_cv_sizeof_long=$ac_size
21688 else
21689   echo "configure: failed program was:" >&5
21690   cat conftest.$ac_ext >&5
21691 fi
21692 rm -f conftest* 
21693   if test x$ac_cv_sizeof_long != x ; then break; fi 
21694 done 
21695
21696 fi
21697  
21698 if test x$ac_cv_sizeof_long = x ; then 
21699   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
21700 fi 
21701 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
21702 cat >> confdefs.h <<EOF
21703 #define SIZEOF_LONG $ac_cv_sizeof_long
21704 EOF
21705  
21706
21707
21708 if test "$ac_cv_sizeof_int" -lt 4 ; then
21709         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
21710
21711         cat >> confdefs.h <<\EOF
21712 #define LBER_INT_T long
21713 EOF
21714
21715 else
21716         cat >> confdefs.h <<\EOF
21717 #define LBER_INT_T int
21718 EOF
21719
21720 fi
21721
21722 cat >> confdefs.h <<\EOF
21723 #define LBER_LEN_T long
21724 EOF
21725
21726 cat >> confdefs.h <<\EOF
21727 #define LBER_SOCKET_T int
21728 EOF
21729
21730 cat >> confdefs.h <<\EOF
21731 #define LBER_TAG_T long
21732 EOF
21733
21734
21735 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
21736 echo "configure:21737: checking for 8-bit clean memcmp" >&5
21737 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
21738   echo $ac_n "(cached) $ac_c" 1>&6
21739 else
21740   if test "$cross_compiling" = yes; then
21741   ac_cv_func_memcmp_clean=no
21742 else
21743   cat > conftest.$ac_ext <<EOF
21744 #line 21745 "configure"
21745 #include "confdefs.h"
21746
21747 main()
21748 {
21749   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
21750   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
21751 }
21752
21753 EOF
21754 if { (eval echo configure:21755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21755 then
21756   ac_cv_func_memcmp_clean=yes
21757 else
21758   echo "configure: failed program was:" >&5
21759   cat conftest.$ac_ext >&5
21760   rm -fr conftest*
21761   ac_cv_func_memcmp_clean=no
21762 fi
21763 rm -fr conftest*
21764 fi
21765
21766 fi
21767
21768 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
21769 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
21770
21771 echo $ac_n "checking for strftime""... $ac_c" 1>&6
21772 echo "configure:21773: checking for strftime" >&5
21773 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
21774   echo $ac_n "(cached) $ac_c" 1>&6
21775 else
21776   cat > conftest.$ac_ext <<EOF
21777 #line 21778 "configure"
21778 #include "confdefs.h"
21779 /* System header to define __stub macros and hopefully few prototypes,
21780     which can conflict with char strftime(); below.  */
21781 #include <assert.h>
21782 /* Override any gcc2 internal prototype to avoid an error.  */
21783 /* We use char because int might match the return type of a gcc2
21784     builtin and then its argument prototype would still apply.  */
21785 char strftime();
21786 char (*f)();
21787
21788 int main() {
21789
21790 /* The GNU C library defines this for functions which it implements
21791     to always fail with ENOSYS.  Some functions are actually named
21792     something starting with __ and the normal name is an alias.  */
21793 #if defined (__stub_strftime) || defined (__stub___strftime)
21794 choke me
21795 #else
21796 f = strftime;
21797 #endif
21798
21799 ; return 0; }
21800 EOF
21801 if { (eval echo configure:21802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21802   rm -rf conftest*
21803   eval "ac_cv_func_strftime=yes"
21804 else
21805   echo "configure: failed program was:" >&5
21806   cat conftest.$ac_ext >&5
21807   rm -rf conftest*
21808   eval "ac_cv_func_strftime=no"
21809 fi
21810 rm -f conftest*
21811 fi
21812
21813 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
21814   echo "$ac_t""yes" 1>&6
21815   cat >> confdefs.h <<\EOF
21816 #define HAVE_STRFTIME 1
21817 EOF
21818
21819 else
21820   echo "$ac_t""no" 1>&6
21821 # strftime is in -lintl on SCO UNIX.
21822 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
21823 echo "configure:21824: checking for strftime in -lintl" >&5
21824 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
21825 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21826   echo $ac_n "(cached) $ac_c" 1>&6
21827 else
21828   ac_save_LIBS="$LIBS"
21829 LIBS="-lintl  $LIBS"
21830 cat > conftest.$ac_ext <<EOF
21831 #line 21832 "configure"
21832 #include "confdefs.h"
21833 /* Override any gcc2 internal prototype to avoid an error.  */
21834 /* We use char because int might match the return type of a gcc2
21835     builtin and then its argument prototype would still apply.  */
21836 char strftime();
21837
21838 int main() {
21839 strftime()
21840 ; return 0; }
21841 EOF
21842 if { (eval echo configure:21843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21843   rm -rf conftest*
21844   eval "ac_cv_lib_$ac_lib_var=yes"
21845 else
21846   echo "configure: failed program was:" >&5
21847   cat conftest.$ac_ext >&5
21848   rm -rf conftest*
21849   eval "ac_cv_lib_$ac_lib_var=no"
21850 fi
21851 rm -f conftest*
21852 LIBS="$ac_save_LIBS"
21853
21854 fi
21855 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21856   echo "$ac_t""yes" 1>&6
21857   cat >> confdefs.h <<\EOF
21858 #define HAVE_STRFTIME 1
21859 EOF
21860
21861 LIBS="-lintl $LIBS"
21862 else
21863   echo "$ac_t""no" 1>&6
21864 fi
21865
21866 fi
21867
21868
21869 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
21870 echo "configure:21871: checking for inet_aton()" >&5
21871 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
21872   echo $ac_n "(cached) $ac_c" 1>&6
21873 else
21874   cat > conftest.$ac_ext <<EOF
21875 #line 21876 "configure"
21876 #include "confdefs.h"
21877
21878 #ifdef HAVE_SYS_TYPES_H
21879 #       include <sys/types.h>
21880 #endif
21881 #ifdef HAVE_SYS_SOCKET_H
21882 #       include <sys/socket.h>
21883 #       ifdef HAVE_SYS_SELECT_H
21884 #               include <sys/select.h>
21885 #       endif
21886 #       include <netinet/in.h>
21887 #       ifdef HAVE_ARPA_INET_H
21888 #               include <arpa/inet.h>
21889 #       endif
21890 #endif
21891
21892 int main() {
21893 struct in_addr in;
21894 int rc = inet_aton( "255.255.255.255", &in );
21895 ; return 0; }
21896 EOF
21897 if { (eval echo configure:21898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21898   rm -rf conftest*
21899   ol_cv_func_inet_aton=yes
21900 else
21901   echo "configure: failed program was:" >&5
21902   cat conftest.$ac_ext >&5
21903   rm -rf conftest*
21904   ol_cv_func_inet_aton=no
21905 fi
21906 rm -f conftest*
21907 fi
21908
21909 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
21910   if test $ol_cv_func_inet_aton != no; then
21911     cat >> confdefs.h <<\EOF
21912 #define HAVE_INET_ATON 1
21913 EOF
21914
21915   fi
21916  
21917
21918 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
21919 echo "configure:21920: checking for _spawnlp" >&5
21920 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
21921   echo $ac_n "(cached) $ac_c" 1>&6
21922 else
21923   cat > conftest.$ac_ext <<EOF
21924 #line 21925 "configure"
21925 #include "confdefs.h"
21926 /* System header to define __stub macros and hopefully few prototypes,
21927     which can conflict with char _spawnlp(); below.  */
21928 #include <assert.h>
21929 /* Override any gcc2 internal prototype to avoid an error.  */
21930 /* We use char because int might match the return type of a gcc2
21931     builtin and then its argument prototype would still apply.  */
21932 char _spawnlp();
21933 char (*f)();
21934
21935 int main() {
21936
21937 /* The GNU C library defines this for functions which it implements
21938     to always fail with ENOSYS.  Some functions are actually named
21939     something starting with __ and the normal name is an alias.  */
21940 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
21941 choke me
21942 #else
21943 f = _spawnlp;
21944 #endif
21945
21946 ; return 0; }
21947 EOF
21948 if { (eval echo configure:21949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21949   rm -rf conftest*
21950   eval "ac_cv_func__spawnlp=yes"
21951 else
21952   echo "configure: failed program was:" >&5
21953   cat conftest.$ac_ext >&5
21954   rm -rf conftest*
21955   eval "ac_cv_func__spawnlp=no"
21956 fi
21957 rm -f conftest*
21958 fi
21959
21960 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
21961   echo "$ac_t""yes" 1>&6
21962   cat >> confdefs.h <<\EOF
21963 #define HAVE_SPAWNLP 1
21964 EOF
21965
21966 else
21967   echo "$ac_t""no" 1>&6
21968 fi
21969
21970
21971 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
21972 echo "configure:21973: checking for _snprintf" >&5
21973 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
21974   echo $ac_n "(cached) $ac_c" 1>&6
21975 else
21976   cat > conftest.$ac_ext <<EOF
21977 #line 21978 "configure"
21978 #include "confdefs.h"
21979 /* System header to define __stub macros and hopefully few prototypes,
21980     which can conflict with char _snprintf(); below.  */
21981 #include <assert.h>
21982 /* Override any gcc2 internal prototype to avoid an error.  */
21983 /* We use char because int might match the return type of a gcc2
21984     builtin and then its argument prototype would still apply.  */
21985 char _snprintf();
21986 char (*f)();
21987
21988 int main() {
21989
21990 /* The GNU C library defines this for functions which it implements
21991     to always fail with ENOSYS.  Some functions are actually named
21992     something starting with __ and the normal name is an alias.  */
21993 #if defined (__stub__snprintf) || defined (__stub____snprintf)
21994 choke me
21995 #else
21996 f = _snprintf;
21997 #endif
21998
21999 ; return 0; }
22000 EOF
22001 if { (eval echo configure:22002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22002   rm -rf conftest*
22003   eval "ac_cv_func__snprintf=yes"
22004 else
22005   echo "configure: failed program was:" >&5
22006   cat conftest.$ac_ext >&5
22007   rm -rf conftest*
22008   eval "ac_cv_func__snprintf=no"
22009 fi
22010 rm -f conftest*
22011 fi
22012
22013 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
22014   echo "$ac_t""yes" 1>&6
22015   ac_cv_func_snprintf=yes
22016         cat >> confdefs.h <<\EOF
22017 #define snprintf _snprintf
22018 EOF
22019
22020
22021 else
22022   echo "$ac_t""no" 1>&6
22023 fi
22024
22025
22026 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
22027 echo "configure:22028: checking for _vsnprintf" >&5
22028 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
22029   echo $ac_n "(cached) $ac_c" 1>&6
22030 else
22031   cat > conftest.$ac_ext <<EOF
22032 #line 22033 "configure"
22033 #include "confdefs.h"
22034 /* System header to define __stub macros and hopefully few prototypes,
22035     which can conflict with char _vsnprintf(); below.  */
22036 #include <assert.h>
22037 /* Override any gcc2 internal prototype to avoid an error.  */
22038 /* We use char because int might match the return type of a gcc2
22039     builtin and then its argument prototype would still apply.  */
22040 char _vsnprintf();
22041 char (*f)();
22042
22043 int main() {
22044
22045 /* The GNU C library defines this for functions which it implements
22046     to always fail with ENOSYS.  Some functions are actually named
22047     something starting with __ and the normal name is an alias.  */
22048 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
22049 choke me
22050 #else
22051 f = _vsnprintf;
22052 #endif
22053
22054 ; return 0; }
22055 EOF
22056 if { (eval echo configure:22057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22057   rm -rf conftest*
22058   eval "ac_cv_func__vsnprintf=yes"
22059 else
22060   echo "configure: failed program was:" >&5
22061   cat conftest.$ac_ext >&5
22062   rm -rf conftest*
22063   eval "ac_cv_func__vsnprintf=no"
22064 fi
22065 rm -f conftest*
22066 fi
22067
22068 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
22069   echo "$ac_t""yes" 1>&6
22070   ac_cv_func_vsnprintf=yes
22071         cat >> confdefs.h <<\EOF
22072 #define vsnprintf _vsnprintf
22073 EOF
22074
22075
22076 else
22077   echo "$ac_t""no" 1>&6
22078 fi
22079
22080
22081 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
22082 echo "configure:22083: checking for vprintf" >&5
22083 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
22084   echo $ac_n "(cached) $ac_c" 1>&6
22085 else
22086   cat > conftest.$ac_ext <<EOF
22087 #line 22088 "configure"
22088 #include "confdefs.h"
22089 /* System header to define __stub macros and hopefully few prototypes,
22090     which can conflict with char vprintf(); below.  */
22091 #include <assert.h>
22092 /* Override any gcc2 internal prototype to avoid an error.  */
22093 /* We use char because int might match the return type of a gcc2
22094     builtin and then its argument prototype would still apply.  */
22095 char vprintf();
22096 char (*f)();
22097
22098 int main() {
22099
22100 /* The GNU C library defines this for functions which it implements
22101     to always fail with ENOSYS.  Some functions are actually named
22102     something starting with __ and the normal name is an alias.  */
22103 #if defined (__stub_vprintf) || defined (__stub___vprintf)
22104 choke me
22105 #else
22106 f = vprintf;
22107 #endif
22108
22109 ; return 0; }
22110 EOF
22111 if { (eval echo configure:22112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22112   rm -rf conftest*
22113   eval "ac_cv_func_vprintf=yes"
22114 else
22115   echo "configure: failed program was:" >&5
22116   cat conftest.$ac_ext >&5
22117   rm -rf conftest*
22118   eval "ac_cv_func_vprintf=no"
22119 fi
22120 rm -f conftest*
22121 fi
22122
22123 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
22124   echo "$ac_t""yes" 1>&6
22125   cat >> confdefs.h <<\EOF
22126 #define HAVE_VPRINTF 1
22127 EOF
22128
22129 else
22130   echo "$ac_t""no" 1>&6
22131 fi
22132
22133 if test "$ac_cv_func_vprintf" != yes; then
22134 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
22135 echo "configure:22136: checking for _doprnt" >&5
22136 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
22137   echo $ac_n "(cached) $ac_c" 1>&6
22138 else
22139   cat > conftest.$ac_ext <<EOF
22140 #line 22141 "configure"
22141 #include "confdefs.h"
22142 /* System header to define __stub macros and hopefully few prototypes,
22143     which can conflict with char _doprnt(); below.  */
22144 #include <assert.h>
22145 /* Override any gcc2 internal prototype to avoid an error.  */
22146 /* We use char because int might match the return type of a gcc2
22147     builtin and then its argument prototype would still apply.  */
22148 char _doprnt();
22149 char (*f)();
22150
22151 int main() {
22152
22153 /* The GNU C library defines this for functions which it implements
22154     to always fail with ENOSYS.  Some functions are actually named
22155     something starting with __ and the normal name is an alias.  */
22156 #if defined (__stub__doprnt) || defined (__stub____doprnt)
22157 choke me
22158 #else
22159 f = _doprnt;
22160 #endif
22161
22162 ; return 0; }
22163 EOF
22164 if { (eval echo configure:22165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22165   rm -rf conftest*
22166   eval "ac_cv_func__doprnt=yes"
22167 else
22168   echo "configure: failed program was:" >&5
22169   cat conftest.$ac_ext >&5
22170   rm -rf conftest*
22171   eval "ac_cv_func__doprnt=no"
22172 fi
22173 rm -f conftest*
22174 fi
22175
22176 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
22177   echo "$ac_t""yes" 1>&6
22178   cat >> confdefs.h <<\EOF
22179 #define HAVE_DOPRNT 1
22180 EOF
22181
22182 else
22183   echo "$ac_t""no" 1>&6
22184 fi
22185
22186 fi
22187
22188
22189 if test $ac_cv_func_vprintf = yes ; then
22190                 for ac_func in vsnprintf vsprintf
22191 do
22192 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22193 echo "configure:22194: checking for $ac_func" >&5
22194 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22195   echo $ac_n "(cached) $ac_c" 1>&6
22196 else
22197   cat > conftest.$ac_ext <<EOF
22198 #line 22199 "configure"
22199 #include "confdefs.h"
22200 /* System header to define __stub macros and hopefully few prototypes,
22201     which can conflict with char $ac_func(); below.  */
22202 #include <assert.h>
22203 /* Override any gcc2 internal prototype to avoid an error.  */
22204 /* We use char because int might match the return type of a gcc2
22205     builtin and then its argument prototype would still apply.  */
22206 char $ac_func();
22207 char (*f)();
22208
22209 int main() {
22210
22211 /* The GNU C library defines this for functions which it implements
22212     to always fail with ENOSYS.  Some functions are actually named
22213     something starting with __ and the normal name is an alias.  */
22214 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22215 choke me
22216 #else
22217 f = $ac_func;
22218 #endif
22219
22220 ; return 0; }
22221 EOF
22222 if { (eval echo configure:22223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22223   rm -rf conftest*
22224   eval "ac_cv_func_$ac_func=yes"
22225 else
22226   echo "configure: failed program was:" >&5
22227   cat conftest.$ac_ext >&5
22228   rm -rf conftest*
22229   eval "ac_cv_func_$ac_func=no"
22230 fi
22231 rm -f conftest*
22232 fi
22233
22234 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22235   echo "$ac_t""yes" 1>&6
22236     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22237   cat >> confdefs.h <<EOF
22238 #define $ac_tr_func 1
22239 EOF
22240  
22241 else
22242   echo "$ac_t""no" 1>&6
22243 fi
22244 done
22245
22246 fi
22247
22248 for ac_func in \
22249         bcopy                   \
22250         closesocket             \
22251         chroot                  \
22252         endgrent                \
22253         endpwent                \
22254         fcntl                   \
22255         flock                   \
22256         getdtablesize   \
22257         getgrgid                \
22258         gethostname             \
22259         getpass                 \
22260         getpassphrase   \
22261         getpwuid                \
22262         getpwnam                \
22263         getspnam                \
22264         gettimeofday    \
22265         initgroups              \
22266         lockf                   \
22267         memcpy                  \
22268         memmove                 \
22269         mkstemp                 \
22270         mktemp                  \
22271         pipe                    \
22272         read                    \
22273         recv                    \
22274         recvfrom                \
22275         recvmsg                 \
22276         setpwfile               \
22277         setgid                  \
22278         setegid                 \
22279         setsid                  \
22280         setuid                  \
22281         seteuid                 \
22282         sigaction               \
22283         signal                  \
22284         sigset                  \
22285         strdup                  \
22286         strerror                \
22287         strpbrk                 \
22288         strrchr                 \
22289         strsep                  \
22290         strstr                  \
22291         strtol                  \
22292         strtoul                 \
22293         strspn                  \
22294         sysconf                 \
22295         usleep                  \
22296         waitpid                 \
22297         wait4                   \
22298         write                   \
22299         send                    \
22300         sendto                  \
22301
22302 do
22303 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22304 echo "configure:22305: checking for $ac_func" >&5
22305 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22306   echo $ac_n "(cached) $ac_c" 1>&6
22307 else
22308   cat > conftest.$ac_ext <<EOF
22309 #line 22310 "configure"
22310 #include "confdefs.h"
22311 /* System header to define __stub macros and hopefully few prototypes,
22312     which can conflict with char $ac_func(); below.  */
22313 #include <assert.h>
22314 /* Override any gcc2 internal prototype to avoid an error.  */
22315 /* We use char because int might match the return type of a gcc2
22316     builtin and then its argument prototype would still apply.  */
22317 char $ac_func();
22318 char (*f)();
22319
22320 int main() {
22321
22322 /* The GNU C library defines this for functions which it implements
22323     to always fail with ENOSYS.  Some functions are actually named
22324     something starting with __ and the normal name is an alias.  */
22325 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22326 choke me
22327 #else
22328 f = $ac_func;
22329 #endif
22330
22331 ; return 0; }
22332 EOF
22333 if { (eval echo configure:22334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22334   rm -rf conftest*
22335   eval "ac_cv_func_$ac_func=yes"
22336 else
22337   echo "configure: failed program was:" >&5
22338   cat conftest.$ac_ext >&5
22339   rm -rf conftest*
22340   eval "ac_cv_func_$ac_func=no"
22341 fi
22342 rm -f conftest*
22343 fi
22344
22345 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22346   echo "$ac_t""yes" 1>&6
22347     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22348   cat >> confdefs.h <<EOF
22349 #define $ac_tr_func 1
22350 EOF
22351  
22352 else
22353   echo "$ac_t""no" 1>&6
22354 fi
22355 done
22356
22357
22358 for ac_func in getopt
22359 do
22360 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22361 echo "configure:22362: checking for $ac_func" >&5
22362 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22363   echo $ac_n "(cached) $ac_c" 1>&6
22364 else
22365   cat > conftest.$ac_ext <<EOF
22366 #line 22367 "configure"
22367 #include "confdefs.h"
22368 /* System header to define __stub macros and hopefully few prototypes,
22369     which can conflict with char $ac_func(); below.  */
22370 #include <assert.h>
22371 /* Override any gcc2 internal prototype to avoid an error.  */
22372 /* We use char because int might match the return type of a gcc2
22373     builtin and then its argument prototype would still apply.  */
22374 char $ac_func();
22375 char (*f)();
22376
22377 int main() {
22378
22379 /* The GNU C library defines this for functions which it implements
22380     to always fail with ENOSYS.  Some functions are actually named
22381     something starting with __ and the normal name is an alias.  */
22382 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22383 choke me
22384 #else
22385 f = $ac_func;
22386 #endif
22387
22388 ; return 0; }
22389 EOF
22390 if { (eval echo configure:22391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22391   rm -rf conftest*
22392   eval "ac_cv_func_$ac_func=yes"
22393 else
22394   echo "configure: failed program was:" >&5
22395   cat conftest.$ac_ext >&5
22396   rm -rf conftest*
22397   eval "ac_cv_func_$ac_func=no"
22398 fi
22399 rm -f conftest*
22400 fi
22401
22402 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22403   echo "$ac_t""yes" 1>&6
22404     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22405   cat >> confdefs.h <<EOF
22406 #define $ac_tr_func 1
22407 EOF
22408  
22409 else
22410   echo "$ac_t""no" 1>&6
22411 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
22412 fi
22413 done
22414
22415
22416
22417 if test "$ac_cv_func_getopt" != yes; then
22418         LIBSRCS="$LIBSRCS getopt.c"
22419 fi
22420
22421 # Check Configuration
22422 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
22423 echo "configure:22424: checking declaration of sys_errlist" >&5
22424 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
22425   echo $ac_n "(cached) $ac_c" 1>&6
22426 else
22427   
22428         cat > conftest.$ac_ext <<EOF
22429 #line 22430 "configure"
22430 #include "confdefs.h"
22431
22432 #include <stdio.h>
22433 #include <sys/types.h>
22434 #include <errno.h>
22435 #ifdef WINNT
22436 #include <stdlib.h>
22437 #endif 
22438 int main() {
22439 char *c = (char *) *sys_errlist
22440 ; return 0; }
22441 EOF
22442 if { (eval echo configure:22443: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22443   rm -rf conftest*
22444   ol_cv_dcl_sys_errlist=yes
22445         ol_cv_have_sys_errlist=yes
22446 else
22447   echo "configure: failed program was:" >&5
22448   cat conftest.$ac_ext >&5
22449   rm -rf conftest*
22450   ol_cv_dcl_sys_errlist=no
22451 fi
22452 rm -f conftest*
22453 fi
22454
22455 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
22456 #
22457 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
22458 if test $ol_cv_dcl_sys_errlist = no ; then
22459         cat >> confdefs.h <<\EOF
22460 #define DECL_SYS_ERRLIST 1
22461 EOF
22462
22463
22464         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
22465 echo "configure:22466: checking existence of sys_errlist" >&5
22466 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
22467   echo $ac_n "(cached) $ac_c" 1>&6
22468 else
22469   
22470                 cat > conftest.$ac_ext <<EOF
22471 #line 22472 "configure"
22472 #include "confdefs.h"
22473 #include <errno.h>
22474 int main() {
22475 char *c = (char *) *sys_errlist
22476 ; return 0; }
22477 EOF
22478 if { (eval echo configure:22479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22479   rm -rf conftest*
22480   ol_cv_have_sys_errlist=yes
22481 else
22482   echo "configure: failed program was:" >&5
22483   cat conftest.$ac_ext >&5
22484   rm -rf conftest*
22485   ol_cv_have_sys_errlist=no
22486 fi
22487 rm -f conftest*
22488 fi
22489
22490 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
22491 fi
22492 if test $ol_cv_have_sys_errlist = yes ; then
22493         cat >> confdefs.h <<\EOF
22494 #define HAVE_SYS_ERRLIST 1
22495 EOF
22496
22497 fi
22498
22499
22500
22501 if test "$ol_enable_debug" != no ; then
22502         cat >> confdefs.h <<\EOF
22503 #define LDAP_DEBUG 1
22504 EOF
22505
22506 fi
22507 if test "$ol_enable_syslog" = yes ; then
22508         cat >> confdefs.h <<\EOF
22509 #define LDAP_SYSLOG 1
22510 EOF
22511
22512 fi
22513 if test "$ol_enable_cache" = no ; then
22514         cat >> confdefs.h <<\EOF
22515 #define LDAP_NOCACHE 1
22516 EOF
22517
22518 fi
22519 if test "$ol_link_kbind" != no ; then
22520         cat >> confdefs.h <<\EOF
22521 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
22522 EOF
22523
22524 fi
22525 if test "$ol_enable_proctitle" != no ; then
22526         cat >> confdefs.h <<\EOF
22527 #define LDAP_PROCTITLE 1
22528 EOF
22529
22530 fi
22531 if test "$ol_enable_referrals" != no ; then
22532         cat >> confdefs.h <<\EOF
22533 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
22534 EOF
22535
22536 fi
22537 if test "$ol_enable_local" != no; then
22538         cat >> confdefs.h <<\EOF
22539 #define LDAP_PF_LOCAL 1
22540 EOF
22541
22542 fi
22543 if test "$ol_link_ipv6" != no; then
22544         cat >> confdefs.h <<\EOF
22545 #define LDAP_PF_INET6 1
22546 EOF
22547
22548 fi
22549 if test "$ol_enable_cleartext" != no ; then
22550         cat >> confdefs.h <<\EOF
22551 #define SLAPD_CLEARTEXT 1
22552 EOF
22553
22554 fi
22555 if test "$ol_enable_crypt" != no ; then
22556         cat >> confdefs.h <<\EOF
22557 #define SLAPD_CRYPT 1
22558 EOF
22559
22560 fi
22561 if test "$ol_link_kpasswd" != no ; then
22562         cat >> confdefs.h <<\EOF
22563 #define SLAPD_KPASSWD 1
22564 EOF
22565
22566 fi
22567 if test "$ol_link_spasswd" != no ; then
22568         cat >> confdefs.h <<\EOF
22569 #define SLAPD_SPASSWD 1
22570 EOF
22571
22572 fi
22573 if test "$ol_enable_multimaster" != no ; then
22574         cat >> confdefs.h <<\EOF
22575 #define SLAPD_MULTIMASTER 1
22576 EOF
22577
22578 fi
22579 if test "$ol_enable_phonetic" != no ; then
22580         cat >> confdefs.h <<\EOF
22581 #define SLAPD_PHONETIC 1
22582 EOF
22583
22584 fi
22585 if test "$ol_enable_rlookups" != no ; then
22586         cat >> confdefs.h <<\EOF
22587 #define SLAPD_RLOOKUPS 1
22588 EOF
22589
22590 fi
22591 if test "$ol_enable_aci" != no ; then
22592         cat >> confdefs.h <<\EOF
22593 #define SLAPD_ACI_ENABLED 1
22594 EOF
22595
22596 fi
22597
22598 if test "$ol_link_modules" != no ; then
22599         cat >> confdefs.h <<\EOF
22600 #define SLAPD_MODULES 1
22601 EOF
22602
22603         BUILD_SLAPD=yes
22604         SLAPD_MODULES_LDFLAGS="-dlopen self"
22605 fi
22606
22607 if test "$ol_enable_bdb" != no ; then
22608         cat >> confdefs.h <<\EOF
22609 #define SLAPD_BDB 1
22610 EOF
22611
22612         BUILD_SLAPD=yes
22613         BUILD_BDB=yes
22614         if test "$ol_with_bdb_module" != static ; then
22615                 cat >> confdefs.h <<\EOF
22616 #define SLAPD_BDB_DYNAMIC 1
22617 EOF
22618
22619                 BUILD_BDB=mod
22620                 BUILD_BDB_DYNAMIC=shared
22621                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
22622         else
22623                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
22624         fi
22625 fi
22626
22627 if test "$ol_link_dnssrv" != no ; then
22628         cat >> confdefs.h <<\EOF
22629 #define SLAPD_DNSSRV 1
22630 EOF
22631
22632         BUILD_SLAPD=yes
22633         BUILD_DNSSRV=yes
22634         if test "$ol_with_dnssrv_module" != static ; then
22635                 cat >> confdefs.h <<\EOF
22636 #define SLAPD_DNSSRV_DYNAMIC 1
22637 EOF
22638
22639                 BUILD_DNSSRV=mod
22640                 BUILD_DNSSRV_DYNAMIC=shared
22641                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
22642         else
22643                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
22644         fi
22645 fi
22646
22647 if test "$ol_enable_ldap" != no ; then
22648         cat >> confdefs.h <<\EOF
22649 #define SLAPD_LDAP 1
22650 EOF
22651
22652         BUILD_SLAPD=yes
22653         BUILD_LDAP=yes
22654         if test "$ol_with_ldap_module" != static ; then
22655                 cat >> confdefs.h <<\EOF
22656 #define SLAPD_LDAP_DYNAMIC 1
22657 EOF
22658
22659                 BUILD_LDAP=mod
22660                 BUILD_LDAP_DYNAMIC=shared
22661                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
22662         else
22663                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
22664         fi
22665 fi
22666
22667 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
22668         cat >> confdefs.h <<\EOF
22669 #define SLAPD_LDBM 1
22670 EOF
22671
22672         BUILD_SLAPD=yes
22673         BUILD_LDBM=yes
22674         LDBM_LIB="-lldbm"
22675         if test "$ol_with_ldbm_module" != static ; then
22676                 cat >> confdefs.h <<\EOF
22677 #define SLAPD_LDBM_DYNAMIC 1
22678 EOF
22679
22680                 BUILD_LDBM=mod
22681                 BUILD_LDBM_DYNAMIC=shared
22682                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
22683         else
22684                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
22685         fi
22686 fi
22687
22688 if test "$ol_enable_meta" != no ; then
22689         if test "$ol_enable_ldap" = no ; then
22690                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
22691         fi
22692         if test "$ol_enable_rewrite" = no ; then
22693                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
22694         fi
22695         cat >> confdefs.h <<\EOF
22696 #define SLAPD_META 1
22697 EOF
22698
22699         BUILD_SLAPD=yes
22700         BUILD_META=yes
22701         BUILD_LDAP=yes
22702         BUILD_REWRITE=yes
22703         if test "$ol_with_meta_module" != static ; then
22704                 cat >> confdefs.h <<\EOF
22705 #define SLAPD_META_DYNAMIC 1
22706 EOF
22707
22708                 BUILD_META=mod
22709                 BUILD_META_DYNAMIC=shared
22710                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
22711         else
22712                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
22713         fi
22714 fi
22715
22716 if test "$ol_enable_monitor" != no ; then
22717         cat >> confdefs.h <<\EOF
22718 #define SLAPD_MONITOR 1
22719 EOF
22720
22721         BUILD_SLAPD=yes
22722         BUILD_MONITOR=yes
22723         if test "$ol_with_monitor_module" != static ; then
22724                 cat >> confdefs.h <<\EOF
22725 #define SLAPD_MONITOR_DYNAMIC 1
22726 EOF
22727
22728                 BUILD_MONITOR=mod
22729                 BUILD_MONITOR_DYNAMIC=shared
22730                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
22731         else
22732                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
22733         fi
22734 fi
22735
22736 if test "$ol_enable_null" != no ; then
22737         cat >> confdefs.h <<\EOF
22738 #define SLAPD_NULL 1
22739 EOF
22740
22741         BUILD_SLAPD=yes
22742         BUILD_NULL=yes
22743         if test "$ol_with_null_module" != static ; then
22744                 cat >> confdefs.h <<\EOF
22745 #define SLAPD_NULL_DYNAMIC 1
22746 EOF
22747
22748                 BUILD_NULL=mod
22749                 BUILD_NULL_DYNAMIC=shared
22750                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
22751         else
22752                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
22753         fi
22754 fi
22755
22756 if test "$ol_enable_passwd" != no ; then
22757         cat >> confdefs.h <<\EOF
22758 #define SLAPD_PASSWD 1
22759 EOF
22760
22761         BUILD_SLAPD=yes
22762         BUILD_PASSWD=yes
22763         if test "$ol_with_passwd_module" != static ; then
22764                 cat >> confdefs.h <<\EOF
22765 #define SLAPD_PASSWD_DYNAMIC 1
22766 EOF
22767
22768                 BUILD_PASSWD=mod
22769                 BUILD_PASSWD_DYNAMIC=shared
22770                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
22771         else
22772                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
22773         fi
22774 fi
22775
22776 if test "$ol_link_perl" != no ; then
22777         cat >> confdefs.h <<\EOF
22778 #define SLAPD_PERL 1
22779 EOF
22780
22781         BUILD_SLAPD=yes
22782         BUILD_PERL=yes
22783         if test "$ol_with_perl_module" != static ; then
22784                 cat >> confdefs.h <<\EOF
22785 #define SLAPD_PERL_DYNAMIC 1
22786 EOF
22787
22788                 BUILD_PERL=mod
22789                 BUILD_PERL_DYNAMIC=shared
22790                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
22791         else
22792                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
22793         fi
22794 fi
22795
22796 if test "$ol_enable_shell" != no ; then
22797         cat >> confdefs.h <<\EOF
22798 #define SLAPD_SHELL 1
22799 EOF
22800
22801         BUILD_SLAPD=yes
22802         BUILD_SHELL=yes
22803         if test "$ol_with_shell_module" != static ; then
22804                 cat >> confdefs.h <<\EOF
22805 #define SLAPD_SHELL_DYNAMIC 1
22806 EOF
22807
22808                 BUILD_SHELL=mod
22809                 BUILD_SHELL_DYNAMIC=shared
22810                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
22811         else
22812                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
22813         fi
22814 fi
22815
22816 if test "$ol_link_sql" != no ; then
22817         cat >> confdefs.h <<\EOF
22818 #define SLAPD_SQL 1
22819 EOF
22820
22821         BUILD_SLAPD=yes
22822         BUILD_SQL=yes
22823         if test "$ol_with_sql_module" != static; then
22824                 cat >> confdefs.h <<\EOF
22825 #define SLAPD_SQL_DYNAMIC 1
22826 EOF
22827
22828                 BUILD_SQL=mod
22829                 BUILD_SQL_DYNAMIC=shared
22830                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
22831         else
22832                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
22833         fi
22834 fi
22835
22836 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
22837         $BUILD_SLAPD = yes ; then
22838         BUILD_SLURPD=yes
22839 fi
22840
22841 if test "$ol_enable_rewrite" != no ; then
22842         cat >> confdefs.h <<\EOF
22843 #define ENABLE_REWRITE 1
22844 EOF
22845
22846         BUILD_REWRITE=yes
22847 fi
22848
22849
22850
22851 if test "$ac_cv_mingw32" = yes ; then
22852         PLAT=NT
22853         SLAPD_MODULES_LDFLAGS=
22854 else
22855         PLAT=UNIX
22856 fi
22857
22858
22859
22860
22861
22862
22863   
22864   
22865   
22866   
22867   
22868   
22869   
22870   
22871   
22872   
22873   
22874   
22875   
22876   
22877   
22878   
22879   
22880   
22881   
22882   
22883   
22884   
22885
22886
22887
22888
22889
22890
22891
22892
22893
22894
22895
22896
22897
22898
22899
22900
22901
22902
22903
22904
22905
22906
22907
22908
22909
22910
22911
22912
22913
22914
22915
22916
22917
22918
22919
22920
22921
22922
22923 # Check whether --with-xxinstall or --without-xxinstall was given.
22924 if test "${with_xxinstall+set}" = set; then
22925   withval="$with_xxinstall"
22926   :
22927 fi
22928
22929
22930
22931 trap '' 1 2 15
22932
22933 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
22934
22935 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22936 # Let make expand exec_prefix.
22937 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22938
22939 # Any assignment to VPATH causes Sun make to only execute
22940 # the first set of double-colon rules, so remove it if not needed.
22941 # If there is a colon in the path, we need to keep it.
22942 if test "x$srcdir" = x.; then
22943   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
22944 fi
22945
22946 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
22947
22948 DEFS=-DHAVE_CONFIG_H
22949
22950 # Without the "./", some shells look in PATH for config.status.
22951 : ${CONFIG_STATUS=./config.status}
22952
22953 echo creating $CONFIG_STATUS
22954 rm -f $CONFIG_STATUS
22955 cat > $CONFIG_STATUS <<EOF
22956 #! /bin/sh
22957 # Generated automatically by configure.
22958 # Run this file to recreate the current configuration.
22959 # This directory was configured as follows,
22960 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
22961 #
22962 # $0 $ac_configure_args
22963 #
22964 # Compiler output produced by configure, useful for debugging
22965 # configure, is in ./config.log if it exists.
22966
22967 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
22968 for ac_option
22969 do
22970   case "\$ac_option" in
22971   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22972     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
22973     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
22974   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
22975     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
22976     exit 0 ;;
22977   -help | --help | --hel | --he | --h)
22978     echo "\$ac_cs_usage"; exit 0 ;;
22979   *) echo "\$ac_cs_usage"; exit 1 ;;
22980   esac
22981 done
22982
22983 ac_given_srcdir=$srcdir
22984 ac_given_INSTALL="$INSTALL"
22985
22986 trap 'rm -fr `echo "\
22987 Makefile:build/top.mk:Makefile.in:build/dir.mk \
22988 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
22989 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
22990 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
22991 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
22992 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
22993 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
22994 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
22995 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
22996 include/Makefile:build/top.mk:include/Makefile.in \
22997 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
22998 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
22999 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23000 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23001 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23002 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
23003 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
23004 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23005 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23006 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23007 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23008 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23009 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23010 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23011 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23012 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23013 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23014 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23015 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23016 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23017 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23018 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23019 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23020 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23021 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
23022 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23023 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23024 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23025  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
23026 EOF
23027 cat >> $CONFIG_STATUS <<EOF
23028
23029 # Protect against being on the right side of a sed subst in config.status.
23030 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
23031  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
23032 $ac_vpsub
23033 $extrasub
23034 s%@SHELL@%$SHELL%g
23035 s%@CFLAGS@%$CFLAGS%g
23036 s%@CPPFLAGS@%$CPPFLAGS%g
23037 s%@CXXFLAGS@%$CXXFLAGS%g
23038 s%@FFLAGS@%$FFLAGS%g
23039 s%@DEFS@%$DEFS%g
23040 s%@LDFLAGS@%$LDFLAGS%g
23041 s%@LIBS@%$LIBS%g
23042 s%@exec_prefix@%$exec_prefix%g
23043 s%@prefix@%$prefix%g
23044 s%@program_transform_name@%$program_transform_name%g
23045 s%@bindir@%$bindir%g
23046 s%@sbindir@%$sbindir%g
23047 s%@libexecdir@%$libexecdir%g
23048 s%@datadir@%$datadir%g
23049 s%@sysconfdir@%$sysconfdir%g
23050 s%@sharedstatedir@%$sharedstatedir%g
23051 s%@localstatedir@%$localstatedir%g
23052 s%@libdir@%$libdir%g
23053 s%@includedir@%$includedir%g
23054 s%@oldincludedir@%$oldincludedir%g
23055 s%@infodir@%$infodir%g
23056 s%@mandir@%$mandir%g
23057 s%@host@%$host%g
23058 s%@host_alias@%$host_alias%g
23059 s%@host_cpu@%$host_cpu%g
23060 s%@host_vendor@%$host_vendor%g
23061 s%@host_os@%$host_os%g
23062 s%@target@%$target%g
23063 s%@target_alias@%$target_alias%g
23064 s%@target_cpu@%$target_cpu%g
23065 s%@target_vendor@%$target_vendor%g
23066 s%@target_os@%$target_os%g
23067 s%@build@%$build%g
23068 s%@build_alias@%$build_alias%g
23069 s%@build_cpu@%$build_cpu%g
23070 s%@build_vendor@%$build_vendor%g
23071 s%@build_os@%$build_os%g
23072 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
23073 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
23074 s%@INSTALL_DATA@%$INSTALL_DATA%g
23075 s%@PACKAGE@%$PACKAGE%g
23076 s%@VERSION@%$VERSION%g
23077 s%@ACLOCAL@%$ACLOCAL%g
23078 s%@AUTOCONF@%$AUTOCONF%g
23079 s%@AUTOMAKE@%$AUTOMAKE%g
23080 s%@AUTOHEADER@%$AUTOHEADER%g
23081 s%@MAKEINFO@%$MAKEINFO%g
23082 s%@install_sh@%$install_sh%g
23083 s%@AMTAR@%$AMTAR%g
23084 s%@AWK@%$AWK%g
23085 s%@AMTARFLAGS@%$AMTARFLAGS%g
23086 s%@SET_MAKE@%$SET_MAKE%g
23087 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
23088 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
23089 s%@top_builddir@%$top_builddir%g
23090 s%@ldap_subdir@%$ldap_subdir%g
23091 s%@CC@%$CC%g
23092 s%@AR@%$AR%g
23093 s%@LN_S@%$LN_S%g
23094 s%@OBJEXT@%$OBJEXT%g
23095 s%@EXEEXT@%$EXEEXT%g
23096 s%@ECHO@%$ECHO%g
23097 s%@RANLIB@%$RANLIB%g
23098 s%@STRIP@%$STRIP%g
23099 s%@DLLTOOL@%$DLLTOOL%g
23100 s%@AS@%$AS%g
23101 s%@OBJDUMP@%$OBJDUMP%g
23102 s%@CPP@%$CPP%g
23103 s%@LIBTOOL@%$LIBTOOL%g
23104 s%@LN_H@%$LN_H%g
23105 s%@SENDMAIL@%$SENDMAIL%g
23106 s%@EDITOR@%$EDITOR%g
23107 s%@PERLBIN@%$PERLBIN%g
23108 s%@OL_MKDEP@%$OL_MKDEP%g
23109 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
23110 s%@LIBOBJS@%$LIBOBJS%g
23111 s%@LIBSRCS@%$LIBSRCS%g
23112 s%@PLAT@%$PLAT%g
23113 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
23114 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
23115 s%@BUILD_BDB@%$BUILD_BDB%g
23116 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
23117 s%@BUILD_LDAP@%$BUILD_LDAP%g
23118 s%@BUILD_LDBM@%$BUILD_LDBM%g
23119 s%@BUILD_META@%$BUILD_META%g
23120 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
23121 s%@BUILD_NULL@%$BUILD_NULL%g
23122 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
23123 s%@BUILD_PERL@%$BUILD_PERL%g
23124 s%@BUILD_SHELL@%$BUILD_SHELL%g
23125 s%@BUILD_SQL@%$BUILD_SQL%g
23126 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
23127 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
23128 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
23129 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
23130 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
23131 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
23132 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
23133 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
23134 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
23135 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
23136 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
23137 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
23138 s%@LDBM_LIB@%$LDBM_LIB%g
23139 s%@LDAP_LIBS@%$LDAP_LIBS%g
23140 s%@LDIF_LIBS@%$LDIF_LIBS%g
23141 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
23142 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
23143 s%@LDBM_LIBS@%$LDBM_LIBS%g
23144 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
23145 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
23146 s%@WRAP_LIBS@%$WRAP_LIBS%g
23147 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
23148 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
23149 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
23150 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
23151 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
23152 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
23153 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
23154 s%@KRB4_LIBS@%$KRB4_LIBS%g
23155 s%@KRB5_LIBS@%$KRB5_LIBS%g
23156 s%@READLINE_LIBS@%$READLINE_LIBS%g
23157 s%@SASL_LIBS@%$SASL_LIBS%g
23158 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
23159 s%@TLS_LIBS@%$TLS_LIBS%g
23160 s%@MODULES_LIBS@%$MODULES_LIBS%g
23161 s%@AUTH_LIBS@%$AUTH_LIBS%g
23162 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
23163 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
23164 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
23165 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
23166
23167 CEOF
23168 EOF
23169
23170 cat >> $CONFIG_STATUS <<\EOF
23171
23172 # Split the substitutions into bite-sized pieces for seds with
23173 # small command number limits, like on Digital OSF/1 and HP-UX.
23174 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
23175 ac_file=1 # Number of current file.
23176 ac_beg=1 # First line for current file.
23177 ac_end=$ac_max_sed_cmds # Line after last line for current file.
23178 ac_more_lines=:
23179 ac_sed_cmds=""
23180 while $ac_more_lines; do
23181   if test $ac_beg -gt 1; then
23182     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
23183   else
23184     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
23185   fi
23186   if test ! -s conftest.s$ac_file; then
23187     ac_more_lines=false
23188     rm -f conftest.s$ac_file
23189   else
23190     if test -z "$ac_sed_cmds"; then
23191       ac_sed_cmds="sed -f conftest.s$ac_file"
23192     else
23193       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
23194     fi
23195     ac_file=`expr $ac_file + 1`
23196     ac_beg=$ac_end
23197     ac_end=`expr $ac_end + $ac_max_sed_cmds`
23198   fi
23199 done
23200 if test -z "$ac_sed_cmds"; then
23201   ac_sed_cmds=cat
23202 fi
23203 EOF
23204
23205 cat >> $CONFIG_STATUS <<EOF
23206
23207 CONFIG_FILES=\${CONFIG_FILES-"\
23208 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23209 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23210 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23211 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23212 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23213 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23214 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23215 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23216 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23217 include/Makefile:build/top.mk:include/Makefile.in \
23218 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23219 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
23220 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23221 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23222 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23223 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
23224 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
23225 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23226 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23227 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23228 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23229 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23230 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23231 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23232 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23233 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23234 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23235 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23236 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23237 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23238 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23239 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23240 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23241 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23242 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
23243 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23244 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23245 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23246 "}
23247 EOF
23248 cat >> $CONFIG_STATUS <<\EOF
23249 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
23250   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23251   case "$ac_file" in
23252   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23253        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23254   *) ac_file_in="${ac_file}.in" ;;
23255   esac
23256
23257   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
23258
23259   # Remove last slash and all that follows it.  Not all systems have dirname.
23260   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23261   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23262     # The file is in a subdirectory.
23263     test ! -d "$ac_dir" && mkdir "$ac_dir"
23264     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
23265     # A "../" for each directory in $ac_dir_suffix.
23266     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
23267   else
23268     ac_dir_suffix= ac_dots=
23269   fi
23270
23271   case "$ac_given_srcdir" in
23272   .)  srcdir=.
23273       if test -z "$ac_dots"; then top_srcdir=.
23274       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
23275   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
23276   *) # Relative path.
23277     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
23278     top_srcdir="$ac_dots$ac_given_srcdir" ;;
23279   esac
23280
23281   case "$ac_given_INSTALL" in
23282   [/$]*) INSTALL="$ac_given_INSTALL" ;;
23283   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
23284   esac
23285
23286   echo creating "$ac_file"
23287   rm -f "$ac_file"
23288   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
23289   case "$ac_file" in
23290   *[Mm]akefile*) ac_comsub="1i\\
23291 # $configure_input" ;;
23292   *) ac_comsub= ;;
23293   esac
23294
23295   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23296   sed -e "$ac_comsub
23297 s%@configure_input@%$configure_input%g
23298 s%@srcdir@%$srcdir%g
23299 s%@top_srcdir@%$top_srcdir%g
23300 s%@INSTALL@%$INSTALL%g
23301 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
23302 fi; done
23303 rm -f conftest.s*
23304
23305 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23306 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23307 #
23308 # ac_d sets the value in "#define NAME VALUE" lines.
23309 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23310 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
23311 ac_dC='\3'
23312 ac_dD='%g'
23313 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23314 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23315 ac_uB='\([      ]\)%\1#\2define\3'
23316 ac_uC=' '
23317 ac_uD='\4%g'
23318 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23319 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23320 ac_eB='$%\1#\2define\3'
23321 ac_eC=' '
23322 ac_eD='%g'
23323
23324 if test "${CONFIG_HEADERS+set}" != set; then
23325 EOF
23326 cat >> $CONFIG_STATUS <<EOF
23327   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
23328 EOF
23329 cat >> $CONFIG_STATUS <<\EOF
23330 fi
23331 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
23332   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23333   case "$ac_file" in
23334   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23335        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23336   *) ac_file_in="${ac_file}.in" ;;
23337   esac
23338
23339   echo creating $ac_file
23340
23341   rm -f conftest.frag conftest.in conftest.out
23342   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23343   cat $ac_file_inputs > conftest.in
23344
23345 EOF
23346
23347 # Transform confdefs.h into a sed script conftest.vals that substitutes
23348 # the proper values into config.h.in to produce config.h.  And first:
23349 # Protect against being on the right side of a sed subst in config.status.
23350 # Protect against being in an unquoted here document in config.status.
23351 rm -f conftest.vals
23352 cat > conftest.hdr <<\EOF
23353 s/[\\&%]/\\&/g
23354 s%[\\$`]%\\&%g
23355 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
23356 s%ac_d%ac_u%gp
23357 s%ac_u%ac_e%gp
23358 EOF
23359 sed -n -f conftest.hdr confdefs.h > conftest.vals
23360 rm -f conftest.hdr
23361
23362 # This sed command replaces #undef with comments.  This is necessary, for
23363 # example, in the case of _POSIX_SOURCE, which is predefined and required
23364 # on some systems where configure will not decide to define it.
23365 cat >> conftest.vals <<\EOF
23366 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
23367 EOF
23368
23369 # Break up conftest.vals because some shells have a limit on
23370 # the size of here documents, and old seds have small limits too.
23371
23372 rm -f conftest.tail
23373 while :
23374 do
23375   ac_lines=`grep -c . conftest.vals`
23376   # grep -c gives empty output for an empty file on some AIX systems.
23377   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
23378   # Write a limited-size here document to conftest.frag.
23379   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
23380   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
23381   echo 'CEOF
23382   sed -f conftest.frag conftest.in > conftest.out
23383   rm -f conftest.in
23384   mv conftest.out conftest.in
23385 ' >> $CONFIG_STATUS
23386   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23387   rm -f conftest.vals
23388   mv conftest.tail conftest.vals
23389 done
23390 rm -f conftest.vals
23391
23392 cat >> $CONFIG_STATUS <<\EOF
23393   rm -f conftest.frag conftest.h
23394   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
23395   cat conftest.in >> conftest.h
23396   rm -f conftest.in
23397   if cmp -s $ac_file conftest.h 2>/dev/null; then
23398     echo "$ac_file is unchanged"
23399     rm -f conftest.h
23400   else
23401     # Remove last slash and all that follows it.  Not all systems have dirname.
23402       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23403       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23404       # The file is in a subdirectory.
23405       test ! -d "$ac_dir" && mkdir "$ac_dir"
23406     fi
23407     rm -f $ac_file
23408     mv conftest.h $ac_file
23409   fi
23410 fi; done
23411
23412 EOF
23413 cat >> $CONFIG_STATUS <<EOF
23414
23415 EOF
23416 cat >> $CONFIG_STATUS <<\EOF
23417
23418 date > stamp-h
23419 echo Please run \"make depend\" to build dependencies
23420
23421 exit 0
23422 EOF
23423 chmod +x $CONFIG_STATUS
23424 rm -fr confdefs* $ac_clean_files
23425 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
23426