]> git.sur5r.net Git - openldap/blob - configure
Fix lastmod bugs
[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
137 SLURPD (Replication Daemon) Options:"
138 ac_help="$ac_help
139   --enable-slurpd         enable building slurpd [auto]"
140 ac_help="$ac_help
141
142 Library Generation & Linking Options"
143 ac_help="$ac_help
144   --enable-static[=PKGS]  build static libraries [default=yes]"
145 ac_help="$ac_help
146   --enable-shared[=PKGS]  build shared libraries [default=yes]"
147 ac_help="$ac_help
148   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
149 ac_help="$ac_help
150   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
151
152 # Find the correct PATH separator.  Usually this is `:', but
153 # DJGPP uses `;' like DOS.
154 if test "X${PATH_SEPARATOR+set}" != Xset; then
155   UNAME=${UNAME-`uname 2>/dev/null`}
156   case X$UNAME in
157     *-DOS) lt_cv_sys_path_separator=';' ;;
158     *)     lt_cv_sys_path_separator=':' ;;
159   esac
160   PATH_SEPARATOR=$lt_cv_sys_path_separator
161 fi
162
163
164 # Check that we are running under the correct shell.
165 SHELL=${CONFIG_SHELL-/bin/sh}
166
167 case X$ECHO in
168 X*--fallback-echo)
169   # Remove one level of quotation (which was required for Make).
170   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
171   ;;
172 esac
173
174 echo=${ECHO-echo}
175 if test "X$1" = X--no-reexec; then
176   # Discard the --no-reexec flag, and continue.
177   shift
178 elif test "X$1" = X--fallback-echo; then
179   # Avoid inline document here, it may be left over
180   :
181 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
182   # Yippee, $echo works!
183   :
184 else
185   # Restart under the correct shell.
186   exec $SHELL "$0" --no-reexec ${1+"$@"}
187 fi
188
189 if test "X$1" = X--fallback-echo; then
190   # used as fallback echo
191   shift
192   cat <<EOF
193
194 EOF
195   exit 0
196 fi
197
198 # The HP-UX ksh and POSIX shell print the target directory to stdout
199 # if CDPATH is set.
200 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
201
202 if test -z "$ECHO"; then
203 if test "X${echo_test_string+set}" != Xset; then
204 # find a string as large as possible, as long as the shell can cope with it
205   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
206     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
207     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
208        echo_test_string="`eval $cmd`" &&
209        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
210     then
211       break
212     fi
213   done
214 fi
215
216 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
217    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
218    test "X$echo_testing_string" = "X$echo_test_string"; then
219   :
220 else
221   # The Solaris, AIX, and Digital Unix default echo programs unquote
222   # backslashes.  This makes it impossible to quote backslashes using
223   #   echo "$something" | sed 's/\\/\\\\/g'
224   #
225   # So, first we look for a working echo in the user's PATH.
226
227   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
228   for dir in $PATH /usr/ucb; do
229     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
230        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
231        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
232        test "X$echo_testing_string" = "X$echo_test_string"; then
233       echo="$dir/echo"
234       break
235     fi
236   done
237   IFS="$save_ifs"
238
239   if test "X$echo" = Xecho; then
240     # We didn't find a better echo, so look for alternatives.
241     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
242        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
243        test "X$echo_testing_string" = "X$echo_test_string"; then
244       # This shell has a builtin print -r that does the trick.
245       echo='print -r'
246     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
247          test "X$CONFIG_SHELL" != X/bin/ksh; then
248       # If we have ksh, try running configure again with it.
249       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
250       export ORIGINAL_CONFIG_SHELL
251       CONFIG_SHELL=/bin/ksh
252       export CONFIG_SHELL
253       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
254     else
255       # Try using printf.
256       echo='printf %s\n'
257       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
258          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
259          test "X$echo_testing_string" = "X$echo_test_string"; then
260         # Cool, printf works
261         :
262       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
263            test "X$echo_testing_string" = 'X\t' &&
264            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
265            test "X$echo_testing_string" = "X$echo_test_string"; then
266         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
267         export CONFIG_SHELL
268         SHELL="$CONFIG_SHELL"
269         export SHELL
270         echo="$CONFIG_SHELL $0 --fallback-echo"
271       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
272            test "X$echo_testing_string" = 'X\t' &&
273            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
274            test "X$echo_testing_string" = "X$echo_test_string"; then
275         echo="$CONFIG_SHELL $0 --fallback-echo"
276       else
277         # maybe with a smaller string...
278         prev=:
279
280         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
281           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
282           then
283             break
284           fi
285           prev="$cmd"
286         done
287
288         if test "$prev" != 'sed 50q "$0"'; then
289           echo_test_string=`eval $prev`
290           export echo_test_string
291           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
292         else
293           # Oops.  We lost completely, so just stick with echo.
294           echo=echo
295         fi
296       fi
297     fi
298   fi
299 fi
300 fi
301
302 # Copy echo and quote the copy suitably for passing to libtool from
303 # the Makefile, instead of quoting the original, which is used later.
304 ECHO=$echo
305 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
306    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
307 fi
308
309
310 ac_help="$ac_help
311   --disable-libtool-lock  avoid locking (might break parallel builds)"
312 ac_help="$ac_help
313   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
314 ac_help="$ac_help
315
316 See INSTALL file for further details."
317
318 # Initialize some variables set by options.
319 # The variables have the same names as the options, with
320 # dashes changed to underlines.
321 build=NONE
322 cache_file=./config.cache
323 exec_prefix=NONE
324 host=NONE
325 no_create=
326 nonopt=NONE
327 no_recursion=
328 prefix=NONE
329 program_prefix=NONE
330 program_suffix=NONE
331 program_transform_name=s,x,x,
332 silent=
333 site=
334 srcdir=
335 target=NONE
336 verbose=
337 x_includes=NONE
338 x_libraries=NONE
339 bindir='${exec_prefix}/bin'
340 sbindir='${exec_prefix}/sbin'
341 libexecdir='${exec_prefix}/libexec'
342 datadir='${prefix}/share'
343 sysconfdir='${prefix}/etc'
344 sharedstatedir='${prefix}/com'
345 localstatedir='${prefix}/var'
346 libdir='${exec_prefix}/lib'
347 includedir='${prefix}/include'
348 oldincludedir='/usr/include'
349 infodir='${prefix}/info'
350 mandir='${prefix}/man'
351
352 # Initialize some other variables.
353 subdirs=
354 MFLAGS= MAKEFLAGS=
355 SHELL=${CONFIG_SHELL-/bin/sh}
356 # Maximum number of lines to put in a shell here document.
357 ac_max_here_lines=12
358
359 ac_prev=
360 for ac_option
361 do
362
363   # If the previous option needs an argument, assign it.
364   if test -n "$ac_prev"; then
365     eval "$ac_prev=\$ac_option"
366     ac_prev=
367     continue
368   fi
369
370   case "$ac_option" in
371   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
372   *) ac_optarg= ;;
373   esac
374
375   # Accept the important Cygnus configure options, so we can diagnose typos.
376
377   case "$ac_option" in
378
379   -bindir | --bindir | --bindi | --bind | --bin | --bi)
380     ac_prev=bindir ;;
381   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
382     bindir="$ac_optarg" ;;
383
384   -build | --build | --buil | --bui | --bu)
385     ac_prev=build ;;
386   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
387     build="$ac_optarg" ;;
388
389   -cache-file | --cache-file | --cache-fil | --cache-fi \
390   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
391     ac_prev=cache_file ;;
392   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
393   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
394     cache_file="$ac_optarg" ;;
395
396   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
397     ac_prev=datadir ;;
398   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
399   | --da=*)
400     datadir="$ac_optarg" ;;
401
402   -disable-* | --disable-*)
403     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
404     # Reject names that are not valid shell variable names.
405     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
406       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
407     fi
408     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
409     eval "enable_${ac_feature}=no" ;;
410
411   -enable-* | --enable-*)
412     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
413     # Reject names that are not valid shell variable names.
414     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
415       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
416     fi
417     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
418     case "$ac_option" in
419       *=*) ;;
420       *) ac_optarg=yes ;;
421     esac
422     eval "enable_${ac_feature}='$ac_optarg'" ;;
423
424   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
425   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
426   | --exec | --exe | --ex)
427     ac_prev=exec_prefix ;;
428   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
429   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
430   | --exec=* | --exe=* | --ex=*)
431     exec_prefix="$ac_optarg" ;;
432
433   -gas | --gas | --ga | --g)
434     # Obsolete; use --with-gas.
435     with_gas=yes ;;
436
437   -help | --help | --hel | --he)
438     # Omit some internal or obsolete options to make the list less imposing.
439     # This message is too long to be a string in the A/UX 3.1 sh.
440     cat << EOF
441 Usage: configure [options] [host]
442 Options: [defaults in brackets after descriptions]
443 Configuration:
444   --cache-file=FILE       cache test results in FILE
445   --help                  print this message
446   --no-create             do not create output files
447   --quiet, --silent       do not print \`checking...' messages
448   --version               print the version of autoconf that created configure
449 Directory and file names:
450   --prefix=PREFIX         install architecture-independent files in PREFIX
451                           [$ac_default_prefix]
452   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
453                           [same as prefix]
454   --bindir=DIR            user executables in DIR [EPREFIX/bin]
455   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
456   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
457   --datadir=DIR           read-only architecture-independent data in DIR
458                           [PREFIX/share]
459   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
460   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
461                           [PREFIX/com]
462   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
463   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
464   --includedir=DIR        C header files in DIR [PREFIX/include]
465   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
466   --infodir=DIR           info documentation in DIR [PREFIX/info]
467   --mandir=DIR            man documentation in DIR [PREFIX/man]
468   --srcdir=DIR            find the sources in DIR [configure dir or ..]
469   --program-prefix=PREFIX prepend PREFIX to installed program names
470   --program-suffix=SUFFIX append SUFFIX to installed program names
471   --program-transform-name=PROGRAM
472                           run sed PROGRAM on installed program names
473 EOF
474     cat << EOF
475 Host type:
476   --build=BUILD           configure for building on BUILD [BUILD=HOST]
477   --host=HOST             configure for HOST [guessed]
478   --target=TARGET         configure for TARGET [TARGET=HOST]
479 Features and packages:
480   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
481   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
482   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
483   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
484   --x-includes=DIR        X include files are in DIR
485   --x-libraries=DIR       X library files are in DIR
486 EOF
487     if test -n "$ac_help"; then
488       echo "--enable and --with options recognized:$ac_help"
489     fi
490     exit 0 ;;
491
492   -host | --host | --hos | --ho)
493     ac_prev=host ;;
494   -host=* | --host=* | --hos=* | --ho=*)
495     host="$ac_optarg" ;;
496
497   -includedir | --includedir | --includedi | --included | --include \
498   | --includ | --inclu | --incl | --inc)
499     ac_prev=includedir ;;
500   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
501   | --includ=* | --inclu=* | --incl=* | --inc=*)
502     includedir="$ac_optarg" ;;
503
504   -infodir | --infodir | --infodi | --infod | --info | --inf)
505     ac_prev=infodir ;;
506   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
507     infodir="$ac_optarg" ;;
508
509   -libdir | --libdir | --libdi | --libd)
510     ac_prev=libdir ;;
511   -libdir=* | --libdir=* | --libdi=* | --libd=*)
512     libdir="$ac_optarg" ;;
513
514   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
515   | --libexe | --libex | --libe)
516     ac_prev=libexecdir ;;
517   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
518   | --libexe=* | --libex=* | --libe=*)
519     libexecdir="$ac_optarg" ;;
520
521   -localstatedir | --localstatedir | --localstatedi | --localstated \
522   | --localstate | --localstat | --localsta | --localst \
523   | --locals | --local | --loca | --loc | --lo)
524     ac_prev=localstatedir ;;
525   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
526   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
527   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
528     localstatedir="$ac_optarg" ;;
529
530   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
531     ac_prev=mandir ;;
532   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
533     mandir="$ac_optarg" ;;
534
535   -nfp | --nfp | --nf)
536     # Obsolete; use --without-fp.
537     with_fp=no ;;
538
539   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
540   | --no-cr | --no-c)
541     no_create=yes ;;
542
543   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
544   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
545     no_recursion=yes ;;
546
547   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
548   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
549   | --oldin | --oldi | --old | --ol | --o)
550     ac_prev=oldincludedir ;;
551   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
552   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
553   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
554     oldincludedir="$ac_optarg" ;;
555
556   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
557     ac_prev=prefix ;;
558   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
559     prefix="$ac_optarg" ;;
560
561   -program-prefix | --program-prefix | --program-prefi | --program-pref \
562   | --program-pre | --program-pr | --program-p)
563     ac_prev=program_prefix ;;
564   -program-prefix=* | --program-prefix=* | --program-prefi=* \
565   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
566     program_prefix="$ac_optarg" ;;
567
568   -program-suffix | --program-suffix | --program-suffi | --program-suff \
569   | --program-suf | --program-su | --program-s)
570     ac_prev=program_suffix ;;
571   -program-suffix=* | --program-suffix=* | --program-suffi=* \
572   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
573     program_suffix="$ac_optarg" ;;
574
575   -program-transform-name | --program-transform-name \
576   | --program-transform-nam | --program-transform-na \
577   | --program-transform-n | --program-transform- \
578   | --program-transform | --program-transfor \
579   | --program-transfo | --program-transf \
580   | --program-trans | --program-tran \
581   | --progr-tra | --program-tr | --program-t)
582     ac_prev=program_transform_name ;;
583   -program-transform-name=* | --program-transform-name=* \
584   | --program-transform-nam=* | --program-transform-na=* \
585   | --program-transform-n=* | --program-transform-=* \
586   | --program-transform=* | --program-transfor=* \
587   | --program-transfo=* | --program-transf=* \
588   | --program-trans=* | --program-tran=* \
589   | --progr-tra=* | --program-tr=* | --program-t=*)
590     program_transform_name="$ac_optarg" ;;
591
592   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
593   | -silent | --silent | --silen | --sile | --sil)
594     silent=yes ;;
595
596   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
597     ac_prev=sbindir ;;
598   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
599   | --sbi=* | --sb=*)
600     sbindir="$ac_optarg" ;;
601
602   -sharedstatedir | --sharedstatedir | --sharedstatedi \
603   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
604   | --sharedst | --shareds | --shared | --share | --shar \
605   | --sha | --sh)
606     ac_prev=sharedstatedir ;;
607   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
608   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
609   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
610   | --sha=* | --sh=*)
611     sharedstatedir="$ac_optarg" ;;
612
613   -site | --site | --sit)
614     ac_prev=site ;;
615   -site=* | --site=* | --sit=*)
616     site="$ac_optarg" ;;
617
618   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
619     ac_prev=srcdir ;;
620   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
621     srcdir="$ac_optarg" ;;
622
623   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
624   | --syscon | --sysco | --sysc | --sys | --sy)
625     ac_prev=sysconfdir ;;
626   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
627   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
628     sysconfdir="$ac_optarg" ;;
629
630   -target | --target | --targe | --targ | --tar | --ta | --t)
631     ac_prev=target ;;
632   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
633     target="$ac_optarg" ;;
634
635   -v | -verbose | --verbose | --verbos | --verbo | --verb)
636     verbose=yes ;;
637
638   -version | --version | --versio | --versi | --vers)
639     echo "configure generated by autoconf version 2.13.1"
640     exit 0 ;;
641
642   -with-* | --with-*)
643     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
644     # Reject names that are not valid shell variable names.
645     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
646       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
647     fi
648     ac_package=`echo $ac_package| sed 's/-/_/g'`
649     case "$ac_option" in
650       *=*) ;;
651       *) ac_optarg=yes ;;
652     esac
653     eval "with_${ac_package}='$ac_optarg'" ;;
654
655   -without-* | --without-*)
656     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
657     # Reject names that are not valid shell variable names.
658     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
659       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
660     fi
661     ac_package=`echo $ac_package| sed 's/-/_/g'`
662     eval "with_${ac_package}=no" ;;
663
664   --x)
665     # Obsolete; use --with-x.
666     with_x=yes ;;
667
668   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
669   | --x-incl | --x-inc | --x-in | --x-i)
670     ac_prev=x_includes ;;
671   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
672   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
673     x_includes="$ac_optarg" ;;
674
675   -x-libraries | --x-libraries | --x-librarie | --x-librari \
676   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
677     ac_prev=x_libraries ;;
678   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
679   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
680     x_libraries="$ac_optarg" ;;
681
682   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
683     ;;
684
685   *)
686     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
687       echo "configure: warning: $ac_option: invalid host type" 1>&2
688     fi
689     if test "x$nonopt" != xNONE; then
690       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
691     fi
692     nonopt="$ac_option"
693     ;;
694
695   esac
696 done
697
698 if test -n "$ac_prev"; then
699   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
700 fi
701
702 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
703
704 # File descriptor usage:
705 # 0 standard input
706 # 1 file creation
707 # 2 errors and warnings
708 # 3 some systems may open it to /dev/tty
709 # 4 used on the Kubota Titan
710 # 6 checking for... messages and results
711 # 5 compiler messages saved in config.log
712 if test "$silent" = yes; then
713   exec 6>/dev/null
714 else
715   exec 6>&1
716 fi
717 exec 5>./config.log
718
719 echo "\
720 This file contains any messages produced by compilers while
721 running configure, to aid debugging if configure makes a mistake.
722 " 1>&5
723
724 # Strip out --no-create and --no-recursion so they do not pile up.
725 # Also quote any args containing shell metacharacters.
726 ac_configure_args=
727 for ac_arg
728 do
729   case "$ac_arg" in
730   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
731   | --no-cr | --no-c) ;;
732   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
733   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
734   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
735   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
736   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
737   esac
738 done
739
740 # NLS nuisances.
741 # Only set these to C if already set.  These must not be set unconditionally
742 # because not all systems understand e.g. LANG=C (notably SCO).
743 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
744 # Non-C LC_CTYPE values break the ctype check.
745 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
746 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
747 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
748 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
749
750 # confdefs.h avoids OS command line length limits that DEFS can exceed.
751 rm -rf conftest* confdefs.h
752 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
753 echo > confdefs.h
754
755 # A filename unique to this package, relative to the directory that
756 # configure is in, which we can look for to find out if srcdir is correct.
757 ac_unique_file=build/version.sh
758
759 # Find the source files, if location was not specified.
760 if test -z "$srcdir"; then
761   ac_srcdir_defaulted=yes
762   # Try the directory containing this script, then its parent.
763   ac_prog=$0
764   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
765   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
766   srcdir=$ac_confdir
767   if test ! -r $srcdir/$ac_unique_file; then
768     srcdir=..
769   fi
770 else
771   ac_srcdir_defaulted=no
772 fi
773 if test ! -r $srcdir/$ac_unique_file; then
774   if test "$ac_srcdir_defaulted" = yes; then
775     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
776   else
777     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
778   fi
779 fi
780 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
781
782 # Prefer explicitly selected file to automatically selected ones.
783 if test -z "$CONFIG_SITE"; then
784   if test "x$prefix" != xNONE; then
785     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
786   else
787     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
788   fi
789 fi
790 for ac_site_file in $CONFIG_SITE; do
791   if test -r "$ac_site_file"; then
792     echo "loading site script $ac_site_file"
793     . "$ac_site_file"
794   fi
795 done
796
797
798 ac_ext=c
799 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
800 ac_cpp='$CPP $CPPFLAGS'
801 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
802 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
803 cross_compiling=$ac_cv_prog_cc_cross
804
805 ac_exeext=
806 ac_objext=o
807 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
808   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
809   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
810     ac_n= ac_c='
811 ' ac_t='        '
812   else
813     ac_n=-n ac_c= ac_t=
814   fi
815 else
816   ac_n= ac_c='\c' ac_t=
817 fi
818
819
820 # set unset (borrowed from autoconf 2.49c)
821 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
822   ol_unset=unset
823 else
824   ol_unset=false
825 fi
826 # unset CDPATH
827 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
828
829 ac_aux_dir=
830 for ac_dir in build $srcdir/build; do
831   if test -f $ac_dir/install-sh; then
832     ac_aux_dir=$ac_dir
833     ac_install_sh="$ac_aux_dir/install-sh -c"
834     break
835   elif 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/shtool; then
840     ac_aux_dir=$ac_dir
841     ac_install_sh="$ac_aux_dir/shtool install -c"
842     break
843   fi
844 done
845 if test -z "$ac_aux_dir"; then
846   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
847 fi
848 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
849 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
850 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
851
852 eval `$ac_aux_dir/version.sh`
853 if test -z "$OL_STRING"; then
854         { echo "configure: error: could not determine version" 1>&2; exit 1; }
855 fi
856
857 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
858         ac_cv_shtool="$ac_aux_dir/shtool"
859 else
860         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
861 fi
862
863 SHTOOL="$ac_cv_shtool"
864
865 TB=`$SHTOOL echo -e %B`
866 TN=`$SHTOOL echo -e %b`
867
868 echo "Configuring $TB$OL_STRING$TN ..."
869
870
871 echo $ac_n "checking host system type""... $ac_c" 1>&6
872 echo "configure:873: checking host system type" >&5
873 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
874
875 # Make sure we can run config.sub.
876   if $ac_config_sub sun4 >/dev/null 2>&1; then :
877     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
878   fi
879
880   ac_cv_host_alias=$host
881   case "$ac_cv_host_alias" in
882   NONE)
883     case $nonopt in
884     NONE)
885       if ac_cv_host_alias=`$ac_config_guess`; then :
886       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
887       fi ;;
888     *) ac_cv_host_alias=$nonopt ;;
889     esac ;;
890   esac
891
892   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
893   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
894   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
895   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
896 else
897   echo $ac_n "(cached) $ac_c" 1>&6
898 fi
899
900 echo "$ac_t""$ac_cv_host" 1>&6
901
902 host=$ac_cv_host
903 host_alias=$ac_cv_host_alias
904 host_cpu=$ac_cv_host_cpu
905 host_vendor=$ac_cv_host_vendor
906 host_os=$ac_cv_host_os
907
908
909
910
911
912 echo $ac_n "checking target system type""... $ac_c" 1>&6
913 echo "configure:914: checking target system type" >&5
914 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
915
916 # Make sure we can run config.sub.
917   if $ac_config_sub sun4 >/dev/null 2>&1; then :
918     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
919   fi
920
921   ac_cv_target_alias=$target
922   case "$ac_cv_target_alias" in
923   NONE)
924     case $nonopt in
925     NONE)
926       ac_cv_target_alias=$host_alias ;;
927
928     *) ac_cv_target_alias=$nonopt ;;
929     esac ;;
930   esac
931
932   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
933   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
934   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
935   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
936 else
937   echo $ac_n "(cached) $ac_c" 1>&6
938 fi
939
940 echo "$ac_t""$ac_cv_target" 1>&6
941
942 target=$ac_cv_target
943 target_alias=$ac_cv_target_alias
944 target_cpu=$ac_cv_target_cpu
945 target_vendor=$ac_cv_target_vendor
946 target_os=$ac_cv_target_os
947
948
949
950
951
952 echo $ac_n "checking build system type""... $ac_c" 1>&6
953 echo "configure:954: checking build system type" >&5
954 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
955
956 # Make sure we can run config.sub.
957   if $ac_config_sub sun4 >/dev/null 2>&1; then :
958     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
959   fi
960
961   ac_cv_build_alias=$build
962   case "$ac_cv_build_alias" in
963   NONE)
964     case $nonopt in
965     NONE)
966       ac_cv_build_alias=$host_alias ;;
967
968     *) ac_cv_build_alias=$nonopt ;;
969     esac ;;
970   esac
971
972   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
973   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
974   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
975   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
976 else
977   echo $ac_n "(cached) $ac_c" 1>&6
978 fi
979
980 echo "$ac_t""$ac_cv_build" 1>&6
981
982 build=$ac_cv_build
983 build_alias=$ac_cv_build_alias
984 build_cpu=$ac_cv_build_cpu
985 build_vendor=$ac_cv_build_vendor
986 build_os=$ac_cv_build_os
987
988
989
990
991
992 # Do some error checking and defaulting for the host and target type.
993 # The inputs are:
994 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
995 #
996 # The rules are:
997 # 1. You are not allowed to specify --host, --target, and nonopt at the
998 #    same time.
999 # 2. Host defaults to nonopt.
1000 # 3. If nonopt is not specified, then host defaults to the current host,
1001 #    as determined by config.guess.
1002 # 4. Target and build default to nonopt.
1003 # 5. If nonopt is not specified, then target and build default to host.
1004
1005 # The aliases save the names the user supplied, while $host etc.
1006 # will get canonicalized.
1007 case $host---$target---$nonopt in
1008 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1009 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1010 esac
1011
1012 test "$host_alias" != "$target_alias" &&
1013   test "$program_prefix$program_suffix$program_transform_name" = \
1014     NONENONEs,x,x, &&
1015   program_prefix=${target_alias}-
1016
1017
1018 # Find a good install program.  We prefer a C program (faster),
1019 # so one script is as good as another.  But avoid the broken or
1020 # incompatible versions:
1021 # SysV /etc/install, /usr/sbin/install
1022 # SunOS /usr/etc/install
1023 # IRIX /sbin/install
1024 # AIX /bin/install
1025 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1026 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1027 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1028 # ./install, which can be erroneously created by make from ./install.sh.
1029 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1030 echo "configure:1031: checking for a BSD compatible install" >&5
1031 if test -z "$INSTALL"; then
1032 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1033   echo $ac_n "(cached) $ac_c" 1>&6
1034 else
1035     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1036   for ac_dir in $PATH; do
1037     # Account for people who put trailing slashes in PATH elements.
1038     case "$ac_dir/" in
1039     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1040     *)
1041       # OSF1 and SCO ODT 3.0 have their own names for install.
1042       # Don't use installbsd from OSF since it installs stuff as root
1043       # by default.
1044       for ac_prog in ginstall scoinst install; do
1045         if test -f $ac_dir/$ac_prog; then
1046           if test $ac_prog = install &&
1047             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1048             # AIX install.  It has an incompatible calling convention.
1049             :
1050           elif test $ac_prog = install &&
1051             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1052             # program-specific install script used by HP pwplus--don't use.
1053             :
1054           else
1055             ac_cv_path_install="$ac_dir/$ac_prog -c"
1056             break 2
1057           fi
1058         fi
1059       done
1060       ;;
1061     esac
1062   done
1063   IFS="$ac_save_IFS"
1064
1065 fi
1066   if test "${ac_cv_path_install+set}" = set; then
1067     INSTALL="$ac_cv_path_install"
1068   else
1069     # As a last resort, use the slow shell script.  We don't cache a
1070     # path for INSTALL within a source directory, because that will
1071     # break other packages using the cache if that directory is
1072     # removed, or if the path is relative.
1073     INSTALL="$ac_install_sh"
1074   fi
1075 fi
1076 echo "$ac_t""$INSTALL" 1>&6
1077
1078 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1079 # It thinks the first close brace ends the variable substitution.
1080 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1081
1082 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1083
1084 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1085
1086 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1087 echo "configure:1088: checking whether build environment is sane" >&5
1088 # Just in case
1089 sleep 1
1090 echo timestamp > conftestfile
1091 # Do `set' in a subshell so we don't clobber the current shell's
1092 # arguments.  Must try -L first in case configure is actually a
1093 # symlink; some systems play weird games with the mod time of symlinks
1094 # (eg FreeBSD returns the mod time of the symlink's containing
1095 # directory).
1096 if (
1097    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1098    if test "$*" = "X"; then
1099       # -L didn't work.
1100       set X `ls -t $srcdir/configure conftestfile`
1101    fi
1102    if test "$*" != "X $srcdir/configure conftestfile" \
1103       && test "$*" != "X conftestfile $srcdir/configure"; then
1104
1105       # If neither matched, then we have a broken ls.  This can happen
1106       # if, for instance, CONFIG_SHELL is bash and it inherits a
1107       # broken ls alias from the environment.  This has actually
1108       # happened.  Such a system could not be considered "sane".
1109       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1110 alias in your environment" 1>&2; exit 1; }
1111    fi
1112
1113    test "$2" = conftestfile
1114    )
1115 then
1116    # Ok.
1117    :
1118 else
1119    { echo "configure: error: newly created file is older than distributed files!
1120 Check your system clock" 1>&2; exit 1; }
1121 fi
1122 rm -f conftest*
1123 echo "$ac_t""yes" 1>&6
1124 if test "$program_transform_name" = s,x,x,; then
1125   program_transform_name=
1126 else
1127   # Double any \ or $.  echo might interpret backslashes.
1128   cat <<\EOF_SED > conftestsed
1129 s,\\,\\\\,g; s,\$,$$,g
1130 EOF_SED
1131   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1132   rm -f conftestsed
1133 fi
1134 test "$program_prefix" != NONE &&
1135   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1136 # Use a double $ so make ignores it.
1137 test "$program_suffix" != NONE &&
1138   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1139
1140 # sed with no file args requires a program.
1141 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1142
1143 for ac_prog in mawk gawk nawk awk
1144 do
1145 # Extract the first word of "$ac_prog", so it can be a program name with args.
1146 set dummy $ac_prog; ac_word=$2
1147 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1148 echo "configure:1149: checking for $ac_word" >&5
1149 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1150   echo $ac_n "(cached) $ac_c" 1>&6
1151 else
1152   if test -n "$AWK"; then
1153   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1154 else
1155   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1156   ac_dummy="$PATH"
1157   for ac_dir in $ac_dummy; do
1158     test -z "$ac_dir" && ac_dir=.
1159     if test -f $ac_dir/$ac_word; then
1160       ac_cv_prog_AWK="$ac_prog"
1161       break
1162     fi
1163   done
1164   IFS="$ac_save_ifs"
1165 fi
1166 fi
1167 AWK="$ac_cv_prog_AWK"
1168 if test -n "$AWK"; then
1169   echo "$ac_t""$AWK" 1>&6
1170 else
1171   echo "$ac_t""no" 1>&6
1172 fi
1173
1174 test -n "$AWK" && break
1175 done
1176
1177 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1178 echo "configure:1179: checking whether ${MAKE-make} sets \${MAKE}" >&5
1179 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1180 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1181   echo $ac_n "(cached) $ac_c" 1>&6
1182 else
1183   cat > conftestmake <<\EOF
1184 all:
1185         @echo 'ac_maketemp="${MAKE}"'
1186 EOF
1187 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1188 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1189 if test -n "$ac_maketemp"; then
1190   eval ac_cv_prog_make_${ac_make}_set=yes
1191 else
1192   eval ac_cv_prog_make_${ac_make}_set=no
1193 fi
1194 rm -f conftestmake
1195 fi
1196 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1197   echo "$ac_t""yes" 1>&6
1198   SET_MAKE=
1199 else
1200   echo "$ac_t""no" 1>&6
1201   SET_MAKE="MAKE=${MAKE-make}"
1202 fi
1203
1204
1205
1206 PACKAGE=$OL_PACKAGE
1207
1208 VERSION=$OL_VERSION
1209
1210 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1211   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1212 fi
1213
1214
1215
1216 missing_dir=`cd $ac_aux_dir && pwd`
1217 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1218 echo "configure:1219: checking for working aclocal" >&5
1219 # Run test in a subshell; some versions of sh will print an error if
1220 # an executable is not found, even if stderr is redirected.
1221 # Redirect stdin to placate older versions of autoconf.  Sigh.
1222 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1223    ACLOCAL=aclocal
1224    echo "$ac_t""found" 1>&6
1225 else
1226    ACLOCAL="$missing_dir/missing aclocal"
1227    echo "$ac_t""missing" 1>&6
1228 fi
1229
1230 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1231 echo "configure:1232: checking for working autoconf" >&5
1232 # Run test in a subshell; some versions of sh will print an error if
1233 # an executable is not found, even if stderr is redirected.
1234 # Redirect stdin to placate older versions of autoconf.  Sigh.
1235 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1236    AUTOCONF=autoconf
1237    echo "$ac_t""found" 1>&6
1238 else
1239    AUTOCONF="$missing_dir/missing autoconf"
1240    echo "$ac_t""missing" 1>&6
1241 fi
1242
1243 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1244 echo "configure:1245: checking for working automake" >&5
1245 # Run test in a subshell; some versions of sh will print an error if
1246 # an executable is not found, even if stderr is redirected.
1247 # Redirect stdin to placate older versions of autoconf.  Sigh.
1248 if (automake --version) < /dev/null > /dev/null 2>&1; then
1249    AUTOMAKE=automake
1250    echo "$ac_t""found" 1>&6
1251 else
1252    AUTOMAKE="$missing_dir/missing automake"
1253    echo "$ac_t""missing" 1>&6
1254 fi
1255
1256 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1257 echo "configure:1258: checking for working autoheader" >&5
1258 # Run test in a subshell; some versions of sh will print an error if
1259 # an executable is not found, even if stderr is redirected.
1260 # Redirect stdin to placate older versions of autoconf.  Sigh.
1261 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1262    AUTOHEADER=autoheader
1263    echo "$ac_t""found" 1>&6
1264 else
1265    AUTOHEADER="$missing_dir/missing autoheader"
1266    echo "$ac_t""missing" 1>&6
1267 fi
1268
1269 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1270 echo "configure:1271: checking for working makeinfo" >&5
1271 # Run test in a subshell; some versions of sh will print an error if
1272 # an executable is not found, even if stderr is redirected.
1273 # Redirect stdin to placate older versions of autoconf.  Sigh.
1274 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1275    MAKEINFO=makeinfo
1276    echo "$ac_t""found" 1>&6
1277 else
1278    MAKEINFO="$missing_dir/missing makeinfo"
1279    echo "$ac_t""missing" 1>&6
1280 fi
1281
1282 install_sh="$missing_dir/install-sh"
1283 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1284
1285 for ac_prog in gnutar gtar tar
1286 do
1287 # Extract the first word of "$ac_prog", so it can be a program name with args.
1288 set dummy $ac_prog; ac_word=$2
1289 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1290 echo "configure:1291: checking for $ac_word" >&5
1291 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1292   echo $ac_n "(cached) $ac_c" 1>&6
1293 else
1294   if test -n "$AMTAR"; then
1295   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1296 else
1297   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1298   ac_dummy="$PATH"
1299   for ac_dir in $ac_dummy; do
1300     test -z "$ac_dir" && ac_dir=.
1301     if test -f $ac_dir/$ac_word; then
1302       ac_cv_prog_AMTAR="$ac_prog"
1303       break
1304     fi
1305   done
1306   IFS="$ac_save_ifs"
1307 fi
1308 fi
1309 AMTAR="$ac_cv_prog_AMTAR"
1310 if test -n "$AMTAR"; then
1311   echo "$ac_t""$AMTAR" 1>&6
1312 else
1313   echo "$ac_t""no" 1>&6
1314 fi
1315
1316 test -n "$AMTAR" && break
1317 done
1318
1319
1320 AMTARFLAGS=
1321 if test -n "$AMTAR"; then
1322   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1323         AMTARFLAGS=o
1324   fi
1325 fi
1326
1327 cat >> confdefs.h <<EOF
1328 #define OPENLDAP_PACKAGE "$PACKAGE"
1329 EOF
1330
1331 cat >> confdefs.h <<EOF
1332 #define OPENLDAP_VERSION "$VERSION"
1333 EOF
1334
1335
1336 cat >> confdefs.h <<EOF
1337 #define LDAP_VENDOR_VERSION $OL_API_INC
1338 EOF
1339
1340 cat >> confdefs.h <<EOF
1341 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1342 EOF
1343
1344 cat >> confdefs.h <<EOF
1345 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1346 EOF
1347
1348 cat >> confdefs.h <<EOF
1349 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1350 EOF
1351
1352
1353 OPENLDAP_LIBVERSION=$OL_API_LIB
1354
1355 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1356
1357
1358
1359 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1360 echo "configure:1361: checking configure arguments" >&5
1361
1362
1363 top_builddir=`pwd`
1364
1365 ldap_subdir="/openldap"
1366
1367 # Check whether --with-subdir or --without-subdir was given.
1368 if test "${with_subdir+set}" = set; then
1369   withval="$with_subdir"
1370   case "$withval" in
1371         no) ldap_subdir=""
1372                 ;;
1373         yes)
1374                 ;;
1375         /*|\\*)
1376                 ldap_subdir="$withval"
1377                 ;;
1378         *)
1379                 ldap_subdir="/$withval"
1380                 ;;
1381 esac
1382
1383 fi
1384
1385
1386 # OpenLDAP --enable-debug
1387         # Check whether --enable-debug or --disable-debug was given.
1388 if test "${enable_debug+set}" = set; then
1389   enableval="$enable_debug"
1390   
1391         ol_arg=invalid
1392         for ol_val in auto yes no ; do
1393                 if test "$enableval" = "$ol_val" ; then
1394                         ol_arg="$ol_val"
1395                 fi
1396         done
1397         if test "$ol_arg" = "invalid" ; then
1398                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1399         fi
1400         ol_enable_debug="$ol_arg"
1401
1402 else
1403         ol_enable_debug="yes"
1404 fi
1405 # end --enable-debug
1406 # OpenLDAP --enable-syslog
1407         # Check whether --enable-syslog or --disable-syslog was given.
1408 if test "${enable_syslog+set}" = set; then
1409   enableval="$enable_syslog"
1410   
1411         ol_arg=invalid
1412         for ol_val in auto yes no ; do
1413                 if test "$enableval" = "$ol_val" ; then
1414                         ol_arg="$ol_val"
1415                 fi
1416         done
1417         if test "$ol_arg" = "invalid" ; then
1418                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1419         fi
1420         ol_enable_syslog="$ol_arg"
1421
1422 else
1423         ol_enable_syslog="auto"
1424 fi
1425 # end --enable-syslog
1426 # OpenLDAP --enable-proctitle
1427         # Check whether --enable-proctitle or --disable-proctitle was given.
1428 if test "${enable_proctitle+set}" = set; then
1429   enableval="$enable_proctitle"
1430   
1431         ol_arg=invalid
1432         for ol_val in auto yes no ; do
1433                 if test "$enableval" = "$ol_val" ; then
1434                         ol_arg="$ol_val"
1435                 fi
1436         done
1437         if test "$ol_arg" = "invalid" ; then
1438                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1439         fi
1440         ol_enable_proctitle="$ol_arg"
1441
1442 else
1443         ol_enable_proctitle="yes"
1444 fi
1445 # end --enable-proctitle
1446 # OpenLDAP --enable-cache
1447         # Check whether --enable-cache or --disable-cache was given.
1448 if test "${enable_cache+set}" = set; then
1449   enableval="$enable_cache"
1450   
1451         ol_arg=invalid
1452         for ol_val in auto yes no ; do
1453                 if test "$enableval" = "$ol_val" ; then
1454                         ol_arg="$ol_val"
1455                 fi
1456         done
1457         if test "$ol_arg" = "invalid" ; then
1458                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1459         fi
1460         ol_enable_cache="$ol_arg"
1461
1462 else
1463         ol_enable_cache="no"
1464 fi
1465 # end --enable-cache
1466 # OpenLDAP --enable-referrals
1467         # Check whether --enable-referrals or --disable-referrals was given.
1468 if test "${enable_referrals+set}" = set; then
1469   enableval="$enable_referrals"
1470   
1471         ol_arg=invalid
1472         for ol_val in auto yes no ; do
1473                 if test "$enableval" = "$ol_val" ; then
1474                         ol_arg="$ol_val"
1475                 fi
1476         done
1477         if test "$ol_arg" = "invalid" ; then
1478                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1479         fi
1480         ol_enable_referrals="$ol_arg"
1481
1482 else
1483         ol_enable_referrals="no"
1484 fi
1485 # end --enable-referrals
1486 ol_enable_kbind=${ol_enable_kbind-no}
1487 # OpenLDAP --enable-ipv6
1488         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1489 if test "${enable_ipv6+set}" = set; then
1490   enableval="$enable_ipv6"
1491   
1492         ol_arg=invalid
1493         for ol_val in auto yes no ; do
1494                 if test "$enableval" = "$ol_val" ; then
1495                         ol_arg="$ol_val"
1496                 fi
1497         done
1498         if test "$ol_arg" = "invalid" ; then
1499                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1500         fi
1501         ol_enable_ipv6="$ol_arg"
1502
1503 else
1504         ol_enable_ipv6="auto"
1505 fi
1506 # end --enable-ipv6
1507 # OpenLDAP --enable-local
1508         # Check whether --enable-local or --disable-local was given.
1509 if test "${enable_local+set}" = set; then
1510   enableval="$enable_local"
1511   
1512         ol_arg=invalid
1513         for ol_val in auto yes no ; do
1514                 if test "$enableval" = "$ol_val" ; then
1515                         ol_arg="$ol_val"
1516                 fi
1517         done
1518         if test "$ol_arg" = "invalid" ; then
1519                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1520         fi
1521         ol_enable_local="$ol_arg"
1522
1523 else
1524         ol_enable_local="auto"
1525 fi
1526 # end --enable-local
1527 # OpenLDAP --enable-x_compile
1528         # Check whether --enable-x_compile or --disable-x_compile was given.
1529 if test "${enable_x_compile+set}" = set; then
1530   enableval="$enable_x_compile"
1531   
1532         ol_arg=invalid
1533         for ol_val in yes no ; do
1534                 if test "$enableval" = "$ol_val" ; then
1535                         ol_arg="$ol_val"
1536                 fi
1537         done
1538         if test "$ol_arg" = "invalid" ; then
1539                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1540         fi
1541         ol_enable_x_compile="$ol_arg"
1542
1543 else
1544         ol_enable_x_compile="no"
1545 fi
1546 # end --enable-x_compile
1547
1548
1549 # OpenLDAP --with-cyrus_sasl
1550         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1551 if test "${with_cyrus_sasl+set}" = set; then
1552   withval="$with_cyrus_sasl"
1553   
1554         ol_arg=invalid
1555         for ol_val in auto yes no  ; do
1556                 if test "$withval" = "$ol_val" ; then
1557                         ol_arg="$ol_val"
1558                 fi
1559         done
1560         if test "$ol_arg" = "invalid" ; then
1561                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1562         fi
1563         ol_with_cyrus_sasl="$ol_arg"
1564
1565 else
1566         ol_with_cyrus_sasl="auto"
1567 fi
1568 # end --with-cyrus_sasl
1569
1570 # OpenLDAP --with-fetch
1571         # Check whether --with-fetch or --without-fetch was given.
1572 if test "${with_fetch+set}" = set; then
1573   withval="$with_fetch"
1574   
1575         ol_arg=invalid
1576         for ol_val in auto yes no  ; do
1577                 if test "$withval" = "$ol_val" ; then
1578                         ol_arg="$ol_val"
1579                 fi
1580         done
1581         if test "$ol_arg" = "invalid" ; then
1582                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1583         fi
1584         ol_with_fetch="$ol_arg"
1585
1586 else
1587         ol_with_fetch="auto"
1588 fi
1589 # end --with-fetch
1590
1591 # OpenLDAP --with-kerberos
1592         # Check whether --with-kerberos or --without-kerberos was given.
1593 if test "${with_kerberos+set}" = set; then
1594   withval="$with_kerberos"
1595   
1596         ol_arg=invalid
1597         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1598                 if test "$withval" = "$ol_val" ; then
1599                         ol_arg="$ol_val"
1600                 fi
1601         done
1602         if test "$ol_arg" = "invalid" ; then
1603                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1604         fi
1605         ol_with_kerberos="$ol_arg"
1606
1607 else
1608         ol_with_kerberos="auto"
1609 fi
1610 # end --with-kerberos
1611
1612 # OpenLDAP --with-readline
1613         # Check whether --with-readline or --without-readline was given.
1614 if test "${with_readline+set}" = set; then
1615   withval="$with_readline"
1616   
1617         ol_arg=invalid
1618         for ol_val in auto yes no  ; do
1619                 if test "$withval" = "$ol_val" ; then
1620                         ol_arg="$ol_val"
1621                 fi
1622         done
1623         if test "$ol_arg" = "invalid" ; then
1624                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1625         fi
1626         ol_with_readline="$ol_arg"
1627
1628 else
1629         ol_with_readline="auto"
1630 fi
1631 # end --with-readline
1632
1633 # OpenLDAP --with-threads
1634         # Check whether --with-threads or --without-threads was given.
1635 if test "${with_threads+set}" = set; then
1636   withval="$with_threads"
1637   
1638         ol_arg=invalid
1639         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1640                 if test "$withval" = "$ol_val" ; then
1641                         ol_arg="$ol_val"
1642                 fi
1643         done
1644         if test "$ol_arg" = "invalid" ; then
1645                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1646         fi
1647         ol_with_threads="$ol_arg"
1648
1649 else
1650         ol_with_threads="auto"
1651 fi
1652 # end --with-threads
1653
1654 # OpenLDAP --with-tls
1655         # Check whether --with-tls or --without-tls was given.
1656 if test "${with_tls+set}" = set; then
1657   withval="$with_tls"
1658   
1659         ol_arg=invalid
1660         for ol_val in auto ssleay openssl yes no  ; do
1661                 if test "$withval" = "$ol_val" ; then
1662                         ol_arg="$ol_val"
1663                 fi
1664         done
1665         if test "$ol_arg" = "invalid" ; then
1666                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1667         fi
1668         ol_with_tls="$ol_arg"
1669
1670 else
1671         ol_with_tls="auto"
1672 fi
1673 # end --with-tls
1674
1675 # OpenLDAP --with-yielding_select
1676         # Check whether --with-yielding_select or --without-yielding_select was given.
1677 if test "${with_yielding_select+set}" = set; then
1678   withval="$with_yielding_select"
1679   
1680         ol_arg=invalid
1681         for ol_val in auto yes no manual  ; do
1682                 if test "$withval" = "$ol_val" ; then
1683                         ol_arg="$ol_val"
1684                 fi
1685         done
1686         if test "$ol_arg" = "invalid" ; then
1687                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1688         fi
1689         ol_with_yielding_select="$ol_arg"
1690
1691 else
1692         ol_with_yielding_select="auto"
1693 fi
1694 # end --with-yielding_select
1695
1696
1697
1698 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1699 if test "${with_xxslapdoptions+set}" = set; then
1700   withval="$with_xxslapdoptions"
1701   :
1702 fi
1703
1704 # OpenLDAP --enable-slapd
1705         # Check whether --enable-slapd or --disable-slapd was given.
1706 if test "${enable_slapd+set}" = set; then
1707   enableval="$enable_slapd"
1708   
1709         ol_arg=invalid
1710         for ol_val in auto yes no ; do
1711                 if test "$enableval" = "$ol_val" ; then
1712                         ol_arg="$ol_val"
1713                 fi
1714         done
1715         if test "$ol_arg" = "invalid" ; then
1716                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1717         fi
1718         ol_enable_slapd="$ol_arg"
1719
1720 else
1721         ol_enable_slapd="yes"
1722 fi
1723 # end --enable-slapd
1724 # OpenLDAP --enable-aci
1725         # Check whether --enable-aci or --disable-aci was given.
1726 if test "${enable_aci+set}" = set; then
1727   enableval="$enable_aci"
1728   
1729         ol_arg=invalid
1730         for ol_val in auto yes no ; do
1731                 if test "$enableval" = "$ol_val" ; then
1732                         ol_arg="$ol_val"
1733                 fi
1734         done
1735         if test "$ol_arg" = "invalid" ; then
1736                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1737         fi
1738         ol_enable_aci="$ol_arg"
1739
1740 else
1741         ol_enable_aci="no"
1742 fi
1743 # end --enable-aci
1744 # OpenLDAP --enable-cleartext
1745         # Check whether --enable-cleartext or --disable-cleartext was given.
1746 if test "${enable_cleartext+set}" = set; then
1747   enableval="$enable_cleartext"
1748   
1749         ol_arg=invalid
1750         for ol_val in auto yes no ; do
1751                 if test "$enableval" = "$ol_val" ; then
1752                         ol_arg="$ol_val"
1753                 fi
1754         done
1755         if test "$ol_arg" = "invalid" ; then
1756                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1757         fi
1758         ol_enable_cleartext="$ol_arg"
1759
1760 else
1761         ol_enable_cleartext="yes"
1762 fi
1763 # end --enable-cleartext
1764 # OpenLDAP --enable-crypt
1765         # Check whether --enable-crypt or --disable-crypt was given.
1766 if test "${enable_crypt+set}" = set; then
1767   enableval="$enable_crypt"
1768   
1769         ol_arg=invalid
1770         for ol_val in auto yes no ; do
1771                 if test "$enableval" = "$ol_val" ; then
1772                         ol_arg="$ol_val"
1773                 fi
1774         done
1775         if test "$ol_arg" = "invalid" ; then
1776                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1777         fi
1778         ol_enable_crypt="$ol_arg"
1779
1780 else
1781         ol_enable_crypt="no"
1782 fi
1783 # end --enable-crypt
1784 # OpenLDAP --enable-dynamic
1785         # Check whether --enable-dynamic or --disable-dynamic was given.
1786 if test "${enable_dynamic+set}" = set; then
1787   enableval="$enable_dynamic"
1788   
1789         ol_arg=invalid
1790         for ol_val in auto yes no ; do
1791                 if test "$enableval" = "$ol_val" ; then
1792                         ol_arg="$ol_val"
1793                 fi
1794         done
1795         if test "$ol_arg" = "invalid" ; then
1796                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1797         fi
1798         ol_enable_dynamic="$ol_arg"
1799
1800 else
1801         ol_enable_dynamic="no"
1802 fi
1803 # end --enable-dynamic
1804 # OpenLDAP --enable-kpasswd
1805         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1806 if test "${enable_kpasswd+set}" = set; then
1807   enableval="$enable_kpasswd"
1808   
1809         ol_arg=invalid
1810         for ol_val in auto yes no ; do
1811                 if test "$enableval" = "$ol_val" ; then
1812                         ol_arg="$ol_val"
1813                 fi
1814         done
1815         if test "$ol_arg" = "invalid" ; then
1816                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1817         fi
1818         ol_enable_kpasswd="$ol_arg"
1819
1820 else
1821         ol_enable_kpasswd="no"
1822 fi
1823 # end --enable-kpasswd
1824 # OpenLDAP --enable-lmpasswd
1825         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1826 if test "${enable_lmpasswd+set}" = set; then
1827   enableval="$enable_lmpasswd"
1828   
1829         ol_arg=invalid
1830         for ol_val in auto yes no ; do
1831                 if test "$enableval" = "$ol_val" ; then
1832                         ol_arg="$ol_val"
1833                 fi
1834         done
1835         if test "$ol_arg" = "invalid" ; then
1836                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1837         fi
1838         ol_enable_lmpasswd="$ol_arg"
1839
1840 else
1841         ol_enable_lmpasswd="no"
1842 fi
1843 # end --enable-lmpasswd
1844 # OpenLDAP --enable-spasswd
1845         # Check whether --enable-spasswd or --disable-spasswd was given.
1846 if test "${enable_spasswd+set}" = set; then
1847   enableval="$enable_spasswd"
1848   
1849         ol_arg=invalid
1850         for ol_val in auto yes no ; do
1851                 if test "$enableval" = "$ol_val" ; then
1852                         ol_arg="$ol_val"
1853                 fi
1854         done
1855         if test "$ol_arg" = "invalid" ; then
1856                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1857         fi
1858         ol_enable_spasswd="$ol_arg"
1859
1860 else
1861         ol_enable_spasswd="no"
1862 fi
1863 # end --enable-spasswd
1864 # OpenLDAP --enable-modules
1865         # Check whether --enable-modules or --disable-modules was given.
1866 if test "${enable_modules+set}" = set; then
1867   enableval="$enable_modules"
1868   
1869         ol_arg=invalid
1870         for ol_val in auto yes no ; do
1871                 if test "$enableval" = "$ol_val" ; then
1872                         ol_arg="$ol_val"
1873                 fi
1874         done
1875         if test "$ol_arg" = "invalid" ; then
1876                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1877         fi
1878         ol_enable_modules="$ol_arg"
1879
1880 else
1881         ol_enable_modules="no"
1882 fi
1883 # end --enable-modules
1884 ol_enable_multimaster=${ol_enable_multimaster-no}
1885 # OpenLDAP --enable-phonetic
1886         # Check whether --enable-phonetic or --disable-phonetic was given.
1887 if test "${enable_phonetic+set}" = set; then
1888   enableval="$enable_phonetic"
1889   
1890         ol_arg=invalid
1891         for ol_val in auto yes no ; do
1892                 if test "$enableval" = "$ol_val" ; then
1893                         ol_arg="$ol_val"
1894                 fi
1895         done
1896         if test "$ol_arg" = "invalid" ; then
1897                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1898         fi
1899         ol_enable_phonetic="$ol_arg"
1900
1901 else
1902         ol_enable_phonetic="no"
1903 fi
1904 # end --enable-phonetic
1905 # OpenLDAP --enable-rewrite
1906         # Check whether --enable-rewrite or --disable-rewrite was given.
1907 if test "${enable_rewrite+set}" = set; then
1908   enableval="$enable_rewrite"
1909   
1910         ol_arg=invalid
1911         for ol_val in auto yes no ; do
1912                 if test "$enableval" = "$ol_val" ; then
1913                         ol_arg="$ol_val"
1914                 fi
1915         done
1916         if test "$ol_arg" = "invalid" ; then
1917                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1918         fi
1919         ol_enable_rewrite="$ol_arg"
1920
1921 else
1922         ol_enable_rewrite="no"
1923 fi
1924 # end --enable-rewrite
1925 # OpenLDAP --enable-rlookups
1926         # Check whether --enable-rlookups or --disable-rlookups was given.
1927 if test "${enable_rlookups+set}" = set; then
1928   enableval="$enable_rlookups"
1929   
1930         ol_arg=invalid
1931         for ol_val in auto yes no ; do
1932                 if test "$enableval" = "$ol_val" ; then
1933                         ol_arg="$ol_val"
1934                 fi
1935         done
1936         if test "$ol_arg" = "invalid" ; then
1937                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1938         fi
1939         ol_enable_rlookups="$ol_arg"
1940
1941 else
1942         ol_enable_rlookups="no"
1943 fi
1944 # end --enable-rlookups
1945 # OpenLDAP --enable-slp
1946         # Check whether --enable-slp or --disable-slp was given.
1947 if test "${enable_slp+set}" = set; then
1948   enableval="$enable_slp"
1949   
1950         ol_arg=invalid
1951         for ol_val in auto yes no ; do
1952                 if test "$enableval" = "$ol_val" ; then
1953                         ol_arg="$ol_val"
1954                 fi
1955         done
1956         if test "$ol_arg" = "invalid" ; then
1957                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1958         fi
1959         ol_enable_slp="$ol_arg"
1960
1961 else
1962         ol_enable_slp="no"
1963 fi
1964 # end --enable-slp
1965 # OpenLDAP --enable-wrappers
1966         # Check whether --enable-wrappers or --disable-wrappers was given.
1967 if test "${enable_wrappers+set}" = set; then
1968   enableval="$enable_wrappers"
1969   
1970         ol_arg=invalid
1971         for ol_val in auto yes no ; do
1972                 if test "$enableval" = "$ol_val" ; then
1973                         ol_arg="$ol_val"
1974                 fi
1975         done
1976         if test "$ol_arg" = "invalid" ; then
1977                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1978         fi
1979         ol_enable_wrappers="$ol_arg"
1980
1981 else
1982         ol_enable_wrappers="no"
1983 fi
1984 # end --enable-wrappers
1985
1986 # OpenLDAP --enable-bdb
1987         # Check whether --enable-bdb or --disable-bdb was given.
1988 if test "${enable_bdb+set}" = set; then
1989   enableval="$enable_bdb"
1990   
1991         ol_arg=invalid
1992         for ol_val in auto yes no ; do
1993                 if test "$enableval" = "$ol_val" ; then
1994                         ol_arg="$ol_val"
1995                 fi
1996         done
1997         if test "$ol_arg" = "invalid" ; then
1998                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1999         fi
2000         ol_enable_bdb="$ol_arg"
2001
2002 else
2003         ol_enable_bdb="yes"
2004 fi
2005 # end --enable-bdb
2006 # OpenLDAP --with-bdb_module
2007         # Check whether --with-bdb_module or --without-bdb_module was given.
2008 if test "${with_bdb_module+set}" = set; then
2009   withval="$with_bdb_module"
2010   
2011         ol_arg=invalid
2012         for ol_val in static dynamic ; do
2013                 if test "$withval" = "$ol_val" ; then
2014                         ol_arg="$ol_val"
2015                 fi
2016         done
2017         if test "$ol_arg" = "invalid" ; then
2018                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
2019         fi
2020         ol_with_bdb_module="$ol_arg"
2021
2022 else
2023         ol_with_bdb_module="static"
2024 fi
2025 # end --with-bdb_module
2026
2027 # OpenLDAP --enable-dnssrv
2028         # Check whether --enable-dnssrv or --disable-dnssrv was given.
2029 if test "${enable_dnssrv+set}" = set; then
2030   enableval="$enable_dnssrv"
2031   
2032         ol_arg=invalid
2033         for ol_val in auto yes no ; do
2034                 if test "$enableval" = "$ol_val" ; then
2035                         ol_arg="$ol_val"
2036                 fi
2037         done
2038         if test "$ol_arg" = "invalid" ; then
2039                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
2040         fi
2041         ol_enable_dnssrv="$ol_arg"
2042
2043 else
2044         ol_enable_dnssrv="no"
2045 fi
2046 # end --enable-dnssrv
2047 # OpenLDAP --with-dnssrv_module
2048         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
2049 if test "${with_dnssrv_module+set}" = set; then
2050   withval="$with_dnssrv_module"
2051   
2052         ol_arg=invalid
2053         for ol_val in static dynamic ; do
2054                 if test "$withval" = "$ol_val" ; then
2055                         ol_arg="$ol_val"
2056                 fi
2057         done
2058         if test "$ol_arg" = "invalid" ; then
2059                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
2060         fi
2061         ol_with_dnssrv_module="$ol_arg"
2062
2063 else
2064         ol_with_dnssrv_module="static"
2065 fi
2066 # end --with-dnssrv_module
2067
2068 # OpenLDAP --enable-ldap
2069         # Check whether --enable-ldap or --disable-ldap was given.
2070 if test "${enable_ldap+set}" = set; then
2071   enableval="$enable_ldap"
2072   
2073         ol_arg=invalid
2074         for ol_val in auto yes no ; do
2075                 if test "$enableval" = "$ol_val" ; then
2076                         ol_arg="$ol_val"
2077                 fi
2078         done
2079         if test "$ol_arg" = "invalid" ; then
2080                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2081         fi
2082         ol_enable_ldap="$ol_arg"
2083
2084 else
2085         ol_enable_ldap="no"
2086 fi
2087 # end --enable-ldap
2088 # OpenLDAP --with-ldap_module
2089         # Check whether --with-ldap_module or --without-ldap_module was given.
2090 if test "${with_ldap_module+set}" = set; then
2091   withval="$with_ldap_module"
2092   
2093         ol_arg=invalid
2094         for ol_val in static dynamic ; do
2095                 if test "$withval" = "$ol_val" ; then
2096                         ol_arg="$ol_val"
2097                 fi
2098         done
2099         if test "$ol_arg" = "invalid" ; then
2100                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
2101         fi
2102         ol_with_ldap_module="$ol_arg"
2103
2104 else
2105         ol_with_ldap_module="static"
2106 fi
2107 # end --with-ldap_module
2108
2109 # OpenLDAP --enable-ldbm
2110         # Check whether --enable-ldbm or --disable-ldbm was given.
2111 if test "${enable_ldbm+set}" = set; then
2112   enableval="$enable_ldbm"
2113   
2114         ol_arg=invalid
2115         for ol_val in auto yes no ; do
2116                 if test "$enableval" = "$ol_val" ; then
2117                         ol_arg="$ol_val"
2118                 fi
2119         done
2120         if test "$ol_arg" = "invalid" ; then
2121                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2122         fi
2123         ol_enable_ldbm="$ol_arg"
2124
2125 else
2126         ol_enable_ldbm="no"
2127 fi
2128 # end --enable-ldbm
2129 # OpenLDAP --with-ldbm_api
2130         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2131 if test "${with_ldbm_api+set}" = set; then
2132   withval="$with_ldbm_api"
2133   
2134         ol_arg=invalid
2135         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2136                 if test "$withval" = "$ol_val" ; then
2137                         ol_arg="$ol_val"
2138                 fi
2139         done
2140         if test "$ol_arg" = "invalid" ; then
2141                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2142         fi
2143         ol_with_ldbm_api="$ol_arg"
2144
2145 else
2146         ol_with_ldbm_api="auto"
2147 fi
2148 # end --with-ldbm_api
2149
2150 # OpenLDAP --with-ldbm_module
2151         # Check whether --with-ldbm_module or --without-ldbm_module was given.
2152 if test "${with_ldbm_module+set}" = set; then
2153   withval="$with_ldbm_module"
2154   
2155         ol_arg=invalid
2156         for ol_val in static dynamic ; do
2157                 if test "$withval" = "$ol_val" ; then
2158                         ol_arg="$ol_val"
2159                 fi
2160         done
2161         if test "$ol_arg" = "invalid" ; then
2162                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2163         fi
2164         ol_with_ldbm_module="$ol_arg"
2165
2166 else
2167         ol_with_ldbm_module="static"
2168 fi
2169 # end --with-ldbm_module
2170
2171 # OpenLDAP --with-ldbm_type
2172         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2173 if test "${with_ldbm_type+set}" = set; then
2174   withval="$with_ldbm_type"
2175   
2176         ol_arg=invalid
2177         for ol_val in auto btree hash ; do
2178                 if test "$withval" = "$ol_val" ; then
2179                         ol_arg="$ol_val"
2180                 fi
2181         done
2182         if test "$ol_arg" = "invalid" ; then
2183                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2184         fi
2185         ol_with_ldbm_type="$ol_arg"
2186
2187 else
2188         ol_with_ldbm_type="auto"
2189 fi
2190 # end --with-ldbm_type
2191
2192 # OpenLDAP --enable-meta
2193         # Check whether --enable-meta or --disable-meta was given.
2194 if test "${enable_meta+set}" = set; then
2195   enableval="$enable_meta"
2196   
2197         ol_arg=invalid
2198         for ol_val in auto yes no ; do
2199                 if test "$enableval" = "$ol_val" ; then
2200                         ol_arg="$ol_val"
2201                 fi
2202         done
2203         if test "$ol_arg" = "invalid" ; then
2204                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2205         fi
2206         ol_enable_meta="$ol_arg"
2207
2208 else
2209         ol_enable_meta="no"
2210 fi
2211 # end --enable-meta
2212 # OpenLDAP --with-meta_module
2213         # Check whether --with-meta_module or --without-meta_module was given.
2214 if test "${with_meta_module+set}" = set; then
2215   withval="$with_meta_module"
2216   
2217         ol_arg=invalid
2218         for ol_val in static dynamic ; do
2219                 if test "$withval" = "$ol_val" ; then
2220                         ol_arg="$ol_val"
2221                 fi
2222         done
2223         if test "$ol_arg" = "invalid" ; then
2224                 { echo "configure: error: bad value $withval for --with-meta_module" 1>&2; exit 1; }
2225         fi
2226         ol_with_meta_module="$ol_arg"
2227
2228 else
2229         ol_with_meta_module="static"
2230 fi
2231 # end --with-meta_module
2232
2233 # OpenLDAP --enable-monitor
2234         # Check whether --enable-monitor or --disable-monitor was given.
2235 if test "${enable_monitor+set}" = set; then
2236   enableval="$enable_monitor"
2237   
2238         ol_arg=invalid
2239         for ol_val in auto yes no ; do
2240                 if test "$enableval" = "$ol_val" ; then
2241                         ol_arg="$ol_val"
2242                 fi
2243         done
2244         if test "$ol_arg" = "invalid" ; then
2245                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2246         fi
2247         ol_enable_monitor="$ol_arg"
2248
2249 else
2250         ol_enable_monitor="no"
2251 fi
2252 # end --enable-monitor
2253 # OpenLDAP --with-monitor_module
2254         # Check whether --with-monitor_module or --without-monitor_module was given.
2255 if test "${with_monitor_module+set}" = set; then
2256   withval="$with_monitor_module"
2257   
2258         ol_arg=invalid
2259         for ol_val in static dynamic ; do
2260                 if test "$withval" = "$ol_val" ; then
2261                         ol_arg="$ol_val"
2262                 fi
2263         done
2264         if test "$ol_arg" = "invalid" ; then
2265                 { echo "configure: error: bad value $withval for --with-monitor_module" 1>&2; exit 1; }
2266         fi
2267         ol_with_monitor_module="$ol_arg"
2268
2269 else
2270         ol_with_monitor_module="static"
2271 fi
2272 # end --with-monitor_module
2273
2274 # OpenLDAP --enable-null
2275         # Check whether --enable-null or --disable-null was given.
2276 if test "${enable_null+set}" = set; then
2277   enableval="$enable_null"
2278   
2279         ol_arg=invalid
2280         for ol_val in auto yes no ; do
2281                 if test "$enableval" = "$ol_val" ; then
2282                         ol_arg="$ol_val"
2283                 fi
2284         done
2285         if test "$ol_arg" = "invalid" ; then
2286                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2287         fi
2288         ol_enable_null="$ol_arg"
2289
2290 else
2291         ol_enable_null="no"
2292 fi
2293 # end --enable-null
2294 # OpenLDAP --with-null_module
2295         # Check whether --with-null_module or --without-null_module was given.
2296 if test "${with_null_module+set}" = set; then
2297   withval="$with_null_module"
2298   
2299         ol_arg=invalid
2300         for ol_val in static dynamic ; do
2301                 if test "$withval" = "$ol_val" ; then
2302                         ol_arg="$ol_val"
2303                 fi
2304         done
2305         if test "$ol_arg" = "invalid" ; then
2306                 { echo "configure: error: bad value $withval for --with-null_module" 1>&2; exit 1; }
2307         fi
2308         ol_with_null_module="$ol_arg"
2309
2310 else
2311         ol_with_null_module="static"
2312 fi
2313 # end --with-null_module
2314
2315 # OpenLDAP --enable-passwd
2316         # Check whether --enable-passwd or --disable-passwd was given.
2317 if test "${enable_passwd+set}" = set; then
2318   enableval="$enable_passwd"
2319   
2320         ol_arg=invalid
2321         for ol_val in auto yes no ; do
2322                 if test "$enableval" = "$ol_val" ; then
2323                         ol_arg="$ol_val"
2324                 fi
2325         done
2326         if test "$ol_arg" = "invalid" ; then
2327                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2328         fi
2329         ol_enable_passwd="$ol_arg"
2330
2331 else
2332         ol_enable_passwd="no"
2333 fi
2334 # end --enable-passwd
2335 # OpenLDAP --with-passwd_module
2336         # Check whether --with-passwd_module or --without-passwd_module was given.
2337 if test "${with_passwd_module+set}" = set; then
2338   withval="$with_passwd_module"
2339   
2340         ol_arg=invalid
2341         for ol_val in static dynamic ; do
2342                 if test "$withval" = "$ol_val" ; then
2343                         ol_arg="$ol_val"
2344                 fi
2345         done
2346         if test "$ol_arg" = "invalid" ; then
2347                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2348         fi
2349         ol_with_passwd_module="$ol_arg"
2350
2351 else
2352         ol_with_passwd_module="static"
2353 fi
2354 # end --with-passwd_module
2355
2356 # OpenLDAP --enable-perl
2357         # Check whether --enable-perl or --disable-perl was given.
2358 if test "${enable_perl+set}" = set; then
2359   enableval="$enable_perl"
2360   
2361         ol_arg=invalid
2362         for ol_val in auto yes no ; do
2363                 if test "$enableval" = "$ol_val" ; then
2364                         ol_arg="$ol_val"
2365                 fi
2366         done
2367         if test "$ol_arg" = "invalid" ; then
2368                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2369         fi
2370         ol_enable_perl="$ol_arg"
2371
2372 else
2373         ol_enable_perl="no"
2374 fi
2375 # end --enable-perl
2376 # OpenLDAP --with-perl_module
2377         # Check whether --with-perl_module or --without-perl_module was given.
2378 if test "${with_perl_module+set}" = set; then
2379   withval="$with_perl_module"
2380   
2381         ol_arg=invalid
2382         for ol_val in static dynamic ; do
2383                 if test "$withval" = "$ol_val" ; then
2384                         ol_arg="$ol_val"
2385                 fi
2386         done
2387         if test "$ol_arg" = "invalid" ; then
2388                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2389         fi
2390         ol_with_perl_module="$ol_arg"
2391
2392 else
2393         ol_with_perl_module="static"
2394 fi
2395 # end --with-perl_module
2396
2397 # OpenLDAP --enable-shell
2398         # Check whether --enable-shell or --disable-shell was given.
2399 if test "${enable_shell+set}" = set; then
2400   enableval="$enable_shell"
2401   
2402         ol_arg=invalid
2403         for ol_val in auto yes no ; do
2404                 if test "$enableval" = "$ol_val" ; then
2405                         ol_arg="$ol_val"
2406                 fi
2407         done
2408         if test "$ol_arg" = "invalid" ; then
2409                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2410         fi
2411         ol_enable_shell="$ol_arg"
2412
2413 else
2414         ol_enable_shell="no"
2415 fi
2416 # end --enable-shell
2417 # OpenLDAP --with-shell_module
2418         # Check whether --with-shell_module or --without-shell_module was given.
2419 if test "${with_shell_module+set}" = set; then
2420   withval="$with_shell_module"
2421   
2422         ol_arg=invalid
2423         for ol_val in static dynamic ; do
2424                 if test "$withval" = "$ol_val" ; then
2425                         ol_arg="$ol_val"
2426                 fi
2427         done
2428         if test "$ol_arg" = "invalid" ; then
2429                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2430         fi
2431         ol_with_shell_module="$ol_arg"
2432
2433 else
2434         ol_with_shell_module="static"
2435 fi
2436 # end --with-shell_module
2437
2438 ol_enable_sql=${ol_enable_sql-no}
2439 ol_with_sql_module=${ol_enable_sql-static}
2440
2441 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2442 if test "${with_xxslurpdoptions+set}" = set; then
2443   withval="$with_xxslurpdoptions"
2444   :
2445 fi
2446
2447 # OpenLDAP --enable-slurpd
2448         # Check whether --enable-slurpd or --disable-slurpd was given.
2449 if test "${enable_slurpd+set}" = set; then
2450   enableval="$enable_slurpd"
2451   
2452         ol_arg=invalid
2453         for ol_val in auto yes no ; do
2454                 if test "$enableval" = "$ol_val" ; then
2455                         ol_arg="$ol_val"
2456                 fi
2457         done
2458         if test "$ol_arg" = "invalid" ; then
2459                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2460         fi
2461         ol_enable_slurpd="$ol_arg"
2462
2463 else
2464         ol_enable_slurpd="auto"
2465 fi
2466 # end --enable-slurpd
2467
2468 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2469 if test "${with_xxliboptions+set}" = set; then
2470   withval="$with_xxliboptions"
2471   :
2472 fi
2473
2474 # Check whether --enable-static or --disable-static was given.
2475 if test "${enable_static+set}" = set; then
2476   enableval="$enable_static"
2477   p=${PACKAGE-default}
2478 case $enableval in
2479 yes) enable_static=yes ;;
2480 no) enable_static=no ;;
2481 *)
2482   enable_static=no
2483   # Look at the argument we got.  We use all the common list separators.
2484   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2485   for pkg in $enableval; do
2486     if test "X$pkg" = "X$p"; then
2487       enable_static=yes
2488     fi
2489   done
2490   IFS="$ac_save_ifs"
2491   ;;
2492 esac
2493 else
2494   enable_static=yes
2495 fi
2496
2497 # Check whether --enable-shared or --disable-shared was given.
2498 if test "${enable_shared+set}" = set; then
2499   enableval="$enable_shared"
2500   p=${PACKAGE-default}
2501 case $enableval in
2502 yes) enable_shared=yes ;;
2503 no) enable_shared=no ;;
2504 *)
2505   enable_shared=no
2506   # Look at the argument we got.  We use all the common list separators.
2507   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2508   for pkg in $enableval; do
2509     if test "X$pkg" = "X$p"; then
2510       enable_shared=yes
2511     fi
2512   done
2513   IFS="$ac_save_ifs"
2514   ;;
2515 esac
2516 else
2517   enable_shared=yes
2518 fi
2519
2520
2521
2522 # validate options
2523 if test $ol_enable_slapd = no ; then
2524                 if test $ol_enable_bdb = yes ; then
2525                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2526         fi
2527         if test $ol_enable_dnssrv = yes ; then
2528                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2529         fi
2530         if test $ol_enable_ldap = yes ; then
2531                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2532         fi
2533         if test $ol_enable_ldbm = yes ; then
2534                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2535         fi
2536         if test $ol_enable_meta = yes ; then
2537                 echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2
2538         fi
2539         if test $ol_enable_monitor = yes ; then
2540                 echo "configure: warning: slapd disabled, ignoring --enable-monitor argument" 1>&2
2541         fi
2542         if test $ol_enable_null = yes ; then
2543                 echo "configure: warning: slapd disabled, ignoring --enable-null argument" 1>&2
2544         fi
2545         if test $ol_enable_passwd = yes ; then
2546                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2547         fi
2548         if test $ol_enable_perl = yes ; then
2549                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2550         fi
2551         if test $ol_enable_shell = yes ; then
2552                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2553         fi
2554         if test $ol_enable_sql = yes ; then
2555                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2556         fi
2557         if test $ol_enable_modules = yes ; then
2558                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2559         fi
2560         if test $ol_enable_multimaster = yes ; then
2561                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2562         fi
2563         if test $ol_enable_wrappers = yes ; then
2564                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2565         fi
2566         if test $ol_enable_phonetic = yes ; then
2567                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2568         fi
2569         if test $ol_enable_rlookups = yes ; then
2570                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2571         fi
2572         if test $ol_enable_aci = yes ; then
2573                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2574         fi
2575         if test $ol_with_ldbm_api != auto ; then
2576                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2577         fi
2578         if test $ol_with_ldbm_type != auto ; then
2579                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2580         fi
2581         if test $ol_with_bdb_module != static ; then
2582                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2583         fi
2584         if test $ol_with_dnssrv_module != static ; then
2585                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2586         fi
2587         if test $ol_with_ldap_module != static ; then
2588                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2589         fi
2590         if test $ol_with_ldbm_module != static ; then
2591                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2592         fi
2593         if test $ol_with_meta_module != static ; then
2594                 echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2
2595         fi
2596         if test $ol_with_monitor_module != static ; then
2597                 echo "configure: warning: slapd disabled, ignoring --with-monitor-module argument" 1>&2
2598         fi
2599         if test $ol_with_null_module != static ; then
2600                 echo "configure: warning: slapd disabled, ignoring --with-null-module argument" 1>&2
2601         fi
2602         if test $ol_with_passwd_module != static ; then
2603                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2604         fi
2605         if test $ol_with_perl_module != static ; then
2606                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2607         fi
2608         if test $ol_with_shell_module != static ; then
2609                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2610         fi
2611         if test $ol_with_sql_module != static ; then
2612                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2613         fi
2614         if test $ol_enable_slurpd = yes ; then
2615                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2616         fi
2617         if test $ol_enable_rewrite = yes ; then
2618                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2619         fi
2620
2621         # force settings to no
2622         ol_enable_bdb=no
2623         ol_enable_dnssrv=no
2624         ol_enable_ldap=no
2625         ol_enable_ldbm=no
2626         ol_enable_meta=no
2627         ol_enable_monitor=no
2628         ol_enable_null=no
2629         ol_enable_passwd=no
2630         ol_enable_perl=no
2631         ol_enable_shell=no
2632         ol_enable_sql=no
2633
2634         ol_enable_modules=no
2635         ol_enable_multimaster=no
2636         ol_enable_phonetic=no
2637         ol_enable_rlookups=no
2638         ol_enable_aci=no
2639         ol_enable_wrappers=no
2640         ol_enable_dynamic=no
2641
2642         ol_with_ldbm_api=no
2643         ol_with_ldbm_type=no
2644
2645         ol_with_bdb_module=static
2646         ol_with_dnssrv_module=static
2647         ol_with_ldap_module=static
2648         ol_with_ldbm_module=static
2649         ol_with_meta_module=static
2650         ol_with_monitor_module=static
2651         ol_with_null_module=static
2652         ol_with_passwd_module=static
2653         ol_with_perl_module=static
2654         ol_with_shell_module=static
2655         ol_with_sql_module=static
2656
2657         ol_enable_slurpd=no
2658
2659         ol_enable_rewrite=no
2660
2661 elif test $ol_enable_ldbm = no ; then
2662         
2663         if test $ol_with_ldbm_api != auto ; then
2664                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2665         fi
2666
2667         if test $ol_with_ldbm_type != auto ; then
2668                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2669         fi
2670
2671         if test $ol_with_ldbm_module != static ; then
2672                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2673         fi
2674
2675         if test $ol_enable_modules != yes -a \
2676                 $ol_enable_bdb = no -a \
2677                 $ol_enable_dnssrv = no -a \
2678                 $ol_enable_ldap = no -a \
2679                 $ol_enable_meta = no -a \
2680                 $ol_enable_monitor = no -a \
2681                 $ol_enable_null = no -a \
2682                 $ol_enable_passwd = no -a \
2683                 $ol_enable_perl = no -a \
2684                 $ol_enable_shell = no -a \
2685                 $ol_enable_sql = no ; then
2686
2687                 if test $ol_enable_slapd = yes ; then
2688                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2689                 else
2690                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2691                         ol_enable_slapd=no
2692                 fi
2693         fi
2694
2695         ol_with_ldbm_api=no
2696         ol_with_ldbm_type=no
2697         ol_with_ldbm_module=static
2698
2699         if test $ol_enable_bdb != no ; then
2700                 ol_with_ldbm_api=berkeley
2701         fi
2702
2703 else
2704                 if test $ol_with_ldbm_api = gdbm -a \
2705                 $ol_with_ldbm_type = btree ; then
2706                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2707         fi
2708         if test $ol_with_ldbm_api = mdbm -a \
2709                 $ol_with_ldbm_type = btree ; then
2710                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2711         fi
2712         if test $ol_with_ldbm_api = ndbm -a \
2713                 $ol_with_ldbm_type = btree ; then
2714                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2715         fi
2716
2717         if test $ol_enable_bdb = yes ; then
2718                 if test $ol_with_ldbm_api = auto ; then
2719                         ol_with_ldbm_api=berkeley
2720                 elif test $ol_with_ldbm_api != berkeley ; then
2721                         { echo "configure: error: LDBM API not compatible with BDB" 1>&2; exit 1; }
2722                 fi
2723
2724         elif test $ol_enable_bdb = auto ; then
2725                 if test $ol_with_ldbm_api != berkeley \
2726                         -o $ol_with_ldbm_api != auto ; then
2727                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2728                         ol_enable_bdb=no
2729                 fi
2730         fi
2731 fi
2732
2733 if test $ol_enable_slurpd = yes ; then
2734                 if test $ol_with_threads = no ; then
2735                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2736         fi
2737 fi
2738
2739 if test $ol_enable_lmpasswd = yes ; then
2740         if test $ol_with_tls = no ; then
2741                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2742         fi
2743 fi
2744
2745 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2746         if test $ol_with_kerberos = no ; then
2747                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2748         elif test $ol_with_kerberos = auto ; then
2749                 ol_with_kerberos=yes
2750         fi
2751
2752 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2753         if test $ol_with_kerberos = auto ; then
2754                 ol_with_kerberos=no
2755         elif test $ol_with_kerberos != no ; then
2756                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2757                 ol_with_kerberos=no
2758         fi
2759 fi
2760
2761 if test $ol_enable_spasswd = yes ; then
2762         if test $ol_with_cyrus_sasl = no ; then
2763                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2764         fi
2765         ol_with_cyrus_sasl=yes
2766 fi
2767
2768 echo "$ac_t""done" 1>&6
2769
2770 LDAP_LIBS=
2771 LDIF_LIBS=
2772 LDBM_LIB=
2773 LDBM_LIBS=
2774 LTHREAD_LIBS=
2775 LUTIL_LIBS=
2776
2777 SLAPD_LIBS=
2778 SLURPD_LIBS=
2779
2780 BUILD_SLAPD=no
2781 BUILD_SLURPD=no
2782
2783 BUILD_THREAD=no
2784
2785 BUILD_BDB=no
2786 BUILD_DNSSRV=no
2787 BUILD_LDAP=no
2788 BUILD_LDBM=no
2789 BUILD_META=no
2790 BUILD_MONITOR=no
2791 BUILD_NULL=no
2792 BUILD_PASSWD=no
2793 BUILD_PERL=no
2794 BUILD_SHELL=no
2795 BUILD_SQL=no
2796
2797 BUILD_BDB_DYNAMIC=static
2798 BUILD_DNSSRV_DYNAMIC=static
2799 BUILD_LDAP_DYNAMIC=static
2800 BUILD_LDBM_DYNAMIC=static
2801 BUILD_META_DYNAMIC=static
2802 BUILD_MONITOR_DYNAMIC=static
2803 BUILD_NULL_DYNAMIC=static
2804 BUILD_PASSWD_DYNAMIC=static
2805 BUILD_PERL_DYNAMIC=static
2806 BUILD_SHELL_DYNAMIC=static
2807 BUILD_SQL_DYNAMIC=static
2808
2809 SLAPD_MODULES_LDFLAGS=
2810 SLAPD_MODULES_CPPFLAGS=
2811
2812 SLAPD_STATIC_BACKENDS=
2813 SLAPD_DYNAMIC_BACKENDS=
2814
2815 SLAPD_PERL_LDFLAGS=
2816 MOD_PERL_LDFLAGS=
2817 PERL_CPPFLAGS=
2818
2819 SLAPD_SQL_LDFLAGS=
2820 SLAPD_SQL_LIBS=
2821 SLAPD_SQL_INCLUDES=
2822
2823 KRB4_LIBS=
2824 KRB5_LIBS=
2825 READLINE_LIBS=
2826 SASL_LIBS=
2827 TERMCAP_LIBS=
2828 TLS_LIBS=
2829 MODULES_LIBS=
2830 AUTH_LIBS=
2831
2832 SLAPD_SLP_LIBS=
2833
2834
2835 # Find a good install program.  We prefer a C program (faster),
2836 # so one script is as good as another.  But avoid the broken or
2837 # incompatible versions:
2838 # SysV /etc/install, /usr/sbin/install
2839 # SunOS /usr/etc/install
2840 # IRIX /sbin/install
2841 # AIX /bin/install
2842 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2843 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2844 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2845 # ./install, which can be erroneously created by make from ./install.sh.
2846 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2847 echo "configure:2848: checking for a BSD compatible install" >&5
2848 if test -z "$INSTALL"; then
2849 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2850   echo $ac_n "(cached) $ac_c" 1>&6
2851 else
2852     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2853   for ac_dir in $PATH; do
2854     # Account for people who put trailing slashes in PATH elements.
2855     case "$ac_dir/" in
2856     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2857     *)
2858       # OSF1 and SCO ODT 3.0 have their own names for install.
2859       # Don't use installbsd from OSF since it installs stuff as root
2860       # by default.
2861       for ac_prog in ginstall scoinst install; do
2862         if test -f $ac_dir/$ac_prog; then
2863           if test $ac_prog = install &&
2864             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2865             # AIX install.  It has an incompatible calling convention.
2866             :
2867           elif test $ac_prog = install &&
2868             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2869             # program-specific install script used by HP pwplus--don't use.
2870             :
2871           else
2872             ac_cv_path_install="$ac_dir/$ac_prog -c"
2873             break 2
2874           fi
2875         fi
2876       done
2877       ;;
2878     esac
2879   done
2880   IFS="$ac_save_IFS"
2881
2882 fi
2883   if test "${ac_cv_path_install+set}" = set; then
2884     INSTALL="$ac_cv_path_install"
2885   else
2886     # As a last resort, use the slow shell script.  We don't cache a
2887     # path for INSTALL within a source directory, because that will
2888     # break other packages using the cache if that directory is
2889     # removed, or if the path is relative.
2890     INSTALL="$ac_install_sh"
2891   fi
2892 fi
2893 echo "$ac_t""$INSTALL" 1>&6
2894
2895 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2896 # It thinks the first close brace ends the variable substitution.
2897 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2898
2899 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2900
2901 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2902
2903
2904 cat >> confdefs.h <<\EOF
2905 #define HAVE_MKVERSION 1
2906 EOF
2907
2908
2909
2910
2911 ol_aix_threads=no
2912 case "$target" in
2913 *-*-aix*)       if test -z "$CC" ; then
2914                 case "$ol_with_threads" in
2915                 auto | yes |  posix) ol_aix_threads=yes ;;
2916                 esac
2917         fi
2918 ;;
2919 esac
2920
2921 if test $ol_aix_threads = yes ; then
2922         if test -z "${CC}" ; then
2923                 for ac_prog in cc_r xlc_r cc
2924 do
2925 # Extract the first word of "$ac_prog", so it can be a program name with args.
2926 set dummy $ac_prog; ac_word=$2
2927 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2928 echo "configure:2929: checking for $ac_word" >&5
2929 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2930   echo $ac_n "(cached) $ac_c" 1>&6
2931 else
2932   if test -n "$CC"; then
2933   ac_cv_prog_CC="$CC" # Let the user override the test.
2934 else
2935   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2936   ac_dummy="$PATH"
2937   for ac_dir in $ac_dummy; do
2938     test -z "$ac_dir" && ac_dir=.
2939     if test -f $ac_dir/$ac_word; then
2940       ac_cv_prog_CC="$ac_prog"
2941       break
2942     fi
2943   done
2944   IFS="$ac_save_ifs"
2945 fi
2946 fi
2947 CC="$ac_cv_prog_CC"
2948 if test -n "$CC"; then
2949   echo "$ac_t""$CC" 1>&6
2950 else
2951   echo "$ac_t""no" 1>&6
2952 fi
2953
2954 test -n "$CC" && break
2955 done
2956
2957
2958                 if test "$CC" = cc ; then
2959                                                 if test $ol_with_threads != auto ; then
2960                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2961                         else
2962                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2963                         fi
2964                         ol_with_threads=no
2965                 fi
2966         fi
2967
2968         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2969                 ol_with_threads=posix
2970                 ol_cv_pthread_create=yes
2971         fi
2972 fi
2973
2974 if test -z "${CC}"; then
2975         for ac_prog in cc gcc
2976 do
2977 # Extract the first word of "$ac_prog", so it can be a program name with args.
2978 set dummy $ac_prog; ac_word=$2
2979 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2980 echo "configure:2981: checking for $ac_word" >&5
2981 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2982   echo $ac_n "(cached) $ac_c" 1>&6
2983 else
2984   if test -n "$CC"; then
2985   ac_cv_prog_CC="$CC" # Let the user override the test.
2986 else
2987   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2988   ac_dummy="$PATH"
2989   for ac_dir in $ac_dummy; do
2990     test -z "$ac_dir" && ac_dir=.
2991     if test -f $ac_dir/$ac_word; then
2992       ac_cv_prog_CC="$ac_prog"
2993       break
2994     fi
2995   done
2996   IFS="$ac_save_ifs"
2997 fi
2998 fi
2999 CC="$ac_cv_prog_CC"
3000 if test -n "$CC"; then
3001   echo "$ac_t""$CC" 1>&6
3002 else
3003   echo "$ac_t""no" 1>&6
3004 fi
3005
3006 test -n "$CC" && break
3007 done
3008 test -n "$CC" || CC="missing"
3009
3010
3011         if test "${CC}" = "missing" ; then
3012                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
3013         fi
3014 fi
3015
3016 if test -z "${AR}"; then
3017         for ac_prog in ar gar
3018 do
3019 # Extract the first word of "$ac_prog", so it can be a program name with args.
3020 set dummy $ac_prog; ac_word=$2
3021 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3022 echo "configure:3023: checking for $ac_word" >&5
3023 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3024   echo $ac_n "(cached) $ac_c" 1>&6
3025 else
3026   if test -n "$AR"; then
3027   ac_cv_prog_AR="$AR" # Let the user override the test.
3028 else
3029   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3030   ac_dummy="$PATH"
3031   for ac_dir in $ac_dummy; do
3032     test -z "$ac_dir" && ac_dir=.
3033     if test -f $ac_dir/$ac_word; then
3034       ac_cv_prog_AR="$ac_prog"
3035       break
3036     fi
3037   done
3038   IFS="$ac_save_ifs"
3039 fi
3040 fi
3041 AR="$ac_cv_prog_AR"
3042 if test -n "$AR"; then
3043   echo "$ac_t""$AR" 1>&6
3044 else
3045   echo "$ac_t""no" 1>&6
3046 fi
3047
3048 test -n "$AR" && break
3049 done
3050 test -n "$AR" || AR="missing"
3051
3052
3053         if test "${AR}" = "missing" ; then
3054                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3055         fi
3056 fi
3057
3058
3059
3060 # Find the correct PATH separator.  Usually this is `:', but
3061 # DJGPP uses `;' like DOS.
3062 if test "X${PATH_SEPARATOR+set}" != Xset; then
3063   UNAME=${UNAME-`uname 2>/dev/null`}
3064   case X$UNAME in
3065     *-DOS) lt_cv_sys_path_separator=';' ;;
3066     *)     lt_cv_sys_path_separator=':' ;;
3067   esac
3068   PATH_SEPARATOR=$lt_cv_sys_path_separator
3069 fi
3070
3071 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3072 echo "configure:3073: checking for Cygwin environment" >&5
3073 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3074   echo $ac_n "(cached) $ac_c" 1>&6
3075 else
3076   cat > conftest.$ac_ext <<EOF
3077 #line 3078 "configure"
3078 #include "confdefs.h"
3079
3080 int main() {
3081
3082 #ifndef __CYGWIN__
3083 #define __CYGWIN__ __CYGWIN32__
3084 #endif
3085 return __CYGWIN__;
3086 ; return 0; }
3087 EOF
3088 if { (eval echo configure:3089: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3089   rm -rf conftest*
3090   ac_cv_cygwin=yes
3091 else
3092   echo "configure: failed program was:" >&5
3093   cat conftest.$ac_ext >&5
3094   rm -rf conftest*
3095   ac_cv_cygwin=no
3096 fi
3097 rm -f conftest*
3098 fi
3099
3100 echo "$ac_t""$ac_cv_cygwin" 1>&6
3101 CYGWIN=
3102 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3103 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3104 echo "configure:3105: checking for mingw32 environment" >&5
3105 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3106   echo $ac_n "(cached) $ac_c" 1>&6
3107 else
3108   cat > conftest.$ac_ext <<EOF
3109 #line 3110 "configure"
3110 #include "confdefs.h"
3111
3112 int main() {
3113 return __MINGW32__;
3114 ; return 0; }
3115 EOF
3116 if { (eval echo configure:3117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3117   rm -rf conftest*
3118   ac_cv_mingw32=yes
3119 else
3120   echo "configure: failed program was:" >&5
3121   cat conftest.$ac_ext >&5
3122   rm -rf conftest*
3123   ac_cv_mingw32=no
3124 fi
3125 rm -f conftest*
3126 fi
3127
3128 echo "$ac_t""$ac_cv_mingw32" 1>&6
3129 MINGW32=
3130 test "$ac_cv_mingw32" = yes && MINGW32=yes
3131 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3132 echo "configure:3133: checking for EMX OS/2 environment" >&5
3133 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3134   echo $ac_n "(cached) $ac_c" 1>&6
3135 else
3136   cat > conftest.$ac_ext <<EOF
3137 #line 3138 "configure"
3138 #include "confdefs.h"
3139
3140 int main() {
3141 return __EMX__;
3142 ; return 0; }
3143 EOF
3144 if { (eval echo configure:3145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3145   rm -rf conftest*
3146   ac_cv_emxos2=yes
3147 else
3148   echo "configure: failed program was:" >&5
3149   cat conftest.$ac_ext >&5
3150   rm -rf conftest*
3151   ac_cv_emxos2=no
3152 fi
3153 rm -f conftest*
3154 fi
3155
3156 echo "$ac_t""$ac_cv_emxos2" 1>&6
3157 EMXOS2=
3158 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3159 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3160 echo "configure:3161: checking how to run the C preprocessor" >&5
3161 # On Suns, sometimes $CPP names a directory.
3162 if test -n "$CPP" && test -d "$CPP"; then
3163   CPP=
3164 fi
3165 if test -z "$CPP"; then
3166 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3167   echo $ac_n "(cached) $ac_c" 1>&6
3168 else
3169     # This must be in double quotes, not single quotes, because CPP may get
3170   # substituted into the Makefile and "${CC-cc}" will confuse make.
3171   CPP="${CC-cc} -E"
3172   # On the NeXT, cc -E runs the code through the compiler's parser,
3173   # not just through cpp.
3174   cat > conftest.$ac_ext <<EOF
3175 #line 3176 "configure"
3176 #include "confdefs.h"
3177 #include <assert.h>
3178 Syntax Error
3179 EOF
3180 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3181 { (eval echo configure:3182: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3182 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3183 if test -z "$ac_err"; then
3184   :
3185 else
3186   echo "$ac_err" >&5
3187   echo "configure: failed program was:" >&5
3188   cat conftest.$ac_ext >&5
3189   rm -rf conftest*
3190   CPP="${CC-cc} -E -traditional-cpp"
3191   cat > conftest.$ac_ext <<EOF
3192 #line 3193 "configure"
3193 #include "confdefs.h"
3194 #include <assert.h>
3195 Syntax Error
3196 EOF
3197 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3198 { (eval echo configure:3199: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3199 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3200 if test -z "$ac_err"; then
3201   :
3202 else
3203   echo "$ac_err" >&5
3204   echo "configure: failed program was:" >&5
3205   cat conftest.$ac_ext >&5
3206   rm -rf conftest*
3207   CPP="${CC-cc} -nologo -E"
3208   cat > conftest.$ac_ext <<EOF
3209 #line 3210 "configure"
3210 #include "confdefs.h"
3211 #include <assert.h>
3212 Syntax Error
3213 EOF
3214 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3215 { (eval echo configure:3216: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3216 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3217 if test -z "$ac_err"; then
3218   :
3219 else
3220   echo "$ac_err" >&5
3221   echo "configure: failed program was:" >&5
3222   cat conftest.$ac_ext >&5
3223   rm -rf conftest*
3224   CPP=/lib/cpp
3225 fi
3226 rm -f conftest*
3227 fi
3228 rm -f conftest*
3229 fi
3230 rm -f conftest*
3231   ac_cv_prog_CPP="$CPP"
3232 fi
3233   CPP="$ac_cv_prog_CPP"
3234 else
3235   ac_cv_prog_CPP="$CPP"
3236 fi
3237 echo "$ac_t""$CPP" 1>&6
3238
3239 # Check whether --enable-fast-install or --disable-fast-install was given.
3240 if test "${enable_fast_install+set}" = set; then
3241   enableval="$enable_fast_install"
3242   p=${PACKAGE-default}
3243 case $enableval in
3244 yes) enable_fast_install=yes ;;
3245 no) enable_fast_install=no ;;
3246 *)
3247   enable_fast_install=no
3248   # Look at the argument we got.  We use all the common list separators.
3249   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3250   for pkg in $enableval; do
3251     if test "X$pkg" = "X$p"; then
3252       enable_fast_install=yes
3253     fi
3254   done
3255   IFS="$ac_save_ifs"
3256   ;;
3257 esac
3258 else
3259   enable_fast_install=yes
3260 fi
3261
3262 # Extract the first word of "gcc", so it can be a program name with args.
3263 set dummy gcc; ac_word=$2
3264 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3265 echo "configure:3266: checking for $ac_word" >&5
3266 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3267   echo $ac_n "(cached) $ac_c" 1>&6
3268 else
3269   if test -n "$CC"; then
3270   ac_cv_prog_CC="$CC" # Let the user override the test.
3271 else
3272   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3273   ac_dummy="$PATH"
3274   for ac_dir in $ac_dummy; do
3275     test -z "$ac_dir" && ac_dir=.
3276     if test -f $ac_dir/$ac_word; then
3277       ac_cv_prog_CC="gcc"
3278       break
3279     fi
3280   done
3281   IFS="$ac_save_ifs"
3282 fi
3283 fi
3284 CC="$ac_cv_prog_CC"
3285 if test -n "$CC"; then
3286   echo "$ac_t""$CC" 1>&6
3287 else
3288   echo "$ac_t""no" 1>&6
3289 fi
3290
3291 if test -z "$CC"; then
3292   # Extract the first word of "cc", so it can be a program name with args.
3293 set dummy cc; ac_word=$2
3294 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3295 echo "configure:3296: checking for $ac_word" >&5
3296 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3297   echo $ac_n "(cached) $ac_c" 1>&6
3298 else
3299   if test -n "$CC"; then
3300   ac_cv_prog_CC="$CC" # Let the user override the test.
3301 else
3302   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3303   ac_prog_rejected=no
3304   ac_dummy="$PATH"
3305   for ac_dir in $ac_dummy; do
3306     test -z "$ac_dir" && ac_dir=.
3307     if test -f $ac_dir/$ac_word; then
3308       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3309         ac_prog_rejected=yes
3310         continue
3311       fi
3312       ac_cv_prog_CC="cc"
3313       break
3314     fi
3315   done
3316   IFS="$ac_save_ifs"
3317 if test $ac_prog_rejected = yes; then
3318   # We found a bogon in the path, so make sure we never use it.
3319   set dummy $ac_cv_prog_CC
3320   shift
3321   if test $# -gt 0; then
3322     # We chose a different compiler from the bogus one.
3323     # However, it has the same basename, so the bogon will be chosen
3324     # first if we set CC to just the basename; use the full file name.
3325     shift
3326     set dummy "$ac_dir/$ac_word" "$@"
3327     shift
3328     ac_cv_prog_CC="$@"
3329   fi
3330 fi
3331 fi
3332 fi
3333 CC="$ac_cv_prog_CC"
3334 if test -n "$CC"; then
3335   echo "$ac_t""$CC" 1>&6
3336 else
3337   echo "$ac_t""no" 1>&6
3338 fi
3339
3340   if test -z "$CC"; then
3341     case "`uname -s`" in
3342     *win32* | *WIN32* | *CYGWIN*)
3343       # Extract the first word of "cl", so it can be a program name with args.
3344 set dummy cl; ac_word=$2
3345 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3346 echo "configure:3347: checking for $ac_word" >&5
3347 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3348   echo $ac_n "(cached) $ac_c" 1>&6
3349 else
3350   if test -n "$CC"; then
3351   ac_cv_prog_CC="$CC" # Let the user override the test.
3352 else
3353   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3354   ac_dummy="$PATH"
3355   for ac_dir in $ac_dummy; do
3356     test -z "$ac_dir" && ac_dir=.
3357     if test -f $ac_dir/$ac_word; then
3358       ac_cv_prog_CC="cl"
3359       break
3360     fi
3361   done
3362   IFS="$ac_save_ifs"
3363 fi
3364 fi
3365 CC="$ac_cv_prog_CC"
3366 if test -n "$CC"; then
3367   echo "$ac_t""$CC" 1>&6
3368 else
3369   echo "$ac_t""no" 1>&6
3370 fi
3371  ;;
3372     esac
3373   fi
3374   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3375 fi
3376
3377 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3378 echo "configure:3379: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3379
3380 ac_ext=c
3381 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3382 ac_cpp='$CPP $CPPFLAGS'
3383 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3384 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3385 cross_compiling=$ac_cv_prog_cc_cross
3386
3387 cat > conftest.$ac_ext << EOF
3388
3389 #line 3390 "configure"
3390 #include "confdefs.h"
3391
3392 main(){return(0);}
3393 EOF
3394 if { (eval echo configure:3395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3395   ac_cv_prog_cc_works=yes
3396   # If we can't run a trivial program, we are probably using a cross compiler.
3397   if (./conftest; exit) 2>/dev/null; then
3398     ac_cv_prog_cc_cross=no
3399   else
3400     ac_cv_prog_cc_cross=yes
3401   fi
3402 else
3403   echo "configure: failed program was:" >&5
3404   cat conftest.$ac_ext >&5
3405   ac_cv_prog_cc_works=no
3406 fi
3407 rm -fr conftest*
3408 ac_ext=c
3409 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3410 ac_cpp='$CPP $CPPFLAGS'
3411 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3412 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3413 cross_compiling=$ac_cv_prog_cc_cross
3414
3415 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3416 if test $ac_cv_prog_cc_works = no; then
3417   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3418 fi
3419 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3420 echo "configure:3421: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3421 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3422 cross_compiling=$ac_cv_prog_cc_cross
3423
3424 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3425 echo "configure:3426: checking whether we are using GNU C" >&5
3426 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3427   echo $ac_n "(cached) $ac_c" 1>&6
3428 else
3429   cat > conftest.c <<EOF
3430 #ifdef __GNUC__
3431   yes;
3432 #endif
3433 EOF
3434 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3435   ac_cv_prog_gcc=yes
3436 else
3437   ac_cv_prog_gcc=no
3438 fi
3439 fi
3440
3441 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3442
3443 if test $ac_cv_prog_gcc = yes; then
3444   GCC=yes
3445 else
3446   GCC=
3447 fi
3448
3449 ac_test_CFLAGS="${CFLAGS+set}"
3450 ac_save_CFLAGS="$CFLAGS"
3451 CFLAGS=
3452 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3453 echo "configure:3454: checking whether ${CC-cc} accepts -g" >&5
3454 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3455   echo $ac_n "(cached) $ac_c" 1>&6
3456 else
3457   echo 'void f(){}' > conftest.c
3458 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3459   ac_cv_prog_cc_g=yes
3460 else
3461   ac_cv_prog_cc_g=no
3462 fi
3463 rm -f conftest*
3464
3465 fi
3466
3467 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3468 if test "$ac_test_CFLAGS" = set; then
3469   CFLAGS="$ac_save_CFLAGS"
3470 elif test $ac_cv_prog_cc_g = yes; then
3471   if test "$GCC" = yes; then
3472     CFLAGS="-g -O2"
3473   else
3474     CFLAGS="-g"
3475   fi
3476 else
3477   if test "$GCC" = yes; then
3478     CFLAGS="-O2"
3479   else
3480     CFLAGS=
3481   fi
3482 fi
3483
3484 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3485 if test "${with_gnu_ld+set}" = set; then
3486   withval="$with_gnu_ld"
3487   test "$withval" = no || with_gnu_ld=yes
3488 else
3489   with_gnu_ld=no
3490 fi
3491
3492 ac_prog=ld
3493 if test "$GCC" = yes; then
3494   # Check if gcc -print-prog-name=ld gives a path.
3495   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3496 echo "configure:3497: checking for ld used by GCC" >&5
3497   case $host in
3498   *-*-mingw*)
3499     # gcc leaves a trailing carriage return which upsets mingw
3500     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3501   *)
3502     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3503   esac
3504   case $ac_prog in
3505     # Accept absolute paths.
3506     [\\/]* | [A-Za-z]:[\\/]*)
3507       re_direlt='/[^/][^/]*/\.\./'
3508       # Canonicalize the path of ld
3509       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3510       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3511         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3512       done
3513       test -z "$LD" && LD="$ac_prog"
3514       ;;
3515   "")
3516     # If it fails, then pretend we aren't using GCC.
3517     ac_prog=ld
3518     ;;
3519   *)
3520     # If it is relative, then search for the first ld in PATH.
3521     with_gnu_ld=unknown
3522     ;;
3523   esac
3524 elif test "$with_gnu_ld" = yes; then
3525   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3526 echo "configure:3527: checking for GNU ld" >&5
3527 else
3528   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3529 echo "configure:3530: checking for non-GNU ld" >&5
3530 fi
3531 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3532   echo $ac_n "(cached) $ac_c" 1>&6
3533 else
3534   if test -z "$LD"; then
3535   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3536   for ac_dir in $PATH; do
3537     test -z "$ac_dir" && ac_dir=.
3538     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3539       lt_cv_path_LD="$ac_dir/$ac_prog"
3540       # Check to see if the program is GNU ld.  I'd rather use --version,
3541       # but apparently some GNU ld's only accept -v.
3542       # Break only if it was the GNU/non-GNU ld that we prefer.
3543       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3544         test "$with_gnu_ld" != no && break
3545       else
3546         test "$with_gnu_ld" != yes && break
3547       fi
3548     fi
3549   done
3550   IFS="$ac_save_ifs"
3551 else
3552   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3553 fi
3554 fi
3555
3556 LD="$lt_cv_path_LD"
3557 if test -n "$LD"; then
3558   echo "$ac_t""$LD" 1>&6
3559 else
3560   echo "$ac_t""no" 1>&6
3561 fi
3562 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3563 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3564 echo "configure:3565: checking if the linker ($LD) is GNU ld" >&5
3565 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3566   echo $ac_n "(cached) $ac_c" 1>&6
3567 else
3568   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3569 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3570   lt_cv_prog_gnu_ld=yes
3571 else
3572   lt_cv_prog_gnu_ld=no
3573 fi
3574 fi
3575
3576 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3577 with_gnu_ld=$lt_cv_prog_gnu_ld
3578
3579
3580 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3581 echo "configure:3582: checking for $LD option to reload object files" >&5
3582 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3583   echo $ac_n "(cached) $ac_c" 1>&6
3584 else
3585   lt_cv_ld_reload_flag='-r'
3586 fi
3587
3588 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3589 reload_flag=$lt_cv_ld_reload_flag
3590 test -n "$reload_flag" && reload_flag=" $reload_flag"
3591
3592 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3593 echo "configure:3594: checking for BSD-compatible nm" >&5
3594 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3595   echo $ac_n "(cached) $ac_c" 1>&6
3596 else
3597   if test -n "$NM"; then
3598   # Let the user override the test.
3599   lt_cv_path_NM="$NM"
3600 else
3601   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3602   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3603     test -z "$ac_dir" && ac_dir=.
3604     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3605     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3606       # Check to see if the nm accepts a BSD-compat flag.
3607       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3608       #   nm: unknown option "B" ignored
3609       # Tru64's nm complains that /dev/null is an invalid object file
3610       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3611         lt_cv_path_NM="$tmp_nm -B"
3612         break
3613       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3614         lt_cv_path_NM="$tmp_nm -p"
3615         break
3616       else
3617         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3618         continue # so that we can try to find one that supports BSD flags
3619       fi
3620     fi
3621   done
3622   IFS="$ac_save_ifs"
3623   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3624 fi
3625 fi
3626
3627 NM="$lt_cv_path_NM"
3628 echo "$ac_t""$NM" 1>&6
3629
3630 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3631 echo "configure:3632: checking whether ln -s works" >&5
3632 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3633   echo $ac_n "(cached) $ac_c" 1>&6
3634 else
3635   rm -f conftestdata
3636 if ln -s X conftestdata 2>/dev/null
3637 then
3638   rm -f conftestdata
3639   ac_cv_prog_LN_S="ln -s"
3640 else
3641   ac_cv_prog_LN_S=ln
3642 fi
3643 fi
3644 LN_S="$ac_cv_prog_LN_S"
3645 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3646   echo "$ac_t""yes" 1>&6
3647 else
3648   echo "$ac_t""no" 1>&6
3649 fi
3650
3651 echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
3652 echo "configure:3653: checking how to recognise dependant libraries" >&5
3653 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3654   echo $ac_n "(cached) $ac_c" 1>&6
3655 else
3656   lt_cv_file_magic_cmd='$MAGIC_CMD'
3657 lt_cv_file_magic_test_file=
3658 lt_cv_deplibs_check_method='unknown'
3659 # Need to set the preceding variable on all platforms that support
3660 # interlibrary dependencies.
3661 # 'none' -- dependencies not supported.
3662 # `unknown' -- same as none, but documents that we really don't know.
3663 # 'pass_all' -- all dependencies passed with no checks.
3664 # 'test_compile' -- check by making test program.
3665 # 'file_magic [[regex]]' -- check by looking for files in library path
3666 # which responds to the $file_magic_cmd with a given egrep regex.
3667 # If you have `file' or equivalent on your system and you're not sure
3668 # whether `pass_all' will *always* work, you probably want this one.
3669
3670 case $host_os in
3671 aix4* | aix5*)
3672   lt_cv_deplibs_check_method=pass_all
3673   ;;
3674
3675 beos*)
3676   lt_cv_deplibs_check_method=pass_all
3677   ;;
3678
3679 bsdi4*)
3680   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3681   lt_cv_file_magic_cmd='/usr/bin/file -L'
3682   lt_cv_file_magic_test_file=/shlib/libc.so
3683   ;;
3684
3685 cygwin* | mingw* | pw32*)
3686   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3687   lt_cv_file_magic_cmd='$OBJDUMP -f'
3688   ;;
3689
3690 darwin* | rhapsody*)
3691   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3692   lt_cv_file_magic_cmd='/usr/bin/file -L'
3693   case "$host_os" in
3694   rhapsody* | darwin1.[012])
3695     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3696     ;;
3697   *) # Darwin 1.3 on
3698     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3699     ;;
3700   esac
3701   ;;
3702
3703 freebsd*)
3704   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3705     case $host_cpu in
3706     i*86 )
3707       # Not sure whether the presence of OpenBSD here was a mistake.
3708       # Let's accept both of them until this is cleared up.
3709       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3710       lt_cv_file_magic_cmd=/usr/bin/file
3711       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3712       ;;
3713     esac
3714   else
3715     lt_cv_deplibs_check_method=pass_all
3716   fi
3717   ;;
3718
3719 gnu*)
3720   lt_cv_deplibs_check_method=pass_all
3721   ;;
3722
3723 hpux10.20*|hpux11*)
3724   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3725   lt_cv_file_magic_cmd=/usr/bin/file
3726   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3727   ;;
3728
3729 irix5* | irix6*)
3730   case $host_os in
3731   irix5*)
3732     # this will be overridden with pass_all, but let us keep it just in case
3733     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3734     ;;
3735   *)
3736     case $LD in
3737     *-32|*"-32 ") libmagic=32-bit;;
3738     *-n32|*"-n32 ") libmagic=N32;;
3739     *-64|*"-64 ") libmagic=64-bit;;
3740     *) libmagic=never-match;;
3741     esac
3742     # this will be overridden with pass_all, but let us keep it just in case
3743     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3744     ;;
3745   esac
3746   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3747   lt_cv_deplibs_check_method=pass_all
3748   ;;
3749
3750 # This must be Linux ELF.
3751 linux-gnu*)
3752   case $host_cpu in
3753   alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
3754     lt_cv_deplibs_check_method=pass_all ;;
3755   *)
3756     # glibc up to 2.1.1 does not perform some relocations on ARM
3757     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3758   esac
3759   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3760   ;;
3761
3762 netbsd*)
3763   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3764     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3765   else
3766     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3767   fi
3768   ;;
3769
3770 newos6*)
3771   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3772   lt_cv_file_magic_cmd=/usr/bin/file
3773   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3774   ;;
3775
3776 openbsd*)
3777   lt_cv_file_magic_cmd=/usr/bin/file
3778   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3779   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3780     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3781   else
3782     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3783   fi
3784   ;;
3785
3786 osf3* | osf4* | osf5*)
3787   # this will be overridden with pass_all, but let us keep it just in case
3788   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3789   lt_cv_file_magic_test_file=/shlib/libc.so
3790   lt_cv_deplibs_check_method=pass_all
3791   ;;
3792
3793 sco3.2v5*)
3794   lt_cv_deplibs_check_method=pass_all
3795   ;;
3796
3797 solaris*)
3798   lt_cv_deplibs_check_method=pass_all
3799   lt_cv_file_magic_test_file=/lib/libc.so
3800   ;;
3801
3802 sysv5uw[78]* | sysv4*uw2*)
3803   lt_cv_deplibs_check_method=pass_all
3804   ;;
3805
3806 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3807   case $host_vendor in
3808   motorola)
3809     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]'
3810     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3811     ;;
3812   ncr)
3813     lt_cv_deplibs_check_method=pass_all
3814     ;;
3815   sequent)
3816     lt_cv_file_magic_cmd='/bin/file'
3817     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3818     ;;
3819   sni)
3820     lt_cv_file_magic_cmd='/bin/file'
3821     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3822     lt_cv_file_magic_test_file=/lib/libc.so
3823     ;;
3824   esac
3825   ;;
3826 esac
3827
3828 fi
3829
3830 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3831 file_magic_cmd=$lt_cv_file_magic_cmd
3832 deplibs_check_method=$lt_cv_deplibs_check_method
3833
3834 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3835 echo "configure:3836: checking for object suffix" >&5
3836 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3837   echo $ac_n "(cached) $ac_c" 1>&6
3838 else
3839   rm -f conftest*
3840 echo 'int i = 1;' > conftest.$ac_ext
3841 if { (eval echo configure:3842: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3842   for ac_file in conftest.*; do
3843     case $ac_file in
3844     *.c) ;;
3845     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3846     esac
3847   done
3848 else
3849   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3850 fi
3851 rm -f conftest*
3852 fi
3853
3854 echo "$ac_t""$ac_cv_objext" 1>&6
3855 OBJEXT=$ac_cv_objext
3856 ac_objext=$ac_cv_objext
3857
3858
3859
3860
3861 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3862 echo "configure:3863: checking for executable suffix" >&5
3863 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3864   echo $ac_n "(cached) $ac_c" 1>&6
3865 else
3866   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3867   ac_cv_exeext=.exe
3868 else
3869   rm -f conftest*
3870   echo 'int main () { return 0; }' > conftest.$ac_ext
3871   ac_cv_exeext=
3872   if { (eval echo configure:3873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3873     for file in conftest.*; do
3874       case $file in
3875       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3876       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3877       esac
3878     done
3879   else
3880     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3881   fi
3882   rm -f conftest*
3883   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3884 fi
3885 fi
3886
3887 EXEEXT=""
3888 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3889 echo "$ac_t""${ac_cv_exeext}" 1>&6
3890 ac_exeext=$EXEEXT
3891
3892 if test $host != $build; then
3893   ac_tool_prefix=${host_alias}-
3894 else
3895   ac_tool_prefix=
3896 fi
3897
3898
3899
3900
3901 # Check for command to grab the raw symbol name followed by C symbol from nm.
3902 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
3903 echo "configure:3904: checking command to parse $NM output" >&5
3904 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
3905   echo $ac_n "(cached) $ac_c" 1>&6
3906 else
3907   
3908 # These are sane defaults that work on at least a few old systems.
3909 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3910
3911 # Character class describing NM global symbol codes.
3912 symcode='[BCDEGRST]'
3913
3914 # Regexp to match symbols that can be accessed directly from C.
3915 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
3916
3917 # Transform the above into a raw symbol and a C symbol.
3918 symxfrm='\1 \2\3 \3'
3919
3920 # Transform an extracted symbol line into a proper C declaration
3921 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
3922
3923 # Transform an extracted symbol line into symbol name and symbol address
3924 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'"
3925
3926 # Define system-specific variables.
3927 case $host_os in
3928 aix*)
3929   symcode='[BCDT]'
3930   ;;
3931 cygwin* | mingw* | pw32*)
3932   symcode='[ABCDGISTW]'
3933   ;;
3934 hpux*) # Its linker distinguishes data from code symbols
3935   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3936   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'"
3937   ;;
3938 irix*)
3939   symcode='[BCDEGRST]'
3940   ;;
3941 solaris* | sysv5*)
3942   symcode='[BDT]'
3943   ;;
3944 sysv4)
3945   symcode='[DFNSTU]'
3946   ;;
3947 esac
3948
3949 # Handle CRLF in mingw tool chain
3950 opt_cr=
3951 case $host_os in
3952 mingw*)
3953   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3954   ;;
3955 esac
3956
3957 # If we're using GNU nm, then use its standard symbol codes.
3958 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
3959   symcode='[ABCDGISTW]'
3960 fi
3961
3962 # Try without a prefix undercore, then with it.
3963 for ac_symprfx in "" "_"; do
3964
3965   # Write the raw and C identifiers.
3966 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
3967
3968   # Check to see that the pipe works correctly.
3969   pipe_works=no
3970   rm -f conftest*
3971   cat > conftest.$ac_ext <<EOF
3972 #ifdef __cplusplus
3973 extern "C" {
3974 #endif
3975 char nm_test_var;
3976 void nm_test_func(){}
3977 #ifdef __cplusplus
3978 }
3979 #endif
3980 int main(){nm_test_var='a';nm_test_func();return(0);}
3981 EOF
3982
3983   if { (eval echo configure:3984: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3984     # Now try to grab the symbols.
3985     nlist=conftest.nm
3986     if { (eval echo configure:3987: \"$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
3987       # Try sorting and uniquifying the output.
3988       if sort "$nlist" | uniq > "$nlist"T; then
3989         mv -f "$nlist"T "$nlist"
3990       else
3991         rm -f "$nlist"T
3992       fi
3993
3994       # Make sure that we snagged all the symbols we need.
3995       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
3996         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
3997           cat <<EOF > conftest.$ac_ext
3998 #ifdef __cplusplus
3999 extern "C" {
4000 #endif
4001
4002 EOF
4003           # Now generate the symbol file.
4004           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4005
4006           cat <<EOF >> conftest.$ac_ext
4007 #if defined (__STDC__) && __STDC__
4008 # define lt_ptr void *
4009 #else
4010 # define lt_ptr char *
4011 # define const
4012 #endif
4013
4014 /* The mapping between symbol names and symbols. */
4015 const struct {
4016   const char *name;
4017   lt_ptr address;
4018 }
4019 lt_preloaded_symbols[] =
4020 {
4021 EOF
4022           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4023           cat <<\EOF >> conftest.$ac_ext
4024   {0, (lt_ptr) 0}
4025 };
4026
4027 #ifdef __cplusplus
4028 }
4029 #endif
4030 EOF
4031           # Now try linking the two files.
4032           mv conftest.$ac_objext conftstm.$ac_objext
4033           save_LIBS="$LIBS"
4034           save_CFLAGS="$CFLAGS"
4035           LIBS="conftstm.$ac_objext"
4036           CFLAGS="$CFLAGS$no_builtin_flag"
4037           if { (eval echo configure:4038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4038             pipe_works=yes
4039           fi
4040           LIBS="$save_LIBS"
4041           CFLAGS="$save_CFLAGS"
4042         else
4043           echo "cannot find nm_test_func in $nlist" >&5
4044         fi
4045       else
4046         echo "cannot find nm_test_var in $nlist" >&5
4047       fi
4048     else
4049       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4050     fi
4051   else
4052     echo "$progname: failed program was:" >&5
4053     cat conftest.$ac_ext >&5
4054   fi
4055   rm -f conftest* conftst*
4056
4057   # Do not use the global_symbol_pipe unless it works.
4058   if test "$pipe_works" = yes; then
4059     break
4060   else
4061     lt_cv_sys_global_symbol_pipe=
4062   fi
4063 done
4064
4065 fi
4066
4067 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4068 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4069   global_symbol_to_cdecl=
4070   global_symbol_to_c_name_address=
4071 else
4072   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4073   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4074 fi
4075 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4076 then
4077   echo "$ac_t""failed" 1>&6
4078 else
4079   echo "$ac_t""ok" 1>&6
4080 fi
4081
4082 for ac_hdr in dlfcn.h
4083 do
4084 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4085 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4086 echo "configure:4087: checking for $ac_hdr" >&5
4087 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4088   echo $ac_n "(cached) $ac_c" 1>&6
4089 else
4090   cat > conftest.$ac_ext <<EOF
4091 #line 4092 "configure"
4092 #include "confdefs.h"
4093 #include <$ac_hdr>
4094 EOF
4095 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4096 { (eval echo configure:4097: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4097 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4098 if test -z "$ac_err"; then
4099   rm -rf conftest*
4100   eval "ac_cv_header_$ac_safe=yes"
4101 else
4102   echo "$ac_err" >&5
4103   echo "configure: failed program was:" >&5
4104   cat conftest.$ac_ext >&5
4105   rm -rf conftest*
4106   eval "ac_cv_header_$ac_safe=no"
4107 fi
4108 rm -f conftest*
4109 fi
4110 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4111   echo "$ac_t""yes" 1>&6
4112     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4113   cat >> confdefs.h <<EOF
4114 #define $ac_tr_hdr 1
4115 EOF
4116  
4117 else
4118   echo "$ac_t""no" 1>&6
4119 fi
4120 done
4121
4122
4123
4124
4125
4126 # Only perform the check for file, if the check method requires it
4127 case $deplibs_check_method in
4128 file_magic*)
4129   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4130     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4131 echo "configure:4132: checking for ${ac_tool_prefix}file" >&5
4132 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4133   echo $ac_n "(cached) $ac_c" 1>&6
4134 else
4135   case $MAGIC_CMD in
4136   /*)
4137   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4138   ;;
4139   ?:/*)
4140   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4141   ;;
4142   *)
4143   ac_save_MAGIC_CMD="$MAGIC_CMD"
4144   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4145   ac_dummy="/usr/bin:$PATH"
4146   for ac_dir in $ac_dummy; do
4147     test -z "$ac_dir" && ac_dir=.
4148     if test -f $ac_dir/${ac_tool_prefix}file; then
4149       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4150       if test -n "$file_magic_test_file"; then
4151         case $deplibs_check_method in
4152         "file_magic "*)
4153           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4154           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4155           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4156             egrep "$file_magic_regex" > /dev/null; then
4157             :
4158           else
4159             cat <<EOF 1>&2
4160
4161 *** Warning: the command libtool uses to detect shared libraries,
4162 *** $file_magic_cmd, produces output that libtool cannot recognize.
4163 *** The result is that libtool may fail to recognize shared libraries
4164 *** as such.  This will affect the creation of libtool libraries that
4165 *** depend on shared libraries, but programs linked with such libtool
4166 *** libraries will work regardless of this problem.  Nevertheless, you
4167 *** may want to report the problem to your system manager and/or to
4168 *** bug-libtool@gnu.org
4169
4170 EOF
4171           fi ;;
4172         esac
4173       fi
4174       break
4175     fi
4176   done
4177   IFS="$ac_save_ifs"
4178   MAGIC_CMD="$ac_save_MAGIC_CMD"
4179   ;;
4180 esac
4181 fi
4182
4183 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4184 if test -n "$MAGIC_CMD"; then
4185   echo "$ac_t""$MAGIC_CMD" 1>&6
4186 else
4187   echo "$ac_t""no" 1>&6
4188 fi
4189
4190 if test -z "$lt_cv_path_MAGIC_CMD"; then
4191   if test -n "$ac_tool_prefix"; then
4192     echo $ac_n "checking for file""... $ac_c" 1>&6
4193 echo "configure:4194: checking for file" >&5
4194 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4195   echo $ac_n "(cached) $ac_c" 1>&6
4196 else
4197   case $MAGIC_CMD in
4198   /*)
4199   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4200   ;;
4201   ?:/*)
4202   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4203   ;;
4204   *)
4205   ac_save_MAGIC_CMD="$MAGIC_CMD"
4206   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4207   ac_dummy="/usr/bin:$PATH"
4208   for ac_dir in $ac_dummy; do
4209     test -z "$ac_dir" && ac_dir=.
4210     if test -f $ac_dir/file; then
4211       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4212       if test -n "$file_magic_test_file"; then
4213         case $deplibs_check_method in
4214         "file_magic "*)
4215           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4216           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4217           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4218             egrep "$file_magic_regex" > /dev/null; then
4219             :
4220           else
4221             cat <<EOF 1>&2
4222
4223 *** Warning: the command libtool uses to detect shared libraries,
4224 *** $file_magic_cmd, produces output that libtool cannot recognize.
4225 *** The result is that libtool may fail to recognize shared libraries
4226 *** as such.  This will affect the creation of libtool libraries that
4227 *** depend on shared libraries, but programs linked with such libtool
4228 *** libraries will work regardless of this problem.  Nevertheless, you
4229 *** may want to report the problem to your system manager and/or to
4230 *** bug-libtool@gnu.org
4231
4232 EOF
4233           fi ;;
4234         esac
4235       fi
4236       break
4237     fi
4238   done
4239   IFS="$ac_save_ifs"
4240   MAGIC_CMD="$ac_save_MAGIC_CMD"
4241   ;;
4242 esac
4243 fi
4244
4245 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4246 if test -n "$MAGIC_CMD"; then
4247   echo "$ac_t""$MAGIC_CMD" 1>&6
4248 else
4249   echo "$ac_t""no" 1>&6
4250 fi
4251
4252   else
4253     MAGIC_CMD=:
4254   fi
4255 fi
4256
4257   fi
4258   ;;
4259 esac
4260
4261 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4262 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4263 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4264 echo "configure:4265: checking for $ac_word" >&5
4265 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4266   echo $ac_n "(cached) $ac_c" 1>&6
4267 else
4268   if test -n "$RANLIB"; then
4269   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4270 else
4271   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4272   ac_dummy="$PATH"
4273   for ac_dir in $ac_dummy; do
4274     test -z "$ac_dir" && ac_dir=.
4275     if test -f $ac_dir/$ac_word; then
4276       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4277       break
4278     fi
4279   done
4280   IFS="$ac_save_ifs"
4281 fi
4282 fi
4283 RANLIB="$ac_cv_prog_RANLIB"
4284 if test -n "$RANLIB"; then
4285   echo "$ac_t""$RANLIB" 1>&6
4286 else
4287   echo "$ac_t""no" 1>&6
4288 fi
4289
4290
4291 if test -z "$ac_cv_prog_RANLIB"; then
4292 if test -n "$ac_tool_prefix"; then
4293   # Extract the first word of "ranlib", so it can be a program name with args.
4294 set dummy ranlib; ac_word=$2
4295 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4296 echo "configure:4297: checking for $ac_word" >&5
4297 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4298   echo $ac_n "(cached) $ac_c" 1>&6
4299 else
4300   if test -n "$RANLIB"; then
4301   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4302 else
4303   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4304   ac_dummy="$PATH"
4305   for ac_dir in $ac_dummy; do
4306     test -z "$ac_dir" && ac_dir=.
4307     if test -f $ac_dir/$ac_word; then
4308       ac_cv_prog_RANLIB="ranlib"
4309       break
4310     fi
4311   done
4312   IFS="$ac_save_ifs"
4313   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4314 fi
4315 fi
4316 RANLIB="$ac_cv_prog_RANLIB"
4317 if test -n "$RANLIB"; then
4318   echo "$ac_t""$RANLIB" 1>&6
4319 else
4320   echo "$ac_t""no" 1>&6
4321 fi
4322
4323 else
4324   RANLIB=":"
4325 fi
4326 fi
4327
4328 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4329 set dummy ${ac_tool_prefix}strip; ac_word=$2
4330 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4331 echo "configure:4332: checking for $ac_word" >&5
4332 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4333   echo $ac_n "(cached) $ac_c" 1>&6
4334 else
4335   if test -n "$STRIP"; then
4336   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4337 else
4338   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4339   ac_dummy="$PATH"
4340   for ac_dir in $ac_dummy; do
4341     test -z "$ac_dir" && ac_dir=.
4342     if test -f $ac_dir/$ac_word; then
4343       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4344       break
4345     fi
4346   done
4347   IFS="$ac_save_ifs"
4348 fi
4349 fi
4350 STRIP="$ac_cv_prog_STRIP"
4351 if test -n "$STRIP"; then
4352   echo "$ac_t""$STRIP" 1>&6
4353 else
4354   echo "$ac_t""no" 1>&6
4355 fi
4356
4357
4358 if test -z "$ac_cv_prog_STRIP"; then
4359 if test -n "$ac_tool_prefix"; then
4360   # Extract the first word of "strip", so it can be a program name with args.
4361 set dummy strip; ac_word=$2
4362 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4363 echo "configure:4364: checking for $ac_word" >&5
4364 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4365   echo $ac_n "(cached) $ac_c" 1>&6
4366 else
4367   if test -n "$STRIP"; then
4368   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4369 else
4370   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4371   ac_dummy="$PATH"
4372   for ac_dir in $ac_dummy; do
4373     test -z "$ac_dir" && ac_dir=.
4374     if test -f $ac_dir/$ac_word; then
4375       ac_cv_prog_STRIP="strip"
4376       break
4377     fi
4378   done
4379   IFS="$ac_save_ifs"
4380   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4381 fi
4382 fi
4383 STRIP="$ac_cv_prog_STRIP"
4384 if test -n "$STRIP"; then
4385   echo "$ac_t""$STRIP" 1>&6
4386 else
4387   echo "$ac_t""no" 1>&6
4388 fi
4389
4390 else
4391   STRIP=":"
4392 fi
4393 fi
4394
4395
4396 enable_dlopen=yes
4397 enable_win32_dll=yes
4398
4399 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4400 if test "${enable_libtool_lock+set}" = set; then
4401   enableval="$enable_libtool_lock"
4402   :
4403 fi
4404
4405 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4406
4407 # Some flags need to be propagated to the compiler or linker for good
4408 # libtool support.
4409 case $host in
4410 *-*-irix6*)
4411   # Find out which ABI we are using.
4412   echo '#line 4413 "configure"' > conftest.$ac_ext
4413   if { (eval echo configure:4414: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4414     case `/usr/bin/file conftest.$ac_objext` in
4415     *32-bit*)
4416       LD="${LD-ld} -32"
4417       ;;
4418     *N32*)
4419       LD="${LD-ld} -n32"
4420       ;;
4421     *64-bit*)
4422       LD="${LD-ld} -64"
4423       ;;
4424     esac
4425   fi
4426   rm -rf conftest*
4427   ;;
4428
4429 *-*-sco3.2v5*)
4430   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4431   SAVE_CFLAGS="$CFLAGS"
4432   CFLAGS="$CFLAGS -belf"
4433   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4434 echo "configure:4435: checking whether the C compiler needs -belf" >&5
4435 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4436   echo $ac_n "(cached) $ac_c" 1>&6
4437 else
4438   
4439      ac_ext=c
4440 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4441 ac_cpp='$CPP $CPPFLAGS'
4442 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4443 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4444 cross_compiling=$ac_cv_prog_cc_cross
4445
4446      cat > conftest.$ac_ext <<EOF
4447 #line 4448 "configure"
4448 #include "confdefs.h"
4449
4450 int main() {
4451
4452 ; return 0; }
4453 EOF
4454 if { (eval echo configure:4455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4455   rm -rf conftest*
4456   lt_cv_cc_needs_belf=yes
4457 else
4458   echo "configure: failed program was:" >&5
4459   cat conftest.$ac_ext >&5
4460   rm -rf conftest*
4461   lt_cv_cc_needs_belf=no
4462 fi
4463 rm -f conftest*
4464      ac_ext=c
4465 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4466 ac_cpp='$CPP $CPPFLAGS'
4467 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4468 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4469 cross_compiling=$ac_cv_prog_cc_cross
4470
4471 fi
4472
4473 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4474   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4475     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4476     CFLAGS="$SAVE_CFLAGS"
4477   fi
4478   ;;
4479
4480 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4481   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4482 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4483 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4484 echo "configure:4485: checking for $ac_word" >&5
4485 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4486   echo $ac_n "(cached) $ac_c" 1>&6
4487 else
4488   if test -n "$DLLTOOL"; then
4489   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4490 else
4491   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4492   ac_dummy="$PATH"
4493   for ac_dir in $ac_dummy; do
4494     test -z "$ac_dir" && ac_dir=.
4495     if test -f $ac_dir/$ac_word; then
4496       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4497       break
4498     fi
4499   done
4500   IFS="$ac_save_ifs"
4501 fi
4502 fi
4503 DLLTOOL="$ac_cv_prog_DLLTOOL"
4504 if test -n "$DLLTOOL"; then
4505   echo "$ac_t""$DLLTOOL" 1>&6
4506 else
4507   echo "$ac_t""no" 1>&6
4508 fi
4509
4510
4511 if test -z "$ac_cv_prog_DLLTOOL"; then
4512 if test -n "$ac_tool_prefix"; then
4513   # Extract the first word of "dlltool", so it can be a program name with args.
4514 set dummy dlltool; ac_word=$2
4515 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4516 echo "configure:4517: checking for $ac_word" >&5
4517 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4518   echo $ac_n "(cached) $ac_c" 1>&6
4519 else
4520   if test -n "$DLLTOOL"; then
4521   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4522 else
4523   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4524   ac_dummy="$PATH"
4525   for ac_dir in $ac_dummy; do
4526     test -z "$ac_dir" && ac_dir=.
4527     if test -f $ac_dir/$ac_word; then
4528       ac_cv_prog_DLLTOOL="dlltool"
4529       break
4530     fi
4531   done
4532   IFS="$ac_save_ifs"
4533   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4534 fi
4535 fi
4536 DLLTOOL="$ac_cv_prog_DLLTOOL"
4537 if test -n "$DLLTOOL"; then
4538   echo "$ac_t""$DLLTOOL" 1>&6
4539 else
4540   echo "$ac_t""no" 1>&6
4541 fi
4542
4543 else
4544   DLLTOOL="false"
4545 fi
4546 fi
4547
4548   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4549 set dummy ${ac_tool_prefix}as; ac_word=$2
4550 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4551 echo "configure:4552: checking for $ac_word" >&5
4552 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4553   echo $ac_n "(cached) $ac_c" 1>&6
4554 else
4555   if test -n "$AS"; then
4556   ac_cv_prog_AS="$AS" # Let the user override the test.
4557 else
4558   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4559   ac_dummy="$PATH"
4560   for ac_dir in $ac_dummy; do
4561     test -z "$ac_dir" && ac_dir=.
4562     if test -f $ac_dir/$ac_word; then
4563       ac_cv_prog_AS="${ac_tool_prefix}as"
4564       break
4565     fi
4566   done
4567   IFS="$ac_save_ifs"
4568 fi
4569 fi
4570 AS="$ac_cv_prog_AS"
4571 if test -n "$AS"; then
4572   echo "$ac_t""$AS" 1>&6
4573 else
4574   echo "$ac_t""no" 1>&6
4575 fi
4576
4577
4578 if test -z "$ac_cv_prog_AS"; then
4579 if test -n "$ac_tool_prefix"; then
4580   # Extract the first word of "as", so it can be a program name with args.
4581 set dummy as; ac_word=$2
4582 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4583 echo "configure:4584: checking for $ac_word" >&5
4584 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4585   echo $ac_n "(cached) $ac_c" 1>&6
4586 else
4587   if test -n "$AS"; then
4588   ac_cv_prog_AS="$AS" # Let the user override the test.
4589 else
4590   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4591   ac_dummy="$PATH"
4592   for ac_dir in $ac_dummy; do
4593     test -z "$ac_dir" && ac_dir=.
4594     if test -f $ac_dir/$ac_word; then
4595       ac_cv_prog_AS="as"
4596       break
4597     fi
4598   done
4599   IFS="$ac_save_ifs"
4600   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4601 fi
4602 fi
4603 AS="$ac_cv_prog_AS"
4604 if test -n "$AS"; then
4605   echo "$ac_t""$AS" 1>&6
4606 else
4607   echo "$ac_t""no" 1>&6
4608 fi
4609
4610 else
4611   AS="false"
4612 fi
4613 fi
4614
4615   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4616 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4617 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4618 echo "configure:4619: checking for $ac_word" >&5
4619 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4620   echo $ac_n "(cached) $ac_c" 1>&6
4621 else
4622   if test -n "$OBJDUMP"; then
4623   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4624 else
4625   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4626   ac_dummy="$PATH"
4627   for ac_dir in $ac_dummy; do
4628     test -z "$ac_dir" && ac_dir=.
4629     if test -f $ac_dir/$ac_word; then
4630       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4631       break
4632     fi
4633   done
4634   IFS="$ac_save_ifs"
4635 fi
4636 fi
4637 OBJDUMP="$ac_cv_prog_OBJDUMP"
4638 if test -n "$OBJDUMP"; then
4639   echo "$ac_t""$OBJDUMP" 1>&6
4640 else
4641   echo "$ac_t""no" 1>&6
4642 fi
4643
4644
4645 if test -z "$ac_cv_prog_OBJDUMP"; then
4646 if test -n "$ac_tool_prefix"; then
4647   # Extract the first word of "objdump", so it can be a program name with args.
4648 set dummy objdump; ac_word=$2
4649 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4650 echo "configure:4651: checking for $ac_word" >&5
4651 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4652   echo $ac_n "(cached) $ac_c" 1>&6
4653 else
4654   if test -n "$OBJDUMP"; then
4655   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4656 else
4657   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4658   ac_dummy="$PATH"
4659   for ac_dir in $ac_dummy; do
4660     test -z "$ac_dir" && ac_dir=.
4661     if test -f $ac_dir/$ac_word; then
4662       ac_cv_prog_OBJDUMP="objdump"
4663       break
4664     fi
4665   done
4666   IFS="$ac_save_ifs"
4667   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4668 fi
4669 fi
4670 OBJDUMP="$ac_cv_prog_OBJDUMP"
4671 if test -n "$OBJDUMP"; then
4672   echo "$ac_t""$OBJDUMP" 1>&6
4673 else
4674   echo "$ac_t""no" 1>&6
4675 fi
4676
4677 else
4678   OBJDUMP="false"
4679 fi
4680 fi
4681
4682
4683   # recent cygwin and mingw systems supply a stub DllMain which the user
4684   # can override, but on older systems we have to supply one
4685   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4686 echo "configure:4687: checking if libtool should supply DllMain function" >&5
4687 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4688   echo $ac_n "(cached) $ac_c" 1>&6
4689 else
4690   cat > conftest.$ac_ext <<EOF
4691 #line 4692 "configure"
4692 #include "confdefs.h"
4693
4694 int main() {
4695 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4696       DllMain (0, 0, 0);
4697 ; return 0; }
4698 EOF
4699 if { (eval echo configure:4700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4700   rm -rf conftest*
4701   lt_cv_need_dllmain=no
4702 else
4703   echo "configure: failed program was:" >&5
4704   cat conftest.$ac_ext >&5
4705   rm -rf conftest*
4706   lt_cv_need_dllmain=yes
4707 fi
4708 rm -f conftest*
4709 fi
4710
4711 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4712
4713   case $host/$CC in
4714   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4715     # old mingw systems require "-dll" to link a DLL, while more recent ones
4716     # require "-mdll"
4717     SAVE_CFLAGS="$CFLAGS"
4718     CFLAGS="$CFLAGS -mdll"
4719     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4720 echo "configure:4721: checking how to link DLLs" >&5
4721 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4722   echo $ac_n "(cached) $ac_c" 1>&6
4723 else
4724   cat > conftest.$ac_ext <<EOF
4725 #line 4726 "configure"
4726 #include "confdefs.h"
4727
4728 int main() {
4729
4730 ; return 0; }
4731 EOF
4732 if { (eval echo configure:4733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4733   rm -rf conftest*
4734   lt_cv_cc_dll_switch=-mdll
4735 else
4736   echo "configure: failed program was:" >&5
4737   cat conftest.$ac_ext >&5
4738   rm -rf conftest*
4739   lt_cv_cc_dll_switch=-dll
4740 fi
4741 rm -f conftest*
4742 fi
4743
4744 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4745     CFLAGS="$SAVE_CFLAGS" ;;
4746   *-*-cygwin* | *-*-pw32*)
4747     # cygwin systems need to pass --dll to the linker, and not link
4748     # crt.o which will require a WinMain@16 definition.
4749     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4750   esac
4751   ;;
4752   
4753 esac
4754
4755 # Sed substitution that helps us do robust quoting.  It backslashifies
4756 # metacharacters that are still active within double-quoted strings.
4757 Xsed='sed -e s/^X//'
4758 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4759
4760 # Same as above, but do not quote variable references.
4761 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4762
4763 # Sed substitution to delay expansion of an escaped shell variable in a
4764 # double_quote_subst'ed string.
4765 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4766
4767 # Constants:
4768 rm="rm -f"
4769
4770 # Global variables:
4771 default_ofile=libtool
4772 can_build_shared=yes
4773
4774 # All known linkers require a `.a' archive for static linking (except M$VC,
4775 # which needs '.lib').
4776 libext=a
4777 ltmain="$ac_aux_dir/ltmain.sh"
4778 ofile="$default_ofile"
4779 with_gnu_ld="$lt_cv_prog_gnu_ld"
4780 need_locks="$enable_libtool_lock"
4781
4782 old_CC="$CC"
4783 old_CFLAGS="$CFLAGS"
4784
4785 # Set sane defaults for various variables
4786 test -z "$AR" && AR=ar
4787 test -z "$AR_FLAGS" && AR_FLAGS=cru
4788 test -z "$AS" && AS=as
4789 test -z "$CC" && CC=cc
4790 test -z "$DLLTOOL" && DLLTOOL=dlltool
4791 test -z "$LD" && LD=ld
4792 test -z "$LN_S" && LN_S="ln -s"
4793 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4794 test -z "$NM" && NM=nm
4795 test -z "$OBJDUMP" && OBJDUMP=objdump
4796 test -z "$RANLIB" && RANLIB=:
4797 test -z "$STRIP" && STRIP=:
4798 test -z "$ac_objext" && ac_objext=o
4799
4800 if test x"$host" != x"$build"; then
4801   ac_tool_prefix=${host_alias}-
4802 else
4803   ac_tool_prefix=
4804 fi
4805
4806 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4807 case $host_os in
4808 linux-gnu*) ;;
4809 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4810 esac
4811
4812 case $host_os in
4813 aix3*)
4814   # AIX sometimes has problems with the GCC collect2 program.  For some
4815   # reason, if we set the COLLECT_NAMES environment variable, the problems
4816   # vanish in a puff of smoke.
4817   if test "X${COLLECT_NAMES+set}" != Xset; then
4818     COLLECT_NAMES=
4819     export COLLECT_NAMES
4820   fi
4821   ;;
4822 esac
4823
4824 # Determine commands to create old-style static archives.
4825 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4826 old_postinstall_cmds='chmod 644 $oldlib'
4827 old_postuninstall_cmds=
4828
4829 if test -n "$RANLIB"; then
4830   case $host_os in
4831   openbsd*)
4832     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4833     ;;
4834   *)
4835     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4836     ;;
4837   esac
4838   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4839 fi
4840
4841 # Allow CC to be a program name with arguments.
4842 set dummy $CC
4843 compiler="$2"
4844
4845 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4846 echo "configure:4847: checking for objdir" >&5
4847 rm -f .libs 2>/dev/null
4848 mkdir .libs 2>/dev/null
4849 if test -d .libs; then
4850   objdir=.libs
4851 else
4852   # MS-DOS does not allow filenames that begin with a dot.
4853   objdir=_libs
4854 fi
4855 rmdir .libs 2>/dev/null
4856 echo "$ac_t""$objdir" 1>&6
4857
4858
4859 # Check whether --with-pic or --without-pic was given.
4860 if test "${with_pic+set}" = set; then
4861   withval="$with_pic"
4862   pic_mode="$withval"
4863 else
4864   pic_mode=default
4865 fi
4866
4867 test -z "$pic_mode" && pic_mode=default
4868
4869 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4870 # in isolation, and that seeing it set (from the cache) indicates that
4871 # the associated values are set (in the cache) correctly too.
4872 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4873 echo "configure:4874: checking for $compiler option to produce PIC" >&5
4874 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4875   echo $ac_n "(cached) $ac_c" 1>&6
4876 else
4877    lt_cv_prog_cc_pic=
4878   lt_cv_prog_cc_shlib=
4879   lt_cv_prog_cc_wl=
4880   lt_cv_prog_cc_static=
4881   lt_cv_prog_cc_no_builtin=
4882   lt_cv_prog_cc_can_build_shared=$can_build_shared
4883
4884   if test "$GCC" = yes; then
4885     lt_cv_prog_cc_wl='-Wl,'
4886     lt_cv_prog_cc_static='-static'
4887
4888     case $host_os in
4889     aix*)
4890       # Below there is a dirty hack to force normal static linking with -ldl
4891       # The problem is because libdl dynamically linked with both libc and
4892       # libC (AIX C++ library), which obviously doesn't included in libraries
4893       # list by gcc. This cause undefined symbols with -static flags.
4894       # This hack allows C programs to be linked with "-static -ldl", but
4895       # not sure about C++ programs.
4896       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
4897       ;;
4898     amigaos*)
4899       # FIXME: we need at least 68020 code to build shared libraries, but
4900       # adding the `-m68020' flag to GCC prevents building anything better,
4901       # like `-m68040'.
4902       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
4903       ;;
4904     beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
4905       # PIC is the default for these OSes.
4906       ;;
4907     darwin* | rhapsody*)
4908       # PIC is the default on this platform
4909       # Common symbols not allowed in MH_DYLIB files
4910       lt_cv_prog_cc_pic='-fno-common'
4911       ;;
4912     cygwin* | mingw* | pw32* | os2*)
4913       # This hack is so that the source file can tell whether it is being
4914       # built for inclusion in a dll (and should export symbols for example).
4915       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4916       ;;
4917     sysv4*MP*)
4918       if test -d /usr/nec; then
4919          lt_cv_prog_cc_pic=-Kconform_pic
4920       fi
4921       ;;
4922     *)
4923       lt_cv_prog_cc_pic='-fPIC'
4924       ;;
4925     esac
4926   else
4927     # PORTME Check for PIC flags for the system compiler.
4928     case $host_os in
4929     aix3* | aix4* | aix5*)
4930       lt_cv_prog_cc_wl='-Wl,'
4931       # All AIX code is PIC.
4932       if test "$host_cpu" = ia64; then
4933         # AIX 5 now supports IA64 processor
4934         lt_cv_prog_cc_static='-Bstatic'
4935       else
4936         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
4937       fi
4938       ;;
4939
4940     hpux9* | hpux10* | hpux11*)
4941       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
4942       lt_cv_prog_cc_wl='-Wl,'
4943       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
4944       lt_cv_prog_cc_pic='+Z'
4945       ;;
4946
4947     irix5* | irix6*)
4948       lt_cv_prog_cc_wl='-Wl,'
4949       lt_cv_prog_cc_static='-non_shared'
4950       # PIC (with -KPIC) is the default.
4951       ;;
4952
4953     cygwin* | mingw* | pw32* | os2*)
4954       # This hack is so that the source file can tell whether it is being
4955       # built for inclusion in a dll (and should export symbols for example).
4956       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4957       ;;
4958
4959     newsos6)
4960       lt_cv_prog_cc_pic='-KPIC'
4961       lt_cv_prog_cc_static='-Bstatic'
4962       ;;
4963
4964     osf3* | osf4* | osf5*)
4965       # All OSF/1 code is PIC.
4966       lt_cv_prog_cc_wl='-Wl,'
4967       lt_cv_prog_cc_static='-non_shared'
4968       ;;
4969
4970     sco3.2v5*)
4971       lt_cv_prog_cc_pic='-Kpic'
4972       lt_cv_prog_cc_static='-dn'
4973       lt_cv_prog_cc_shlib='-belf'
4974       ;;
4975
4976     solaris*)
4977       lt_cv_prog_cc_pic='-KPIC'
4978       lt_cv_prog_cc_static='-Bstatic'
4979       lt_cv_prog_cc_wl='-Wl,'
4980       ;;
4981
4982     sunos4*)
4983       lt_cv_prog_cc_pic='-PIC'
4984       lt_cv_prog_cc_static='-Bstatic'
4985       lt_cv_prog_cc_wl='-Qoption ld '
4986       ;;
4987
4988     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4989       lt_cv_prog_cc_pic='-KPIC'
4990       lt_cv_prog_cc_static='-Bstatic'
4991       if test "x$host_vendor" = xsni; then
4992         lt_cv_prog_cc_wl='-LD'
4993       else
4994         lt_cv_prog_cc_wl='-Wl,'
4995       fi
4996       ;;
4997
4998     uts4*)
4999       lt_cv_prog_cc_pic='-pic'
5000       lt_cv_prog_cc_static='-Bstatic'
5001       ;;
5002
5003     sysv4*MP*)
5004       if test -d /usr/nec ;then
5005         lt_cv_prog_cc_pic='-Kconform_pic'
5006         lt_cv_prog_cc_static='-Bstatic'
5007       fi
5008       ;;
5009
5010     *)
5011       lt_cv_prog_cc_can_build_shared=no
5012       ;;
5013     esac
5014   fi
5015
5016 fi
5017
5018 if test -z "$lt_cv_prog_cc_pic"; then
5019   echo "$ac_t""none" 1>&6
5020 else
5021   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5022
5023   # Check to make sure the pic_flag actually works.
5024   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5025 echo "configure:5026: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5026   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5027   echo $ac_n "(cached) $ac_c" 1>&6
5028 else
5029       save_CFLAGS="$CFLAGS"
5030     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5031     cat > conftest.$ac_ext <<EOF
5032 #line 5033 "configure"
5033 #include "confdefs.h"
5034
5035 int main() {
5036
5037 ; return 0; }
5038 EOF
5039 if { (eval echo configure:5040: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5040   rm -rf conftest*
5041         case $host_os in
5042       hpux9* | hpux10* | hpux11*)
5043         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5044         # they create non-PIC objects.  So, if there were any warnings, we
5045         # assume that PIC is not supported.
5046         if test -s conftest.err; then
5047           lt_cv_prog_cc_pic_works=no
5048         else
5049           lt_cv_prog_cc_pic_works=yes
5050         fi
5051         ;;
5052       *)
5053         lt_cv_prog_cc_pic_works=yes
5054         ;;
5055       esac
5056     
5057 else
5058   echo "configure: failed program was:" >&5
5059   cat conftest.$ac_ext >&5
5060   rm -rf conftest*
5061         lt_cv_prog_cc_pic_works=no
5062     
5063 fi
5064 rm -f conftest*
5065     CFLAGS="$save_CFLAGS"
5066   
5067 fi
5068
5069
5070   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5071     lt_cv_prog_cc_pic=
5072     lt_cv_prog_cc_can_build_shared=no
5073   else
5074     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5075   fi
5076
5077   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5078 fi
5079
5080 # Check for any special shared library compilation flags.
5081 if test -n "$lt_cv_prog_cc_shlib"; then
5082   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5083   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5084   else
5085    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5086     lt_cv_prog_cc_can_build_shared=no
5087   fi
5088 fi
5089
5090 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5091 echo "configure:5092: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5092 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5093   echo $ac_n "(cached) $ac_c" 1>&6
5094 else
5095     lt_cv_prog_cc_static_works=no
5096   save_LDFLAGS="$LDFLAGS"
5097   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5098   cat > conftest.$ac_ext <<EOF
5099 #line 5100 "configure"
5100 #include "confdefs.h"
5101
5102 int main() {
5103
5104 ; return 0; }
5105 EOF
5106 if { (eval echo configure:5107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5107   rm -rf conftest*
5108   lt_cv_prog_cc_static_works=yes
5109 else
5110   echo "configure: failed program was:" >&5
5111   cat conftest.$ac_ext >&5
5112 fi
5113 rm -f conftest*
5114   LDFLAGS="$save_LDFLAGS"
5115
5116 fi
5117
5118
5119 # Belt *and* braces to stop my trousers falling down:
5120 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5121 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5122
5123 pic_flag="$lt_cv_prog_cc_pic"
5124 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5125 wl="$lt_cv_prog_cc_wl"
5126 link_static_flag="$lt_cv_prog_cc_static"
5127 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5128 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5129
5130
5131 # Check to see if options -o and -c are simultaneously supported by compiler
5132 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5133 echo "configure:5134: checking if $compiler supports -c -o file.$ac_objext" >&5
5134 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5135   echo $ac_n "(cached) $ac_c" 1>&6
5136 else
5137   
5138 $rm -r conftest 2>/dev/null
5139 mkdir conftest
5140 cd conftest
5141 echo "int some_variable = 0;" > conftest.$ac_ext
5142 mkdir out
5143 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5144 # that will create temporary files in the current directory regardless of
5145 # the output directory.  Thus, making CWD read-only will cause this test
5146 # to fail, enabling locking or at least warning the user not to do parallel
5147 # builds.
5148 chmod -w .
5149 save_CFLAGS="$CFLAGS"
5150 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5151 compiler_c_o=no
5152 if { (eval echo configure:5153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5153   # The compiler can only warn and ignore the option if not recognized
5154   # So say no if there are warnings
5155   if test -s out/conftest.err; then
5156     lt_cv_compiler_c_o=no
5157   else
5158     lt_cv_compiler_c_o=yes
5159   fi
5160 else
5161   # Append any errors to the config.log.
5162   cat out/conftest.err 1>&5
5163   lt_cv_compiler_c_o=no
5164 fi
5165 CFLAGS="$save_CFLAGS"
5166 chmod u+w .
5167 $rm conftest* out/*
5168 rmdir out
5169 cd ..
5170 rmdir conftest
5171 $rm -r conftest 2>/dev/null
5172
5173 fi
5174
5175 compiler_c_o=$lt_cv_compiler_c_o
5176 echo "$ac_t""$compiler_c_o" 1>&6
5177
5178 if test x"$compiler_c_o" = x"yes"; then
5179   # Check to see if we can write to a .lo
5180   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5181 echo "configure:5182: checking if $compiler supports -c -o file.lo" >&5
5182   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5183   echo $ac_n "(cached) $ac_c" 1>&6
5184 else
5185   
5186   lt_cv_compiler_o_lo=no
5187   save_CFLAGS="$CFLAGS"
5188   CFLAGS="$CFLAGS -c -o conftest.lo"
5189   save_objext="$ac_objext"
5190   ac_objext=lo
5191   cat > conftest.$ac_ext <<EOF
5192 #line 5193 "configure"
5193 #include "confdefs.h"
5194
5195 int main() {
5196 int some_variable = 0;
5197 ; return 0; }
5198 EOF
5199 if { (eval echo configure:5200: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5200   rm -rf conftest*
5201       # The compiler can only warn and ignore the option if not recognized
5202     # So say no if there are warnings
5203     if test -s conftest.err; then
5204       lt_cv_compiler_o_lo=no
5205     else
5206       lt_cv_compiler_o_lo=yes
5207     fi
5208   
5209 else
5210   echo "configure: failed program was:" >&5
5211   cat conftest.$ac_ext >&5
5212 fi
5213 rm -f conftest*
5214   ac_objext="$save_objext"
5215   CFLAGS="$save_CFLAGS"
5216   
5217 fi
5218
5219   compiler_o_lo=$lt_cv_compiler_o_lo
5220   echo "$ac_t""$compiler_o_lo" 1>&6
5221 else
5222   compiler_o_lo=no
5223 fi
5224
5225 # Check to see if we can do hard links to lock some files if needed
5226 hard_links="nottested"
5227 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5228   # do not overwrite the value of need_locks provided by the user
5229   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5230 echo "configure:5231: checking if we can lock with hard links" >&5
5231   hard_links=yes
5232   $rm conftest*
5233   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5234   touch conftest.a
5235   ln conftest.a conftest.b 2>&5 || hard_links=no
5236   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5237   echo "$ac_t""$hard_links" 1>&6
5238   if test "$hard_links" = no; then
5239     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5240     need_locks=warn
5241   fi
5242 else
5243   need_locks=no
5244 fi
5245
5246 if test "$GCC" = yes; then
5247   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5248   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5249 echo "configure:5250: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5250   echo "int some_variable = 0;" > conftest.$ac_ext
5251   save_CFLAGS="$CFLAGS"
5252   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5253   compiler_rtti_exceptions=no
5254   cat > conftest.$ac_ext <<EOF
5255 #line 5256 "configure"
5256 #include "confdefs.h"
5257
5258 int main() {
5259 int some_variable = 0;
5260 ; return 0; }
5261 EOF
5262 if { (eval echo configure:5263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5263   rm -rf conftest*
5264       # The compiler can only warn and ignore the option if not recognized
5265     # So say no if there are warnings
5266     if test -s conftest.err; then
5267       compiler_rtti_exceptions=no
5268     else
5269       compiler_rtti_exceptions=yes
5270     fi
5271   
5272 else
5273   echo "configure: failed program was:" >&5
5274   cat conftest.$ac_ext >&5
5275 fi
5276 rm -f conftest*
5277   CFLAGS="$save_CFLAGS"
5278   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5279
5280   if test "$compiler_rtti_exceptions" = "yes"; then
5281     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5282   else
5283     no_builtin_flag=' -fno-builtin'
5284   fi
5285 fi
5286
5287 # See if the linker supports building shared libraries.
5288 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5289 echo "configure:5290: checking whether the linker ($LD) supports shared libraries" >&5
5290
5291 allow_undefined_flag=
5292 no_undefined_flag=
5293 need_lib_prefix=unknown
5294 need_version=unknown
5295 # when you set need_version to no, make sure it does not cause -set_version
5296 # flags to be left without arguments
5297 archive_cmds=
5298 archive_expsym_cmds=
5299 old_archive_from_new_cmds=
5300 old_archive_from_expsyms_cmds=
5301 export_dynamic_flag_spec=
5302 whole_archive_flag_spec=
5303 thread_safe_flag_spec=
5304 hardcode_into_libs=no
5305 hardcode_libdir_flag_spec=
5306 hardcode_libdir_separator=
5307 hardcode_direct=no
5308 hardcode_minus_L=no
5309 hardcode_shlibpath_var=unsupported
5310 runpath_var=
5311 link_all_deplibs=unknown
5312 always_export_symbols=no
5313 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5314 # include_expsyms should be a list of space-separated symbols to be *always*
5315 # included in the symbol list
5316 include_expsyms=
5317 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5318 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5319 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5320 # as well as any symbol that contains `d'.
5321 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5322 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5323 # platforms (ab)use it in PIC code, but their linkers get confused if
5324 # the symbol is explicitly referenced.  Since portable code cannot
5325 # rely on this symbol name, it's probably fine to never include it in
5326 # preloaded symbol tables.
5327 extract_expsyms_cmds=
5328
5329 case $host_os in
5330 cygwin* | mingw* | pw32*)
5331   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5332   # When not using gcc, we currently assume that we are using
5333   # Microsoft Visual C++.
5334   if test "$GCC" != yes; then
5335     with_gnu_ld=no
5336   fi
5337   ;;
5338 openbsd*)
5339   with_gnu_ld=no
5340   ;;
5341 esac
5342
5343 ld_shlibs=yes
5344 if test "$with_gnu_ld" = yes; then
5345   # If archive_cmds runs LD, not CC, wlarc should be empty
5346   wlarc='${wl}'
5347
5348   # See if GNU ld supports shared libraries.
5349   case $host_os in
5350   aix3* | aix4* | aix5*)
5351     # On AIX, the GNU linker is very broken
5352     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5353     ld_shlibs=no
5354     cat <<EOF 1>&2
5355
5356 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5357 *** to be unable to reliably create shared libraries on AIX.
5358 *** Therefore, libtool is disabling shared libraries support.  If you
5359 *** really care for shared libraries, you may want to modify your PATH
5360 *** so that a non-GNU linker is found, and then restart.
5361
5362 EOF
5363     ;;
5364
5365   amigaos*)
5366     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)'
5367     hardcode_libdir_flag_spec='-L$libdir'
5368     hardcode_minus_L=yes
5369
5370     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5371     # that the semantics of dynamic libraries on AmigaOS, at least up
5372     # to version 4, is to share data among multiple programs linked
5373     # with the same dynamic library.  Since this doesn't match the
5374     # behavior of shared libraries on other platforms, we can use
5375     # them.
5376     ld_shlibs=no
5377     ;;
5378
5379   beos*)
5380     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5381       allow_undefined_flag=unsupported
5382       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5383       # support --undefined.  This deserves some investigation.  FIXME
5384       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5385     else
5386       ld_shlibs=no
5387     fi
5388     ;;
5389
5390   cygwin* | mingw* | pw32*)
5391     # hardcode_libdir_flag_spec is actually meaningless, as there is
5392     # no search path for DLLs.
5393     hardcode_libdir_flag_spec='-L$libdir'
5394     allow_undefined_flag=unsupported
5395     always_export_symbols=yes
5396
5397     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5398       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5399       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5400       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5401       else $CC -o impgen impgen.c ; fi)~
5402       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5403
5404     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5405
5406     # cygwin and mingw dlls have different entry points and sets of symbols
5407     # to exclude.
5408     # FIXME: what about values for MSVC?
5409     dll_entry=__cygwin_dll_entry@12
5410     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5411     case $host_os in
5412     mingw*)
5413       # mingw values
5414       dll_entry=_DllMainCRTStartup@12
5415       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5416       ;;
5417     esac
5418
5419     # mingw and cygwin differ, and it's simplest to just exclude the union
5420     # of the two symbol sets.
5421     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5422
5423     # recent cygwin and mingw systems supply a stub DllMain which the user
5424     # can override, but on older systems we have to supply one (in ltdll.c)
5425     if test "x$lt_cv_need_dllmain" = "xyes"; then
5426       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5427       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~
5428         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5429     else
5430       ltdll_obj=
5431       ltdll_cmds=
5432     fi
5433
5434     # Extract the symbol export list from an `--export-all' def file,
5435     # then regenerate the def file from the symbol export list, so that
5436     # the compiled dll only exports the symbol export list.
5437     # Be careful not to strip the DATA tag left be newer dlltools.
5438     export_symbols_cmds="$ltdll_cmds"'
5439       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5440       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5441
5442     # If the export-symbols file already is a .def file (1st line
5443     # is EXPORTS), use it as is.
5444     # If DATA tags from a recent dlltool are present, honour them!
5445     archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
5446         cp $export_symbols $output_objdir/$soname-def;
5447       else
5448         echo EXPORTS > $output_objdir/$soname-def;
5449         _lt_hint=1;
5450         cat $export_symbols | while read symbol; do
5451          set dummy \$symbol;
5452          case \$# in
5453            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5454            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5455          esac;
5456          _lt_hint=`expr 1 + \$_lt_hint`;
5457         done;
5458       fi~
5459       '"$ltdll_cmds"'
5460       $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~
5461       $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~
5462       $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~
5463       $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~
5464       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5465     ;;
5466
5467   netbsd*)
5468     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5469       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5470       wlarc=
5471     else
5472       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5473       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5474     fi
5475     ;;
5476
5477   solaris* | sysv5*)
5478     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5479       ld_shlibs=no
5480       cat <<EOF 1>&2
5481
5482 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5483 *** create shared libraries on Solaris systems.  Therefore, libtool
5484 *** is disabling shared libraries support.  We urge you to upgrade GNU
5485 *** binutils to release 2.9.1 or newer.  Another option is to modify
5486 *** your PATH or compiler configuration so that the native linker is
5487 *** used, and then restart.
5488
5489 EOF
5490     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5491       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5492       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5493     else
5494       ld_shlibs=no
5495     fi
5496     ;;
5497
5498   sunos4*)
5499     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5500     wlarc=
5501     hardcode_direct=yes
5502     hardcode_shlibpath_var=no
5503     ;;
5504
5505   *)
5506     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5507       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5508       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5509     else
5510       ld_shlibs=no
5511     fi
5512     ;;
5513   esac
5514
5515   if test "$ld_shlibs" = yes; then
5516     runpath_var=LD_RUN_PATH
5517     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5518     export_dynamic_flag_spec='${wl}--export-dynamic'
5519     case $host_os in
5520     cygwin* | mingw* | pw32*)
5521       # dlltool doesn't understand --whole-archive et. al.
5522       whole_archive_flag_spec=
5523       ;;
5524     *)
5525       # ancient GNU ld didn't support --whole-archive et. al.
5526       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5527         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5528       else
5529         whole_archive_flag_spec=
5530       fi
5531       ;;
5532     esac
5533   fi
5534 else
5535   # PORTME fill in a description of your system's linker (not GNU ld)
5536   case $host_os in
5537   aix3*)
5538     allow_undefined_flag=unsupported
5539     always_export_symbols=yes
5540     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'
5541     # Note: this linker hardcodes the directories in LIBPATH if there
5542     # are no directories specified by -L.
5543     hardcode_minus_L=yes
5544     if test "$GCC" = yes && test -z "$link_static_flag"; then
5545       # Neither direct hardcoding nor static linking is supported with a
5546       # broken collect2.
5547       hardcode_direct=unsupported
5548     fi
5549     ;;
5550
5551   aix4* | aix5*)
5552     if test "$host_cpu" = ia64; then
5553       # On IA64, the linker does run time linking by default, so we don't
5554       # have to do anything special.
5555       aix_use_runtimelinking=no
5556       exp_sym_flag='-Bexport'
5557       no_entry_flag=""
5558     else
5559       aix_use_runtimelinking=no
5560
5561       # Test if we are trying to use run time linking or normal
5562       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5563       # need to do runtime linking.
5564       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5565         for ld_flag in $LDFLAGS; do
5566           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5567             aix_use_runtimelinking=yes
5568             break
5569           fi
5570         done
5571       esac
5572
5573       exp_sym_flag='-bexport'
5574       no_entry_flag='-bnoentry'
5575     fi
5576
5577     # When large executables or shared objects are built, AIX ld can
5578     # have problems creating the table of contents.  If linking a library
5579     # or program results in "error TOC overflow" add -mminimal-toc to
5580     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5581     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5582
5583     hardcode_direct=yes
5584     archive_cmds=''
5585     hardcode_libdir_separator=':'
5586     if test "$GCC" = yes; then
5587       case $host_os in aix4.[012]|aix4.[012].*)
5588         collect2name=`${CC} -print-prog-name=collect2`
5589         if test -f "$collect2name" && \
5590           strings "$collect2name" | grep resolve_lib_name >/dev/null
5591         then
5592           # We have reworked collect2
5593           hardcode_direct=yes
5594         else
5595           # We have old collect2
5596           hardcode_direct=unsupported
5597           # It fails to find uninstalled libraries when the uninstalled
5598           # path is not listed in the libpath.  Setting hardcode_minus_L
5599           # to unsupported forces relinking
5600           hardcode_minus_L=yes
5601           hardcode_libdir_flag_spec='-L$libdir'
5602           hardcode_libdir_separator=
5603         fi
5604       esac
5605
5606       shared_flag='-shared'
5607     else
5608       # not using gcc
5609       if test "$host_cpu" = ia64; then
5610         shared_flag='${wl}-G'
5611       else
5612         if test "$aix_use_runtimelinking" = yes; then
5613           shared_flag='${wl}-G'
5614         else
5615           shared_flag='${wl}-bM:SRE'
5616         fi
5617       fi
5618     fi
5619
5620     # It seems that -bexpall can do strange things, so it is better to
5621     # generate a list of symbols to export.
5622     always_export_symbols=yes
5623     if test "$aix_use_runtimelinking" = yes; then
5624       # Warning - without using the other runtime loading flags (-brtl),
5625       # -berok will link without error, but may produce a broken library.
5626       allow_undefined_flag='-berok'
5627       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5628       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"
5629     else
5630       if test "$host_cpu" = ia64; then
5631         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5632         allow_undefined_flag="-z nodefs"
5633         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"
5634       else
5635         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5636         # Warning - without using the other run time loading flags,
5637         # -berok will link without error, but may produce a broken library.
5638         allow_undefined_flag='${wl}-berok'
5639         # This is a bit strange, but is similar to how AIX traditionally builds
5640         # it's shared libraries.
5641         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'
5642       fi
5643     fi
5644     ;;
5645
5646   amigaos*)
5647     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)'
5648     hardcode_libdir_flag_spec='-L$libdir'
5649     hardcode_minus_L=yes
5650     # see comment about different semantics on the GNU ld section
5651     ld_shlibs=no
5652     ;;
5653
5654   cygwin* | mingw* | pw32*)
5655     # When not using gcc, we currently assume that we are using
5656     # Microsoft Visual C++.
5657     # hardcode_libdir_flag_spec is actually meaningless, as there is
5658     # no search path for DLLs.
5659     hardcode_libdir_flag_spec=' '
5660     allow_undefined_flag=unsupported
5661     # Tell ltmain to make .lib files, not .a files.
5662     libext=lib
5663     # FIXME: Setting linknames here is a bad hack.
5664     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5665     # The linker will automatically build a .lib file if we build a DLL.
5666     old_archive_from_new_cmds='true'
5667     # FIXME: Should let the user specify the lib program.
5668     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5669     fix_srcfile_path='`cygpath -w "$srcfile"`'
5670     ;;
5671
5672   darwin* | rhapsody*)
5673     case "$host_os" in
5674     rhapsody* | darwin1.[012])
5675       allow_undefined_flag='-undefined suppress'
5676       ;;
5677     *) # Darwin 1.3 on
5678       allow_undefined_flag='-flat_namespace -undefined suppress'
5679       ;;
5680     esac
5681     # FIXME: Relying on posixy $() will cause problems for
5682     #        cross-compilation, but unfortunately the echo tests do not
5683     #        yet detect zsh echo's removal of \ escapes.
5684     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'
5685     # We need to add '_' to the symbols in $export_symbols first
5686     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5687     hardcode_direct=yes
5688     hardcode_shlibpath_var=no
5689     whole_archive_flag_spec='-all_load $convenience'
5690     ;;
5691
5692   freebsd1*)
5693     ld_shlibs=no
5694     ;;
5695
5696   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5697   # support.  Future versions do this automatically, but an explicit c++rt0.o
5698   # does not break anything, and helps significantly (at the cost of a little
5699   # extra space).
5700   freebsd2.2*)
5701     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5702     hardcode_libdir_flag_spec='-R$libdir'
5703     hardcode_direct=yes
5704     hardcode_shlibpath_var=no
5705     ;;
5706
5707   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5708   freebsd2*)
5709     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5710     hardcode_direct=yes
5711     hardcode_minus_L=yes
5712     hardcode_shlibpath_var=no
5713     ;;
5714
5715   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5716   freebsd*)
5717     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5718     hardcode_libdir_flag_spec='-R$libdir'
5719     hardcode_direct=yes
5720     hardcode_shlibpath_var=no
5721     ;;
5722
5723   hpux9* | hpux10* | hpux11*)
5724     case $host_os in
5725     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' ;;
5726     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5727     esac
5728     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5729     hardcode_libdir_separator=:
5730     hardcode_direct=yes
5731     hardcode_minus_L=yes # Not in the search PATH, but as the default
5732                          # location of the library.
5733     export_dynamic_flag_spec='${wl}-E'
5734     ;;
5735
5736   irix5* | irix6*)
5737     if test "$GCC" = yes; then
5738       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'
5739     else
5740       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'
5741     fi
5742     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5743     hardcode_libdir_separator=:
5744     link_all_deplibs=yes
5745     ;;
5746
5747   netbsd*)
5748     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5749       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5750     else
5751       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5752     fi
5753     hardcode_libdir_flag_spec='-R$libdir'
5754     hardcode_direct=yes
5755     hardcode_shlibpath_var=no
5756     ;;
5757
5758   newsos6)
5759     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5760     hardcode_direct=yes
5761     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5762     hardcode_libdir_separator=:
5763     hardcode_shlibpath_var=no
5764     ;;
5765
5766   openbsd*)
5767     hardcode_direct=yes
5768     hardcode_shlibpath_var=no
5769     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5770       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
5771       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5772       export_dynamic_flag_spec='${wl}-E'
5773     else
5774       case "$host_os" in
5775       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5776         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5777         hardcode_libdir_flag_spec='-R$libdir'
5778         ;;
5779       *)
5780         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
5781         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5782         ;;
5783       esac
5784     fi
5785     ;;
5786
5787   os2*)
5788     hardcode_libdir_flag_spec='-L$libdir'
5789     hardcode_minus_L=yes
5790     allow_undefined_flag=unsupported
5791     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'
5792     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5793     ;;
5794
5795   osf3*)
5796     if test "$GCC" = yes; then
5797       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5798       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'
5799     else
5800       allow_undefined_flag=' -expect_unresolved \*'
5801       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'
5802     fi
5803     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5804     hardcode_libdir_separator=:
5805     ;;
5806
5807   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5808     if test "$GCC" = yes; then
5809       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5810       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'
5811       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5812     else
5813       allow_undefined_flag=' -expect_unresolved \*'
5814       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'
5815       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5816       $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'
5817
5818       #Both c and cxx compiler support -rpath directly
5819       hardcode_libdir_flag_spec='-rpath $libdir'
5820     fi
5821     hardcode_libdir_separator=:
5822     ;;
5823
5824   sco3.2v5*)
5825     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5826     hardcode_shlibpath_var=no
5827     runpath_var=LD_RUN_PATH
5828     hardcode_runpath_var=yes
5829     export_dynamic_flag_spec='${wl}-Bexport'
5830     ;;
5831
5832   solaris*)
5833     # gcc --version < 3.0 without binutils cannot create self contained
5834     # shared libraries reliably, requiring libgcc.a to resolve some of
5835     # the object symbols generated in some cases.  Libraries that use
5836     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5837     # a copy of libgcc.a into every shared library to guarantee resolving
5838     # such symbols causes other problems:  According to Tim Van Holder
5839     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5840     # (to the application) exception stack for one thing.
5841     no_undefined_flag=' -z defs'
5842     if test "$GCC" = yes; then
5843       case `$CC --version 2>/dev/null` in
5844       [12].*)
5845         cat <<EOF 1>&2
5846
5847 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5848 *** create self contained shared libraries on Solaris systems, without
5849 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5850 *** -no-undefined support, which will at least allow you to build shared
5851 *** libraries.  However, you may find that when you link such libraries
5852 *** into an application without using GCC, you have to manually add
5853 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5854 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5855 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5856
5857 EOF
5858         no_undefined_flag=
5859         ;;
5860       esac
5861     fi
5862     # $CC -shared without GNU ld will not create a library from C++
5863     # object files and a static libstdc++, better avoid it by now
5864     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5865     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5866                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5867     hardcode_libdir_flag_spec='-R$libdir'
5868     hardcode_shlibpath_var=no
5869     case $host_os in
5870     solaris2.[0-5] | solaris2.[0-5].*) ;;
5871     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5872       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5873     esac
5874     link_all_deplibs=yes
5875     ;;
5876
5877   sunos4*)
5878     if test "x$host_vendor" = xsequent; then
5879       # Use $CC to link under sequent, because it throws in some extra .o
5880       # files that make .init and .fini sections work.
5881       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5882     else
5883       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5884     fi
5885     hardcode_libdir_flag_spec='-L$libdir'
5886     hardcode_direct=yes
5887     hardcode_minus_L=yes
5888     hardcode_shlibpath_var=no
5889     ;;
5890
5891   sysv4)
5892     if test "x$host_vendor" = xsno; then
5893       archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
5894       hardcode_direct=yes # is this really true???
5895     else
5896       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5897       hardcode_direct=no #Motorola manual says yes, but my tests say they lie
5898     fi
5899     runpath_var='LD_RUN_PATH'
5900     hardcode_shlibpath_var=no
5901     ;;
5902
5903   sysv4.3*)
5904     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5905     hardcode_shlibpath_var=no
5906     export_dynamic_flag_spec='-Bexport'
5907     ;;
5908
5909   sysv5*)
5910     no_undefined_flag=' -z text'
5911     # $CC -shared without GNU ld will not create a library from C++
5912     # object files and a static libstdc++, better avoid it by now
5913     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5914     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5915                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5916     hardcode_libdir_flag_spec=
5917     hardcode_shlibpath_var=no
5918     runpath_var='LD_RUN_PATH'
5919     ;;
5920
5921   uts4*)
5922     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5923     hardcode_libdir_flag_spec='-L$libdir'
5924     hardcode_shlibpath_var=no
5925     ;;
5926
5927   dgux*)
5928     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5929     hardcode_libdir_flag_spec='-L$libdir'
5930     hardcode_shlibpath_var=no
5931     ;;
5932
5933   sysv4*MP*)
5934     if test -d /usr/nec; then
5935       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5936       hardcode_shlibpath_var=no
5937       runpath_var=LD_RUN_PATH
5938       hardcode_runpath_var=yes
5939       ld_shlibs=yes
5940     fi
5941     ;;
5942
5943   sysv4.2uw2*)
5944     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5945     hardcode_direct=yes
5946     hardcode_minus_L=no
5947     hardcode_shlibpath_var=no
5948     hardcode_runpath_var=yes
5949     runpath_var=LD_RUN_PATH
5950     ;;
5951
5952   sysv5uw7* | unixware7*)
5953     no_undefined_flag='${wl}-z ${wl}text'
5954     if test "$GCC" = yes; then
5955       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5956     else
5957       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5958     fi
5959     runpath_var='LD_RUN_PATH'
5960     hardcode_shlibpath_var=no
5961     ;;
5962
5963   *)
5964     ld_shlibs=no
5965     ;;
5966   esac
5967 fi
5968 echo "$ac_t""$ld_shlibs" 1>&6
5969 test "$ld_shlibs" = no && can_build_shared=no
5970
5971 # Check hardcoding attributes.
5972 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
5973 echo "configure:5974: checking how to hardcode library paths into programs" >&5
5974 hardcode_action=
5975 if test -n "$hardcode_libdir_flag_spec" || \
5976    test -n "$runpath_var"; then
5977
5978   # We can hardcode non-existant directories.
5979   if test "$hardcode_direct" != no &&
5980      # If the only mechanism to avoid hardcoding is shlibpath_var, we
5981      # have to relink, otherwise we might link with an installed library
5982      # when we should be linking with a yet-to-be-installed one
5983      ## test "$hardcode_shlibpath_var" != no &&
5984      test "$hardcode_minus_L" != no; then
5985     # Linking always hardcodes the temporary library directory.
5986     hardcode_action=relink
5987   else
5988     # We can link without hardcoding, and we can hardcode nonexisting dirs.
5989     hardcode_action=immediate
5990   fi
5991 else
5992   # We cannot hardcode anything, or else we can only hardcode existing
5993   # directories.
5994   hardcode_action=unsupported
5995 fi
5996 echo "$ac_t""$hardcode_action" 1>&6
5997
5998 striplib=
5999 old_striplib=
6000 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6001 echo "configure:6002: checking whether stripping libraries is possible" >&5
6002 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6003   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6004   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6005   echo "$ac_t""yes" 1>&6
6006 else
6007   echo "$ac_t""no" 1>&6
6008 fi
6009
6010 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6011 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6012
6013 # PORTME Fill in your ld.so characteristics
6014 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6015 echo "configure:6016: checking dynamic linker characteristics" >&5
6016 library_names_spec=
6017 libname_spec='lib$name'
6018 soname_spec=
6019 postinstall_cmds=
6020 postuninstall_cmds=
6021 finish_cmds=
6022 finish_eval=
6023 shlibpath_var=
6024 shlibpath_overrides_runpath=unknown
6025 version_type=none
6026 dynamic_linker="$host_os ld.so"
6027 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6028 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6029
6030 case $host_os in
6031 aix3*)
6032   version_type=linux
6033   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6034   shlibpath_var=LIBPATH
6035
6036   # AIX has no versioning support, so we append a major version to the name.
6037   soname_spec='${libname}${release}.so$major'
6038   ;;
6039
6040 aix4* | aix5*)
6041   version_type=linux
6042   if test "$host_cpu" = ia64; then
6043     # AIX 5 supports IA64
6044     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6045     shlibpath_var=LD_LIBRARY_PATH
6046   else
6047     # With GCC up to 2.95.x, collect2 would create an import file
6048     # for dependence libraries.  The import file would start with
6049     # the line `#! .'.  This would cause the generated library to
6050     # depend on `.', always an invalid library.  This was fixed in
6051     # development snapshots of GCC prior to 3.0.
6052     case $host_os in
6053       aix4 | aix4.[01] | aix4.[01].*)
6054         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6055              echo ' yes '
6056              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6057           :
6058         else
6059           can_build_shared=no
6060         fi
6061         ;;
6062     esac
6063     # AIX (on Power*) has no versioning support, so currently we can
6064     # not hardcode correct soname into executable. Probably we can
6065     # add versioning support to collect2, so additional links can
6066     # be useful in future.
6067     if test "$aix_use_runtimelinking" = yes; then
6068       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6069       # instead of lib<name>.a to let people know that these are not
6070       # typical AIX shared libraries.
6071       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6072     else
6073       # We preserve .a as extension for shared libraries through AIX4.2
6074       # and later when we are not doing run time linking.
6075       library_names_spec='${libname}${release}.a $libname.a'
6076       soname_spec='${libname}${release}.so$major'
6077     fi
6078     shlibpath_var=LIBPATH
6079   fi
6080   ;;
6081
6082 amigaos*)
6083   library_names_spec='$libname.ixlibrary $libname.a'
6084   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6085   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'
6086   ;;
6087
6088 beos*)
6089   library_names_spec='${libname}.so'
6090   dynamic_linker="$host_os ld.so"
6091   shlibpath_var=LIBRARY_PATH
6092   ;;
6093
6094 bsdi4*)
6095   version_type=linux
6096   need_version=no
6097   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6098   soname_spec='${libname}${release}.so$major'
6099   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6100   shlibpath_var=LD_LIBRARY_PATH
6101   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6102   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6103   export_dynamic_flag_spec=-rdynamic
6104   # the default ld.so.conf also contains /usr/contrib/lib and
6105   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6106   # libtool to hard-code these into programs
6107   ;;
6108
6109 cygwin* | mingw* | pw32*)
6110   version_type=windows
6111   need_version=no
6112   need_lib_prefix=no
6113   case $GCC,$host_os in
6114   yes,cygwin*)
6115     library_names_spec='$libname.dll.a'
6116     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6117     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6118       dldir=$destdir/`dirname \$dlpath`~
6119       test -d \$dldir || mkdir -p \$dldir~
6120       $install_prog .libs/$dlname \$dldir/$dlname'
6121     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6122       dlpath=$dir/\$dldll~
6123        $rm \$dlpath'
6124     ;;
6125   yes,mingw*)
6126     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6127     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
6128     ;;
6129   yes,pw32*)
6130     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6131     ;;
6132   *)
6133     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6134     ;;
6135   esac
6136   dynamic_linker='Win32 ld.exe'
6137   # FIXME: first we should search . and the directory the executable is in
6138   shlibpath_var=PATH
6139   ;;
6140
6141 darwin* | rhapsody*)
6142   dynamic_linker="$host_os dyld"
6143   version_type=darwin
6144   need_lib_prefix=no
6145   need_version=no
6146   # FIXME: Relying on posixy $() will cause problems for
6147   #        cross-compilation, but unfortunately the echo tests do not
6148   #        yet detect zsh echo's removal of \ escapes.
6149   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)'
6150   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6151   shlibpath_overrides_runpath=yes
6152   shlibpath_var=DYLD_LIBRARY_PATH
6153   ;;
6154
6155 freebsd1*)
6156   dynamic_linker=no
6157   ;;
6158
6159 freebsd*)
6160   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6161   version_type=freebsd-$objformat
6162   case $version_type in
6163     freebsd-elf*)
6164       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6165       need_version=no
6166       need_lib_prefix=no
6167       ;;
6168     freebsd-*)
6169       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6170       need_version=yes
6171       ;;
6172   esac
6173   shlibpath_var=LD_LIBRARY_PATH
6174   case $host_os in
6175   freebsd2*)
6176     shlibpath_overrides_runpath=yes
6177     ;;
6178   *)
6179     shlibpath_overrides_runpath=no
6180     hardcode_into_libs=yes
6181     ;;
6182   esac
6183   ;;
6184
6185 gnu*)
6186   version_type=linux
6187   need_lib_prefix=no
6188   need_version=no
6189   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6190   soname_spec='${libname}${release}.so$major'
6191   shlibpath_var=LD_LIBRARY_PATH
6192   hardcode_into_libs=yes
6193   ;;
6194
6195 hpux9* | hpux10* | hpux11*)
6196   # Give a soname corresponding to the major version so that dld.sl refuses to
6197   # link against other versions.
6198   dynamic_linker="$host_os dld.sl"
6199   version_type=sunos
6200   need_lib_prefix=no
6201   need_version=no
6202   shlibpath_var=SHLIB_PATH
6203   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6204   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6205   soname_spec='${libname}${release}.sl$major'
6206   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6207   postinstall_cmds='chmod 555 $lib'
6208   ;;
6209
6210 irix5* | irix6*)
6211   version_type=irix
6212   need_lib_prefix=no
6213   need_version=no
6214   soname_spec='${libname}${release}.so$major'
6215   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6216   case $host_os in
6217   irix5*)
6218     libsuff= shlibsuff=
6219     ;;
6220   *)
6221     case $LD in # libtool.m4 will add one of these switches to LD
6222     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6223     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6224     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6225     *) libsuff= shlibsuff= libmagic=never-match;;
6226     esac
6227     ;;
6228   esac
6229   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6230   shlibpath_overrides_runpath=no
6231   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6232   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6233   ;;
6234
6235 # No shared lib support for Linux oldld, aout, or coff.
6236 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6237   dynamic_linker=no
6238   ;;
6239
6240 # This must be Linux ELF.
6241 linux-gnu*)
6242   version_type=linux
6243   need_lib_prefix=no
6244   need_version=no
6245   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6246   soname_spec='${libname}${release}.so$major'
6247   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6248   shlibpath_var=LD_LIBRARY_PATH
6249   shlibpath_overrides_runpath=no
6250   # This implies no fast_install, which is unacceptable.
6251   # Some rework will be needed to allow for fast_install
6252   # before this can be enabled.
6253   hardcode_into_libs=yes
6254
6255   # We used to test for /lib/ld.so.1 and disable shared libraries on
6256   # powerpc, because MkLinux only supported shared libraries with the
6257   # GNU dynamic linker.  Since this was broken with cross compilers,
6258   # most powerpc-linux boxes support dynamic linking these days and
6259   # people can always --disable-shared, the test was removed, and we
6260   # assume the GNU/Linux dynamic linker is in use.
6261   dynamic_linker='GNU/Linux ld.so'
6262   ;;
6263
6264 netbsd*)
6265   version_type=sunos
6266   need_lib_prefix=no
6267   need_version=no
6268   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6269     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6270     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6271     dynamic_linker='NetBSD (a.out) ld.so'
6272   else
6273     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6274     soname_spec='${libname}${release}.so$major'
6275     dynamic_linker='NetBSD ld.elf_so'
6276   fi
6277   shlibpath_var=LD_LIBRARY_PATH
6278   shlibpath_overrides_runpath=yes
6279   hardcode_into_libs=yes
6280   ;;
6281
6282 newsos6)
6283   version_type=linux
6284   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6285   shlibpath_var=LD_LIBRARY_PATH
6286   shlibpath_overrides_runpath=yes
6287   ;;
6288
6289 openbsd*)
6290   version_type=sunos
6291   need_lib_prefix=no
6292   need_version=no
6293   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6294     case "$host_os" in
6295     openbsd2.[89] | openbsd2.[89].*)
6296       shlibpath_overrides_runpath=no
6297       ;;
6298     *)
6299       shlibpath_overrides_runpath=yes
6300       ;;
6301     esac
6302   else
6303     shlibpath_overrides_runpath=yes
6304   fi
6305   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6306   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6307   shlibpath_var=LD_LIBRARY_PATH
6308   ;;
6309
6310 os2*)
6311   libname_spec='$name'
6312   need_lib_prefix=no
6313   library_names_spec='$libname.dll $libname.a'
6314   dynamic_linker='OS/2 ld.exe'
6315   shlibpath_var=LIBPATH
6316   ;;
6317
6318 osf3* | osf4* | osf5*)
6319   version_type=osf
6320   need_version=no
6321   soname_spec='${libname}${release}.so'
6322   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6323   shlibpath_var=LD_LIBRARY_PATH
6324   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6325   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6326   ;;
6327
6328 sco3.2v5*)
6329   version_type=osf
6330   soname_spec='${libname}${release}.so$major'
6331   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6332   shlibpath_var=LD_LIBRARY_PATH
6333   ;;
6334
6335 solaris*)
6336   version_type=linux
6337   need_lib_prefix=no
6338   need_version=no
6339   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6340   soname_spec='${libname}${release}.so$major'
6341   shlibpath_var=LD_LIBRARY_PATH
6342   shlibpath_overrides_runpath=yes
6343   hardcode_into_libs=yes
6344   # ldd complains unless libraries are executable
6345   postinstall_cmds='chmod +x $lib'
6346   ;;
6347
6348 sunos4*)
6349   version_type=sunos
6350   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6351   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6352   shlibpath_var=LD_LIBRARY_PATH
6353   shlibpath_overrides_runpath=yes
6354   if test "$with_gnu_ld" = yes; then
6355     need_lib_prefix=no
6356   fi
6357   need_version=yes
6358   ;;
6359
6360 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6361   version_type=linux
6362   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6363   soname_spec='${libname}${release}.so$major'
6364   shlibpath_var=LD_LIBRARY_PATH
6365   case $host_vendor in
6366     sni)
6367       shlibpath_overrides_runpath=no
6368       ;;
6369     motorola)
6370       need_lib_prefix=no
6371       need_version=no
6372       shlibpath_overrides_runpath=no
6373       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6374       ;;
6375   esac
6376   ;;
6377
6378 uts4*)
6379   version_type=linux
6380   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6381   soname_spec='${libname}${release}.so$major'
6382   shlibpath_var=LD_LIBRARY_PATH
6383   ;;
6384
6385 dgux*)
6386   version_type=linux
6387   need_lib_prefix=no
6388   need_version=no
6389   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6390   soname_spec='${libname}${release}.so$major'
6391   shlibpath_var=LD_LIBRARY_PATH
6392   ;;
6393
6394 sysv4*MP*)
6395   if test -d /usr/nec ;then
6396     version_type=linux
6397     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6398     soname_spec='$libname.so.$major'
6399     shlibpath_var=LD_LIBRARY_PATH
6400   fi
6401   ;;
6402
6403 *)
6404   dynamic_linker=no
6405   ;;
6406 esac
6407 echo "$ac_t""$dynamic_linker" 1>&6
6408 test "$dynamic_linker" = no && can_build_shared=no
6409
6410 # Report the final consequences.
6411 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6412 echo "configure:6413: checking if libtool supports shared libraries" >&5
6413 echo "$ac_t""$can_build_shared" 1>&6
6414
6415 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6416 echo "configure:6417: checking whether to build shared libraries" >&5
6417 test "$can_build_shared" = "no" && enable_shared=no
6418
6419 # On AIX, shared libraries and static libraries use the same namespace, and
6420 # are all built from PIC.
6421 case "$host_os" in
6422 aix3*)
6423   test "$enable_shared" = yes && enable_static=no
6424   if test -n "$RANLIB"; then
6425     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6426     postinstall_cmds='$RANLIB $lib'
6427   fi
6428   ;;
6429
6430 aix4*)
6431   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6432     test "$enable_shared" = yes && enable_static=no
6433   fi
6434   ;;
6435 esac
6436 echo "$ac_t""$enable_shared" 1>&6
6437
6438 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6439 echo "configure:6440: checking whether to build static libraries" >&5
6440 # Make sure either enable_shared or enable_static is yes.
6441 test "$enable_shared" = yes || enable_static=yes
6442 echo "$ac_t""$enable_static" 1>&6
6443
6444 if test "$hardcode_action" = relink; then
6445   # Fast installation is not supported
6446   enable_fast_install=no
6447 elif test "$shlibpath_overrides_runpath" = yes ||
6448      test "$enable_shared" = no; then
6449   # Fast installation is not necessary
6450   enable_fast_install=needless
6451 fi
6452
6453 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6454 if test "$GCC" = yes; then
6455   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6456 fi
6457
6458 if test "x$enable_dlopen" != xyes; then
6459   enable_dlopen=unknown
6460   enable_dlopen_self=unknown
6461   enable_dlopen_self_static=unknown
6462 else
6463   lt_cv_dlopen=no
6464   lt_cv_dlopen_libs=
6465
6466   case $host_os in
6467   beos*)
6468     lt_cv_dlopen="load_add_on"
6469     lt_cv_dlopen_libs=
6470     lt_cv_dlopen_self=yes
6471     ;;
6472
6473   cygwin* | mingw* | pw32*)
6474     lt_cv_dlopen="LoadLibrary"
6475     lt_cv_dlopen_libs=
6476    ;;
6477
6478   *)
6479     echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6480 echo "configure:6481: checking for shl_load" >&5
6481 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6482   echo $ac_n "(cached) $ac_c" 1>&6
6483 else
6484   cat > conftest.$ac_ext <<EOF
6485 #line 6486 "configure"
6486 #include "confdefs.h"
6487 /* System header to define __stub macros and hopefully few prototypes,
6488     which can conflict with char shl_load(); below.  */
6489 #include <assert.h>
6490 /* Override any gcc2 internal prototype to avoid an error.  */
6491 /* We use char because int might match the return type of a gcc2
6492     builtin and then its argument prototype would still apply.  */
6493 char shl_load();
6494 char (*f)();
6495
6496 int main() {
6497
6498 /* The GNU C library defines this for functions which it implements
6499     to always fail with ENOSYS.  Some functions are actually named
6500     something starting with __ and the normal name is an alias.  */
6501 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6502 choke me
6503 #else
6504 f = shl_load;
6505 #endif
6506
6507 ; return 0; }
6508 EOF
6509 if { (eval echo configure:6510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6510   rm -rf conftest*
6511   eval "ac_cv_func_shl_load=yes"
6512 else
6513   echo "configure: failed program was:" >&5
6514   cat conftest.$ac_ext >&5
6515   rm -rf conftest*
6516   eval "ac_cv_func_shl_load=no"
6517 fi
6518 rm -f conftest*
6519 fi
6520
6521 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6522   echo "$ac_t""yes" 1>&6
6523   lt_cv_dlopen="shl_load"
6524 else
6525   echo "$ac_t""no" 1>&6
6526 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6527 echo "configure:6528: checking for shl_load in -ldld" >&5
6528 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6529 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6530   echo $ac_n "(cached) $ac_c" 1>&6
6531 else
6532   ac_save_LIBS="$LIBS"
6533 LIBS="-ldld  $LIBS"
6534 cat > conftest.$ac_ext <<EOF
6535 #line 6536 "configure"
6536 #include "confdefs.h"
6537 /* Override any gcc2 internal prototype to avoid an error.  */
6538 /* We use char because int might match the return type of a gcc2
6539     builtin and then its argument prototype would still apply.  */
6540 char shl_load();
6541
6542 int main() {
6543 shl_load()
6544 ; return 0; }
6545 EOF
6546 if { (eval echo configure:6547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6547   rm -rf conftest*
6548   eval "ac_cv_lib_$ac_lib_var=yes"
6549 else
6550   echo "configure: failed program was:" >&5
6551   cat conftest.$ac_ext >&5
6552   rm -rf conftest*
6553   eval "ac_cv_lib_$ac_lib_var=no"
6554 fi
6555 rm -f conftest*
6556 LIBS="$ac_save_LIBS"
6557
6558 fi
6559 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6560   echo "$ac_t""yes" 1>&6
6561   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6562 else
6563   echo "$ac_t""no" 1>&6
6564 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6565 echo "configure:6566: checking for dlopen" >&5
6566 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6567   echo $ac_n "(cached) $ac_c" 1>&6
6568 else
6569   cat > conftest.$ac_ext <<EOF
6570 #line 6571 "configure"
6571 #include "confdefs.h"
6572 /* System header to define __stub macros and hopefully few prototypes,
6573     which can conflict with char dlopen(); below.  */
6574 #include <assert.h>
6575 /* Override any gcc2 internal prototype to avoid an error.  */
6576 /* We use char because int might match the return type of a gcc2
6577     builtin and then its argument prototype would still apply.  */
6578 char dlopen();
6579 char (*f)();
6580
6581 int main() {
6582
6583 /* The GNU C library defines this for functions which it implements
6584     to always fail with ENOSYS.  Some functions are actually named
6585     something starting with __ and the normal name is an alias.  */
6586 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6587 choke me
6588 #else
6589 f = dlopen;
6590 #endif
6591
6592 ; return 0; }
6593 EOF
6594 if { (eval echo configure:6595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6595   rm -rf conftest*
6596   eval "ac_cv_func_dlopen=yes"
6597 else
6598   echo "configure: failed program was:" >&5
6599   cat conftest.$ac_ext >&5
6600   rm -rf conftest*
6601   eval "ac_cv_func_dlopen=no"
6602 fi
6603 rm -f conftest*
6604 fi
6605
6606 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6607   echo "$ac_t""yes" 1>&6
6608   lt_cv_dlopen="dlopen"
6609 else
6610   echo "$ac_t""no" 1>&6
6611 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6612 echo "configure:6613: checking for dlopen in -ldl" >&5
6613 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6614 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6615   echo $ac_n "(cached) $ac_c" 1>&6
6616 else
6617   ac_save_LIBS="$LIBS"
6618 LIBS="-ldl  $LIBS"
6619 cat > conftest.$ac_ext <<EOF
6620 #line 6621 "configure"
6621 #include "confdefs.h"
6622 /* Override any gcc2 internal prototype to avoid an error.  */
6623 /* We use char because int might match the return type of a gcc2
6624     builtin and then its argument prototype would still apply.  */
6625 char dlopen();
6626
6627 int main() {
6628 dlopen()
6629 ; return 0; }
6630 EOF
6631 if { (eval echo configure:6632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6632   rm -rf conftest*
6633   eval "ac_cv_lib_$ac_lib_var=yes"
6634 else
6635   echo "configure: failed program was:" >&5
6636   cat conftest.$ac_ext >&5
6637   rm -rf conftest*
6638   eval "ac_cv_lib_$ac_lib_var=no"
6639 fi
6640 rm -f conftest*
6641 LIBS="$ac_save_LIBS"
6642
6643 fi
6644 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6645   echo "$ac_t""yes" 1>&6
6646   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6647 else
6648   echo "$ac_t""no" 1>&6
6649 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6650 echo "configure:6651: checking for dlopen in -lsvld" >&5
6651 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6652 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6653   echo $ac_n "(cached) $ac_c" 1>&6
6654 else
6655   ac_save_LIBS="$LIBS"
6656 LIBS="-lsvld  $LIBS"
6657 cat > conftest.$ac_ext <<EOF
6658 #line 6659 "configure"
6659 #include "confdefs.h"
6660 /* Override any gcc2 internal prototype to avoid an error.  */
6661 /* We use char because int might match the return type of a gcc2
6662     builtin and then its argument prototype would still apply.  */
6663 char dlopen();
6664
6665 int main() {
6666 dlopen()
6667 ; return 0; }
6668 EOF
6669 if { (eval echo configure:6670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6670   rm -rf conftest*
6671   eval "ac_cv_lib_$ac_lib_var=yes"
6672 else
6673   echo "configure: failed program was:" >&5
6674   cat conftest.$ac_ext >&5
6675   rm -rf conftest*
6676   eval "ac_cv_lib_$ac_lib_var=no"
6677 fi
6678 rm -f conftest*
6679 LIBS="$ac_save_LIBS"
6680
6681 fi
6682 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6683   echo "$ac_t""yes" 1>&6
6684   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6685 else
6686   echo "$ac_t""no" 1>&6
6687 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6688 echo "configure:6689: checking for dld_link in -ldld" >&5
6689 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6690 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6691   echo $ac_n "(cached) $ac_c" 1>&6
6692 else
6693   ac_save_LIBS="$LIBS"
6694 LIBS="-ldld  $LIBS"
6695 cat > conftest.$ac_ext <<EOF
6696 #line 6697 "configure"
6697 #include "confdefs.h"
6698 /* Override any gcc2 internal prototype to avoid an error.  */
6699 /* We use char because int might match the return type of a gcc2
6700     builtin and then its argument prototype would still apply.  */
6701 char dld_link();
6702
6703 int main() {
6704 dld_link()
6705 ; return 0; }
6706 EOF
6707 if { (eval echo configure:6708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6708   rm -rf conftest*
6709   eval "ac_cv_lib_$ac_lib_var=yes"
6710 else
6711   echo "configure: failed program was:" >&5
6712   cat conftest.$ac_ext >&5
6713   rm -rf conftest*
6714   eval "ac_cv_lib_$ac_lib_var=no"
6715 fi
6716 rm -f conftest*
6717 LIBS="$ac_save_LIBS"
6718
6719 fi
6720 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6721   echo "$ac_t""yes" 1>&6
6722   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6723 else
6724   echo "$ac_t""no" 1>&6
6725 fi
6726
6727               
6728 fi
6729
6730             
6731 fi
6732
6733           
6734 fi
6735
6736         
6737 fi
6738
6739       
6740 fi
6741
6742     ;;
6743   esac
6744
6745   if test "x$lt_cv_dlopen" != xno; then
6746     enable_dlopen=yes
6747   else
6748     enable_dlopen=no
6749   fi
6750
6751   case $lt_cv_dlopen in
6752   dlopen)
6753     save_CPPFLAGS="$CPPFLAGS"
6754         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6755
6756     save_LDFLAGS="$LDFLAGS"
6757     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6758
6759     save_LIBS="$LIBS"
6760     LIBS="$lt_cv_dlopen_libs $LIBS"
6761
6762     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6763 echo "configure:6764: checking whether a program can dlopen itself" >&5
6764 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6765   echo $ac_n "(cached) $ac_c" 1>&6
6766 else
6767           if test "$cross_compiling" = yes; then :
6768   lt_cv_dlopen_self=cross
6769 else
6770     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6771   lt_status=$lt_dlunknown
6772   cat > conftest.$ac_ext <<EOF
6773 #line 6774 "configure"
6774 #include "confdefs.h"
6775
6776 #if HAVE_DLFCN_H
6777 #include <dlfcn.h>
6778 #endif
6779
6780 #include <stdio.h>
6781
6782 #ifdef RTLD_GLOBAL
6783 #  define LT_DLGLOBAL           RTLD_GLOBAL
6784 #else
6785 #  ifdef DL_GLOBAL
6786 #    define LT_DLGLOBAL         DL_GLOBAL
6787 #  else
6788 #    define LT_DLGLOBAL         0
6789 #  endif
6790 #endif
6791
6792 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6793    find out it does not work in some platform. */
6794 #ifndef LT_DLLAZY_OR_NOW
6795 #  ifdef RTLD_LAZY
6796 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6797 #  else
6798 #    ifdef DL_LAZY
6799 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6800 #    else
6801 #      ifdef RTLD_NOW
6802 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6803 #      else
6804 #        ifdef DL_NOW
6805 #          define LT_DLLAZY_OR_NOW      DL_NOW
6806 #        else
6807 #          define LT_DLLAZY_OR_NOW      0
6808 #        endif
6809 #      endif
6810 #    endif
6811 #  endif
6812 #endif
6813
6814 #ifdef __cplusplus
6815 extern "C" void exit (int);
6816 #endif
6817
6818 void fnord() { int i=42;}
6819 int main ()
6820 {
6821   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6822   int status = $lt_dlunknown;
6823
6824   if (self)
6825     {
6826       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6827       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6828       /* dlclose (self); */
6829     }
6830
6831     exit (status);
6832 }
6833 EOF
6834   if { (eval echo configure:6835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6835     (./conftest; exit; ) 2>/dev/null
6836     lt_status=$?
6837     case x$lt_status in
6838       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6839       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
6840       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
6841     esac
6842   else :
6843     # compilation failed
6844     lt_cv_dlopen_self=no
6845   fi
6846 fi
6847 rm -fr conftest*
6848
6849     
6850 fi
6851
6852 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
6853
6854     if test "x$lt_cv_dlopen_self" = xyes; then
6855       LDFLAGS="$LDFLAGS $link_static_flag"
6856       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
6857 echo "configure:6858: checking whether a statically linked program can dlopen itself" >&5
6858 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
6859   echo $ac_n "(cached) $ac_c" 1>&6
6860 else
6861           if test "$cross_compiling" = yes; then :
6862   lt_cv_dlopen_self_static=cross
6863 else
6864     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6865   lt_status=$lt_dlunknown
6866   cat > conftest.$ac_ext <<EOF
6867 #line 6868 "configure"
6868 #include "confdefs.h"
6869
6870 #if HAVE_DLFCN_H
6871 #include <dlfcn.h>
6872 #endif
6873
6874 #include <stdio.h>
6875
6876 #ifdef RTLD_GLOBAL
6877 #  define LT_DLGLOBAL           RTLD_GLOBAL
6878 #else
6879 #  ifdef DL_GLOBAL
6880 #    define LT_DLGLOBAL         DL_GLOBAL
6881 #  else
6882 #    define LT_DLGLOBAL         0
6883 #  endif
6884 #endif
6885
6886 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6887    find out it does not work in some platform. */
6888 #ifndef LT_DLLAZY_OR_NOW
6889 #  ifdef RTLD_LAZY
6890 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6891 #  else
6892 #    ifdef DL_LAZY
6893 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6894 #    else
6895 #      ifdef RTLD_NOW
6896 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6897 #      else
6898 #        ifdef DL_NOW
6899 #          define LT_DLLAZY_OR_NOW      DL_NOW
6900 #        else
6901 #          define LT_DLLAZY_OR_NOW      0
6902 #        endif
6903 #      endif
6904 #    endif
6905 #  endif
6906 #endif
6907
6908 #ifdef __cplusplus
6909 extern "C" void exit (int);
6910 #endif
6911
6912 void fnord() { int i=42;}
6913 int main ()
6914 {
6915   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6916   int status = $lt_dlunknown;
6917
6918   if (self)
6919     {
6920       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6921       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6922       /* dlclose (self); */
6923     }
6924
6925     exit (status);
6926 }
6927 EOF
6928   if { (eval echo configure:6929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6929     (./conftest; exit; ) 2>/dev/null
6930     lt_status=$?
6931     case x$lt_status in
6932       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
6933       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
6934       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
6935     esac
6936   else :
6937     # compilation failed
6938     lt_cv_dlopen_self_static=no
6939   fi
6940 fi
6941 rm -fr conftest*
6942
6943       
6944 fi
6945
6946 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
6947     fi
6948
6949     CPPFLAGS="$save_CPPFLAGS"
6950     LDFLAGS="$save_LDFLAGS"
6951     LIBS="$save_LIBS"
6952     ;;
6953   esac
6954
6955   case $lt_cv_dlopen_self in
6956   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
6957   *) enable_dlopen_self=unknown ;;
6958   esac
6959
6960   case $lt_cv_dlopen_self_static in
6961   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
6962   *) enable_dlopen_self_static=unknown ;;
6963   esac
6964 fi
6965
6966
6967 if test "$enable_shared" = yes && test "$GCC" = yes; then
6968   case $archive_cmds in
6969   *'~'*)
6970     # FIXME: we may have to deal with multi-command sequences.
6971     ;;
6972   '$CC '*)
6973     # Test whether the compiler implicitly links with -lc since on some
6974     # systems, -lgcc has to come before -lc. If gcc already passes -lc
6975     # to ld, don't add -lc before -lgcc.
6976     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
6977 echo "configure:6978: checking whether -lc should be explicitly linked in" >&5
6978     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
6979   echo $ac_n "(cached) $ac_c" 1>&6
6980 else
6981   $rm conftest*
6982     echo 'static int dummy;' > conftest.$ac_ext
6983
6984     if { (eval echo configure:6985: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6985       soname=conftest
6986       lib=conftest
6987       libobjs=conftest.$ac_objext
6988       deplibs=
6989       wl=$lt_cv_prog_cc_wl
6990       compiler_flags=-v
6991       linker_flags=-v
6992       verstring=
6993       output_objdir=.
6994       libname=conftest
6995       save_allow_undefined_flag=$allow_undefined_flag
6996       allow_undefined_flag=
6997       if { (eval echo configure:6998: \"$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; }
6998       then
6999         lt_cv_archive_cmds_need_lc=no
7000       else
7001         lt_cv_archive_cmds_need_lc=yes
7002       fi
7003       allow_undefined_flag=$save_allow_undefined_flag
7004     else
7005       cat conftest.err 1>&5
7006     fi
7007 fi
7008
7009     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7010     ;;
7011   esac
7012 fi
7013 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7014
7015 # The second clause should only fire when bootstrapping the
7016 # libtool distribution, otherwise you forgot to ship ltmain.sh
7017 # with your package, and you will get complaints that there are
7018 # no rules to generate ltmain.sh.
7019 if test -f "$ltmain"; then
7020   :
7021 else
7022   # If there is no Makefile yet, we rely on a make rule to execute
7023   # `config.status --recheck' to rerun these tests and create the
7024   # libtool script then.
7025   test -f Makefile && make "$ltmain"
7026 fi
7027
7028 if test -f "$ltmain"; then
7029   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7030   $rm -f "${ofile}T"
7031
7032   echo creating $ofile
7033
7034   # Now quote all the things that may contain metacharacters while being
7035   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7036   # variables and quote the copies for generation of the libtool script.
7037   for var in echo old_CC old_CFLAGS \
7038     AR AR_FLAGS CC LD LN_S NM SHELL \
7039     reload_flag reload_cmds wl \
7040     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7041     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7042     library_names_spec soname_spec \
7043     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7044     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7045     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7046     old_striplib striplib file_magic_cmd export_symbols_cmds \
7047     deplibs_check_method allow_undefined_flag no_undefined_flag \
7048     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7049     global_symbol_to_c_name_address \
7050     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7051     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7052     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7053
7054     case $var in
7055     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7056     old_postinstall_cmds | old_postuninstall_cmds | \
7057     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7058     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7059     postinstall_cmds | postuninstall_cmds | \
7060     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7061       # Double-quote double-evaled strings.
7062       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7063       ;;
7064     *)
7065       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7066       ;;
7067     esac
7068   done
7069
7070   cat <<__EOF__ > "${ofile}T"
7071 #! $SHELL
7072
7073 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7074 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7075 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7076 #
7077 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7078 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7079 #
7080 # This program is free software; you can redistribute it and/or modify
7081 # it under the terms of the GNU General Public License as published by
7082 # the Free Software Foundation; either version 2 of the License, or
7083 # (at your option) any later version.
7084 #
7085 # This program is distributed in the hope that it will be useful, but
7086 # WITHOUT ANY WARRANTY; without even the implied warranty of
7087 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7088 # General Public License for more details.
7089 #
7090 # You should have received a copy of the GNU General Public License
7091 # along with this program; if not, write to the Free Software
7092 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7093 #
7094 # As a special exception to the GNU General Public License, if you
7095 # distribute this file as part of a program that contains a
7096 # configuration script generated by Autoconf, you may include it under
7097 # the same distribution terms that you use for the rest of that program.
7098
7099 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7100 Xsed="sed -e s/^X//"
7101
7102 # The HP-UX ksh and POSIX shell print the target directory to stdout
7103 # if CDPATH is set.
7104 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7105
7106 # ### BEGIN LIBTOOL CONFIG
7107
7108 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7109
7110 # Shell to use when invoking shell scripts.
7111 SHELL=$lt_SHELL
7112
7113 # Whether or not to build shared libraries.
7114 build_libtool_libs=$enable_shared
7115
7116 # Whether or not to build static libraries.
7117 build_old_libs=$enable_static
7118
7119 # Whether or not to add -lc for building shared libraries.
7120 build_libtool_need_lc=$need_lc
7121
7122 # Whether or not to optimize for fast installation.
7123 fast_install=$enable_fast_install
7124
7125 # The host system.
7126 host_alias=$host_alias
7127 host=$host
7128
7129 # An echo program that does not interpret backslashes.
7130 echo=$lt_echo
7131
7132 # The archiver.
7133 AR=$lt_AR
7134 AR_FLAGS=$lt_AR_FLAGS
7135
7136 # The default C compiler.
7137 CC=$lt_CC
7138
7139 # Is the compiler the GNU C compiler?
7140 with_gcc=$GCC
7141
7142 # The linker used to build libraries.
7143 LD=$lt_LD
7144
7145 # Whether we need hard or soft links.
7146 LN_S=$lt_LN_S
7147
7148 # A BSD-compatible nm program.
7149 NM=$lt_NM
7150
7151 # A symbol stripping program
7152 STRIP=$STRIP
7153
7154 # Used to examine libraries when file_magic_cmd begins "file"
7155 MAGIC_CMD=$MAGIC_CMD
7156
7157 # Used on cygwin: DLL creation program.
7158 DLLTOOL="$DLLTOOL"
7159
7160 # Used on cygwin: object dumper.
7161 OBJDUMP="$OBJDUMP"
7162
7163 # Used on cygwin: assembler.
7164 AS="$AS"
7165
7166 # The name of the directory that contains temporary libtool files.
7167 objdir=$objdir
7168
7169 # How to create reloadable object files.
7170 reload_flag=$lt_reload_flag
7171 reload_cmds=$lt_reload_cmds
7172
7173 # How to pass a linker flag through the compiler.
7174 wl=$lt_wl
7175
7176 # Object file suffix (normally "o").
7177 objext="$ac_objext"
7178
7179 # Old archive suffix (normally "a").
7180 libext="$libext"
7181
7182 # Executable file suffix (normally "").
7183 exeext="$exeext"
7184
7185 # Additional compiler flags for building library objects.
7186 pic_flag=$lt_pic_flag
7187 pic_mode=$pic_mode
7188
7189 # Does compiler simultaneously support -c and -o options?
7190 compiler_c_o=$lt_compiler_c_o
7191
7192 # Can we write directly to a .lo ?
7193 compiler_o_lo=$lt_compiler_o_lo
7194
7195 # Must we lock files when doing compilation ?
7196 need_locks=$lt_need_locks
7197
7198 # Do we need the lib prefix for modules?
7199 need_lib_prefix=$need_lib_prefix
7200
7201 # Do we need a version for libraries?
7202 need_version=$need_version
7203
7204 # Whether dlopen is supported.
7205 dlopen_support=$enable_dlopen
7206
7207 # Whether dlopen of programs is supported.
7208 dlopen_self=$enable_dlopen_self
7209
7210 # Whether dlopen of statically linked programs is supported.
7211 dlopen_self_static=$enable_dlopen_self_static
7212
7213 # Compiler flag to prevent dynamic linking.
7214 link_static_flag=$lt_link_static_flag
7215
7216 # Compiler flag to turn off builtin functions.
7217 no_builtin_flag=$lt_no_builtin_flag
7218
7219 # Compiler flag to allow reflexive dlopens.
7220 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7221
7222 # Compiler flag to generate shared objects directly from archives.
7223 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7224
7225 # Compiler flag to generate thread-safe objects.
7226 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7227
7228 # Library versioning type.
7229 version_type=$version_type
7230
7231 # Format of library name prefix.
7232 libname_spec=$lt_libname_spec
7233
7234 # List of archive names.  First name is the real one, the rest are links.
7235 # The last name is the one that the linker finds with -lNAME.
7236 library_names_spec=$lt_library_names_spec
7237
7238 # The coded name of the library, if different from the real name.
7239 soname_spec=$lt_soname_spec
7240
7241 # Commands used to build and install an old-style archive.
7242 RANLIB=$lt_RANLIB
7243 old_archive_cmds=$lt_old_archive_cmds
7244 old_postinstall_cmds=$lt_old_postinstall_cmds
7245 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7246
7247 # Create an old-style archive from a shared archive.
7248 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7249
7250 # Create a temporary old-style archive to link instead of a shared archive.
7251 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7252
7253 # Commands used to build and install a shared archive.
7254 archive_cmds=$lt_archive_cmds
7255 archive_expsym_cmds=$lt_archive_expsym_cmds
7256 postinstall_cmds=$lt_postinstall_cmds
7257 postuninstall_cmds=$lt_postuninstall_cmds
7258
7259 # Commands to strip libraries.
7260 old_striplib=$lt_old_striplib
7261 striplib=$lt_striplib
7262
7263 # Method to check whether dependent libraries are shared objects.
7264 deplibs_check_method=$lt_deplibs_check_method
7265
7266 # Command to use when deplibs_check_method == file_magic.
7267 file_magic_cmd=$lt_file_magic_cmd
7268
7269 # Flag that allows shared libraries with undefined symbols to be built.
7270 allow_undefined_flag=$lt_allow_undefined_flag
7271
7272 # Flag that forces no undefined symbols.
7273 no_undefined_flag=$lt_no_undefined_flag
7274
7275 # Commands used to finish a libtool library installation in a directory.
7276 finish_cmds=$lt_finish_cmds
7277
7278 # Same as above, but a single script fragment to be evaled but not shown.
7279 finish_eval=$lt_finish_eval
7280
7281 # Take the output of nm and produce a listing of raw symbols and C names.
7282 global_symbol_pipe=$lt_global_symbol_pipe
7283
7284 # Transform the output of nm in a proper C declaration
7285 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7286
7287 # Transform the output of nm in a C name address pair
7288 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7289
7290 # This is the shared library runtime path variable.
7291 runpath_var=$runpath_var
7292
7293 # This is the shared library path variable.
7294 shlibpath_var=$shlibpath_var
7295
7296 # Is shlibpath searched before the hard-coded library search path?
7297 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7298
7299 # How to hardcode a shared library path into an executable.
7300 hardcode_action=$hardcode_action
7301
7302 # Whether we should hardcode library paths into libraries.
7303 hardcode_into_libs=$hardcode_into_libs
7304
7305 # Flag to hardcode \$libdir into a binary during linking.
7306 # This must work even if \$libdir does not exist.
7307 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7308
7309 # Whether we need a single -rpath flag with a separated argument.
7310 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7311
7312 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7313 # resulting binary.
7314 hardcode_direct=$hardcode_direct
7315
7316 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7317 # resulting binary.
7318 hardcode_minus_L=$hardcode_minus_L
7319
7320 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7321 # the resulting binary.
7322 hardcode_shlibpath_var=$hardcode_shlibpath_var
7323
7324 # Variables whose values should be saved in libtool wrapper scripts and
7325 # restored at relink time.
7326 variables_saved_for_relink="$variables_saved_for_relink"
7327
7328 # Whether libtool must link a program against all its dependency libraries.
7329 link_all_deplibs=$link_all_deplibs
7330
7331 # Compile-time system search path for libraries
7332 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7333
7334 # Run-time system search path for libraries
7335 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7336
7337 # Fix the shell variable \$srcfile for the compiler.
7338 fix_srcfile_path="$fix_srcfile_path"
7339
7340 # Set to yes if exported symbols are required.
7341 always_export_symbols=$always_export_symbols
7342
7343 # The commands to list exported symbols.
7344 export_symbols_cmds=$lt_export_symbols_cmds
7345
7346 # The commands to extract the exported symbol list from a shared archive.
7347 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7348
7349 # Symbols that should not be listed in the preloaded symbols.
7350 exclude_expsyms=$lt_exclude_expsyms
7351
7352 # Symbols that must always be exported.
7353 include_expsyms=$lt_include_expsyms
7354
7355 # ### END LIBTOOL CONFIG
7356
7357 __EOF__
7358
7359   case $host_os in
7360   aix3*)
7361     cat <<\EOF >> "${ofile}T"
7362
7363 # AIX sometimes has problems with the GCC collect2 program.  For some
7364 # reason, if we set the COLLECT_NAMES environment variable, the problems
7365 # vanish in a puff of smoke.
7366 if test "X${COLLECT_NAMES+set}" != Xset; then
7367   COLLECT_NAMES=
7368   export COLLECT_NAMES
7369 fi
7370 EOF
7371     ;;
7372   esac
7373
7374   case $host_os in
7375   cygwin* | mingw* | pw32* | os2*)
7376     cat <<'EOF' >> "${ofile}T"
7377       # This is a source program that is used to create dlls on Windows
7378       # Don't remove nor modify the starting and closing comments
7379 # /* ltdll.c starts here */
7380 # #define WIN32_LEAN_AND_MEAN
7381 # #include <windows.h>
7382 # #undef WIN32_LEAN_AND_MEAN
7383 # #include <stdio.h>
7384 #
7385 # #ifndef __CYGWIN__
7386 # #  ifdef __CYGWIN32__
7387 # #    define __CYGWIN__ __CYGWIN32__
7388 # #  endif
7389 # #endif
7390 #
7391 # #ifdef __cplusplus
7392 # extern "C" {
7393 # #endif
7394 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7395 # #ifdef __cplusplus
7396 # }
7397 # #endif
7398 #
7399 # #ifdef __CYGWIN__
7400 # #include <cygwin/cygwin_dll.h>
7401 # DECLARE_CYGWIN_DLL( DllMain );
7402 # #endif
7403 # HINSTANCE __hDllInstance_base;
7404 #
7405 # BOOL APIENTRY
7406 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7407 # {
7408 #   __hDllInstance_base = hInst;
7409 #   return TRUE;
7410 # }
7411 # /* ltdll.c ends here */
7412         # This is a source program that is used to create import libraries
7413         # on Windows for dlls which lack them. Don't remove nor modify the
7414         # starting and closing comments
7415 # /* impgen.c starts here */
7416 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7417 #
7418 #  This file is part of GNU libtool.
7419 #
7420 #  This program is free software; you can redistribute it and/or modify
7421 #  it under the terms of the GNU General Public License as published by
7422 #  the Free Software Foundation; either version 2 of the License, or
7423 #  (at your option) any later version.
7424 #
7425 #  This program is distributed in the hope that it will be useful,
7426 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7427 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7428 #  GNU General Public License for more details.
7429 #
7430 #  You should have received a copy of the GNU General Public License
7431 #  along with this program; if not, write to the Free Software
7432 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7433 #  */
7434 #
7435 # #include <stdio.h>            /* for printf() */
7436 # #include <unistd.h>           /* for open(), lseek(), read() */
7437 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7438 # #include <string.h>           /* for strdup() */
7439 #
7440 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7441 # #ifndef O_BINARY
7442 # #define O_BINARY 0
7443 # #endif
7444 #
7445 # static unsigned int
7446 # pe_get16 (fd, offset)
7447 #      int fd;
7448 #      int offset;
7449 # {
7450 #   unsigned char b[2];
7451 #   lseek (fd, offset, SEEK_SET);
7452 #   read (fd, b, 2);
7453 #   return b[0] + (b[1]<<8);
7454 # }
7455 #
7456 # static unsigned int
7457 # pe_get32 (fd, offset)
7458 #     int fd;
7459 #     int offset;
7460 # {
7461 #   unsigned char b[4];
7462 #   lseek (fd, offset, SEEK_SET);
7463 #   read (fd, b, 4);
7464 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7465 # }
7466 #
7467 # static unsigned int
7468 # pe_as32 (ptr)
7469 #      void *ptr;
7470 # {
7471 #   unsigned char *b = ptr;
7472 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7473 # }
7474 #
7475 # int
7476 # main (argc, argv)
7477 #     int argc;
7478 #     char *argv[];
7479 # {
7480 #     int dll;
7481 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7482 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7483 #     unsigned long name_rvas, nexp;
7484 #     unsigned char *expdata, *erva;
7485 #     char *filename, *dll_name;
7486 #
7487 #     filename = argv[1];
7488 #
7489 #     dll = open(filename, O_RDONLY|O_BINARY);
7490 #     if (dll < 1)
7491 #       return 1;
7492 #
7493 #     dll_name = filename;
7494 #
7495 #     for (i=0; filename[i]; i++)
7496 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7497 #           dll_name = filename + i +1;
7498 #
7499 #     pe_header_offset = pe_get32 (dll, 0x3c);
7500 #     opthdr_ofs = pe_header_offset + 4 + 20;
7501 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7502 #
7503 #     if (num_entries < 1) /* no exports */
7504 #       return 1;
7505 #
7506 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7507 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7508 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7509 #     secptr = (pe_header_offset + 4 + 20 +
7510 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7511 #
7512 #     expptr = 0;
7513 #     for (i = 0; i < nsections; i++)
7514 #     {
7515 #       char sname[8];
7516 #       unsigned long secptr1 = secptr + 40 * i;
7517 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7518 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7519 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7520 #       lseek(dll, secptr1, SEEK_SET);
7521 #       read(dll, sname, 8);
7522 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7523 #       {
7524 #           expptr = fptr + (export_rva - vaddr);
7525 #           if (export_rva + export_size > vaddr + vsize)
7526 #               export_size = vsize - (export_rva - vaddr);
7527 #           break;
7528 #       }
7529 #     }
7530 #
7531 #     expdata = (unsigned char*)malloc(export_size);
7532 #     lseek (dll, expptr, SEEK_SET);
7533 #     read (dll, expdata, export_size);
7534 #     erva = expdata - export_rva;
7535 #
7536 #     nexp = pe_as32 (expdata+24);
7537 #     name_rvas = pe_as32 (expdata+32);
7538 #
7539 #     printf ("EXPORTS\n");
7540 #     for (i = 0; i<nexp; i++)
7541 #     {
7542 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7543 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7544 #     }
7545 #
7546 #     return 0;
7547 # }
7548 # /* impgen.c ends here */
7549
7550 EOF
7551     ;;
7552   esac
7553
7554   # We use sed instead of cat because bash on DJGPP gets confused if
7555   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7556   # text mode, it properly converts lines to CR/LF.  This bash problem
7557   # is reportedly fixed, but why not run on old versions too?
7558   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7559
7560   mv -f "${ofile}T" "$ofile" || \
7561     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7562   chmod +x "$ofile"
7563 fi
7564
7565
7566
7567
7568
7569 # This can be used to rebuild libtool when needed
7570 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7571
7572 # Always use our own libtool.
7573 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7574
7575 # Prevent multiple expansion
7576
7577
7578
7579 for ac_prog in mawk gawk nawk awk
7580 do
7581 # Extract the first word of "$ac_prog", so it can be a program name with args.
7582 set dummy $ac_prog; ac_word=$2
7583 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7584 echo "configure:7585: checking for $ac_word" >&5
7585 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
7586   echo $ac_n "(cached) $ac_c" 1>&6
7587 else
7588   if test -n "$AWK"; then
7589   ac_cv_prog_AWK="$AWK" # Let the user override the test.
7590 else
7591   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7592   ac_dummy="$PATH"
7593   for ac_dir in $ac_dummy; do
7594     test -z "$ac_dir" && ac_dir=.
7595     if test -f $ac_dir/$ac_word; then
7596       ac_cv_prog_AWK="$ac_prog"
7597       break
7598     fi
7599   done
7600   IFS="$ac_save_ifs"
7601 fi
7602 fi
7603 AWK="$ac_cv_prog_AWK"
7604 if test -n "$AWK"; then
7605   echo "$ac_t""$AWK" 1>&6
7606 else
7607   echo "$ac_t""no" 1>&6
7608 fi
7609
7610 test -n "$AWK" && break
7611 done
7612
7613 # test for ln hardlink support
7614 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7615 echo "configure:7616: checking whether ln works" >&5
7616 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7617   echo $ac_n "(cached) $ac_c" 1>&6
7618 else
7619   rm -f conftest.src conftest.dst
7620 echo "conftest" > conftest.src
7621 if ln conftest.src conftest.dst 2>/dev/null
7622 then
7623   ol_cv_prog_LN_H="ln"
7624 else
7625   ol_cv_prog_LN_H="cp"
7626 fi
7627 rm -f conftest.src conftest.dst
7628
7629 fi
7630 LN_H="$ol_cv_prog_LN_H"
7631 if test "$ol_cv_prog_LN_H" = "ln"; then
7632         echo "$ac_t""yes" 1>&6
7633 else
7634         echo "$ac_t""no" 1>&6
7635 fi
7636
7637 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7638 echo "configure:7639: checking whether ln -s works" >&5
7639 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7640   echo $ac_n "(cached) $ac_c" 1>&6
7641 else
7642   rm -f conftestdata
7643 if ln -s X conftestdata 2>/dev/null
7644 then
7645   rm -f conftestdata
7646   ac_cv_prog_LN_S="ln -s"
7647 else
7648   ac_cv_prog_LN_S=ln
7649 fi
7650 fi
7651 LN_S="$ac_cv_prog_LN_S"
7652 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7653   echo "$ac_t""yes" 1>&6
7654 else
7655   echo "$ac_t""no" 1>&6
7656 fi
7657
7658
7659 # Extract the first word of "sendmail", so it can be a program name with args.
7660 set dummy sendmail; ac_word=$2
7661 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7662 echo "configure:7663: checking for $ac_word" >&5
7663 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
7664   echo $ac_n "(cached) $ac_c" 1>&6
7665 else
7666   case "$SENDMAIL" in
7667   /*)
7668   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
7669   ;;
7670   ?:/*)
7671   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
7672   ;;
7673   *)
7674   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7675   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
7676   for ac_dir in $ac_dummy; do 
7677     test -z "$ac_dir" && ac_dir=.
7678     if test -f $ac_dir/$ac_word; then
7679       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
7680       break
7681     fi
7682   done
7683   IFS="$ac_save_ifs"
7684   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
7685   ;;
7686 esac
7687 fi
7688 SENDMAIL="$ac_cv_path_SENDMAIL"
7689 if test -n "$SENDMAIL"; then
7690   echo "$ac_t""$SENDMAIL" 1>&6
7691 else
7692   echo "$ac_t""no" 1>&6
7693 fi
7694
7695 # Extract the first word of "vi", so it can be a program name with args.
7696 set dummy vi; ac_word=$2
7697 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7698 echo "configure:7699: checking for $ac_word" >&5
7699 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
7700   echo $ac_n "(cached) $ac_c" 1>&6
7701 else
7702   case "$EDITOR" in
7703   /*)
7704   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
7705   ;;
7706   ?:/*)
7707   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
7708   ;;
7709   *)
7710   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7711   ac_dummy="$PATH:/usr/ucb"
7712   for ac_dir in $ac_dummy; do 
7713     test -z "$ac_dir" && ac_dir=.
7714     if test -f $ac_dir/$ac_word; then
7715       ac_cv_path_EDITOR="$ac_dir/$ac_word"
7716       break
7717     fi
7718   done
7719   IFS="$ac_save_ifs"
7720   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
7721   ;;
7722 esac
7723 fi
7724 EDITOR="$ac_cv_path_EDITOR"
7725 if test -n "$EDITOR"; then
7726   echo "$ac_t""$EDITOR" 1>&6
7727 else
7728   echo "$ac_t""no" 1>&6
7729 fi
7730
7731
7732 ol_link_perl=no
7733 if test $ol_enable_perl != no ; then
7734         # Extract the first word of "perl", so it can be a program name with args.
7735 set dummy perl; ac_word=$2
7736 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7737 echo "configure:7738: checking for $ac_word" >&5
7738 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7739   echo $ac_n "(cached) $ac_c" 1>&6
7740 else
7741   case "$PERLBIN" in
7742   /*)
7743   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7744   ;;
7745   ?:/*)
7746   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7747   ;;
7748   *)
7749   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7750   ac_dummy="$PATH"
7751   for ac_dir in $ac_dummy; do 
7752     test -z "$ac_dir" && ac_dir=.
7753     if test -f $ac_dir/$ac_word; then
7754       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7755       break
7756     fi
7757   done
7758   IFS="$ac_save_ifs"
7759   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7760   ;;
7761 esac
7762 fi
7763 PERLBIN="$ac_cv_path_PERLBIN"
7764 if test -n "$PERLBIN"; then
7765   echo "$ac_t""$PERLBIN" 1>&6
7766 else
7767   echo "$ac_t""no" 1>&6
7768 fi
7769
7770
7771         if test "no$PERLBIN" = "no" ; then
7772                 if test $ol_enable_perl = yes ; then
7773                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7774                 fi
7775
7776         else
7777                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7778                 if test x"$ol_with_perl_module" = "xstatic" ; then
7779                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7780                 else
7781                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7782                 fi
7783                                 ol_link_perl=yes
7784         fi
7785 fi
7786
7787 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7788 echo "configure:7789: checking how to run the C preprocessor" >&5
7789 # On Suns, sometimes $CPP names a directory.
7790 if test -n "$CPP" && test -d "$CPP"; then
7791   CPP=
7792 fi
7793 if test -z "$CPP"; then
7794 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7795   echo $ac_n "(cached) $ac_c" 1>&6
7796 else
7797     # This must be in double quotes, not single quotes, because CPP may get
7798   # substituted into the Makefile and "${CC-cc}" will confuse make.
7799   CPP="${CC-cc} -E"
7800   # On the NeXT, cc -E runs the code through the compiler's parser,
7801   # not just through cpp.
7802   cat > conftest.$ac_ext <<EOF
7803 #line 7804 "configure"
7804 #include "confdefs.h"
7805 #include <assert.h>
7806 Syntax Error
7807 EOF
7808 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7809 { (eval echo configure:7810: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7810 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7811 if test -z "$ac_err"; then
7812   :
7813 else
7814   echo "$ac_err" >&5
7815   echo "configure: failed program was:" >&5
7816   cat conftest.$ac_ext >&5
7817   rm -rf conftest*
7818   CPP="${CC-cc} -E -traditional-cpp"
7819   cat > conftest.$ac_ext <<EOF
7820 #line 7821 "configure"
7821 #include "confdefs.h"
7822 #include <assert.h>
7823 Syntax Error
7824 EOF
7825 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7826 { (eval echo configure:7827: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7827 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7828 if test -z "$ac_err"; then
7829   :
7830 else
7831   echo "$ac_err" >&5
7832   echo "configure: failed program was:" >&5
7833   cat conftest.$ac_ext >&5
7834   rm -rf conftest*
7835   CPP="${CC-cc} -nologo -E"
7836   cat > conftest.$ac_ext <<EOF
7837 #line 7838 "configure"
7838 #include "confdefs.h"
7839 #include <assert.h>
7840 Syntax Error
7841 EOF
7842 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7843 { (eval echo configure:7844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7844 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7845 if test -z "$ac_err"; then
7846   :
7847 else
7848   echo "$ac_err" >&5
7849   echo "configure: failed program was:" >&5
7850   cat conftest.$ac_ext >&5
7851   rm -rf conftest*
7852   CPP=/lib/cpp
7853 fi
7854 rm -f conftest*
7855 fi
7856 rm -f conftest*
7857 fi
7858 rm -f conftest*
7859   ac_cv_prog_CPP="$CPP"
7860 fi
7861   CPP="$ac_cv_prog_CPP"
7862 else
7863   ac_cv_prog_CPP="$CPP"
7864 fi
7865 echo "$ac_t""$CPP" 1>&6
7866
7867
7868 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
7869         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
7870
7871 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
7872         echo "configure: warning: programs compiled here do run here..." 1>&2
7873         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
7874
7875 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
7876         echo "configure: warning: programs compiled here do not run here..." 1>&2
7877         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
7878 fi
7879
7880
7881 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7882 echo "configure:7883: checking for Cygwin environment" >&5
7883 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7884   echo $ac_n "(cached) $ac_c" 1>&6
7885 else
7886   cat > conftest.$ac_ext <<EOF
7887 #line 7888 "configure"
7888 #include "confdefs.h"
7889
7890 int main() {
7891
7892 #ifndef __CYGWIN__
7893 #define __CYGWIN__ __CYGWIN32__
7894 #endif
7895 return __CYGWIN__;
7896 ; return 0; }
7897 EOF
7898 if { (eval echo configure:7899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7899   rm -rf conftest*
7900   ac_cv_cygwin=yes
7901 else
7902   echo "configure: failed program was:" >&5
7903   cat conftest.$ac_ext >&5
7904   rm -rf conftest*
7905   ac_cv_cygwin=no
7906 fi
7907 rm -f conftest*
7908 fi
7909
7910 echo "$ac_t""$ac_cv_cygwin" 1>&6
7911 CYGWIN=
7912 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7913 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7914 echo "configure:7915: checking for mingw32 environment" >&5
7915 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7916   echo $ac_n "(cached) $ac_c" 1>&6
7917 else
7918   cat > conftest.$ac_ext <<EOF
7919 #line 7920 "configure"
7920 #include "confdefs.h"
7921
7922 int main() {
7923 return __MINGW32__;
7924 ; return 0; }
7925 EOF
7926 if { (eval echo configure:7927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7927   rm -rf conftest*
7928   ac_cv_mingw32=yes
7929 else
7930   echo "configure: failed program was:" >&5
7931   cat conftest.$ac_ext >&5
7932   rm -rf conftest*
7933   ac_cv_mingw32=no
7934 fi
7935 rm -f conftest*
7936 fi
7937
7938 echo "$ac_t""$ac_cv_mingw32" 1>&6
7939 MINGW32=
7940 test "$ac_cv_mingw32" = yes && MINGW32=yes
7941
7942
7943
7944 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
7945 echo "configure:7946: checking for executable suffix" >&5
7946 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
7947   echo $ac_n "(cached) $ac_c" 1>&6
7948 else
7949   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
7950   ac_cv_exeext=.exe
7951 else
7952   rm -f conftest*
7953   echo 'int main () { return 0; }' > conftest.$ac_ext
7954   ac_cv_exeext=
7955   if { (eval echo configure:7956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
7956     for file in conftest.*; do
7957       case $file in
7958       *.c | *.C | *.o | *.obj | *.xcoff) ;;
7959       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
7960       esac
7961     done
7962   else
7963     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
7964   fi
7965   rm -f conftest*
7966   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
7967 fi
7968 fi
7969
7970 EXEEXT=""
7971 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
7972 echo "$ac_t""${ac_cv_exeext}" 1>&6
7973 ac_exeext=$EXEEXT
7974
7975 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
7976 echo "configure:7977: checking for object suffix" >&5
7977 if eval "test \"\${ac_cv_objext+set}\" = set"; then
7978   echo $ac_n "(cached) $ac_c" 1>&6
7979 else
7980   rm -f conftest*
7981 echo 'int i = 1;' > conftest.$ac_ext
7982 if { (eval echo configure:7983: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7983   for ac_file in conftest.*; do
7984     case $ac_file in
7985     *.c) ;;
7986     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
7987     esac
7988   done
7989 else
7990   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
7991 fi
7992 rm -f conftest*
7993 fi
7994
7995 echo "$ac_t""$ac_cv_objext" 1>&6
7996 OBJEXT=$ac_cv_objext
7997 ac_objext=$ac_cv_objext
7998
7999
8000 cat >> confdefs.h <<EOF
8001 #define EXEEXT "${EXEEXT}"
8002 EOF
8003
8004
8005 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8006 echo "configure:8007: checking for be_app in -lbe" >&5
8007 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8008 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8009   echo $ac_n "(cached) $ac_c" 1>&6
8010 else
8011   ac_save_LIBS="$LIBS"
8012 LIBS="-lbe -lroot -lnet $LIBS"
8013 cat > conftest.$ac_ext <<EOF
8014 #line 8015 "configure"
8015 #include "confdefs.h"
8016 /* Override any gcc2 internal prototype to avoid an error.  */
8017 /* We use char because int might match the return type of a gcc2
8018     builtin and then its argument prototype would still apply.  */
8019 char be_app();
8020
8021 int main() {
8022 be_app()
8023 ; return 0; }
8024 EOF
8025 if { (eval echo configure:8026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8026   rm -rf conftest*
8027   eval "ac_cv_lib_$ac_lib_var=yes"
8028 else
8029   echo "configure: failed program was:" >&5
8030   cat conftest.$ac_ext >&5
8031   rm -rf conftest*
8032   eval "ac_cv_lib_$ac_lib_var=no"
8033 fi
8034 rm -f conftest*
8035 LIBS="$ac_save_LIBS"
8036
8037 fi
8038 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8039   echo "$ac_t""yes" 1>&6
8040   LIBS="$LIBS -lbe -lroot -lnet"
8041 else
8042   echo "$ac_t""no" 1>&6
8043 :
8044 fi
8045
8046
8047
8048
8049
8050 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8051 echo "configure:8052: checking for ${CC-cc} option to accept ANSI C" >&5
8052 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8053   echo $ac_n "(cached) $ac_c" 1>&6
8054 else
8055   am_cv_prog_cc_stdc=no
8056 ac_save_CC="$CC"
8057 # Don't try gcc -ansi; that turns off useful extensions and
8058 # breaks some systems' header files.
8059 # AIX                   -qlanglvl=ansi
8060 # Ultrix and OSF/1      -std1
8061 # HP-UX 10.20 and later -Ae
8062 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8063 # SVR4                  -Xc -D__EXTENSIONS__
8064 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8065 do
8066   CC="$ac_save_CC $ac_arg"
8067   cat > conftest.$ac_ext <<EOF
8068 #line 8069 "configure"
8069 #include "confdefs.h"
8070 #include <stdarg.h>
8071 #include <stdio.h>
8072 #include <sys/types.h>
8073 #include <sys/stat.h>
8074 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8075 struct buf { int x; };
8076 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8077 static char *e (p, i)
8078      char **p;
8079      int i;
8080 {
8081   return p[i];
8082 }
8083 static char *f (char * (*g) (char **, int), char **p, ...)
8084 {
8085   char *s;
8086   va_list v;
8087   va_start (v,p);
8088   s = g (p, va_arg (v,int));
8089   va_end (v);
8090   return s;
8091 }
8092 int test (int i, double x);
8093 struct s1 {int (*f) (int a);};
8094 struct s2 {int (*f) (double a);};
8095 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8096 int argc;
8097 char **argv;
8098
8099 int main() {
8100
8101 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8102
8103 ; return 0; }
8104 EOF
8105 if { (eval echo configure:8106: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8106   rm -rf conftest*
8107   am_cv_prog_cc_stdc="$ac_arg"; break
8108 else
8109   echo "configure: failed program was:" >&5
8110   cat conftest.$ac_ext >&5
8111 fi
8112 rm -f conftest*
8113 done
8114 CC="$ac_save_CC"
8115
8116 fi
8117
8118 if test -z "$am_cv_prog_cc_stdc"; then
8119   echo "$ac_t""none needed" 1>&6
8120 else
8121   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8122 fi
8123 case "x$am_cv_prog_cc_stdc" in
8124   x|xno) ;;
8125   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8126 esac
8127
8128 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8129         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8130 fi
8131
8132 # test for make depend flag
8133 OL_MKDEP=
8134 OL_MKDEP_FLAGS=
8135 if test -z "${MKDEP}"; then
8136         OL_MKDEP="${CC-cc}"
8137         if test -z "${MKDEP_FLAGS}"; then
8138                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8139 echo "configure:8140: checking for ${OL_MKDEP} depend flag" >&5
8140 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8141   echo $ac_n "(cached) $ac_c" 1>&6
8142 else
8143   
8144                         ol_cv_mkdep=no
8145                         for flag in "-M" "-xM"; do
8146                                 cat > conftest.c <<EOF
8147  noCode;
8148 EOF
8149                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8150: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8150                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8151                                 then
8152                                         if test ! -f conftest."${ac_object}" ; then
8153                                                 ol_cv_mkdep=$flag
8154                                                 OL_MKDEP_FLAGS="$flag"
8155                                                 break
8156                                         fi
8157                                 fi
8158                         done
8159                         rm -f conftest*
8160                 
8161 fi
8162
8163 echo "$ac_t""$ol_cv_mkdep" 1>&6
8164         else
8165                 cc_cv_mkdep=yes
8166                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8167         fi
8168 else
8169         cc_cv_mkdep=yes
8170         OL_MKDEP="${MKDEP}"
8171         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8172 fi
8173
8174
8175
8176 if test "${ol_cv_mkdep}" = no ; then
8177         # this will soon become an error
8178         echo "configure: warning: do not know how to generate dependencies" 1>&2
8179 fi
8180
8181 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8182 echo "configure:8183: checking for afopen in -ls" >&5
8183 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8184 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8185   echo $ac_n "(cached) $ac_c" 1>&6
8186 else
8187   ac_save_LIBS="$LIBS"
8188 LIBS="-ls  $LIBS"
8189 cat > conftest.$ac_ext <<EOF
8190 #line 8191 "configure"
8191 #include "confdefs.h"
8192 /* Override any gcc2 internal prototype to avoid an error.  */
8193 /* We use char because int might match the return type of a gcc2
8194     builtin and then its argument prototype would still apply.  */
8195 char afopen();
8196
8197 int main() {
8198 afopen()
8199 ; return 0; }
8200 EOF
8201 if { (eval echo configure:8202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8202   rm -rf conftest*
8203   eval "ac_cv_lib_$ac_lib_var=yes"
8204 else
8205   echo "configure: failed program was:" >&5
8206   cat conftest.$ac_ext >&5
8207   rm -rf conftest*
8208   eval "ac_cv_lib_$ac_lib_var=no"
8209 fi
8210 rm -f conftest*
8211 LIBS="$ac_save_LIBS"
8212
8213 fi
8214 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8215   echo "$ac_t""yes" 1>&6
8216   
8217         AUTH_LIBS=-ls
8218         cat >> confdefs.h <<\EOF
8219 #define HAVE_AIX_SECURITY 1
8220 EOF
8221
8222
8223 else
8224   echo "$ac_t""no" 1>&6
8225 fi
8226
8227
8228
8229 ol_link_modules=no
8230 if test $ol_enable_modules != no ; then
8231         for ac_hdr in ltdl.h
8232 do
8233 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8234 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8235 echo "configure:8236: checking for $ac_hdr" >&5
8236 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8237   echo $ac_n "(cached) $ac_c" 1>&6
8238 else
8239   cat > conftest.$ac_ext <<EOF
8240 #line 8241 "configure"
8241 #include "confdefs.h"
8242 #include <$ac_hdr>
8243 EOF
8244 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8245 { (eval echo configure:8246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8246 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8247 if test -z "$ac_err"; then
8248   rm -rf conftest*
8249   eval "ac_cv_header_$ac_safe=yes"
8250 else
8251   echo "$ac_err" >&5
8252   echo "configure: failed program was:" >&5
8253   cat conftest.$ac_ext >&5
8254   rm -rf conftest*
8255   eval "ac_cv_header_$ac_safe=no"
8256 fi
8257 rm -f conftest*
8258 fi
8259 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8260   echo "$ac_t""yes" 1>&6
8261     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8262   cat >> confdefs.h <<EOF
8263 #define $ac_tr_hdr 1
8264 EOF
8265  
8266 else
8267   echo "$ac_t""no" 1>&6
8268 fi
8269 done
8270
8271
8272         if test $ac_cv_header_ltdl_h = no ; then
8273                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8274         fi
8275
8276         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8277 echo "configure:8278: checking for lt_dlinit in -lltdl" >&5
8278 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8279 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8280   echo $ac_n "(cached) $ac_c" 1>&6
8281 else
8282   ac_save_LIBS="$LIBS"
8283 LIBS="-lltdl  $LIBS"
8284 cat > conftest.$ac_ext <<EOF
8285 #line 8286 "configure"
8286 #include "confdefs.h"
8287 /* Override any gcc2 internal prototype to avoid an error.  */
8288 /* We use char because int might match the return type of a gcc2
8289     builtin and then its argument prototype would still apply.  */
8290 char lt_dlinit();
8291
8292 int main() {
8293 lt_dlinit()
8294 ; return 0; }
8295 EOF
8296 if { (eval echo configure:8297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8297   rm -rf conftest*
8298   eval "ac_cv_lib_$ac_lib_var=yes"
8299 else
8300   echo "configure: failed program was:" >&5
8301   cat conftest.$ac_ext >&5
8302   rm -rf conftest*
8303   eval "ac_cv_lib_$ac_lib_var=no"
8304 fi
8305 rm -f conftest*
8306 LIBS="$ac_save_LIBS"
8307
8308 fi
8309 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8310   echo "$ac_t""yes" 1>&6
8311   
8312                 MODULES_LIBS=-lltdl
8313                 cat >> confdefs.h <<\EOF
8314 #define HAVE_LIBLTDL 1
8315 EOF
8316
8317         
8318 else
8319   echo "$ac_t""no" 1>&6
8320 fi
8321
8322
8323         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8324                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8325         fi
8326         ol_link_modules=yes
8327 else
8328         ol_with_bdb_module=static
8329         ol_with_dnssrv_module=static
8330         ol_with_ldap_module=static
8331         ol_with_ldbm_module=static
8332         ol_with_meta_module=static
8333         ol_with_monitor_module=static
8334         ol_with_null_module=static
8335         ol_with_passwd_module=static
8336         ol_with_perl_module=static
8337         ol_with_shell_module=static
8338         ol_with_sql_module=static
8339 fi
8340
8341 # test for EBCDIC
8342 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8343 echo "configure:8344: checking for EBCDIC" >&5
8344 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8345   echo $ac_n "(cached) $ac_c" 1>&6
8346 else
8347   
8348         cat > conftest.$ac_ext <<EOF
8349 #line 8350 "configure"
8350 #include "confdefs.h"
8351
8352 #if !('M' == 0xd4)
8353 #include <__ASCII__/generate_error.h>
8354 #endif
8355
8356 EOF
8357 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8358 { (eval echo configure:8359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8359 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8360 if test -z "$ac_err"; then
8361   rm -rf conftest*
8362   ol_cv_cpp_ebcdic=yes
8363 else
8364   echo "$ac_err" >&5
8365   echo "configure: failed program was:" >&5
8366   cat conftest.$ac_ext >&5
8367   rm -rf conftest*
8368   ol_cv_cpp_ebcdic=no
8369 fi
8370 rm -f conftest*
8371 fi
8372
8373 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8374 if test $ol_cv_cpp_ebcdic = yes ; then
8375         cat >> confdefs.h <<\EOF
8376 #define HAVE_EBCDIC 1
8377 EOF
8378
8379 fi
8380
8381 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8382 echo "configure:8383: checking for ANSI C header files" >&5
8383 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8384   echo $ac_n "(cached) $ac_c" 1>&6
8385 else
8386   cat > conftest.$ac_ext <<EOF
8387 #line 8388 "configure"
8388 #include "confdefs.h"
8389 #include <stdlib.h>
8390 #include <stdarg.h>
8391 #include <string.h>
8392 #include <float.h>
8393 EOF
8394 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8395 { (eval echo configure:8396: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8396 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8397 if test -z "$ac_err"; then
8398   rm -rf conftest*
8399   ol_cv_header_stdc=yes
8400 else
8401   echo "$ac_err" >&5
8402   echo "configure: failed program was:" >&5
8403   cat conftest.$ac_ext >&5
8404   rm -rf conftest*
8405   ol_cv_header_stdc=no
8406 fi
8407 rm -f conftest*
8408
8409 if test $ol_cv_header_stdc = yes; then
8410   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8411 cat > conftest.$ac_ext <<EOF
8412 #line 8413 "configure"
8413 #include "confdefs.h"
8414 #include <string.h>
8415 EOF
8416 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8417   egrep "memchr" >/dev/null 2>&1; then
8418   :
8419 else
8420   rm -rf conftest*
8421   ol_cv_header_stdc=no
8422 fi
8423 rm -f conftest*
8424
8425 fi
8426
8427 if test $ol_cv_header_stdc = yes; then
8428   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8429 cat > conftest.$ac_ext <<EOF
8430 #line 8431 "configure"
8431 #include "confdefs.h"
8432 #include <stdlib.h>
8433 EOF
8434 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8435   egrep "free" >/dev/null 2>&1; then
8436   :
8437 else
8438   rm -rf conftest*
8439   ol_cv_header_stdc=no
8440 fi
8441 rm -f conftest*
8442
8443 fi
8444
8445 if test $ol_cv_header_stdc = yes; then
8446   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8447 if test "$cross_compiling" = yes; then
8448   :
8449 else
8450   cat > conftest.$ac_ext <<EOF
8451 #line 8452 "configure"
8452 #include "confdefs.h"
8453 #include <ctype.h>
8454 #ifndef HAVE_EBCDIC
8455 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8456 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8457 #else
8458 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8459                 || ('j' <= (c) && (c) <= 'r') \
8460                 || ('s' <= (c) && (c) <= 'z'))
8461 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8462 #endif
8463 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8464 int main () { int i; for (i = 0; i < 256; i++)
8465 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8466 exit (0); }
8467
8468 EOF
8469 if { (eval echo configure:8470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8470 then
8471   :
8472 else
8473   echo "configure: failed program was:" >&5
8474   cat conftest.$ac_ext >&5
8475   rm -fr conftest*
8476   ol_cv_header_stdc=no
8477 fi
8478 rm -fr conftest*
8479 fi
8480
8481 fi
8482 fi
8483
8484 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8485 if test $ol_cv_header_stdc = yes; then
8486   cat >> confdefs.h <<\EOF
8487 #define STDC_HEADERS 1
8488 EOF
8489
8490 fi
8491 ac_cv_header_stdc=disable
8492
8493
8494 if test $ol_cv_header_stdc != yes; then
8495         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8496 fi
8497
8498 ac_header_dirent=no
8499 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8500 do
8501 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8502 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8503 echo "configure:8504: checking for $ac_hdr that defines DIR" >&5
8504 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8505   echo $ac_n "(cached) $ac_c" 1>&6
8506 else
8507   cat > conftest.$ac_ext <<EOF
8508 #line 8509 "configure"
8509 #include "confdefs.h"
8510 #include <sys/types.h>
8511 #include <$ac_hdr>
8512 int main() {
8513 DIR *dirp = 0;
8514 ; return 0; }
8515 EOF
8516 if { (eval echo configure:8517: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8517   rm -rf conftest*
8518   eval "ac_cv_header_dirent_$ac_safe=yes"
8519 else
8520   echo "configure: failed program was:" >&5
8521   cat conftest.$ac_ext >&5
8522   rm -rf conftest*
8523   eval "ac_cv_header_dirent_$ac_safe=no"
8524 fi
8525 rm -f conftest*
8526 fi
8527 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8528   echo "$ac_t""yes" 1>&6
8529     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8530   cat >> confdefs.h <<EOF
8531 #define $ac_tr_hdr 1
8532 EOF
8533  ac_header_dirent=$ac_hdr; break
8534 else
8535   echo "$ac_t""no" 1>&6
8536 fi
8537 done
8538 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8539 if test $ac_header_dirent = dirent.h; then
8540 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8541 echo "configure:8542: checking for opendir in -ldir" >&5
8542 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8543 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8544   echo $ac_n "(cached) $ac_c" 1>&6
8545 else
8546   ac_save_LIBS="$LIBS"
8547 LIBS="-ldir  $LIBS"
8548 cat > conftest.$ac_ext <<EOF
8549 #line 8550 "configure"
8550 #include "confdefs.h"
8551 /* Override any gcc2 internal prototype to avoid an error.  */
8552 /* We use char because int might match the return type of a gcc2
8553     builtin and then its argument prototype would still apply.  */
8554 char opendir();
8555
8556 int main() {
8557 opendir()
8558 ; return 0; }
8559 EOF
8560 if { (eval echo configure:8561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8561   rm -rf conftest*
8562   eval "ac_cv_lib_$ac_lib_var=yes"
8563 else
8564   echo "configure: failed program was:" >&5
8565   cat conftest.$ac_ext >&5
8566   rm -rf conftest*
8567   eval "ac_cv_lib_$ac_lib_var=no"
8568 fi
8569 rm -f conftest*
8570 LIBS="$ac_save_LIBS"
8571
8572 fi
8573 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8574   echo "$ac_t""yes" 1>&6
8575   LIBS="$LIBS -ldir"
8576 else
8577   echo "$ac_t""no" 1>&6
8578 fi
8579
8580 else
8581 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8582 echo "configure:8583: checking for opendir in -lx" >&5
8583 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8584 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8585   echo $ac_n "(cached) $ac_c" 1>&6
8586 else
8587   ac_save_LIBS="$LIBS"
8588 LIBS="-lx  $LIBS"
8589 cat > conftest.$ac_ext <<EOF
8590 #line 8591 "configure"
8591 #include "confdefs.h"
8592 /* Override any gcc2 internal prototype to avoid an error.  */
8593 /* We use char because int might match the return type of a gcc2
8594     builtin and then its argument prototype would still apply.  */
8595 char opendir();
8596
8597 int main() {
8598 opendir()
8599 ; return 0; }
8600 EOF
8601 if { (eval echo configure:8602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8602   rm -rf conftest*
8603   eval "ac_cv_lib_$ac_lib_var=yes"
8604 else
8605   echo "configure: failed program was:" >&5
8606   cat conftest.$ac_ext >&5
8607   rm -rf conftest*
8608   eval "ac_cv_lib_$ac_lib_var=no"
8609 fi
8610 rm -f conftest*
8611 LIBS="$ac_save_LIBS"
8612
8613 fi
8614 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8615   echo "$ac_t""yes" 1>&6
8616   LIBS="$LIBS -lx"
8617 else
8618   echo "$ac_t""no" 1>&6
8619 fi
8620
8621 fi
8622
8623 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8624 echo "configure:8625: checking for sys/wait.h that is POSIX.1 compatible" >&5
8625 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8626   echo $ac_n "(cached) $ac_c" 1>&6
8627 else
8628   cat > conftest.$ac_ext <<EOF
8629 #line 8630 "configure"
8630 #include "confdefs.h"
8631 #include <sys/types.h>
8632 #include <sys/wait.h>
8633 #ifndef WEXITSTATUS
8634 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8635 #endif
8636 #ifndef WIFEXITED
8637 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8638 #endif
8639 int main() {
8640 int s;
8641 wait (&s);
8642 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8643 ; return 0; }
8644 EOF
8645 if { (eval echo configure:8646: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8646   rm -rf conftest*
8647   ac_cv_header_sys_wait_h=yes
8648 else
8649   echo "configure: failed program was:" >&5
8650   cat conftest.$ac_ext >&5
8651   rm -rf conftest*
8652   ac_cv_header_sys_wait_h=no
8653 fi
8654 rm -f conftest*
8655 fi
8656
8657 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8658 if test $ac_cv_header_sys_wait_h = yes; then
8659   cat >> confdefs.h <<\EOF
8660 #define HAVE_SYS_WAIT_H 1
8661 EOF
8662
8663 fi
8664
8665 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8666 echo "configure:8667: checking POSIX termios" >&5
8667 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8668   echo $ac_n "(cached) $ac_c" 1>&6
8669 else
8670   cat > conftest.$ac_ext <<EOF
8671 #line 8672 "configure"
8672 #include "confdefs.h"
8673 #include <sys/types.h>
8674 #include <unistd.h>
8675 #include <termios.h>
8676 int main() {
8677 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8678    tcgetattr(0, 0);
8679 ; return 0; }
8680 EOF
8681 if { (eval echo configure:8682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8682   rm -rf conftest*
8683   am_cv_sys_posix_termios=yes
8684 else
8685   echo "configure: failed program was:" >&5
8686   cat conftest.$ac_ext >&5
8687   rm -rf conftest*
8688   am_cv_sys_posix_termios=no
8689 fi
8690 rm -f conftest*
8691 fi
8692
8693 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8694
8695
8696  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8697 echo "configure:8698: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8698 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8699   echo $ac_n "(cached) $ac_c" 1>&6
8700 else
8701   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8702
8703   gwinsz_in_termios_h=no
8704   if test $am_cv_sys_posix_termios = yes; then
8705     cat > conftest.$ac_ext <<EOF
8706 #line 8707 "configure"
8707 #include "confdefs.h"
8708 #include <sys/types.h>
8709 #     include <termios.h>
8710 #     ifdef TIOCGWINSZ
8711         yes
8712 #     endif
8713     
8714 EOF
8715 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8716   egrep "yes" >/dev/null 2>&1; then
8717   rm -rf conftest*
8718   gwinsz_in_termios_h=yes
8719 fi
8720 rm -f conftest*
8721
8722   fi
8723
8724   if test $gwinsz_in_termios_h = no; then
8725     cat > conftest.$ac_ext <<EOF
8726 #line 8727 "configure"
8727 #include "confdefs.h"
8728 #include <sys/types.h>
8729 #     include <sys/ioctl.h>
8730 #     ifdef TIOCGWINSZ
8731         yes
8732 #     endif
8733     
8734 EOF
8735 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8736   egrep "yes" >/dev/null 2>&1; then
8737   rm -rf conftest*
8738   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8739 fi
8740 rm -f conftest*
8741
8742   fi
8743   
8744 fi
8745
8746 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8747   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8748     cat >> confdefs.h <<\EOF
8749 #define GWINSZ_IN_SYS_IOCTL 1
8750 EOF
8751
8752   fi
8753
8754 if test $am_cv_sys_posix_termios = yes ; then
8755         cat >> confdefs.h <<\EOF
8756 #define HAVE_POSIX_TERMIOS 1
8757 EOF
8758
8759 fi
8760
8761 for ac_hdr in \
8762         arpa/inet.h             \
8763         arpa/nameser.h  \
8764         assert.h                \
8765         conio.h                 \
8766         crypt.h                 \
8767         direct.h                \
8768         errno.h                 \
8769         fcntl.h                 \
8770         filio.h                 \
8771         getopt.h                \
8772         grp.h                   \
8773         io.h                    \
8774         libutil.h               \
8775         limits.h                \
8776         locale.h                \
8777         netinet/tcp.h   \
8778         malloc.h                \
8779         memory.h                \
8780         psap.h                  \
8781         pwd.h                   \
8782         process.h               \
8783         resolv.h                \
8784         sgtty.h                 \
8785         shadow.h                \
8786         stddef.h                \
8787         string.h                \
8788         strings.h               \
8789         sysexits.h              \
8790         sys/file.h              \
8791         sys/filio.h             \
8792         sys/errno.h             \
8793         sys/ioctl.h             \
8794         sys/param.h             \
8795         sys/resource.h  \
8796         sys/select.h    \
8797         sys/socket.h    \
8798         sys/syslog.h    \
8799         sys/time.h              \
8800         sys/types.h             \
8801         syslog.h                \
8802         termios.h               \
8803         unistd.h                \
8804         winsock.h               \
8805         winsock2.h              \
8806
8807 do
8808 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8809 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8810 echo "configure:8811: checking for $ac_hdr" >&5
8811 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8812   echo $ac_n "(cached) $ac_c" 1>&6
8813 else
8814   cat > conftest.$ac_ext <<EOF
8815 #line 8816 "configure"
8816 #include "confdefs.h"
8817 #include <$ac_hdr>
8818 EOF
8819 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8820 { (eval echo configure:8821: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8821 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8822 if test -z "$ac_err"; then
8823   rm -rf conftest*
8824   eval "ac_cv_header_$ac_safe=yes"
8825 else
8826   echo "$ac_err" >&5
8827   echo "configure: failed program was:" >&5
8828   cat conftest.$ac_ext >&5
8829   rm -rf conftest*
8830   eval "ac_cv_header_$ac_safe=no"
8831 fi
8832 rm -f conftest*
8833 fi
8834 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8835   echo "$ac_t""yes" 1>&6
8836     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8837   cat >> confdefs.h <<EOF
8838 #define $ac_tr_hdr 1
8839 EOF
8840  
8841 else
8842   echo "$ac_t""no" 1>&6
8843 fi
8844 done
8845
8846
8847
8848
8849 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
8850 echo "configure:8851: checking for dlopen" >&5
8851 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
8852   echo $ac_n "(cached) $ac_c" 1>&6
8853 else
8854   cat > conftest.$ac_ext <<EOF
8855 #line 8856 "configure"
8856 #include "confdefs.h"
8857 /* System header to define __stub macros and hopefully few prototypes,
8858     which can conflict with char dlopen(); below.  */
8859 #include <assert.h>
8860 /* Override any gcc2 internal prototype to avoid an error.  */
8861 /* We use char because int might match the return type of a gcc2
8862     builtin and then its argument prototype would still apply.  */
8863 char dlopen();
8864 char (*f)();
8865
8866 int main() {
8867
8868 /* The GNU C library defines this for functions which it implements
8869     to always fail with ENOSYS.  Some functions are actually named
8870     something starting with __ and the normal name is an alias.  */
8871 #if defined (__stub_dlopen) || defined (__stub___dlopen)
8872 choke me
8873 #else
8874 f = dlopen;
8875 #endif
8876
8877 ; return 0; }
8878 EOF
8879 if { (eval echo configure:8880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8880   rm -rf conftest*
8881   eval "ac_cv_func_dlopen=yes"
8882 else
8883   echo "configure: failed program was:" >&5
8884   cat conftest.$ac_ext >&5
8885   rm -rf conftest*
8886   eval "ac_cv_func_dlopen=no"
8887 fi
8888 rm -f conftest*
8889 fi
8890
8891 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
8892   echo "$ac_t""yes" 1>&6
8893   :
8894 else
8895   echo "$ac_t""no" 1>&6
8896 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
8897 echo "configure:8898: checking for dlopen in -ldl" >&5
8898 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
8899 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8900   echo $ac_n "(cached) $ac_c" 1>&6
8901 else
8902   ac_save_LIBS="$LIBS"
8903 LIBS="-ldl  $LIBS"
8904 cat > conftest.$ac_ext <<EOF
8905 #line 8906 "configure"
8906 #include "confdefs.h"
8907 /* Override any gcc2 internal prototype to avoid an error.  */
8908 /* We use char because int might match the return type of a gcc2
8909     builtin and then its argument prototype would still apply.  */
8910 char dlopen();
8911
8912 int main() {
8913 dlopen()
8914 ; return 0; }
8915 EOF
8916 if { (eval echo configure:8917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8917   rm -rf conftest*
8918   eval "ac_cv_lib_$ac_lib_var=yes"
8919 else
8920   echo "configure: failed program was:" >&5
8921   cat conftest.$ac_ext >&5
8922   rm -rf conftest*
8923   eval "ac_cv_lib_$ac_lib_var=no"
8924 fi
8925 rm -f conftest*
8926 LIBS="$ac_save_LIBS"
8927
8928 fi
8929 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8930   echo "$ac_t""yes" 1>&6
8931     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8932     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8933   cat >> confdefs.h <<EOF
8934 #define $ac_tr_lib 1
8935 EOF
8936
8937   LIBS="-ldl $LIBS"
8938
8939 else
8940   echo "$ac_t""no" 1>&6
8941 fi
8942
8943 fi
8944
8945
8946 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
8947 echo "configure:8948: checking for sigset in -lV3" >&5
8948 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
8949 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8950   echo $ac_n "(cached) $ac_c" 1>&6
8951 else
8952   ac_save_LIBS="$LIBS"
8953 LIBS="-lV3  $LIBS"
8954 cat > conftest.$ac_ext <<EOF
8955 #line 8956 "configure"
8956 #include "confdefs.h"
8957 /* Override any gcc2 internal prototype to avoid an error.  */
8958 /* We use char because int might match the return type of a gcc2
8959     builtin and then its argument prototype would still apply.  */
8960 char sigset();
8961
8962 int main() {
8963 sigset()
8964 ; return 0; }
8965 EOF
8966 if { (eval echo configure:8967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8967   rm -rf conftest*
8968   eval "ac_cv_lib_$ac_lib_var=yes"
8969 else
8970   echo "configure: failed program was:" >&5
8971   cat conftest.$ac_ext >&5
8972   rm -rf conftest*
8973   eval "ac_cv_lib_$ac_lib_var=no"
8974 fi
8975 rm -f conftest*
8976 LIBS="$ac_save_LIBS"
8977
8978 fi
8979 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8980   echo "$ac_t""yes" 1>&6
8981     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8982     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8983   cat >> confdefs.h <<EOF
8984 #define $ac_tr_lib 1
8985 EOF
8986
8987   LIBS="-lV3 $LIBS"
8988
8989 else
8990   echo "$ac_t""no" 1>&6
8991 fi
8992
8993
8994 echo $ac_n "checking for winsock""... $ac_c" 1>&6
8995 echo "configure:8996: checking for winsock" >&5
8996 save_LIBS="$LIBS"
8997 for curlib in ws2_32 wsock32; do
8998         LIBS="$LIBS -l$curlib"
8999         cat > conftest.$ac_ext <<EOF
9000 #line 9001 "configure"
9001 #include "confdefs.h"
9002
9003                         char socket@12();
9004                         char select@20();
9005                         char closesocket@4();
9006                         char gethostname@8();
9007                         
9008 int main() {
9009
9010                         socket@12();
9011                         select@20();
9012                         closesocket@4();
9013                         gethostname@8();
9014                         
9015 ; return 0; }
9016 EOF
9017 if { (eval echo configure:9018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9018   rm -rf conftest*
9019   have_winsock=yes
9020 else
9021   echo "configure: failed program was:" >&5
9022   cat conftest.$ac_ext >&5
9023   rm -rf conftest*
9024   have_winsock=no
9025 fi
9026 rm -f conftest*
9027
9028         if test $have_winsock = yes; then
9029                 cat >> confdefs.h <<\EOF
9030 #define HAVE_WINSOCK 1
9031 EOF
9032
9033                 ac_cv_func_socket=yes
9034                 ac_cv_func_select=yes
9035                 ac_cv_func_closesocket=yes
9036                 ac_cv_func_gethostname=yes
9037                 if test $curlib = ws2_32; then
9038                         have_winsock=winsock2
9039                         cat >> confdefs.h <<\EOF
9040 #define HAVE_WINSOCK2 1
9041 EOF
9042
9043                 fi
9044                 break
9045         fi
9046         LIBS="$save_LIBS"
9047 done
9048 echo "$ac_t""$have_winsock" 1>&6
9049
9050
9051 echo $ac_n "checking for socket""... $ac_c" 1>&6
9052 echo "configure:9053: checking for socket" >&5
9053 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9054   echo $ac_n "(cached) $ac_c" 1>&6
9055 else
9056   cat > conftest.$ac_ext <<EOF
9057 #line 9058 "configure"
9058 #include "confdefs.h"
9059 /* System header to define __stub macros and hopefully few prototypes,
9060     which can conflict with char socket(); below.  */
9061 #include <assert.h>
9062 /* Override any gcc2 internal prototype to avoid an error.  */
9063 /* We use char because int might match the return type of a gcc2
9064     builtin and then its argument prototype would still apply.  */
9065 char socket();
9066 char (*f)();
9067
9068 int main() {
9069
9070 /* The GNU C library defines this for functions which it implements
9071     to always fail with ENOSYS.  Some functions are actually named
9072     something starting with __ and the normal name is an alias.  */
9073 #if defined (__stub_socket) || defined (__stub___socket)
9074 choke me
9075 #else
9076 f = socket;
9077 #endif
9078
9079 ; return 0; }
9080 EOF
9081 if { (eval echo configure:9082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9082   rm -rf conftest*
9083   eval "ac_cv_func_socket=yes"
9084 else
9085   echo "configure: failed program was:" >&5
9086   cat conftest.$ac_ext >&5
9087   rm -rf conftest*
9088   eval "ac_cv_func_socket=no"
9089 fi
9090 rm -f conftest*
9091 fi
9092
9093 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9094   echo "$ac_t""yes" 1>&6
9095   :
9096 else
9097   echo "$ac_t""no" 1>&6
9098         
9099         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9100 echo "configure:9101: checking for main in -lsocket" >&5
9101 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9102 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9103   echo $ac_n "(cached) $ac_c" 1>&6
9104 else
9105   ac_save_LIBS="$LIBS"
9106 LIBS="-lsocket  $LIBS"
9107 cat > conftest.$ac_ext <<EOF
9108 #line 9109 "configure"
9109 #include "confdefs.h"
9110
9111 int main() {
9112 main()
9113 ; return 0; }
9114 EOF
9115 if { (eval echo configure:9116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9116   rm -rf conftest*
9117   eval "ac_cv_lib_$ac_lib_var=yes"
9118 else
9119   echo "configure: failed program was:" >&5
9120   cat conftest.$ac_ext >&5
9121   rm -rf conftest*
9122   eval "ac_cv_lib_$ac_lib_var=no"
9123 fi
9124 rm -f conftest*
9125 LIBS="$ac_save_LIBS"
9126
9127 fi
9128 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9129   echo "$ac_t""yes" 1>&6
9130     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9131     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9132   cat >> confdefs.h <<EOF
9133 #define $ac_tr_lib 1
9134 EOF
9135
9136   LIBS="-lsocket $LIBS"
9137
9138 else
9139   echo "$ac_t""no" 1>&6
9140 fi
9141
9142         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9143 echo "configure:9144: checking for main in -lnet" >&5
9144 ac_lib_var=`echo net'_'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="-lnet  $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 net | 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="-lnet $LIBS"
9180
9181 else
9182   echo "$ac_t""no" 1>&6
9183 fi
9184
9185         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9186 echo "configure:9187: checking for main in -lnsl_s" >&5
9187 ac_lib_var=`echo nsl_s'_'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="-lnsl_s  $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 nsl_s | 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="-lnsl_s $LIBS"
9223
9224 else
9225   echo "$ac_t""no" 1>&6
9226 fi
9227
9228         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9229 echo "configure:9230: checking for main in -lnsl" >&5
9230 ac_lib_var=`echo nsl'_'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  $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 | 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 $LIBS"
9266
9267 else
9268   echo "$ac_t""no" 1>&6
9269 fi
9270
9271         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9272 echo "configure:9273: checking for socket in -linet" >&5
9273 ac_lib_var=`echo inet'_'socket | 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="-linet  $LIBS"
9279 cat > conftest.$ac_ext <<EOF
9280 #line 9281 "configure"
9281 #include "confdefs.h"
9282 /* Override any gcc2 internal prototype to avoid an error.  */
9283 /* We use char because int might match the return type of a gcc2
9284     builtin and then its argument prototype would still apply.  */
9285 char socket();
9286
9287 int main() {
9288 socket()
9289 ; return 0; }
9290 EOF
9291 if { (eval echo configure:9292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9292   rm -rf conftest*
9293   eval "ac_cv_lib_$ac_lib_var=yes"
9294 else
9295   echo "configure: failed program was:" >&5
9296   cat conftest.$ac_ext >&5
9297   rm -rf conftest*
9298   eval "ac_cv_lib_$ac_lib_var=no"
9299 fi
9300 rm -f conftest*
9301 LIBS="$ac_save_LIBS"
9302
9303 fi
9304 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9305   echo "$ac_t""yes" 1>&6
9306     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9307     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9308   cat >> confdefs.h <<EOF
9309 #define $ac_tr_lib 1
9310 EOF
9311
9312   LIBS="-linet $LIBS"
9313
9314 else
9315   echo "$ac_t""no" 1>&6
9316 fi
9317
9318         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9319 echo "configure:9320: checking for main in -lgen" >&5
9320 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9321 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9322   echo $ac_n "(cached) $ac_c" 1>&6
9323 else
9324   ac_save_LIBS="$LIBS"
9325 LIBS="-lgen  $LIBS"
9326 cat > conftest.$ac_ext <<EOF
9327 #line 9328 "configure"
9328 #include "confdefs.h"
9329
9330 int main() {
9331 main()
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 gen | 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="-lgen $LIBS"
9356
9357 else
9358   echo "$ac_t""no" 1>&6
9359 fi
9360
9361
9362 fi
9363
9364
9365 echo $ac_n "checking for select""... $ac_c" 1>&6
9366 echo "configure:9367: checking for select" >&5
9367 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9368   echo $ac_n "(cached) $ac_c" 1>&6
9369 else
9370   cat > conftest.$ac_ext <<EOF
9371 #line 9372 "configure"
9372 #include "confdefs.h"
9373 /* System header to define __stub macros and hopefully few prototypes,
9374     which can conflict with char select(); below.  */
9375 #include <assert.h>
9376 /* Override any gcc2 internal prototype to avoid an error.  */
9377 /* We use char because int might match the return type of a gcc2
9378     builtin and then its argument prototype would still apply.  */
9379 char select();
9380 char (*f)();
9381
9382 int main() {
9383
9384 /* The GNU C library defines this for functions which it implements
9385     to always fail with ENOSYS.  Some functions are actually named
9386     something starting with __ and the normal name is an alias.  */
9387 #if defined (__stub_select) || defined (__stub___select)
9388 choke me
9389 #else
9390 f = select;
9391 #endif
9392
9393 ; return 0; }
9394 EOF
9395 if { (eval echo configure:9396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9396   rm -rf conftest*
9397   eval "ac_cv_func_select=yes"
9398 else
9399   echo "configure: failed program was:" >&5
9400   cat conftest.$ac_ext >&5
9401   rm -rf conftest*
9402   eval "ac_cv_func_select=no"
9403 fi
9404 rm -f conftest*
9405 fi
9406
9407 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9408   echo "$ac_t""yes" 1>&6
9409   :
9410 else
9411   echo "$ac_t""no" 1>&6
9412 { echo "configure: error: select() required." 1>&2; exit 1; }
9413 fi
9414
9415
9416 if test "${ac_cv_header_winsock_h}" != yes; then
9417                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9418 echo "configure:9419: checking types of arguments for select()" >&5
9419  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9420   echo $ac_n "(cached) $ac_c" 1>&6
9421 else
9422    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9423   echo $ac_n "(cached) $ac_c" 1>&6
9424 else
9425     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9426   echo $ac_n "(cached) $ac_c" 1>&6
9427 else
9428      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9429      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9430       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9431        cat > conftest.$ac_ext <<EOF
9432 #line 9433 "configure"
9433 #include "confdefs.h"
9434 #ifdef HAVE_SYS_TYPES_H
9435 #include <sys/types.h>
9436 #endif
9437 #ifdef HAVE_SYS_TIME_H
9438 #include <sys/time.h>
9439 #endif
9440 #ifdef HAVE_SYS_SELECT_H
9441 #include <sys/select.h>
9442 #endif
9443 #ifdef HAVE_SYS_SOCKET_H
9444 #include <sys/socket.h>
9445 #endif
9446 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);
9447 int main() {
9448
9449 ; return 0; }
9450 EOF
9451 if { (eval echo configure:9452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9452   rm -rf conftest*
9453           ac_not_found=no ; break 3
9454 else
9455   echo "configure: failed program was:" >&5
9456   cat conftest.$ac_ext >&5
9457   rm -rf conftest*
9458   ac_not_found=yes
9459 fi
9460 rm -f conftest*
9461       done
9462      done
9463     done
9464    
9465 fi
9466   
9467 fi
9468  
9469 fi
9470  if test "$ac_not_found" = yes; then
9471   ac_cv_func_select_arg1=int 
9472   ac_cv_func_select_arg234='int *' 
9473   ac_cv_func_select_arg5='struct timeval *'
9474  fi
9475  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9476  cat >> confdefs.h <<EOF
9477 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9478 EOF
9479
9480  cat >> confdefs.h <<EOF
9481 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9482 EOF
9483
9484  cat >> confdefs.h <<EOF
9485 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9486 EOF
9487
9488
9489 fi
9490
9491
9492 for ac_hdr in regex.h 
9493 do
9494 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9495 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9496 echo "configure:9497: checking for $ac_hdr" >&5
9497 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9498   echo $ac_n "(cached) $ac_c" 1>&6
9499 else
9500   cat > conftest.$ac_ext <<EOF
9501 #line 9502 "configure"
9502 #include "confdefs.h"
9503 #include <$ac_hdr>
9504 EOF
9505 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9506 { (eval echo configure:9507: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9507 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9508 if test -z "$ac_err"; then
9509   rm -rf conftest*
9510   eval "ac_cv_header_$ac_safe=yes"
9511 else
9512   echo "$ac_err" >&5
9513   echo "configure: failed program was:" >&5
9514   cat conftest.$ac_ext >&5
9515   rm -rf conftest*
9516   eval "ac_cv_header_$ac_safe=no"
9517 fi
9518 rm -f conftest*
9519 fi
9520 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9521   echo "$ac_t""yes" 1>&6
9522     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9523   cat >> confdefs.h <<EOF
9524 #define $ac_tr_hdr 1
9525 EOF
9526  
9527 else
9528   echo "$ac_t""no" 1>&6
9529 fi
9530 done
9531
9532 if test "$ac_cv_header_regex_h" != yes ; then
9533         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9534 fi
9535
9536 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9537 echo "configure:9538: checking for library containing regfree" >&5
9538 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9539   echo $ac_n "(cached) $ac_c" 1>&6
9540 else
9541   ac_func_search_save_LIBS="$LIBS"
9542 ac_cv_search_regfree="no"
9543 cat > conftest.$ac_ext <<EOF
9544 #line 9545 "configure"
9545 #include "confdefs.h"
9546 /* Override any gcc2 internal prototype to avoid an error.  */
9547 /* We use char because int might match the return type of a gcc2
9548     builtin and then its argument prototype would still apply.  */
9549 char regfree();
9550
9551 int main() {
9552 regfree()
9553 ; return 0; }
9554 EOF
9555 if { (eval echo configure:9556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9556   rm -rf conftest*
9557   ac_cv_search_regfree="none required"
9558 else
9559   echo "configure: failed program was:" >&5
9560   cat conftest.$ac_ext >&5
9561 fi
9562 rm -f conftest*
9563 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9564 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9565 cat > conftest.$ac_ext <<EOF
9566 #line 9567 "configure"
9567 #include "confdefs.h"
9568 /* Override any gcc2 internal prototype to avoid an error.  */
9569 /* We use char because int might match the return type of a gcc2
9570     builtin and then its argument prototype would still apply.  */
9571 char regfree();
9572
9573 int main() {
9574 regfree()
9575 ; return 0; }
9576 EOF
9577 if { (eval echo configure:9578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9578   rm -rf conftest*
9579   ac_cv_search_regfree="-l$ac_lib"
9580 break
9581 else
9582   echo "configure: failed program was:" >&5
9583   cat conftest.$ac_ext >&5
9584 fi
9585 rm -f conftest*
9586 done
9587 LIBS="$ac_func_search_save_LIBS"
9588 fi
9589
9590 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9591 if test "$ac_cv_search_regfree" != "no"; then
9592   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9593   :
9594 else :
9595   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9596 fi
9597
9598
9599 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9600 echo "configure:9601: checking for compatible POSIX regex" >&5
9601 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9602   echo $ac_n "(cached) $ac_c" 1>&6
9603 else
9604   
9605         if test "$cross_compiling" = yes; then
9606   ol_cv_c_posix_regex=cross
9607 else
9608   cat > conftest.$ac_ext <<EOF
9609 #line 9610 "configure"
9610 #include "confdefs.h"
9611
9612 #include <sys/types.h>
9613 #include <regex.h>
9614 static char *pattern, *string;
9615 main()
9616 {
9617         int rc;
9618         regex_t re;
9619
9620         pattern = "^A";
9621
9622         if(regcomp(&re, pattern, 0)) {
9623                 return -1;
9624         }
9625         
9626         string = "ALL MATCH";
9627         
9628         rc = regexec(&re, string, 0, (void*)0, 0);
9629
9630         regfree(&re);
9631
9632         return rc;
9633 }
9634 EOF
9635 if { (eval echo configure:9636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9636 then
9637   ol_cv_c_posix_regex=yes
9638 else
9639   echo "configure: failed program was:" >&5
9640   cat conftest.$ac_ext >&5
9641   rm -fr conftest*
9642   ol_cv_c_posix_regex=no
9643 fi
9644 rm -fr conftest*
9645 fi
9646
9647 fi
9648
9649 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9650
9651 if test "$ol_cv_c_posix_regex" = no ; then
9652         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9653 fi
9654
9655
9656 have_uuid=no
9657 for ac_hdr in sys/uuid.h
9658 do
9659 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9660 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9661 echo "configure:9662: checking for $ac_hdr" >&5
9662 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9663   echo $ac_n "(cached) $ac_c" 1>&6
9664 else
9665   cat > conftest.$ac_ext <<EOF
9666 #line 9667 "configure"
9667 #include "confdefs.h"
9668 #include <$ac_hdr>
9669 EOF
9670 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9671 { (eval echo configure:9672: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9672 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9673 if test -z "$ac_err"; then
9674   rm -rf conftest*
9675   eval "ac_cv_header_$ac_safe=yes"
9676 else
9677   echo "$ac_err" >&5
9678   echo "configure: failed program was:" >&5
9679   cat conftest.$ac_ext >&5
9680   rm -rf conftest*
9681   eval "ac_cv_header_$ac_safe=no"
9682 fi
9683 rm -f conftest*
9684 fi
9685 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9686   echo "$ac_t""yes" 1>&6
9687     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9688   cat >> confdefs.h <<EOF
9689 #define $ac_tr_hdr 1
9690 EOF
9691  
9692 else
9693   echo "$ac_t""no" 1>&6
9694 fi
9695 done
9696
9697 if test $ac_cv_header_sys_uuid_h = yes ; then
9698         save_LIBS="$LIBS"
9699         
9700 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9701 echo "configure:9702: checking for library containing uuid_to_str" >&5
9702 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9703   echo $ac_n "(cached) $ac_c" 1>&6
9704 else
9705   ac_func_search_save_LIBS="$LIBS"
9706 ac_cv_search_uuid_to_str="no"
9707 cat > conftest.$ac_ext <<EOF
9708 #line 9709 "configure"
9709 #include "confdefs.h"
9710 /* Override any gcc2 internal prototype to avoid an error.  */
9711 /* We use char because int might match the return type of a gcc2
9712     builtin and then its argument prototype would still apply.  */
9713 char uuid_to_str();
9714
9715 int main() {
9716 uuid_to_str()
9717 ; return 0; }
9718 EOF
9719 if { (eval echo configure:9720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9720   rm -rf conftest*
9721   ac_cv_search_uuid_to_str="none required"
9722 else
9723   echo "configure: failed program was:" >&5
9724   cat conftest.$ac_ext >&5
9725 fi
9726 rm -f conftest*
9727 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9728 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9729 cat > conftest.$ac_ext <<EOF
9730 #line 9731 "configure"
9731 #include "confdefs.h"
9732 /* Override any gcc2 internal prototype to avoid an error.  */
9733 /* We use char because int might match the return type of a gcc2
9734     builtin and then its argument prototype would still apply.  */
9735 char uuid_to_str();
9736
9737 int main() {
9738 uuid_to_str()
9739 ; return 0; }
9740 EOF
9741 if { (eval echo configure:9742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9742   rm -rf conftest*
9743   ac_cv_search_uuid_to_str="-l$ac_lib"
9744 break
9745 else
9746   echo "configure: failed program was:" >&5
9747   cat conftest.$ac_ext >&5
9748 fi
9749 rm -f conftest*
9750 done
9751 LIBS="$ac_func_search_save_LIBS"
9752 fi
9753
9754 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9755 if test "$ac_cv_search_uuid_to_str" != "no"; then
9756   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9757   have_uuid=yes
9758 else :
9759   :
9760 fi
9761         LIBS="$save_LIBS"
9762
9763         if test have_uuid = yes ; then
9764                 cat >> confdefs.h <<\EOF
9765 #define HAVE_UUID_TO_STR 1
9766 EOF
9767
9768
9769                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9770                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9771         fi
9772 fi
9773
9774 if test $have_uuid = no ; then
9775         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9776 echo "configure:9777: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9777         save_LIBS="$LIBS"
9778         LIBS="$LIBS -lrpcrt4"
9779         cat > conftest.$ac_ext <<EOF
9780 #line 9781 "configure"
9781 #include "confdefs.h"
9782
9783                 char UuidCreate@4();
9784                 char UuidToStringA@8();
9785                 
9786 int main() {
9787
9788                 UuidCreate@4();
9789                 UuidToStringA@8();
9790                 
9791 ; return 0; }
9792 EOF
9793 if { (eval echo configure:9794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9794   rm -rf conftest*
9795   need_rpcrt=yes
9796 else
9797   echo "configure: failed program was:" >&5
9798   cat conftest.$ac_ext >&5
9799   rm -rf conftest*
9800   need_rpcrt=no
9801 fi
9802 rm -f conftest*
9803         if test $need_rpcrt = yes; then
9804                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9805         fi
9806         LIBS="$save_LIBS"
9807         echo "$ac_t""$need_rpcrt" 1>&6
9808 fi
9809
9810 ol_link_dnssrv=no
9811 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9812 echo "configure:9813: checking for res_query" >&5
9813 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9814   echo $ac_n "(cached) $ac_c" 1>&6
9815 else
9816   cat > conftest.$ac_ext <<EOF
9817 #line 9818 "configure"
9818 #include "confdefs.h"
9819 /* System header to define __stub macros and hopefully few prototypes,
9820     which can conflict with char res_query(); below.  */
9821 #include <assert.h>
9822 /* Override any gcc2 internal prototype to avoid an error.  */
9823 /* We use char because int might match the return type of a gcc2
9824     builtin and then its argument prototype would still apply.  */
9825 char res_query();
9826 char (*f)();
9827
9828 int main() {
9829
9830 /* The GNU C library defines this for functions which it implements
9831     to always fail with ENOSYS.  Some functions are actually named
9832     something starting with __ and the normal name is an alias.  */
9833 #if defined (__stub_res_query) || defined (__stub___res_query)
9834 choke me
9835 #else
9836 f = res_query;
9837 #endif
9838
9839 ; return 0; }
9840 EOF
9841 if { (eval echo configure:9842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9842   rm -rf conftest*
9843   eval "ac_cv_func_res_query=yes"
9844 else
9845   echo "configure: failed program was:" >&5
9846   cat conftest.$ac_ext >&5
9847   rm -rf conftest*
9848   eval "ac_cv_func_res_query=no"
9849 fi
9850 rm -f conftest*
9851 fi
9852
9853 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9854   echo "$ac_t""yes" 1>&6
9855   :
9856 else
9857   echo "$ac_t""no" 1>&6
9858 fi
9859
9860 if test $ac_cv_func_res_query = no ; then 
9861         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9862 echo "configure:9863: checking for __res_query" >&5
9863 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9864   echo $ac_n "(cached) $ac_c" 1>&6
9865 else
9866   cat > conftest.$ac_ext <<EOF
9867 #line 9868 "configure"
9868 #include "confdefs.h"
9869 /* System header to define __stub macros and hopefully few prototypes,
9870     which can conflict with char __res_query(); below.  */
9871 #include <assert.h>
9872 /* Override any gcc2 internal prototype to avoid an error.  */
9873 /* We use char because int might match the return type of a gcc2
9874     builtin and then its argument prototype would still apply.  */
9875 char __res_query();
9876 char (*f)();
9877
9878 int main() {
9879
9880 /* The GNU C library defines this for functions which it implements
9881     to always fail with ENOSYS.  Some functions are actually named
9882     something starting with __ and the normal name is an alias.  */
9883 #if defined (__stub___res_query) || defined (__stub_____res_query)
9884 choke me
9885 #else
9886 f = __res_query;
9887 #endif
9888
9889 ; return 0; }
9890 EOF
9891 if { (eval echo configure:9892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9892   rm -rf conftest*
9893   eval "ac_cv_func___res_query=yes"
9894 else
9895   echo "configure: failed program was:" >&5
9896   cat conftest.$ac_ext >&5
9897   rm -rf conftest*
9898   eval "ac_cv_func___res_query=no"
9899 fi
9900 rm -f conftest*
9901 fi
9902
9903 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
9904   echo "$ac_t""yes" 1>&6
9905   :
9906 else
9907   echo "$ac_t""no" 1>&6
9908 fi
9909
9910         ac_cv_func_res_query=$ac_cv_func___res_query
9911 fi
9912
9913 if test $ac_cv_func_res_query = no ; then 
9914         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
9915 echo "configure:9916: checking for res_query in -lbind" >&5
9916 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
9917 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9918   echo $ac_n "(cached) $ac_c" 1>&6
9919 else
9920   ac_save_LIBS="$LIBS"
9921 LIBS="-lbind  $LIBS"
9922 cat > conftest.$ac_ext <<EOF
9923 #line 9924 "configure"
9924 #include "confdefs.h"
9925 /* Override any gcc2 internal prototype to avoid an error.  */
9926 /* We use char because int might match the return type of a gcc2
9927     builtin and then its argument prototype would still apply.  */
9928 char res_query();
9929
9930 int main() {
9931 res_query()
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_lib_$ac_lib_var=yes"
9937 else
9938   echo "configure: failed program was:" >&5
9939   cat conftest.$ac_ext >&5
9940   rm -rf conftest*
9941   eval "ac_cv_lib_$ac_lib_var=no"
9942 fi
9943 rm -f conftest*
9944 LIBS="$ac_save_LIBS"
9945
9946 fi
9947 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9948   echo "$ac_t""yes" 1>&6
9949     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9950     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9951   cat >> confdefs.h <<EOF
9952 #define $ac_tr_lib 1
9953 EOF
9954
9955   LIBS="-lbind $LIBS"
9956
9957 else
9958   echo "$ac_t""no" 1>&6
9959 fi
9960
9961         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
9962 fi
9963
9964 if test $ac_cv_func_res_query = no ; then 
9965         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
9966 echo "configure:9967: checking for __res_query in -lbind" >&5
9967 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
9968 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9969   echo $ac_n "(cached) $ac_c" 1>&6
9970 else
9971   ac_save_LIBS="$LIBS"
9972 LIBS="-lbind  $LIBS"
9973 cat > conftest.$ac_ext <<EOF
9974 #line 9975 "configure"
9975 #include "confdefs.h"
9976 /* Override any gcc2 internal prototype to avoid an error.  */
9977 /* We use char because int might match the return type of a gcc2
9978     builtin and then its argument prototype would still apply.  */
9979 char __res_query();
9980
9981 int main() {
9982 __res_query()
9983 ; return 0; }
9984 EOF
9985 if { (eval echo configure:9986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9986   rm -rf conftest*
9987   eval "ac_cv_lib_$ac_lib_var=yes"
9988 else
9989   echo "configure: failed program was:" >&5
9990   cat conftest.$ac_ext >&5
9991   rm -rf conftest*
9992   eval "ac_cv_lib_$ac_lib_var=no"
9993 fi
9994 rm -f conftest*
9995 LIBS="$ac_save_LIBS"
9996
9997 fi
9998 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9999   echo "$ac_t""yes" 1>&6
10000     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10001     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10002   cat >> confdefs.h <<EOF
10003 #define $ac_tr_lib 1
10004 EOF
10005
10006   LIBS="-lbind $LIBS"
10007
10008 else
10009   echo "$ac_t""no" 1>&6
10010 fi
10011
10012         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10013 fi
10014
10015 if test $ac_cv_func_res_query = no ; then 
10016         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10017 echo "configure:10018: checking for res_query in -lresolv" >&5
10018 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10019 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10020   echo $ac_n "(cached) $ac_c" 1>&6
10021 else
10022   ac_save_LIBS="$LIBS"
10023 LIBS="-lresolv  $LIBS"
10024 cat > conftest.$ac_ext <<EOF
10025 #line 10026 "configure"
10026 #include "confdefs.h"
10027 /* Override any gcc2 internal prototype to avoid an error.  */
10028 /* We use char because int might match the return type of a gcc2
10029     builtin and then its argument prototype would still apply.  */
10030 char res_query();
10031
10032 int main() {
10033 res_query()
10034 ; return 0; }
10035 EOF
10036 if { (eval echo configure:10037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10037   rm -rf conftest*
10038   eval "ac_cv_lib_$ac_lib_var=yes"
10039 else
10040   echo "configure: failed program was:" >&5
10041   cat conftest.$ac_ext >&5
10042   rm -rf conftest*
10043   eval "ac_cv_lib_$ac_lib_var=no"
10044 fi
10045 rm -f conftest*
10046 LIBS="$ac_save_LIBS"
10047
10048 fi
10049 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10050   echo "$ac_t""yes" 1>&6
10051     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10052     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10053   cat >> confdefs.h <<EOF
10054 #define $ac_tr_lib 1
10055 EOF
10056
10057   LIBS="-lresolv $LIBS"
10058
10059 else
10060   echo "$ac_t""no" 1>&6
10061 fi
10062
10063         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10064 fi
10065
10066 if test $ac_cv_func_res_query = no ; then 
10067         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10068 echo "configure:10069: checking for __res_query in -lresolv" >&5
10069 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10070 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10071   echo $ac_n "(cached) $ac_c" 1>&6
10072 else
10073   ac_save_LIBS="$LIBS"
10074 LIBS="-lresolv  $LIBS"
10075 cat > conftest.$ac_ext <<EOF
10076 #line 10077 "configure"
10077 #include "confdefs.h"
10078 /* Override any gcc2 internal prototype to avoid an error.  */
10079 /* We use char because int might match the return type of a gcc2
10080     builtin and then its argument prototype would still apply.  */
10081 char __res_query();
10082
10083 int main() {
10084 __res_query()
10085 ; return 0; }
10086 EOF
10087 if { (eval echo configure:10088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10088   rm -rf conftest*
10089   eval "ac_cv_lib_$ac_lib_var=yes"
10090 else
10091   echo "configure: failed program was:" >&5
10092   cat conftest.$ac_ext >&5
10093   rm -rf conftest*
10094   eval "ac_cv_lib_$ac_lib_var=no"
10095 fi
10096 rm -f conftest*
10097 LIBS="$ac_save_LIBS"
10098
10099 fi
10100 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10101   echo "$ac_t""yes" 1>&6
10102     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10103     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10104   cat >> confdefs.h <<EOF
10105 #define $ac_tr_lib 1
10106 EOF
10107
10108   LIBS="-lresolv $LIBS"
10109
10110 else
10111   echo "$ac_t""no" 1>&6
10112 fi
10113
10114         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10115 fi
10116
10117 if test "$ac_cv_func_res_query" = yes ; then
10118         cat >> confdefs.h <<\EOF
10119 #define HAVE_RES_QUERY 1
10120 EOF
10121
10122
10123         if test $ol_enable_dnssrv != no ; then
10124                 ol_link_dnssrv=yes
10125         fi
10126 fi
10127
10128 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10129         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10130 fi
10131
10132 for ac_func in getaddrinfo gai_strerror inet_ntop 
10133 do
10134 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10135 echo "configure:10136: checking for $ac_func" >&5
10136 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10137   echo $ac_n "(cached) $ac_c" 1>&6
10138 else
10139   cat > conftest.$ac_ext <<EOF
10140 #line 10141 "configure"
10141 #include "confdefs.h"
10142 /* System header to define __stub macros and hopefully few prototypes,
10143     which can conflict with char $ac_func(); below.  */
10144 #include <assert.h>
10145 /* Override any gcc2 internal prototype to avoid an error.  */
10146 /* We use char because int might match the return type of a gcc2
10147     builtin and then its argument prototype would still apply.  */
10148 char $ac_func();
10149 char (*f)();
10150
10151 int main() {
10152
10153 /* The GNU C library defines this for functions which it implements
10154     to always fail with ENOSYS.  Some functions are actually named
10155     something starting with __ and the normal name is an alias.  */
10156 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10157 choke me
10158 #else
10159 f = $ac_func;
10160 #endif
10161
10162 ; return 0; }
10163 EOF
10164 if { (eval echo configure:10165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10165   rm -rf conftest*
10166   eval "ac_cv_func_$ac_func=yes"
10167 else
10168   echo "configure: failed program was:" >&5
10169   cat conftest.$ac_ext >&5
10170   rm -rf conftest*
10171   eval "ac_cv_func_$ac_func=no"
10172 fi
10173 rm -f conftest*
10174 fi
10175
10176 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10177   echo "$ac_t""yes" 1>&6
10178     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10179   cat >> confdefs.h <<EOF
10180 #define $ac_tr_func 1
10181 EOF
10182  
10183 else
10184   echo "$ac_t""no" 1>&6
10185 fi
10186 done
10187
10188
10189 ol_link_ipv6=no
10190 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10191         if test $ol_enable_ipv6 = yes ; then
10192                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10193         fi
10194 elif test $ol_enable_ipv6 != no ; then
10195         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10196 echo "configure:10197: checking INET6_ADDRSTRLEN" >&5
10197 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10198   echo $ac_n "(cached) $ac_c" 1>&6
10199 else
10200   
10201                 cat > conftest.$ac_ext <<EOF
10202 #line 10203 "configure"
10203 #include "confdefs.h"
10204
10205 #                       include <netinet/in.h>
10206 #                       ifdef INET6_ADDRSTRLEN
10207                                 __has_inet6_addrstrlen__;
10208 #                       endif
10209                 
10210 EOF
10211 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10212   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10213   rm -rf conftest*
10214   ol_cv_inet6_addrstrlen=yes
10215 else
10216   rm -rf conftest*
10217   ol_cv_inet6_addrstrlen=no
10218 fi
10219 rm -f conftest*
10220
10221 fi
10222
10223 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10224
10225         if test $ol_cv_inet6_addrstrlen = yes ; then
10226                 ol_link_ipv6=yes
10227         elif test $ol_enable_ipv6 = yes ; then
10228                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10229         fi
10230 fi
10231
10232 if test $ol_enable_local != no ; then
10233         for ac_hdr in sys/un.h 
10234 do
10235 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10236 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10237 echo "configure:10238: checking for $ac_hdr" >&5
10238 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10239   echo $ac_n "(cached) $ac_c" 1>&6
10240 else
10241   cat > conftest.$ac_ext <<EOF
10242 #line 10243 "configure"
10243 #include "confdefs.h"
10244 #include <$ac_hdr>
10245 EOF
10246 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10247 { (eval echo configure:10248: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10248 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10249 if test -z "$ac_err"; then
10250   rm -rf conftest*
10251   eval "ac_cv_header_$ac_safe=yes"
10252 else
10253   echo "$ac_err" >&5
10254   echo "configure: failed program was:" >&5
10255   cat conftest.$ac_ext >&5
10256   rm -rf conftest*
10257   eval "ac_cv_header_$ac_safe=no"
10258 fi
10259 rm -f conftest*
10260 fi
10261 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10262   echo "$ac_t""yes" 1>&6
10263     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10264   cat >> confdefs.h <<EOF
10265 #define $ac_tr_hdr 1
10266 EOF
10267  
10268 else
10269   echo "$ac_t""no" 1>&6
10270 fi
10271 done
10272
10273
10274         if test $ol_enable_local = auto ; then
10275                 ol_enable_local=$ac_cv_header_sys_un_h
10276         elif test $ac_cv_header_sys_un_h = no ; then
10277                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10278         fi
10279 fi
10280
10281 ol_link_kbind=no
10282 ol_link_kpasswd=no
10283 ol_link_krb5=no
10284 ol_link_krb4=no
10285
10286 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10287         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10288         -o $ol_with_kerberos = k425 ; then
10289
10290         for ac_hdr in krb5.h
10291 do
10292 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10293 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10294 echo "configure:10295: checking for $ac_hdr" >&5
10295 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10296   echo $ac_n "(cached) $ac_c" 1>&6
10297 else
10298   cat > conftest.$ac_ext <<EOF
10299 #line 10300 "configure"
10300 #include "confdefs.h"
10301 #include <$ac_hdr>
10302 EOF
10303 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10304 { (eval echo configure:10305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10305 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10306 if test -z "$ac_err"; then
10307   rm -rf conftest*
10308   eval "ac_cv_header_$ac_safe=yes"
10309 else
10310   echo "$ac_err" >&5
10311   echo "configure: failed program was:" >&5
10312   cat conftest.$ac_ext >&5
10313   rm -rf conftest*
10314   eval "ac_cv_header_$ac_safe=no"
10315 fi
10316 rm -f conftest*
10317 fi
10318 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10319   echo "$ac_t""yes" 1>&6
10320     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10321   cat >> confdefs.h <<EOF
10322 #define $ac_tr_hdr 1
10323 EOF
10324  
10325 else
10326   echo "$ac_t""no" 1>&6
10327 fi
10328 done
10329
10330
10331         if test $ac_cv_header_krb5_h = yes ; then
10332                                 for ac_hdr in heim_err.h
10333 do
10334 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10335 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10336 echo "configure:10337: checking for $ac_hdr" >&5
10337 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10338   echo $ac_n "(cached) $ac_c" 1>&6
10339 else
10340   cat > conftest.$ac_ext <<EOF
10341 #line 10342 "configure"
10342 #include "confdefs.h"
10343 #include <$ac_hdr>
10344 EOF
10345 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10346 { (eval echo configure:10347: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10347 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10348 if test -z "$ac_err"; then
10349   rm -rf conftest*
10350   eval "ac_cv_header_$ac_safe=yes"
10351 else
10352   echo "$ac_err" >&5
10353   echo "configure: failed program was:" >&5
10354   cat conftest.$ac_ext >&5
10355   rm -rf conftest*
10356   eval "ac_cv_header_$ac_safe=no"
10357 fi
10358 rm -f conftest*
10359 fi
10360 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10361   echo "$ac_t""yes" 1>&6
10362     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10363   cat >> confdefs.h <<EOF
10364 #define $ac_tr_hdr 1
10365 EOF
10366  
10367 else
10368   echo "$ac_t""no" 1>&6
10369 fi
10370 done
10371
10372                 if test $ac_cv_header_heim_err_h = yes ; then
10373                         krb5_impl=heimdal
10374                 else
10375                         krb5_impl=mit
10376                 fi
10377
10378                 if test $krb5_impl = mit; then
10379                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10380 echo "configure:10381: checking for main in -lk5crypto" >&5
10381 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10382 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10383   echo $ac_n "(cached) $ac_c" 1>&6
10384 else
10385   ac_save_LIBS="$LIBS"
10386 LIBS="-lk5crypto  $LIBS"
10387 cat > conftest.$ac_ext <<EOF
10388 #line 10389 "configure"
10389 #include "confdefs.h"
10390
10391 int main() {
10392 main()
10393 ; return 0; }
10394 EOF
10395 if { (eval echo configure:10396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10396   rm -rf conftest*
10397   eval "ac_cv_lib_$ac_lib_var=yes"
10398 else
10399   echo "configure: failed program was:" >&5
10400   cat conftest.$ac_ext >&5
10401   rm -rf conftest*
10402   eval "ac_cv_lib_$ac_lib_var=no"
10403 fi
10404 rm -f conftest*
10405 LIBS="$ac_save_LIBS"
10406
10407 fi
10408 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10409   echo "$ac_t""yes" 1>&6
10410   krb5crypto=k5crypto
10411 else
10412   echo "$ac_t""no" 1>&6
10413 krb5crypto=crypto
10414 fi
10415
10416
10417                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10418 echo "configure:10419: checking for main in -lkrb5" >&5
10419 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10420 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10421   echo $ac_n "(cached) $ac_c" 1>&6
10422 else
10423   ac_save_LIBS="$LIBS"
10424 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10425 cat > conftest.$ac_ext <<EOF
10426 #line 10427 "configure"
10427 #include "confdefs.h"
10428
10429 int main() {
10430 main()
10431 ; return 0; }
10432 EOF
10433 if { (eval echo configure:10434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10434   rm -rf conftest*
10435   eval "ac_cv_lib_$ac_lib_var=yes"
10436 else
10437   echo "configure: failed program was:" >&5
10438   cat conftest.$ac_ext >&5
10439   rm -rf conftest*
10440   eval "ac_cv_lib_$ac_lib_var=no"
10441 fi
10442 rm -f conftest*
10443 LIBS="$ac_save_LIBS"
10444
10445 fi
10446 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10447   echo "$ac_t""yes" 1>&6
10448   have_krb5=yes
10449                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10450 else
10451   echo "$ac_t""no" 1>&6
10452 have_krb5=no
10453 fi
10454
10455
10456                 elif test $krb5_impl = heimdal; then
10457                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10458 echo "configure:10459: checking for main in -ldes" >&5
10459 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10460 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10461   echo $ac_n "(cached) $ac_c" 1>&6
10462 else
10463   ac_save_LIBS="$LIBS"
10464 LIBS="-ldes  $LIBS"
10465 cat > conftest.$ac_ext <<EOF
10466 #line 10467 "configure"
10467 #include "confdefs.h"
10468
10469 int main() {
10470 main()
10471 ; return 0; }
10472 EOF
10473 if { (eval echo configure:10474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10474   rm -rf conftest*
10475   eval "ac_cv_lib_$ac_lib_var=yes"
10476 else
10477   echo "configure: failed program was:" >&5
10478   cat conftest.$ac_ext >&5
10479   rm -rf conftest*
10480   eval "ac_cv_lib_$ac_lib_var=no"
10481 fi
10482 rm -f conftest*
10483 LIBS="$ac_save_LIBS"
10484
10485 fi
10486 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10487   echo "$ac_t""yes" 1>&6
10488   krb5crypto=des
10489 else
10490   echo "$ac_t""no" 1>&6
10491 krb5crypto=crypto
10492 fi
10493
10494
10495                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10496 echo "configure:10497: checking for main in -lkrb5" >&5
10497 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10498 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10499   echo $ac_n "(cached) $ac_c" 1>&6
10500 else
10501   ac_save_LIBS="$LIBS"
10502 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10503 cat > conftest.$ac_ext <<EOF
10504 #line 10505 "configure"
10505 #include "confdefs.h"
10506
10507 int main() {
10508 main()
10509 ; return 0; }
10510 EOF
10511 if { (eval echo configure:10512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10512   rm -rf conftest*
10513   eval "ac_cv_lib_$ac_lib_var=yes"
10514 else
10515   echo "configure: failed program was:" >&5
10516   cat conftest.$ac_ext >&5
10517   rm -rf conftest*
10518   eval "ac_cv_lib_$ac_lib_var=no"
10519 fi
10520 rm -f conftest*
10521 LIBS="$ac_save_LIBS"
10522
10523 fi
10524 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10525   echo "$ac_t""yes" 1>&6
10526   have_krb5=yes
10527                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10528 else
10529   echo "$ac_t""no" 1>&6
10530 have_krb5=no
10531 fi
10532
10533
10534                         cat >> confdefs.h <<\EOF
10535 #define HAVE_HEIMDAL_KERBEROS 1
10536 EOF
10537
10538
10539                 else
10540                         have_krb5=no
10541                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
10542                 fi
10543
10544                 if test $have_krb5 = yes ; then
10545                         ol_link_krb5=yes
10546
10547                         cat >> confdefs.h <<\EOF
10548 #define HAVE_KRB5 1
10549 EOF
10550
10551
10552                         if test $ol_enable_kpasswd != no ; then
10553                                 ol_link_kpasswd=yes;
10554                         fi
10555
10556                         if test $ol_with_kerberos = k5only ; then
10557                                 ol_with_kerberos=found
10558                         fi
10559
10560                 elif test $ol_with_kerberos != auto ; then
10561                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10562                 fi
10563
10564         fi
10565 fi
10566
10567 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10568         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10569
10570         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10571 do
10572 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10573 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10574 echo "configure:10575: checking for $ac_hdr" >&5
10575 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10576   echo $ac_n "(cached) $ac_c" 1>&6
10577 else
10578   cat > conftest.$ac_ext <<EOF
10579 #line 10580 "configure"
10580 #include "confdefs.h"
10581 #include <$ac_hdr>
10582 EOF
10583 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10584 { (eval echo configure:10585: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10585 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10586 if test -z "$ac_err"; then
10587   rm -rf conftest*
10588   eval "ac_cv_header_$ac_safe=yes"
10589 else
10590   echo "$ac_err" >&5
10591   echo "configure: failed program was:" >&5
10592   cat conftest.$ac_ext >&5
10593   rm -rf conftest*
10594   eval "ac_cv_header_$ac_safe=no"
10595 fi
10596 rm -f conftest*
10597 fi
10598 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10599   echo "$ac_t""yes" 1>&6
10600     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10601   cat >> confdefs.h <<EOF
10602 #define $ac_tr_hdr 1
10603 EOF
10604  
10605 else
10606   echo "$ac_t""no" 1>&6
10607 fi
10608 done
10609
10610
10611         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10612                 if test $krb5_impl = mit; then
10613                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10614 echo "configure:10615: checking for main in -lkrb4" >&5
10615 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10616 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10617   echo $ac_n "(cached) $ac_c" 1>&6
10618 else
10619   ac_save_LIBS="$LIBS"
10620 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10621 cat > conftest.$ac_ext <<EOF
10622 #line 10623 "configure"
10623 #include "confdefs.h"
10624
10625 int main() {
10626 main()
10627 ; return 0; }
10628 EOF
10629 if { (eval echo configure:10630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10630   rm -rf conftest*
10631   eval "ac_cv_lib_$ac_lib_var=yes"
10632 else
10633   echo "configure: failed program was:" >&5
10634   cat conftest.$ac_ext >&5
10635   rm -rf conftest*
10636   eval "ac_cv_lib_$ac_lib_var=no"
10637 fi
10638 rm -f conftest*
10639 LIBS="$ac_save_LIBS"
10640
10641 fi
10642 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10643   echo "$ac_t""yes" 1>&6
10644   have_k425=yes
10645                                 KRB4_LIBS="-lkrb4 -ldes425"
10646 else
10647   echo "$ac_t""no" 1>&6
10648 have_k425=no
10649 fi
10650
10651
10652                 elif test $krb5_impl = heimdal; then
10653                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10654 echo "configure:10655: checking for main in -lkrb4" >&5
10655 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10656 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10657   echo $ac_n "(cached) $ac_c" 1>&6
10658 else
10659   ac_save_LIBS="$LIBS"
10660 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10661 cat > conftest.$ac_ext <<EOF
10662 #line 10663 "configure"
10663 #include "confdefs.h"
10664
10665 int main() {
10666 main()
10667 ; return 0; }
10668 EOF
10669 if { (eval echo configure:10670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10670   rm -rf conftest*
10671   eval "ac_cv_lib_$ac_lib_var=yes"
10672 else
10673   echo "configure: failed program was:" >&5
10674   cat conftest.$ac_ext >&5
10675   rm -rf conftest*
10676   eval "ac_cv_lib_$ac_lib_var=no"
10677 fi
10678 rm -f conftest*
10679 LIBS="$ac_save_LIBS"
10680
10681 fi
10682 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10683   echo "$ac_t""yes" 1>&6
10684   have_k425=yes
10685                                 KRB4_LIBS="-lkrb4"
10686 else
10687   echo "$ac_t""no" 1>&6
10688 have_k425=no
10689 fi
10690
10691
10692                 else
10693                         have_425=no
10694                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10695                 fi
10696
10697                 if test $have_k425 = yes ; then
10698                         ol_with_kerberos=found
10699                         ol_link_krb4=yes
10700
10701                         cat >> confdefs.h <<\EOF
10702 #define HAVE_KRB425 1
10703 EOF
10704
10705                         cat >> confdefs.h <<\EOF
10706 #define HAVE_KRB4 1
10707 EOF
10708
10709
10710                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10711 echo "configure:10712: checking for des_debug in Kerberos libraries" >&5
10712 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10713   echo $ac_n "(cached) $ac_c" 1>&6
10714 else
10715   
10716                                                                 save_LIBS="$LIBS"
10717                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10718                                 cat > conftest.$ac_ext <<EOF
10719 #line 10720 "configure"
10720 #include "confdefs.h"
10721
10722 #include <kerberosIV/krb.h>
10723 #include <kerberosIV/des.h>
10724 extern int des_debug;
10725
10726 int main() {
10727
10728 des_debug = 1;
10729
10730 ; return 0; }
10731 EOF
10732 if { (eval echo configure:10733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10733   rm -rf conftest*
10734   ol_cv_var_des_debug=yes
10735 else
10736   echo "configure: failed program was:" >&5
10737   cat conftest.$ac_ext >&5
10738   rm -rf conftest*
10739   ol_cv_var_des_debug=no
10740 fi
10741 rm -f conftest*
10742                                                                 LIBS="$save_LIBS"
10743                         
10744 fi
10745
10746 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10747
10748                         if test $ol_cv_var_des_debug = yes ; then
10749                                 cat >> confdefs.h <<\EOF
10750 #define HAVE_DES_DEBUG 1
10751 EOF
10752
10753                         fi
10754
10755                         LIBS="$save_LIBS"
10756                 fi
10757         fi
10758 fi
10759
10760 if test $ol_link_krb5 = yes ; then
10761         ol_with_kerberos=found
10762 fi
10763
10764 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10765         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10766
10767         for ac_hdr in krb.h des.h krb-archaeology.h 
10768 do
10769 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10770 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10771 echo "configure:10772: checking for $ac_hdr" >&5
10772 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10773   echo $ac_n "(cached) $ac_c" 1>&6
10774 else
10775   cat > conftest.$ac_ext <<EOF
10776 #line 10777 "configure"
10777 #include "confdefs.h"
10778 #include <$ac_hdr>
10779 EOF
10780 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10781 { (eval echo configure:10782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10782 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10783 if test -z "$ac_err"; then
10784   rm -rf conftest*
10785   eval "ac_cv_header_$ac_safe=yes"
10786 else
10787   echo "$ac_err" >&5
10788   echo "configure: failed program was:" >&5
10789   cat conftest.$ac_ext >&5
10790   rm -rf conftest*
10791   eval "ac_cv_header_$ac_safe=no"
10792 fi
10793 rm -f conftest*
10794 fi
10795 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10796   echo "$ac_t""yes" 1>&6
10797     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10798   cat >> confdefs.h <<EOF
10799 #define $ac_tr_hdr 1
10800 EOF
10801  
10802 else
10803   echo "$ac_t""no" 1>&6
10804 fi
10805 done
10806
10807
10808         if test $ac_cv_header_krb_h = yes ; then
10809                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10810 echo "configure:10811: checking for main in -lkrb" >&5
10811 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10812 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10813   echo $ac_n "(cached) $ac_c" 1>&6
10814 else
10815   ac_save_LIBS="$LIBS"
10816 LIBS="-lkrb -ldes $LIBS"
10817 cat > conftest.$ac_ext <<EOF
10818 #line 10819 "configure"
10819 #include "confdefs.h"
10820
10821 int main() {
10822 main()
10823 ; return 0; }
10824 EOF
10825 if { (eval echo configure:10826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10826   rm -rf conftest*
10827   eval "ac_cv_lib_$ac_lib_var=yes"
10828 else
10829   echo "configure: failed program was:" >&5
10830   cat conftest.$ac_ext >&5
10831   rm -rf conftest*
10832   eval "ac_cv_lib_$ac_lib_var=no"
10833 fi
10834 rm -f conftest*
10835 LIBS="$ac_save_LIBS"
10836
10837 fi
10838 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10839   echo "$ac_t""yes" 1>&6
10840   have_k4=yes
10841 else
10842   echo "$ac_t""no" 1>&6
10843 have_k4=no
10844 fi
10845
10846
10847                 if test $have_k4 = yes ; then
10848                         ol_with_kerberos=found
10849                         ol_link_krb4=yes
10850
10851                         cat >> confdefs.h <<\EOF
10852 #define HAVE_KRB4 1
10853 EOF
10854
10855
10856                         KRB4_LIBS="-lkrb -ldes"
10857
10858                         if test $ac_cv_header_krb_archaeology_h = yes ; then
10859                                 cat >> confdefs.h <<\EOF
10860 #define HAVE_KTH_KERBEROS 1
10861 EOF
10862
10863                         fi
10864                 fi
10865         fi
10866 fi
10867
10868 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
10869         ol_link_kpasswd=yes
10870 fi
10871
10872 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
10873         ol_link_kbind=yes
10874
10875 elif test $ol_enable_kbind = yes ; then
10876         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
10877 fi
10878
10879 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
10880         cat >> confdefs.h <<\EOF
10881 #define HAVE_KERBEROS 1
10882 EOF
10883
10884
10885 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
10886         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
10887 fi
10888
10889 ol_link_tls=no
10890 if test $ol_with_tls != no ; then
10891         for ac_hdr in openssl/ssl.h ssl.h
10892 do
10893 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10894 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10895 echo "configure:10896: checking for $ac_hdr" >&5
10896 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10897   echo $ac_n "(cached) $ac_c" 1>&6
10898 else
10899   cat > conftest.$ac_ext <<EOF
10900 #line 10901 "configure"
10901 #include "confdefs.h"
10902 #include <$ac_hdr>
10903 EOF
10904 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10905 { (eval echo configure:10906: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10906 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10907 if test -z "$ac_err"; then
10908   rm -rf conftest*
10909   eval "ac_cv_header_$ac_safe=yes"
10910 else
10911   echo "$ac_err" >&5
10912   echo "configure: failed program was:" >&5
10913   cat conftest.$ac_ext >&5
10914   rm -rf conftest*
10915   eval "ac_cv_header_$ac_safe=no"
10916 fi
10917 rm -f conftest*
10918 fi
10919 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10920   echo "$ac_t""yes" 1>&6
10921     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10922   cat >> confdefs.h <<EOF
10923 #define $ac_tr_hdr 1
10924 EOF
10925  
10926 else
10927   echo "$ac_t""no" 1>&6
10928 fi
10929 done
10930
10931         
10932         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
10933                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
10934 echo "configure:10935: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
10935 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
10936 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10937   echo $ac_n "(cached) $ac_c" 1>&6
10938 else
10939   ac_save_LIBS="$LIBS"
10940 LIBS="-lssl -lcrypto $LIBS"
10941 cat > conftest.$ac_ext <<EOF
10942 #line 10943 "configure"
10943 #include "confdefs.h"
10944 /* Override any gcc2 internal prototype to avoid an error.  */
10945 /* We use char because int might match the return type of a gcc2
10946     builtin and then its argument prototype would still apply.  */
10947 char SSLeay_add_ssl_algorithms();
10948
10949 int main() {
10950 SSLeay_add_ssl_algorithms()
10951 ; return 0; }
10952 EOF
10953 if { (eval echo configure:10954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10954   rm -rf conftest*
10955   eval "ac_cv_lib_$ac_lib_var=yes"
10956 else
10957   echo "configure: failed program was:" >&5
10958   cat conftest.$ac_ext >&5
10959   rm -rf conftest*
10960   eval "ac_cv_lib_$ac_lib_var=no"
10961 fi
10962 rm -f conftest*
10963 LIBS="$ac_save_LIBS"
10964
10965 fi
10966 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10967   echo "$ac_t""yes" 1>&6
10968   have_ssleay=yes
10969                         need_rsaref=no
10970 else
10971   echo "$ac_t""no" 1>&6
10972 have_ssleay=no
10973 fi
10974
10975                         
10976                 if test $have_ssleay = no ; then
10977                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
10978 echo "configure:10979: checking for SSL_library_init in -lssl" >&5
10979 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
10980 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10981   echo $ac_n "(cached) $ac_c" 1>&6
10982 else
10983   ac_save_LIBS="$LIBS"
10984 LIBS="-lssl -lcrypto $LIBS"
10985 cat > conftest.$ac_ext <<EOF
10986 #line 10987 "configure"
10987 #include "confdefs.h"
10988 /* Override any gcc2 internal prototype to avoid an error.  */
10989 /* We use char because int might match the return type of a gcc2
10990     builtin and then its argument prototype would still apply.  */
10991 char SSL_library_init();
10992
10993 int main() {
10994 SSL_library_init()
10995 ; return 0; }
10996 EOF
10997 if { (eval echo configure:10998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10998   rm -rf conftest*
10999   eval "ac_cv_lib_$ac_lib_var=yes"
11000 else
11001   echo "configure: failed program was:" >&5
11002   cat conftest.$ac_ext >&5
11003   rm -rf conftest*
11004   eval "ac_cv_lib_$ac_lib_var=no"
11005 fi
11006 rm -f conftest*
11007 LIBS="$ac_save_LIBS"
11008
11009 fi
11010 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11011   echo "$ac_t""yes" 1>&6
11012   have_ssleay=yes
11013                                 need_rsaref=no
11014 else
11015   echo "$ac_t""no" 1>&6
11016 have_ssleay=no
11017 fi
11018
11019                 fi
11020
11021                 if test $have_ssleay = no ; then
11022                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11023 echo "configure:11024: checking for ssl3_accept in -lssl" >&5
11024 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11025 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11026   echo $ac_n "(cached) $ac_c" 1>&6
11027 else
11028   ac_save_LIBS="$LIBS"
11029 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11030 cat > conftest.$ac_ext <<EOF
11031 #line 11032 "configure"
11032 #include "confdefs.h"
11033 /* Override any gcc2 internal prototype to avoid an error.  */
11034 /* We use char because int might match the return type of a gcc2
11035     builtin and then its argument prototype would still apply.  */
11036 char ssl3_accept();
11037
11038 int main() {
11039 ssl3_accept()
11040 ; return 0; }
11041 EOF
11042 if { (eval echo configure:11043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11043   rm -rf conftest*
11044   eval "ac_cv_lib_$ac_lib_var=yes"
11045 else
11046   echo "configure: failed program was:" >&5
11047   cat conftest.$ac_ext >&5
11048   rm -rf conftest*
11049   eval "ac_cv_lib_$ac_lib_var=no"
11050 fi
11051 rm -f conftest*
11052 LIBS="$ac_save_LIBS"
11053
11054 fi
11055 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11056   echo "$ac_t""yes" 1>&6
11057   have_ssleay=yes
11058                                 need_rsaref=yes
11059 else
11060   echo "$ac_t""no" 1>&6
11061 have_ssleay=no
11062 fi
11063
11064                 fi
11065
11066                 if test $have_ssleay = yes ; then
11067                         ol_with_tls=found
11068                         ol_link_tls=yes
11069
11070                         cat >> confdefs.h <<\EOF
11071 #define HAVE_SSLEAY 1
11072 EOF
11073
11074
11075                         if test $need_rsaref = yes; then
11076                                 cat >> confdefs.h <<\EOF
11077 #define HAVE_RSAREF 1
11078 EOF
11079
11080
11081                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11082                         else
11083                                 TLS_LIBS="-lssl -lcrypto"
11084                         fi
11085                 fi
11086         fi
11087
11088 else
11089         echo "configure: warning: TLS data protection not supported!" 1>&2
11090 fi
11091
11092 if test $ol_link_tls = yes ; then
11093         cat >> confdefs.h <<\EOF
11094 #define HAVE_TLS 1
11095 EOF
11096
11097
11098 elif test $ol_with_tls = auto ; then
11099         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11100         echo "configure: warning: TLS data protection not supported!" 1>&2
11101
11102 elif test $ol_with_tls != no ; then
11103         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11104 fi
11105
11106 if test $ol_enable_lmpasswd != no; then
11107         if test $ol_link_tls != yes ; then
11108                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11109         fi
11110
11111         cat >> confdefs.h <<\EOF
11112 #define SLAPD_LMHASH 1
11113 EOF
11114
11115 fi
11116
11117 for ac_func in \
11118         ctime_r                 \
11119         gethostbyname_r gethostbyaddr_r \
11120
11121 do
11122 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11123 echo "configure:11124: checking for $ac_func" >&5
11124 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11125   echo $ac_n "(cached) $ac_c" 1>&6
11126 else
11127   cat > conftest.$ac_ext <<EOF
11128 #line 11129 "configure"
11129 #include "confdefs.h"
11130 /* System header to define __stub macros and hopefully few prototypes,
11131     which can conflict with char $ac_func(); below.  */
11132 #include <assert.h>
11133 /* Override any gcc2 internal prototype to avoid an error.  */
11134 /* We use char because int might match the return type of a gcc2
11135     builtin and then its argument prototype would still apply.  */
11136 char $ac_func();
11137 char (*f)();
11138
11139 int main() {
11140
11141 /* The GNU C library defines this for functions which it implements
11142     to always fail with ENOSYS.  Some functions are actually named
11143     something starting with __ and the normal name is an alias.  */
11144 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11145 choke me
11146 #else
11147 f = $ac_func;
11148 #endif
11149
11150 ; return 0; }
11151 EOF
11152 if { (eval echo configure:11153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11153   rm -rf conftest*
11154   eval "ac_cv_func_$ac_func=yes"
11155 else
11156   echo "configure: failed program was:" >&5
11157   cat conftest.$ac_ext >&5
11158   rm -rf conftest*
11159   eval "ac_cv_func_$ac_func=no"
11160 fi
11161 rm -f conftest*
11162 fi
11163
11164 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11165   echo "$ac_t""yes" 1>&6
11166     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11167   cat >> confdefs.h <<EOF
11168 #define $ac_tr_func 1
11169 EOF
11170  
11171 else
11172   echo "$ac_t""no" 1>&6
11173 fi
11174 done
11175
11176
11177 if test "$ac_cv_func_ctime_r" = no ; then
11178         ol_cv_func_ctime_r_nargs=0
11179 else
11180         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
11181 echo "configure:11182: checking number of arguments of ctime_r" >&5
11182 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
11183   echo $ac_n "(cached) $ac_c" 1>&6
11184 else
11185   cat > conftest.$ac_ext <<EOF
11186 #line 11187 "configure"
11187 #include "confdefs.h"
11188 #include <time.h>
11189 int main() {
11190 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
11191 ; return 0; }
11192 EOF
11193 if { (eval echo configure:11194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11194   rm -rf conftest*
11195   ol_cv_func_ctime_r_nargs3=yes
11196 else
11197   echo "configure: failed program was:" >&5
11198   cat conftest.$ac_ext >&5
11199   rm -rf conftest*
11200   ol_cv_func_ctime_r_nargs3=no
11201 fi
11202 rm -f conftest*
11203
11204         cat > conftest.$ac_ext <<EOF
11205 #line 11206 "configure"
11206 #include "confdefs.h"
11207 #include <time.h>
11208 int main() {
11209 time_t ti; char *buffer; ctime_r(&ti,buffer);
11210 ; return 0; }
11211 EOF
11212 if { (eval echo configure:11213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11213   rm -rf conftest*
11214   ol_cv_func_ctime_r_nargs2=yes
11215 else
11216   echo "configure: failed program was:" >&5
11217   cat conftest.$ac_ext >&5
11218   rm -rf conftest*
11219   ol_cv_func_ctime_r_nargs2=no
11220 fi
11221 rm -f conftest*
11222
11223         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
11224                 $ol_cv_func_ctime_r_nargs2 = no ; then
11225
11226                 ol_cv_func_ctime_r_nargs=3
11227
11228         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
11229                 $ol_cv_func_ctime_r_nargs2 = yes ; then
11230
11231                 ol_cv_func_ctime_r_nargs=2
11232
11233         else
11234                 ol_cv_func_ctime_r_nargs=0
11235         fi
11236   
11237 fi
11238
11239 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
11240
11241   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
11242         cat >> confdefs.h <<EOF
11243 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
11244 EOF
11245
11246   fi
11247
11248 fi
11249
11250 if test "$ac_cv_func_gethostbyname_r" = yes ; then
11251         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
11252 echo "configure:11253: checking number of arguments of gethostbyname_r" >&5
11253 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
11254   echo $ac_n "(cached) $ac_c" 1>&6
11255 else
11256   cat > conftest.$ac_ext <<EOF
11257 #line 11258 "configure"
11258 #include "confdefs.h"
11259 #include <sys/types.h>
11260 #include <sys/socket.h>
11261 #include <netinet/in.h>
11262 #include <netdb.h>
11263 #define BUFSIZE (sizeof(struct hostent)+10)
11264 int main() {
11265 struct hostent hent; char buffer[BUFSIZE];
11266                 int bufsize=BUFSIZE;int h_errno;
11267                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
11268                         buffer, bufsize, &h_errno);
11269 ; return 0; }
11270 EOF
11271 if { (eval echo configure:11272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11272   rm -rf conftest*
11273   ol_cv_func_gethostbyname_r_nargs5=yes
11274 else
11275   echo "configure: failed program was:" >&5
11276   cat conftest.$ac_ext >&5
11277   rm -rf conftest*
11278   ol_cv_func_gethostbyname_r_nargs5=no
11279 fi
11280 rm -f conftest*
11281
11282         cat > conftest.$ac_ext <<EOF
11283 #line 11284 "configure"
11284 #include "confdefs.h"
11285 #include <sys/types.h>
11286 #include <sys/socket.h>
11287 #include <netinet/in.h>
11288 #include <netdb.h>
11289 #define BUFSIZE (sizeof(struct hostent)+10)
11290 int main() {
11291 struct hostent hent;struct hostent *rhent;
11292                 char buffer[BUFSIZE];
11293                 int bufsize=BUFSIZE;int h_errno;
11294                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
11295                         &rhent, &h_errno);
11296 ; return 0; }
11297 EOF
11298 if { (eval echo configure:11299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11299   rm -rf conftest*
11300   ol_cv_func_gethostbyname_r_nargs6=yes
11301 else
11302   echo "configure: failed program was:" >&5
11303   cat conftest.$ac_ext >&5
11304   rm -rf conftest*
11305   ol_cv_func_gethostbyname_r_nargs6=no
11306 fi
11307 rm -f conftest*
11308
11309         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
11310                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
11311
11312                 ol_cv_func_gethostbyname_r_nargs=5
11313
11314         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
11315                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
11316
11317                 ol_cv_func_gethostbyname_r_nargs=6
11318
11319         else
11320                 ol_cv_func_gethostbyname_r_nargs=0
11321         fi
11322   
11323 fi
11324
11325 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
11326   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
11327         cat >> confdefs.h <<EOF
11328 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
11329 EOF
11330
11331   fi
11332
11333 else
11334         ol_cv_func_gethostbyname_r_nargs=0
11335 fi
11336  
11337 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
11338         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
11339 echo "configure:11340: checking number of arguments of gethostbyaddr_r" >&5
11340 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
11341   echo $ac_n "(cached) $ac_c" 1>&6
11342 else
11343   cat > conftest.$ac_ext <<EOF
11344 #line 11345 "configure"
11345 #include "confdefs.h"
11346 #include <sys/types.h>
11347 #include <sys/socket.h>
11348 #include <netinet/in.h>
11349 #include <netdb.h>
11350 #define BUFSIZE (sizeof(struct hostent)+10)
11351 int main() {
11352 struct hostent hent; char buffer[BUFSIZE]; 
11353             struct in_addr add;
11354             size_t alen=sizeof(struct in_addr);
11355             int bufsize=BUFSIZE;int h_errno;
11356                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
11357                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
11358 ; return 0; }
11359 EOF
11360 if { (eval echo configure:11361: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11361   rm -rf conftest*
11362   ol_cv_func_gethostbyaddr_r_nargs7=yes
11363 else
11364   echo "configure: failed program was:" >&5
11365   cat conftest.$ac_ext >&5
11366   rm -rf conftest*
11367   ol_cv_func_gethostbyaddr_r_nargs7=no
11368 fi
11369 rm -f conftest*
11370
11371         cat > conftest.$ac_ext <<EOF
11372 #line 11373 "configure"
11373 #include "confdefs.h"
11374 #include <sys/types.h>
11375 #include <sys/socket.h>
11376 #include <netinet/in.h>
11377 #include <netdb.h>
11378 #define BUFSIZE (sizeof(struct hostent)+10)
11379 int main() {
11380 struct hostent hent;
11381                 struct hostent *rhent; char buffer[BUFSIZE]; 
11382                 struct in_addr add;
11383                 size_t alen=sizeof(struct in_addr);
11384                 int bufsize=BUFSIZE;int h_errno;
11385                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
11386                         alen, AF_INET, &hent, buffer, bufsize, 
11387                         &rhent, &h_errno);
11388 ; return 0; }
11389 EOF
11390 if { (eval echo configure:11391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11391   rm -rf conftest*
11392   ol_cv_func_gethostbyaddr_r_nargs8=yes
11393 else
11394   echo "configure: failed program was:" >&5
11395   cat conftest.$ac_ext >&5
11396   rm -rf conftest*
11397   ol_cv_func_gethostbyaddr_r_nargs8=no
11398 fi
11399 rm -f conftest*
11400
11401         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
11402                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
11403
11404                 ol_cv_func_gethostbyaddr_r_nargs=7
11405
11406         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
11407                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
11408
11409                 ol_cv_func_gethostbyaddr_r_nargs=8
11410
11411         else
11412                 ol_cv_func_gethostbyaddr_r_nargs=0
11413         fi
11414   
11415 fi
11416
11417 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
11418   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
11419     cat >> confdefs.h <<EOF
11420 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
11421 EOF
11422
11423   fi
11424
11425 else
11426         ol_cv_func_gethostbyaddr_r_nargs=0
11427 fi
11428
11429 if test "$ac_cv_func_ctime_r" = yes \
11430         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
11431         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
11432         -a "$ac_cv_func_gethostbyname_r" = yes \
11433         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
11434         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
11435         -a "$ac_cv_func_gethostbyaddr_r" = yes \
11436         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
11437         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
11438         ; then
11439  
11440         cat >> confdefs.h <<\EOF
11441 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
11442 EOF
11443
11444 fi
11445
11446 ol_link_threads=no
11447
11448 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11449         -o $ol_with_threads = nt ; then
11450
11451         
11452         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11453 echo "configure:11454: checking for _beginthread" >&5
11454 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11455   echo $ac_n "(cached) $ac_c" 1>&6
11456 else
11457   cat > conftest.$ac_ext <<EOF
11458 #line 11459 "configure"
11459 #include "confdefs.h"
11460 /* System header to define __stub macros and hopefully few prototypes,
11461     which can conflict with char _beginthread(); below.  */
11462 #include <assert.h>
11463 /* Override any gcc2 internal prototype to avoid an error.  */
11464 /* We use char because int might match the return type of a gcc2
11465     builtin and then its argument prototype would still apply.  */
11466 char _beginthread();
11467 char (*f)();
11468
11469 int main() {
11470
11471 /* The GNU C library defines this for functions which it implements
11472     to always fail with ENOSYS.  Some functions are actually named
11473     something starting with __ and the normal name is an alias.  */
11474 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11475 choke me
11476 #else
11477 f = _beginthread;
11478 #endif
11479
11480 ; return 0; }
11481 EOF
11482 if { (eval echo configure:11483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11483   rm -rf conftest*
11484   eval "ac_cv_func__beginthread=yes"
11485 else
11486   echo "configure: failed program was:" >&5
11487   cat conftest.$ac_ext >&5
11488   rm -rf conftest*
11489   eval "ac_cv_func__beginthread=no"
11490 fi
11491 rm -f conftest*
11492 fi
11493
11494 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11495   echo "$ac_t""yes" 1>&6
11496   :
11497 else
11498   echo "$ac_t""no" 1>&6
11499 fi
11500
11501
11502         if test $ac_cv_func__beginthread = yes ; then
11503                 cat >> confdefs.h <<\EOF
11504 #define HAVE_NT_THREADS 1
11505 EOF
11506
11507                 ol_cv_nt_threads=yes
11508         fi
11509
11510
11511         if test "$ol_cv_nt_threads" = yes ; then
11512                 ol_link_threads=nt
11513                 ol_with_threads=found
11514                 ol_with_yielding_select=yes
11515
11516                 cat >> confdefs.h <<\EOF
11517 #define HAVE_NT_SERVICE_MANAGER 1
11518 EOF
11519
11520                 cat >> confdefs.h <<\EOF
11521 #define HAVE_NT_EVENT_LOG 1
11522 EOF
11523
11524         fi
11525
11526         if test $ol_with_threads = nt ; then
11527                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11528         fi
11529 fi
11530
11531 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11532         -o $ol_with_threads = posix ; then
11533
11534         for ac_hdr in pthread.h
11535 do
11536 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11537 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11538 echo "configure:11539: checking for $ac_hdr" >&5
11539 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11540   echo $ac_n "(cached) $ac_c" 1>&6
11541 else
11542   cat > conftest.$ac_ext <<EOF
11543 #line 11544 "configure"
11544 #include "confdefs.h"
11545 #include <$ac_hdr>
11546 EOF
11547 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11548 { (eval echo configure:11549: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11549 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11550 if test -z "$ac_err"; then
11551   rm -rf conftest*
11552   eval "ac_cv_header_$ac_safe=yes"
11553 else
11554   echo "$ac_err" >&5
11555   echo "configure: failed program was:" >&5
11556   cat conftest.$ac_ext >&5
11557   rm -rf conftest*
11558   eval "ac_cv_header_$ac_safe=no"
11559 fi
11560 rm -f conftest*
11561 fi
11562 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11563   echo "$ac_t""yes" 1>&6
11564     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11565   cat >> confdefs.h <<EOF
11566 #define $ac_tr_hdr 1
11567 EOF
11568  
11569 else
11570   echo "$ac_t""no" 1>&6
11571 fi
11572 done
11573
11574
11575         if test $ac_cv_header_pthread_h = yes ; then
11576                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11577 echo "configure:11578: checking POSIX thread version" >&5
11578 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11579   echo $ac_n "(cached) $ac_c" 1>&6
11580 else
11581   
11582         cat > conftest.$ac_ext <<EOF
11583 #line 11584 "configure"
11584 #include "confdefs.h"
11585
11586 #               include <pthread.h>
11587                 /* this check could be improved */
11588 #               ifdef PTHREAD_ONCE_INIT
11589                         pthread_version_final;
11590 #               endif
11591         
11592 EOF
11593 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11594   egrep "pthread_version_final" >/dev/null 2>&1; then
11595   rm -rf conftest*
11596   ol_pthread_final=yes
11597 else
11598   rm -rf conftest*
11599   ol_pthread_final=no
11600 fi
11601 rm -f conftest*
11602
11603
11604         cat > conftest.$ac_ext <<EOF
11605 #line 11606 "configure"
11606 #include "confdefs.h"
11607
11608 #               include <pthread.h>
11609                 /* this check could be improved */
11610 #               ifdef pthread_once_init
11611                         pthread_version_draft4;
11612 #               endif
11613         
11614 EOF
11615 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11616   egrep "pthread_version_draft4" >/dev/null 2>&1; then
11617   rm -rf conftest*
11618   ol_pthread_draft4=yes
11619 else
11620   rm -rf conftest*
11621   ol_pthread_draft4=no
11622 fi
11623 rm -f conftest*
11624
11625
11626         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
11627                 ol_cv_pthread_version=final
11628         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
11629                 ol_cv_pthread_version=draft4
11630         else
11631                 ol_cv_pthread_version=unknown
11632         fi
11633
11634 fi
11635
11636 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11637
11638
11639                 if test $ol_cv_pthread_version = final ; then
11640                         cat >> confdefs.h <<\EOF
11641 #define HAVE_PTHREADS_FINAL 1
11642 EOF
11643
11644                 elif test $ol_cv_pthread_version = draft4 ; then
11645                         cat >> confdefs.h <<\EOF
11646 #define HAVE_PTHREADS_D4 1
11647 EOF
11648
11649                 else
11650                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11651                 fi
11652
11653                 # consider threads found
11654                 ol_with_threads=found
11655
11656                 
11657         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11658 echo "configure:11659: checking for LinuxThreads pthread.h" >&5
11659 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11660   echo $ac_n "(cached) $ac_c" 1>&6
11661 else
11662   cat > conftest.$ac_ext <<EOF
11663 #line 11664 "configure"
11664 #include "confdefs.h"
11665 #include <pthread.h>
11666 EOF
11667 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11668   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11669   rm -rf conftest*
11670   ol_cv_header_linux_threads=yes
11671 else
11672   rm -rf conftest*
11673   ol_cv_header_linux_threads=no
11674 fi
11675 rm -f conftest*
11676
11677                 
11678 fi
11679
11680 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11681         if test $ol_cv_header_linux_threads = yes; then
11682                 cat >> confdefs.h <<\EOF
11683 #define HAVE_LINUX_THREADS 1
11684 EOF
11685
11686         fi
11687
11688                 
11689         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11690 echo "configure:11691: checking for GNU Pth pthread.h" >&5
11691 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11692   echo $ac_n "(cached) $ac_c" 1>&6
11693 else
11694   cat > conftest.$ac_ext <<EOF
11695 #line 11696 "configure"
11696 #include "confdefs.h"
11697 #include <pthread.h>
11698 #ifdef _POSIX_THREAD_IS_GNU_PTH
11699         __gnu_pth__;
11700 #endif
11701
11702 EOF
11703 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11704   egrep "__gnu_pth__" >/dev/null 2>&1; then
11705   rm -rf conftest*
11706   ol_cv_header_gnu_pth_pthread_h=yes
11707 else
11708   rm -rf conftest*
11709   ol_cv_header_gnu_pth_pthread_h=no
11710 fi
11711 rm -f conftest*
11712
11713                 
11714 fi
11715
11716 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11717
11718
11719                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11720                         for ac_hdr in sched.h
11721 do
11722 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11723 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11724 echo "configure:11725: checking for $ac_hdr" >&5
11725 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11726   echo $ac_n "(cached) $ac_c" 1>&6
11727 else
11728   cat > conftest.$ac_ext <<EOF
11729 #line 11730 "configure"
11730 #include "confdefs.h"
11731 #include <$ac_hdr>
11732 EOF
11733 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11734 { (eval echo configure:11735: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11735 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11736 if test -z "$ac_err"; then
11737   rm -rf conftest*
11738   eval "ac_cv_header_$ac_safe=yes"
11739 else
11740   echo "$ac_err" >&5
11741   echo "configure: failed program was:" >&5
11742   cat conftest.$ac_ext >&5
11743   rm -rf conftest*
11744   eval "ac_cv_header_$ac_safe=no"
11745 fi
11746 rm -f conftest*
11747 fi
11748 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11749   echo "$ac_t""yes" 1>&6
11750     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11751   cat >> confdefs.h <<EOF
11752 #define $ac_tr_hdr 1
11753 EOF
11754  
11755 else
11756   echo "$ac_t""no" 1>&6
11757 fi
11758 done
11759
11760                 fi
11761
11762                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11763                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11764 echo "configure:11765: checking for pthread_create in default libraries" >&5
11765 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11766   echo $ac_n "(cached) $ac_c" 1>&6
11767 else
11768   
11769                 if test "$cross_compiling" = yes; then
11770   cat > conftest.$ac_ext <<EOF
11771 #line 11772 "configure"
11772 #include "confdefs.h"
11773 /* pthread test headers */
11774 #include <pthread.h>
11775 #ifndef NULL
11776 #define NULL (void*)0
11777 #endif
11778
11779 static void *task(p)
11780         void *p;
11781 {
11782         return (void *) (p == NULL);
11783 }
11784
11785 int main() {
11786
11787         /* pthread test function */
11788         pthread_t t;
11789         int status;
11790         int detach = 1;
11791
11792 #ifdef HAVE_PTHREADS_FINAL
11793         /* Final pthreads */
11794         pthread_attr_t attr;
11795
11796         status = pthread_attr_init(&attr);
11797         if( status ) return status;
11798
11799 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11800         if( !detach ) {
11801 #if defined( PTHREAD_CREATE_JOINABLE )
11802                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11803 #else
11804                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11805 #endif
11806
11807 #ifdef PTHREAD_CREATE_DETACHED
11808         } else {
11809                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11810 #endif
11811         }
11812         if( status ) return status;
11813 #endif
11814
11815         status = pthread_create( &t, &attr, task, NULL );
11816         if( status ) return status;
11817
11818 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11819         if( detach ) {
11820                 /* give thread a chance to complete */
11821                 /* it should remain joinable and hence detachable */
11822                 sleep( 1 );
11823
11824                 status = pthread_detach( t );
11825                 if( status ) return status;
11826         }
11827 #endif
11828
11829 #else
11830         /* Draft 4 pthreads */
11831         status = pthread_create( &t, pthread_attr_default, task, NULL );
11832         if( status ) return status;
11833
11834         if( detach ) {
11835                 /* give thread a chance to complete */
11836                 /* it should remain joinable and hence detachable */
11837                 sleep( 1 );
11838
11839                 status = pthread_detach( &t );
11840                 if( status ) return status;
11841         }
11842 #endif
11843
11844 #ifdef HAVE_LINUX_THREADS
11845         pthread_kill_other_threads_np();
11846 #endif
11847
11848         return 0;
11849
11850 ; return 0; }
11851 EOF
11852 if { (eval echo configure:11853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11853   rm -rf conftest*
11854   ol_cv_pthread_create=yes
11855 else
11856   echo "configure: failed program was:" >&5
11857   cat conftest.$ac_ext >&5
11858   rm -rf conftest*
11859   ol_cv_pthread_create=no
11860 fi
11861 rm -f conftest*
11862 else
11863   cat > conftest.$ac_ext <<EOF
11864 #line 11865 "configure"
11865 #include "confdefs.h"
11866 /* pthread test headers */
11867 #include <pthread.h>
11868 #ifndef NULL
11869 #define NULL (void*)0
11870 #endif
11871
11872 static void *task(p)
11873         void *p;
11874 {
11875         return (void *) (p == NULL);
11876 }
11877
11878
11879 int main(argc, argv)
11880         int argc;
11881         char **argv;
11882 {
11883
11884         /* pthread test function */
11885         pthread_t t;
11886         int status;
11887         int detach = 1;
11888
11889 #ifdef HAVE_PTHREADS_FINAL
11890         /* Final pthreads */
11891         pthread_attr_t attr;
11892
11893         status = pthread_attr_init(&attr);
11894         if( status ) return status;
11895
11896 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11897         if( !detach ) {
11898 #if defined( PTHREAD_CREATE_JOINABLE )
11899                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11900 #else
11901                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11902 #endif
11903
11904 #ifdef PTHREAD_CREATE_DETACHED
11905         } else {
11906                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11907 #endif
11908         }
11909         if( status ) return status;
11910 #endif
11911
11912         status = pthread_create( &t, &attr, task, NULL );
11913         if( status ) return status;
11914
11915 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11916         if( detach ) {
11917                 /* give thread a chance to complete */
11918                 /* it should remain joinable and hence detachable */
11919                 sleep( 1 );
11920
11921                 status = pthread_detach( t );
11922                 if( status ) return status;
11923         }
11924 #endif
11925
11926 #else
11927         /* Draft 4 pthreads */
11928         status = pthread_create( &t, pthread_attr_default, task, NULL );
11929         if( status ) return status;
11930
11931         if( detach ) {
11932                 /* give thread a chance to complete */
11933                 /* it should remain joinable and hence detachable */
11934                 sleep( 1 );
11935
11936                 status = pthread_detach( &t );
11937                 if( status ) return status;
11938         }
11939 #endif
11940
11941 #ifdef HAVE_LINUX_THREADS
11942         pthread_kill_other_threads_np();
11943 #endif
11944
11945         return 0;
11946
11947 }
11948
11949 EOF
11950 if { (eval echo configure:11951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11951 then
11952   ol_cv_pthread_create=yes
11953 else
11954   echo "configure: failed program was:" >&5
11955   cat conftest.$ac_ext >&5
11956   rm -fr conftest*
11957   ol_cv_pthread_create=no
11958 fi
11959 rm -fr conftest*
11960 fi
11961
11962 fi
11963
11964 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11965
11966                 if test $ol_cv_pthread_create != no ; then
11967                         ol_link_threads=posix
11968                         ol_link_pthreads=""
11969                 fi
11970                 
11971                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11972 if test "$ol_link_threads" = no ; then
11973         # try -kthread
11974         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11975 echo "configure:11976: checking for pthread link with -kthread" >&5
11976 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11977   echo $ac_n "(cached) $ac_c" 1>&6
11978 else
11979   
11980                 # save the flags
11981                 ol_LIBS="$LIBS"
11982                 LIBS="-kthread $LIBS"
11983
11984                 if test "$cross_compiling" = yes; then
11985   cat > conftest.$ac_ext <<EOF
11986 #line 11987 "configure"
11987 #include "confdefs.h"
11988 /* pthread test headers */
11989 #include <pthread.h>
11990 #ifndef NULL
11991 #define NULL (void*)0
11992 #endif
11993
11994 static void *task(p)
11995         void *p;
11996 {
11997         return (void *) (p == NULL);
11998 }
11999
12000 int main() {
12001
12002         /* pthread test function */
12003         pthread_t t;
12004         int status;
12005         int detach = 1;
12006
12007 #ifdef HAVE_PTHREADS_FINAL
12008         /* Final pthreads */
12009         pthread_attr_t attr;
12010
12011         status = pthread_attr_init(&attr);
12012         if( status ) return status;
12013
12014 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12015         if( !detach ) {
12016 #if defined( PTHREAD_CREATE_JOINABLE )
12017                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12018 #else
12019                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12020 #endif
12021
12022 #ifdef PTHREAD_CREATE_DETACHED
12023         } else {
12024                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12025 #endif
12026         }
12027         if( status ) return status;
12028 #endif
12029
12030         status = pthread_create( &t, &attr, task, NULL );
12031         if( status ) return status;
12032
12033 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12034         if( detach ) {
12035                 /* give thread a chance to complete */
12036                 /* it should remain joinable and hence detachable */
12037                 sleep( 1 );
12038
12039                 status = pthread_detach( t );
12040                 if( status ) return status;
12041         }
12042 #endif
12043
12044 #else
12045         /* Draft 4 pthreads */
12046         status = pthread_create( &t, pthread_attr_default, task, NULL );
12047         if( status ) return status;
12048
12049         if( detach ) {
12050                 /* give thread a chance to complete */
12051                 /* it should remain joinable and hence detachable */
12052                 sleep( 1 );
12053
12054                 status = pthread_detach( &t );
12055                 if( status ) return status;
12056         }
12057 #endif
12058
12059 #ifdef HAVE_LINUX_THREADS
12060         pthread_kill_other_threads_np();
12061 #endif
12062
12063         return 0;
12064
12065 ; return 0; }
12066 EOF
12067 if { (eval echo configure:12068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12068   rm -rf conftest*
12069   ol_cv_pthread_kthread=yes
12070 else
12071   echo "configure: failed program was:" >&5
12072   cat conftest.$ac_ext >&5
12073   rm -rf conftest*
12074   ol_cv_pthread_kthread=no
12075 fi
12076 rm -f conftest*
12077 else
12078   cat > conftest.$ac_ext <<EOF
12079 #line 12080 "configure"
12080 #include "confdefs.h"
12081 /* pthread test headers */
12082 #include <pthread.h>
12083 #ifndef NULL
12084 #define NULL (void*)0
12085 #endif
12086
12087 static void *task(p)
12088         void *p;
12089 {
12090         return (void *) (p == NULL);
12091 }
12092
12093
12094 int main(argc, argv)
12095         int argc;
12096         char **argv;
12097 {
12098
12099         /* pthread test function */
12100         pthread_t t;
12101         int status;
12102         int detach = 1;
12103
12104 #ifdef HAVE_PTHREADS_FINAL
12105         /* Final pthreads */
12106         pthread_attr_t attr;
12107
12108         status = pthread_attr_init(&attr);
12109         if( status ) return status;
12110
12111 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12112         if( !detach ) {
12113 #if defined( PTHREAD_CREATE_JOINABLE )
12114                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12115 #else
12116                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12117 #endif
12118
12119 #ifdef PTHREAD_CREATE_DETACHED
12120         } else {
12121                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12122 #endif
12123         }
12124         if( status ) return status;
12125 #endif
12126
12127         status = pthread_create( &t, &attr, task, NULL );
12128         if( status ) return status;
12129
12130 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12131         if( detach ) {
12132                 /* give thread a chance to complete */
12133                 /* it should remain joinable and hence detachable */
12134                 sleep( 1 );
12135
12136                 status = pthread_detach( t );
12137                 if( status ) return status;
12138         }
12139 #endif
12140
12141 #else
12142         /* Draft 4 pthreads */
12143         status = pthread_create( &t, pthread_attr_default, task, NULL );
12144         if( status ) return status;
12145
12146         if( detach ) {
12147                 /* give thread a chance to complete */
12148                 /* it should remain joinable and hence detachable */
12149                 sleep( 1 );
12150
12151                 status = pthread_detach( &t );
12152                 if( status ) return status;
12153         }
12154 #endif
12155
12156 #ifdef HAVE_LINUX_THREADS
12157         pthread_kill_other_threads_np();
12158 #endif
12159
12160         return 0;
12161
12162 }
12163
12164 EOF
12165 if { (eval echo configure:12166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12166 then
12167   ol_cv_pthread_kthread=yes
12168 else
12169   echo "configure: failed program was:" >&5
12170   cat conftest.$ac_ext >&5
12171   rm -fr conftest*
12172   ol_cv_pthread_kthread=no
12173 fi
12174 rm -fr conftest*
12175 fi
12176
12177
12178                 # restore the LIBS
12179                 LIBS="$ol_LIBS"
12180         
12181 fi
12182
12183 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12184
12185         if test $ol_cv_pthread_kthread = yes ; then
12186                 ol_link_pthreads="-kthread"
12187                 ol_link_threads=posix
12188         fi
12189 fi
12190
12191                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12192 if test "$ol_link_threads" = no ; then
12193         # try -pthread
12194         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12195 echo "configure:12196: checking for pthread link with -pthread" >&5
12196 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12197   echo $ac_n "(cached) $ac_c" 1>&6
12198 else
12199   
12200                 # save the flags
12201                 ol_LIBS="$LIBS"
12202                 LIBS="-pthread $LIBS"
12203
12204                 if test "$cross_compiling" = yes; then
12205   cat > conftest.$ac_ext <<EOF
12206 #line 12207 "configure"
12207 #include "confdefs.h"
12208 /* pthread test headers */
12209 #include <pthread.h>
12210 #ifndef NULL
12211 #define NULL (void*)0
12212 #endif
12213
12214 static void *task(p)
12215         void *p;
12216 {
12217         return (void *) (p == NULL);
12218 }
12219
12220 int main() {
12221
12222         /* pthread test function */
12223         pthread_t t;
12224         int status;
12225         int detach = 1;
12226
12227 #ifdef HAVE_PTHREADS_FINAL
12228         /* Final pthreads */
12229         pthread_attr_t attr;
12230
12231         status = pthread_attr_init(&attr);
12232         if( status ) return status;
12233
12234 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12235         if( !detach ) {
12236 #if defined( PTHREAD_CREATE_JOINABLE )
12237                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12238 #else
12239                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12240 #endif
12241
12242 #ifdef PTHREAD_CREATE_DETACHED
12243         } else {
12244                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12245 #endif
12246         }
12247         if( status ) return status;
12248 #endif
12249
12250         status = pthread_create( &t, &attr, task, NULL );
12251         if( status ) return status;
12252
12253 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12254         if( detach ) {
12255                 /* give thread a chance to complete */
12256                 /* it should remain joinable and hence detachable */
12257                 sleep( 1 );
12258
12259                 status = pthread_detach( t );
12260                 if( status ) return status;
12261         }
12262 #endif
12263
12264 #else
12265         /* Draft 4 pthreads */
12266         status = pthread_create( &t, pthread_attr_default, task, NULL );
12267         if( status ) return status;
12268
12269         if( detach ) {
12270                 /* give thread a chance to complete */
12271                 /* it should remain joinable and hence detachable */
12272                 sleep( 1 );
12273
12274                 status = pthread_detach( &t );
12275                 if( status ) return status;
12276         }
12277 #endif
12278
12279 #ifdef HAVE_LINUX_THREADS
12280         pthread_kill_other_threads_np();
12281 #endif
12282
12283         return 0;
12284
12285 ; return 0; }
12286 EOF
12287 if { (eval echo configure:12288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12288   rm -rf conftest*
12289   ol_cv_pthread_pthread=yes
12290 else
12291   echo "configure: failed program was:" >&5
12292   cat conftest.$ac_ext >&5
12293   rm -rf conftest*
12294   ol_cv_pthread_pthread=no
12295 fi
12296 rm -f conftest*
12297 else
12298   cat > conftest.$ac_ext <<EOF
12299 #line 12300 "configure"
12300 #include "confdefs.h"
12301 /* pthread test headers */
12302 #include <pthread.h>
12303 #ifndef NULL
12304 #define NULL (void*)0
12305 #endif
12306
12307 static void *task(p)
12308         void *p;
12309 {
12310         return (void *) (p == NULL);
12311 }
12312
12313
12314 int main(argc, argv)
12315         int argc;
12316         char **argv;
12317 {
12318
12319         /* pthread test function */
12320         pthread_t t;
12321         int status;
12322         int detach = 1;
12323
12324 #ifdef HAVE_PTHREADS_FINAL
12325         /* Final pthreads */
12326         pthread_attr_t attr;
12327
12328         status = pthread_attr_init(&attr);
12329         if( status ) return status;
12330
12331 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12332         if( !detach ) {
12333 #if defined( PTHREAD_CREATE_JOINABLE )
12334                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12335 #else
12336                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12337 #endif
12338
12339 #ifdef PTHREAD_CREATE_DETACHED
12340         } else {
12341                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12342 #endif
12343         }
12344         if( status ) return status;
12345 #endif
12346
12347         status = pthread_create( &t, &attr, task, NULL );
12348         if( status ) return status;
12349
12350 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12351         if( detach ) {
12352                 /* give thread a chance to complete */
12353                 /* it should remain joinable and hence detachable */
12354                 sleep( 1 );
12355
12356                 status = pthread_detach( t );
12357                 if( status ) return status;
12358         }
12359 #endif
12360
12361 #else
12362         /* Draft 4 pthreads */
12363         status = pthread_create( &t, pthread_attr_default, task, NULL );
12364         if( status ) return status;
12365
12366         if( detach ) {
12367                 /* give thread a chance to complete */
12368                 /* it should remain joinable and hence detachable */
12369                 sleep( 1 );
12370
12371                 status = pthread_detach( &t );
12372                 if( status ) return status;
12373         }
12374 #endif
12375
12376 #ifdef HAVE_LINUX_THREADS
12377         pthread_kill_other_threads_np();
12378 #endif
12379
12380         return 0;
12381
12382 }
12383
12384 EOF
12385 if { (eval echo configure:12386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12386 then
12387   ol_cv_pthread_pthread=yes
12388 else
12389   echo "configure: failed program was:" >&5
12390   cat conftest.$ac_ext >&5
12391   rm -fr conftest*
12392   ol_cv_pthread_pthread=no
12393 fi
12394 rm -fr conftest*
12395 fi
12396
12397
12398                 # restore the LIBS
12399                 LIBS="$ol_LIBS"
12400         
12401 fi
12402
12403 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12404
12405         if test $ol_cv_pthread_pthread = yes ; then
12406                 ol_link_pthreads="-pthread"
12407                 ol_link_threads=posix
12408         fi
12409 fi
12410
12411                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12412 if test "$ol_link_threads" = no ; then
12413         # try -pthreads
12414         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12415 echo "configure:12416: checking for pthread link with -pthreads" >&5
12416 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12417   echo $ac_n "(cached) $ac_c" 1>&6
12418 else
12419   
12420                 # save the flags
12421                 ol_LIBS="$LIBS"
12422                 LIBS="-pthreads $LIBS"
12423
12424                 if test "$cross_compiling" = yes; then
12425   cat > conftest.$ac_ext <<EOF
12426 #line 12427 "configure"
12427 #include "confdefs.h"
12428 /* pthread test headers */
12429 #include <pthread.h>
12430 #ifndef NULL
12431 #define NULL (void*)0
12432 #endif
12433
12434 static void *task(p)
12435         void *p;
12436 {
12437         return (void *) (p == NULL);
12438 }
12439
12440 int main() {
12441
12442         /* pthread test function */
12443         pthread_t t;
12444         int status;
12445         int detach = 1;
12446
12447 #ifdef HAVE_PTHREADS_FINAL
12448         /* Final pthreads */
12449         pthread_attr_t attr;
12450
12451         status = pthread_attr_init(&attr);
12452         if( status ) return status;
12453
12454 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12455         if( !detach ) {
12456 #if defined( PTHREAD_CREATE_JOINABLE )
12457                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12458 #else
12459                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12460 #endif
12461
12462 #ifdef PTHREAD_CREATE_DETACHED
12463         } else {
12464                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12465 #endif
12466         }
12467         if( status ) return status;
12468 #endif
12469
12470         status = pthread_create( &t, &attr, task, NULL );
12471         if( status ) return status;
12472
12473 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12474         if( detach ) {
12475                 /* give thread a chance to complete */
12476                 /* it should remain joinable and hence detachable */
12477                 sleep( 1 );
12478
12479                 status = pthread_detach( t );
12480                 if( status ) return status;
12481         }
12482 #endif
12483
12484 #else
12485         /* Draft 4 pthreads */
12486         status = pthread_create( &t, pthread_attr_default, task, NULL );
12487         if( status ) return status;
12488
12489         if( detach ) {
12490                 /* give thread a chance to complete */
12491                 /* it should remain joinable and hence detachable */
12492                 sleep( 1 );
12493
12494                 status = pthread_detach( &t );
12495                 if( status ) return status;
12496         }
12497 #endif
12498
12499 #ifdef HAVE_LINUX_THREADS
12500         pthread_kill_other_threads_np();
12501 #endif
12502
12503         return 0;
12504
12505 ; return 0; }
12506 EOF
12507 if { (eval echo configure:12508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12508   rm -rf conftest*
12509   ol_cv_pthread_pthreads=yes
12510 else
12511   echo "configure: failed program was:" >&5
12512   cat conftest.$ac_ext >&5
12513   rm -rf conftest*
12514   ol_cv_pthread_pthreads=no
12515 fi
12516 rm -f conftest*
12517 else
12518   cat > conftest.$ac_ext <<EOF
12519 #line 12520 "configure"
12520 #include "confdefs.h"
12521 /* pthread test headers */
12522 #include <pthread.h>
12523 #ifndef NULL
12524 #define NULL (void*)0
12525 #endif
12526
12527 static void *task(p)
12528         void *p;
12529 {
12530         return (void *) (p == NULL);
12531 }
12532
12533
12534 int main(argc, argv)
12535         int argc;
12536         char **argv;
12537 {
12538
12539         /* pthread test function */
12540         pthread_t t;
12541         int status;
12542         int detach = 1;
12543
12544 #ifdef HAVE_PTHREADS_FINAL
12545         /* Final pthreads */
12546         pthread_attr_t attr;
12547
12548         status = pthread_attr_init(&attr);
12549         if( status ) return status;
12550
12551 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12552         if( !detach ) {
12553 #if defined( PTHREAD_CREATE_JOINABLE )
12554                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12555 #else
12556                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12557 #endif
12558
12559 #ifdef PTHREAD_CREATE_DETACHED
12560         } else {
12561                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12562 #endif
12563         }
12564         if( status ) return status;
12565 #endif
12566
12567         status = pthread_create( &t, &attr, task, NULL );
12568         if( status ) return status;
12569
12570 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12571         if( detach ) {
12572                 /* give thread a chance to complete */
12573                 /* it should remain joinable and hence detachable */
12574                 sleep( 1 );
12575
12576                 status = pthread_detach( t );
12577                 if( status ) return status;
12578         }
12579 #endif
12580
12581 #else
12582         /* Draft 4 pthreads */
12583         status = pthread_create( &t, pthread_attr_default, task, NULL );
12584         if( status ) return status;
12585
12586         if( detach ) {
12587                 /* give thread a chance to complete */
12588                 /* it should remain joinable and hence detachable */
12589                 sleep( 1 );
12590
12591                 status = pthread_detach( &t );
12592                 if( status ) return status;
12593         }
12594 #endif
12595
12596 #ifdef HAVE_LINUX_THREADS
12597         pthread_kill_other_threads_np();
12598 #endif
12599
12600         return 0;
12601
12602 }
12603
12604 EOF
12605 if { (eval echo configure:12606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12606 then
12607   ol_cv_pthread_pthreads=yes
12608 else
12609   echo "configure: failed program was:" >&5
12610   cat conftest.$ac_ext >&5
12611   rm -fr conftest*
12612   ol_cv_pthread_pthreads=no
12613 fi
12614 rm -fr conftest*
12615 fi
12616
12617
12618                 # restore the LIBS
12619                 LIBS="$ol_LIBS"
12620         
12621 fi
12622
12623 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12624
12625         if test $ol_cv_pthread_pthreads = yes ; then
12626                 ol_link_pthreads="-pthreads"
12627                 ol_link_threads=posix
12628         fi
12629 fi
12630
12631                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12632 if test "$ol_link_threads" = no ; then
12633         # try -mthreads
12634         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12635 echo "configure:12636: checking for pthread link with -mthreads" >&5
12636 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12637   echo $ac_n "(cached) $ac_c" 1>&6
12638 else
12639   
12640                 # save the flags
12641                 ol_LIBS="$LIBS"
12642                 LIBS="-mthreads $LIBS"
12643
12644                 if test "$cross_compiling" = yes; then
12645   cat > conftest.$ac_ext <<EOF
12646 #line 12647 "configure"
12647 #include "confdefs.h"
12648 /* pthread test headers */
12649 #include <pthread.h>
12650 #ifndef NULL
12651 #define NULL (void*)0
12652 #endif
12653
12654 static void *task(p)
12655         void *p;
12656 {
12657         return (void *) (p == NULL);
12658 }
12659
12660 int main() {
12661
12662         /* pthread test function */
12663         pthread_t t;
12664         int status;
12665         int detach = 1;
12666
12667 #ifdef HAVE_PTHREADS_FINAL
12668         /* Final pthreads */
12669         pthread_attr_t attr;
12670
12671         status = pthread_attr_init(&attr);
12672         if( status ) return status;
12673
12674 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12675         if( !detach ) {
12676 #if defined( PTHREAD_CREATE_JOINABLE )
12677                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12678 #else
12679                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12680 #endif
12681
12682 #ifdef PTHREAD_CREATE_DETACHED
12683         } else {
12684                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12685 #endif
12686         }
12687         if( status ) return status;
12688 #endif
12689
12690         status = pthread_create( &t, &attr, task, NULL );
12691         if( status ) return status;
12692
12693 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12694         if( detach ) {
12695                 /* give thread a chance to complete */
12696                 /* it should remain joinable and hence detachable */
12697                 sleep( 1 );
12698
12699                 status = pthread_detach( t );
12700                 if( status ) return status;
12701         }
12702 #endif
12703
12704 #else
12705         /* Draft 4 pthreads */
12706         status = pthread_create( &t, pthread_attr_default, task, NULL );
12707         if( status ) return status;
12708
12709         if( detach ) {
12710                 /* give thread a chance to complete */
12711                 /* it should remain joinable and hence detachable */
12712                 sleep( 1 );
12713
12714                 status = pthread_detach( &t );
12715                 if( status ) return status;
12716         }
12717 #endif
12718
12719 #ifdef HAVE_LINUX_THREADS
12720         pthread_kill_other_threads_np();
12721 #endif
12722
12723         return 0;
12724
12725 ; return 0; }
12726 EOF
12727 if { (eval echo configure:12728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12728   rm -rf conftest*
12729   ol_cv_pthread_mthreads=yes
12730 else
12731   echo "configure: failed program was:" >&5
12732   cat conftest.$ac_ext >&5
12733   rm -rf conftest*
12734   ol_cv_pthread_mthreads=no
12735 fi
12736 rm -f conftest*
12737 else
12738   cat > conftest.$ac_ext <<EOF
12739 #line 12740 "configure"
12740 #include "confdefs.h"
12741 /* pthread test headers */
12742 #include <pthread.h>
12743 #ifndef NULL
12744 #define NULL (void*)0
12745 #endif
12746
12747 static void *task(p)
12748         void *p;
12749 {
12750         return (void *) (p == NULL);
12751 }
12752
12753
12754 int main(argc, argv)
12755         int argc;
12756         char **argv;
12757 {
12758
12759         /* pthread test function */
12760         pthread_t t;
12761         int status;
12762         int detach = 1;
12763
12764 #ifdef HAVE_PTHREADS_FINAL
12765         /* Final pthreads */
12766         pthread_attr_t attr;
12767
12768         status = pthread_attr_init(&attr);
12769         if( status ) return status;
12770
12771 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12772         if( !detach ) {
12773 #if defined( PTHREAD_CREATE_JOINABLE )
12774                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12775 #else
12776                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12777 #endif
12778
12779 #ifdef PTHREAD_CREATE_DETACHED
12780         } else {
12781                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12782 #endif
12783         }
12784         if( status ) return status;
12785 #endif
12786
12787         status = pthread_create( &t, &attr, task, NULL );
12788         if( status ) return status;
12789
12790 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12791         if( detach ) {
12792                 /* give thread a chance to complete */
12793                 /* it should remain joinable and hence detachable */
12794                 sleep( 1 );
12795
12796                 status = pthread_detach( t );
12797                 if( status ) return status;
12798         }
12799 #endif
12800
12801 #else
12802         /* Draft 4 pthreads */
12803         status = pthread_create( &t, pthread_attr_default, task, NULL );
12804         if( status ) return status;
12805
12806         if( detach ) {
12807                 /* give thread a chance to complete */
12808                 /* it should remain joinable and hence detachable */
12809                 sleep( 1 );
12810
12811                 status = pthread_detach( &t );
12812                 if( status ) return status;
12813         }
12814 #endif
12815
12816 #ifdef HAVE_LINUX_THREADS
12817         pthread_kill_other_threads_np();
12818 #endif
12819
12820         return 0;
12821
12822 }
12823
12824 EOF
12825 if { (eval echo configure:12826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12826 then
12827   ol_cv_pthread_mthreads=yes
12828 else
12829   echo "configure: failed program was:" >&5
12830   cat conftest.$ac_ext >&5
12831   rm -fr conftest*
12832   ol_cv_pthread_mthreads=no
12833 fi
12834 rm -fr conftest*
12835 fi
12836
12837
12838                 # restore the LIBS
12839                 LIBS="$ol_LIBS"
12840         
12841 fi
12842
12843 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12844
12845         if test $ol_cv_pthread_mthreads = yes ; then
12846                 ol_link_pthreads="-mthreads"
12847                 ol_link_threads=posix
12848         fi
12849 fi
12850
12851                 # Pthread try link: -thread (ol_cv_pthread_thread)
12852 if test "$ol_link_threads" = no ; then
12853         # try -thread
12854         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12855 echo "configure:12856: checking for pthread link with -thread" >&5
12856 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12857   echo $ac_n "(cached) $ac_c" 1>&6
12858 else
12859   
12860                 # save the flags
12861                 ol_LIBS="$LIBS"
12862                 LIBS="-thread $LIBS"
12863
12864                 if test "$cross_compiling" = yes; then
12865   cat > conftest.$ac_ext <<EOF
12866 #line 12867 "configure"
12867 #include "confdefs.h"
12868 /* pthread test headers */
12869 #include <pthread.h>
12870 #ifndef NULL
12871 #define NULL (void*)0
12872 #endif
12873
12874 static void *task(p)
12875         void *p;
12876 {
12877         return (void *) (p == NULL);
12878 }
12879
12880 int main() {
12881
12882         /* pthread test function */
12883         pthread_t t;
12884         int status;
12885         int detach = 1;
12886
12887 #ifdef HAVE_PTHREADS_FINAL
12888         /* Final pthreads */
12889         pthread_attr_t attr;
12890
12891         status = pthread_attr_init(&attr);
12892         if( status ) return status;
12893
12894 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12895         if( !detach ) {
12896 #if defined( PTHREAD_CREATE_JOINABLE )
12897                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12898 #else
12899                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12900 #endif
12901
12902 #ifdef PTHREAD_CREATE_DETACHED
12903         } else {
12904                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12905 #endif
12906         }
12907         if( status ) return status;
12908 #endif
12909
12910         status = pthread_create( &t, &attr, task, NULL );
12911         if( status ) return status;
12912
12913 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12914         if( detach ) {
12915                 /* give thread a chance to complete */
12916                 /* it should remain joinable and hence detachable */
12917                 sleep( 1 );
12918
12919                 status = pthread_detach( t );
12920                 if( status ) return status;
12921         }
12922 #endif
12923
12924 #else
12925         /* Draft 4 pthreads */
12926         status = pthread_create( &t, pthread_attr_default, task, NULL );
12927         if( status ) return status;
12928
12929         if( detach ) {
12930                 /* give thread a chance to complete */
12931                 /* it should remain joinable and hence detachable */
12932                 sleep( 1 );
12933
12934                 status = pthread_detach( &t );
12935                 if( status ) return status;
12936         }
12937 #endif
12938
12939 #ifdef HAVE_LINUX_THREADS
12940         pthread_kill_other_threads_np();
12941 #endif
12942
12943         return 0;
12944
12945 ; return 0; }
12946 EOF
12947 if { (eval echo configure:12948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12948   rm -rf conftest*
12949   ol_cv_pthread_thread=yes
12950 else
12951   echo "configure: failed program was:" >&5
12952   cat conftest.$ac_ext >&5
12953   rm -rf conftest*
12954   ol_cv_pthread_thread=no
12955 fi
12956 rm -f conftest*
12957 else
12958   cat > conftest.$ac_ext <<EOF
12959 #line 12960 "configure"
12960 #include "confdefs.h"
12961 /* pthread test headers */
12962 #include <pthread.h>
12963 #ifndef NULL
12964 #define NULL (void*)0
12965 #endif
12966
12967 static void *task(p)
12968         void *p;
12969 {
12970         return (void *) (p == NULL);
12971 }
12972
12973
12974 int main(argc, argv)
12975         int argc;
12976         char **argv;
12977 {
12978
12979         /* pthread test function */
12980         pthread_t t;
12981         int status;
12982         int detach = 1;
12983
12984 #ifdef HAVE_PTHREADS_FINAL
12985         /* Final pthreads */
12986         pthread_attr_t attr;
12987
12988         status = pthread_attr_init(&attr);
12989         if( status ) return status;
12990
12991 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12992         if( !detach ) {
12993 #if defined( PTHREAD_CREATE_JOINABLE )
12994                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12995 #else
12996                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12997 #endif
12998
12999 #ifdef PTHREAD_CREATE_DETACHED
13000         } else {
13001                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13002 #endif
13003         }
13004         if( status ) return status;
13005 #endif
13006
13007         status = pthread_create( &t, &attr, task, NULL );
13008         if( status ) return status;
13009
13010 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13011         if( detach ) {
13012                 /* give thread a chance to complete */
13013                 /* it should remain joinable and hence detachable */
13014                 sleep( 1 );
13015
13016                 status = pthread_detach( t );
13017                 if( status ) return status;
13018         }
13019 #endif
13020
13021 #else
13022         /* Draft 4 pthreads */
13023         status = pthread_create( &t, pthread_attr_default, task, NULL );
13024         if( status ) return status;
13025
13026         if( detach ) {
13027                 /* give thread a chance to complete */
13028                 /* it should remain joinable and hence detachable */
13029                 sleep( 1 );
13030
13031                 status = pthread_detach( &t );
13032                 if( status ) return status;
13033         }
13034 #endif
13035
13036 #ifdef HAVE_LINUX_THREADS
13037         pthread_kill_other_threads_np();
13038 #endif
13039
13040         return 0;
13041
13042 }
13043
13044 EOF
13045 if { (eval echo configure:13046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13046 then
13047   ol_cv_pthread_thread=yes
13048 else
13049   echo "configure: failed program was:" >&5
13050   cat conftest.$ac_ext >&5
13051   rm -fr conftest*
13052   ol_cv_pthread_thread=no
13053 fi
13054 rm -fr conftest*
13055 fi
13056
13057
13058                 # restore the LIBS
13059                 LIBS="$ol_LIBS"
13060         
13061 fi
13062
13063 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
13064
13065         if test $ol_cv_pthread_thread = yes ; then
13066                 ol_link_pthreads="-thread"
13067                 ol_link_threads=posix
13068         fi
13069 fi
13070
13071
13072                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
13073 if test "$ol_link_threads" = no ; then
13074         # try -lpthread -lmach -lexc -lc_r
13075         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
13076 echo "configure:13077: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
13077 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
13078   echo $ac_n "(cached) $ac_c" 1>&6
13079 else
13080   
13081                 # save the flags
13082                 ol_LIBS="$LIBS"
13083                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
13084
13085                 if test "$cross_compiling" = yes; then
13086   cat > conftest.$ac_ext <<EOF
13087 #line 13088 "configure"
13088 #include "confdefs.h"
13089 /* pthread test headers */
13090 #include <pthread.h>
13091 #ifndef NULL
13092 #define NULL (void*)0
13093 #endif
13094
13095 static void *task(p)
13096         void *p;
13097 {
13098         return (void *) (p == NULL);
13099 }
13100
13101 int main() {
13102
13103         /* pthread test function */
13104         pthread_t t;
13105         int status;
13106         int detach = 1;
13107
13108 #ifdef HAVE_PTHREADS_FINAL
13109         /* Final pthreads */
13110         pthread_attr_t attr;
13111
13112         status = pthread_attr_init(&attr);
13113         if( status ) return status;
13114
13115 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13116         if( !detach ) {
13117 #if defined( PTHREAD_CREATE_JOINABLE )
13118                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13119 #else
13120                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13121 #endif
13122
13123 #ifdef PTHREAD_CREATE_DETACHED
13124         } else {
13125                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13126 #endif
13127         }
13128         if( status ) return status;
13129 #endif
13130
13131         status = pthread_create( &t, &attr, task, NULL );
13132         if( status ) return status;
13133
13134 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13135         if( detach ) {
13136                 /* give thread a chance to complete */
13137                 /* it should remain joinable and hence detachable */
13138                 sleep( 1 );
13139
13140                 status = pthread_detach( t );
13141                 if( status ) return status;
13142         }
13143 #endif
13144
13145 #else
13146         /* Draft 4 pthreads */
13147         status = pthread_create( &t, pthread_attr_default, task, NULL );
13148         if( status ) return status;
13149
13150         if( detach ) {
13151                 /* give thread a chance to complete */
13152                 /* it should remain joinable and hence detachable */
13153                 sleep( 1 );
13154
13155                 status = pthread_detach( &t );
13156                 if( status ) return status;
13157         }
13158 #endif
13159
13160 #ifdef HAVE_LINUX_THREADS
13161         pthread_kill_other_threads_np();
13162 #endif
13163
13164         return 0;
13165
13166 ; return 0; }
13167 EOF
13168 if { (eval echo configure:13169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13169   rm -rf conftest*
13170   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13171 else
13172   echo "configure: failed program was:" >&5
13173   cat conftest.$ac_ext >&5
13174   rm -rf conftest*
13175   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13176 fi
13177 rm -f conftest*
13178 else
13179   cat > conftest.$ac_ext <<EOF
13180 #line 13181 "configure"
13181 #include "confdefs.h"
13182 /* pthread test headers */
13183 #include <pthread.h>
13184 #ifndef NULL
13185 #define NULL (void*)0
13186 #endif
13187
13188 static void *task(p)
13189         void *p;
13190 {
13191         return (void *) (p == NULL);
13192 }
13193
13194
13195 int main(argc, argv)
13196         int argc;
13197         char **argv;
13198 {
13199
13200         /* pthread test function */
13201         pthread_t t;
13202         int status;
13203         int detach = 1;
13204
13205 #ifdef HAVE_PTHREADS_FINAL
13206         /* Final pthreads */
13207         pthread_attr_t attr;
13208
13209         status = pthread_attr_init(&attr);
13210         if( status ) return status;
13211
13212 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13213         if( !detach ) {
13214 #if defined( PTHREAD_CREATE_JOINABLE )
13215                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13216 #else
13217                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13218 #endif
13219
13220 #ifdef PTHREAD_CREATE_DETACHED
13221         } else {
13222                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13223 #endif
13224         }
13225         if( status ) return status;
13226 #endif
13227
13228         status = pthread_create( &t, &attr, task, NULL );
13229         if( status ) return status;
13230
13231 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13232         if( detach ) {
13233                 /* give thread a chance to complete */
13234                 /* it should remain joinable and hence detachable */
13235                 sleep( 1 );
13236
13237                 status = pthread_detach( t );
13238                 if( status ) return status;
13239         }
13240 #endif
13241
13242 #else
13243         /* Draft 4 pthreads */
13244         status = pthread_create( &t, pthread_attr_default, task, NULL );
13245         if( status ) return status;
13246
13247         if( detach ) {
13248                 /* give thread a chance to complete */
13249                 /* it should remain joinable and hence detachable */
13250                 sleep( 1 );
13251
13252                 status = pthread_detach( &t );
13253                 if( status ) return status;
13254         }
13255 #endif
13256
13257 #ifdef HAVE_LINUX_THREADS
13258         pthread_kill_other_threads_np();
13259 #endif
13260
13261         return 0;
13262
13263 }
13264
13265 EOF
13266 if { (eval echo configure:13267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13267 then
13268   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13269 else
13270   echo "configure: failed program was:" >&5
13271   cat conftest.$ac_ext >&5
13272   rm -fr conftest*
13273   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13274 fi
13275 rm -fr conftest*
13276 fi
13277
13278
13279                 # restore the LIBS
13280                 LIBS="$ol_LIBS"
13281         
13282 fi
13283
13284 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13285
13286         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13287                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13288                 ol_link_threads=posix
13289         fi
13290 fi
13291
13292                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13293 if test "$ol_link_threads" = no ; then
13294         # try -lpthread -lmach -lexc
13295         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13296 echo "configure:13297: checking for pthread link with -lpthread -lmach -lexc" >&5
13297 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13298   echo $ac_n "(cached) $ac_c" 1>&6
13299 else
13300   
13301                 # save the flags
13302                 ol_LIBS="$LIBS"
13303                 LIBS="-lpthread -lmach -lexc $LIBS"
13304
13305                 if test "$cross_compiling" = yes; then
13306   cat > conftest.$ac_ext <<EOF
13307 #line 13308 "configure"
13308 #include "confdefs.h"
13309 /* pthread test headers */
13310 #include <pthread.h>
13311 #ifndef NULL
13312 #define NULL (void*)0
13313 #endif
13314
13315 static void *task(p)
13316         void *p;
13317 {
13318         return (void *) (p == NULL);
13319 }
13320
13321 int main() {
13322
13323         /* pthread test function */
13324         pthread_t t;
13325         int status;
13326         int detach = 1;
13327
13328 #ifdef HAVE_PTHREADS_FINAL
13329         /* Final pthreads */
13330         pthread_attr_t attr;
13331
13332         status = pthread_attr_init(&attr);
13333         if( status ) return status;
13334
13335 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13336         if( !detach ) {
13337 #if defined( PTHREAD_CREATE_JOINABLE )
13338                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13339 #else
13340                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13341 #endif
13342
13343 #ifdef PTHREAD_CREATE_DETACHED
13344         } else {
13345                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13346 #endif
13347         }
13348         if( status ) return status;
13349 #endif
13350
13351         status = pthread_create( &t, &attr, task, NULL );
13352         if( status ) return status;
13353
13354 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13355         if( detach ) {
13356                 /* give thread a chance to complete */
13357                 /* it should remain joinable and hence detachable */
13358                 sleep( 1 );
13359
13360                 status = pthread_detach( t );
13361                 if( status ) return status;
13362         }
13363 #endif
13364
13365 #else
13366         /* Draft 4 pthreads */
13367         status = pthread_create( &t, pthread_attr_default, task, NULL );
13368         if( status ) return status;
13369
13370         if( detach ) {
13371                 /* give thread a chance to complete */
13372                 /* it should remain joinable and hence detachable */
13373                 sleep( 1 );
13374
13375                 status = pthread_detach( &t );
13376                 if( status ) return status;
13377         }
13378 #endif
13379
13380 #ifdef HAVE_LINUX_THREADS
13381         pthread_kill_other_threads_np();
13382 #endif
13383
13384         return 0;
13385
13386 ; return 0; }
13387 EOF
13388 if { (eval echo configure:13389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13389   rm -rf conftest*
13390   ol_cv_pthread_lpthread_lmach_lexc=yes
13391 else
13392   echo "configure: failed program was:" >&5
13393   cat conftest.$ac_ext >&5
13394   rm -rf conftest*
13395   ol_cv_pthread_lpthread_lmach_lexc=no
13396 fi
13397 rm -f conftest*
13398 else
13399   cat > conftest.$ac_ext <<EOF
13400 #line 13401 "configure"
13401 #include "confdefs.h"
13402 /* pthread test headers */
13403 #include <pthread.h>
13404 #ifndef NULL
13405 #define NULL (void*)0
13406 #endif
13407
13408 static void *task(p)
13409         void *p;
13410 {
13411         return (void *) (p == NULL);
13412 }
13413
13414
13415 int main(argc, argv)
13416         int argc;
13417         char **argv;
13418 {
13419
13420         /* pthread test function */
13421         pthread_t t;
13422         int status;
13423         int detach = 1;
13424
13425 #ifdef HAVE_PTHREADS_FINAL
13426         /* Final pthreads */
13427         pthread_attr_t attr;
13428
13429         status = pthread_attr_init(&attr);
13430         if( status ) return status;
13431
13432 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13433         if( !detach ) {
13434 #if defined( PTHREAD_CREATE_JOINABLE )
13435                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13436 #else
13437                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13438 #endif
13439
13440 #ifdef PTHREAD_CREATE_DETACHED
13441         } else {
13442                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13443 #endif
13444         }
13445         if( status ) return status;
13446 #endif
13447
13448         status = pthread_create( &t, &attr, task, NULL );
13449         if( status ) return status;
13450
13451 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13452         if( detach ) {
13453                 /* give thread a chance to complete */
13454                 /* it should remain joinable and hence detachable */
13455                 sleep( 1 );
13456
13457                 status = pthread_detach( t );
13458                 if( status ) return status;
13459         }
13460 #endif
13461
13462 #else
13463         /* Draft 4 pthreads */
13464         status = pthread_create( &t, pthread_attr_default, task, NULL );
13465         if( status ) return status;
13466
13467         if( detach ) {
13468                 /* give thread a chance to complete */
13469                 /* it should remain joinable and hence detachable */
13470                 sleep( 1 );
13471
13472                 status = pthread_detach( &t );
13473                 if( status ) return status;
13474         }
13475 #endif
13476
13477 #ifdef HAVE_LINUX_THREADS
13478         pthread_kill_other_threads_np();
13479 #endif
13480
13481         return 0;
13482
13483 }
13484
13485 EOF
13486 if { (eval echo configure:13487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13487 then
13488   ol_cv_pthread_lpthread_lmach_lexc=yes
13489 else
13490   echo "configure: failed program was:" >&5
13491   cat conftest.$ac_ext >&5
13492   rm -fr conftest*
13493   ol_cv_pthread_lpthread_lmach_lexc=no
13494 fi
13495 rm -fr conftest*
13496 fi
13497
13498
13499                 # restore the LIBS
13500                 LIBS="$ol_LIBS"
13501         
13502 fi
13503
13504 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13505
13506         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13507                 ol_link_pthreads="-lpthread -lmach -lexc"
13508                 ol_link_threads=posix
13509         fi
13510 fi
13511
13512
13513                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13514 if test "$ol_link_threads" = no ; then
13515         # try -lpthread -Wl,-woff,85
13516         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13517 echo "configure:13518: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13518 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13519   echo $ac_n "(cached) $ac_c" 1>&6
13520 else
13521   
13522                 # save the flags
13523                 ol_LIBS="$LIBS"
13524                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13525
13526                 if test "$cross_compiling" = yes; then
13527   cat > conftest.$ac_ext <<EOF
13528 #line 13529 "configure"
13529 #include "confdefs.h"
13530 /* pthread test headers */
13531 #include <pthread.h>
13532 #ifndef NULL
13533 #define NULL (void*)0
13534 #endif
13535
13536 static void *task(p)
13537         void *p;
13538 {
13539         return (void *) (p == NULL);
13540 }
13541
13542 int main() {
13543
13544         /* pthread test function */
13545         pthread_t t;
13546         int status;
13547         int detach = 1;
13548
13549 #ifdef HAVE_PTHREADS_FINAL
13550         /* Final pthreads */
13551         pthread_attr_t attr;
13552
13553         status = pthread_attr_init(&attr);
13554         if( status ) return status;
13555
13556 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13557         if( !detach ) {
13558 #if defined( PTHREAD_CREATE_JOINABLE )
13559                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13560 #else
13561                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13562 #endif
13563
13564 #ifdef PTHREAD_CREATE_DETACHED
13565         } else {
13566                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13567 #endif
13568         }
13569         if( status ) return status;
13570 #endif
13571
13572         status = pthread_create( &t, &attr, task, NULL );
13573         if( status ) return status;
13574
13575 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13576         if( detach ) {
13577                 /* give thread a chance to complete */
13578                 /* it should remain joinable and hence detachable */
13579                 sleep( 1 );
13580
13581                 status = pthread_detach( t );
13582                 if( status ) return status;
13583         }
13584 #endif
13585
13586 #else
13587         /* Draft 4 pthreads */
13588         status = pthread_create( &t, pthread_attr_default, task, NULL );
13589         if( status ) return status;
13590
13591         if( detach ) {
13592                 /* give thread a chance to complete */
13593                 /* it should remain joinable and hence detachable */
13594                 sleep( 1 );
13595
13596                 status = pthread_detach( &t );
13597                 if( status ) return status;
13598         }
13599 #endif
13600
13601 #ifdef HAVE_LINUX_THREADS
13602         pthread_kill_other_threads_np();
13603 #endif
13604
13605         return 0;
13606
13607 ; return 0; }
13608 EOF
13609 if { (eval echo configure:13610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13610   rm -rf conftest*
13611   ol_cv_pthread_lib_lpthread_woff=yes
13612 else
13613   echo "configure: failed program was:" >&5
13614   cat conftest.$ac_ext >&5
13615   rm -rf conftest*
13616   ol_cv_pthread_lib_lpthread_woff=no
13617 fi
13618 rm -f conftest*
13619 else
13620   cat > conftest.$ac_ext <<EOF
13621 #line 13622 "configure"
13622 #include "confdefs.h"
13623 /* pthread test headers */
13624 #include <pthread.h>
13625 #ifndef NULL
13626 #define NULL (void*)0
13627 #endif
13628
13629 static void *task(p)
13630         void *p;
13631 {
13632         return (void *) (p == NULL);
13633 }
13634
13635
13636 int main(argc, argv)
13637         int argc;
13638         char **argv;
13639 {
13640
13641         /* pthread test function */
13642         pthread_t t;
13643         int status;
13644         int detach = 1;
13645
13646 #ifdef HAVE_PTHREADS_FINAL
13647         /* Final pthreads */
13648         pthread_attr_t attr;
13649
13650         status = pthread_attr_init(&attr);
13651         if( status ) return status;
13652
13653 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13654         if( !detach ) {
13655 #if defined( PTHREAD_CREATE_JOINABLE )
13656                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13657 #else
13658                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13659 #endif
13660
13661 #ifdef PTHREAD_CREATE_DETACHED
13662         } else {
13663                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13664 #endif
13665         }
13666         if( status ) return status;
13667 #endif
13668
13669         status = pthread_create( &t, &attr, task, NULL );
13670         if( status ) return status;
13671
13672 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13673         if( detach ) {
13674                 /* give thread a chance to complete */
13675                 /* it should remain joinable and hence detachable */
13676                 sleep( 1 );
13677
13678                 status = pthread_detach( t );
13679                 if( status ) return status;
13680         }
13681 #endif
13682
13683 #else
13684         /* Draft 4 pthreads */
13685         status = pthread_create( &t, pthread_attr_default, task, NULL );
13686         if( status ) return status;
13687
13688         if( detach ) {
13689                 /* give thread a chance to complete */
13690                 /* it should remain joinable and hence detachable */
13691                 sleep( 1 );
13692
13693                 status = pthread_detach( &t );
13694                 if( status ) return status;
13695         }
13696 #endif
13697
13698 #ifdef HAVE_LINUX_THREADS
13699         pthread_kill_other_threads_np();
13700 #endif
13701
13702         return 0;
13703
13704 }
13705
13706 EOF
13707 if { (eval echo configure:13708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13708 then
13709   ol_cv_pthread_lib_lpthread_woff=yes
13710 else
13711   echo "configure: failed program was:" >&5
13712   cat conftest.$ac_ext >&5
13713   rm -fr conftest*
13714   ol_cv_pthread_lib_lpthread_woff=no
13715 fi
13716 rm -fr conftest*
13717 fi
13718
13719
13720                 # restore the LIBS
13721                 LIBS="$ol_LIBS"
13722         
13723 fi
13724
13725 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13726
13727         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13728                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13729                 ol_link_threads=posix
13730         fi
13731 fi
13732
13733
13734                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13735 if test "$ol_link_threads" = no ; then
13736         # try -lpthread
13737         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13738 echo "configure:13739: checking for pthread link with -lpthread" >&5
13739 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13740   echo $ac_n "(cached) $ac_c" 1>&6
13741 else
13742   
13743                 # save the flags
13744                 ol_LIBS="$LIBS"
13745                 LIBS="-lpthread $LIBS"
13746
13747                 if test "$cross_compiling" = yes; then
13748   cat > conftest.$ac_ext <<EOF
13749 #line 13750 "configure"
13750 #include "confdefs.h"
13751 /* pthread test headers */
13752 #include <pthread.h>
13753 #ifndef NULL
13754 #define NULL (void*)0
13755 #endif
13756
13757 static void *task(p)
13758         void *p;
13759 {
13760         return (void *) (p == NULL);
13761 }
13762
13763 int main() {
13764
13765         /* pthread test function */
13766         pthread_t t;
13767         int status;
13768         int detach = 1;
13769
13770 #ifdef HAVE_PTHREADS_FINAL
13771         /* Final pthreads */
13772         pthread_attr_t attr;
13773
13774         status = pthread_attr_init(&attr);
13775         if( status ) return status;
13776
13777 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13778         if( !detach ) {
13779 #if defined( PTHREAD_CREATE_JOINABLE )
13780                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13781 #else
13782                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13783 #endif
13784
13785 #ifdef PTHREAD_CREATE_DETACHED
13786         } else {
13787                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13788 #endif
13789         }
13790         if( status ) return status;
13791 #endif
13792
13793         status = pthread_create( &t, &attr, task, NULL );
13794         if( status ) return status;
13795
13796 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13797         if( detach ) {
13798                 /* give thread a chance to complete */
13799                 /* it should remain joinable and hence detachable */
13800                 sleep( 1 );
13801
13802                 status = pthread_detach( t );
13803                 if( status ) return status;
13804         }
13805 #endif
13806
13807 #else
13808         /* Draft 4 pthreads */
13809         status = pthread_create( &t, pthread_attr_default, task, NULL );
13810         if( status ) return status;
13811
13812         if( detach ) {
13813                 /* give thread a chance to complete */
13814                 /* it should remain joinable and hence detachable */
13815                 sleep( 1 );
13816
13817                 status = pthread_detach( &t );
13818                 if( status ) return status;
13819         }
13820 #endif
13821
13822 #ifdef HAVE_LINUX_THREADS
13823         pthread_kill_other_threads_np();
13824 #endif
13825
13826         return 0;
13827
13828 ; return 0; }
13829 EOF
13830 if { (eval echo configure:13831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13831   rm -rf conftest*
13832   ol_cv_pthread_lpthread=yes
13833 else
13834   echo "configure: failed program was:" >&5
13835   cat conftest.$ac_ext >&5
13836   rm -rf conftest*
13837   ol_cv_pthread_lpthread=no
13838 fi
13839 rm -f conftest*
13840 else
13841   cat > conftest.$ac_ext <<EOF
13842 #line 13843 "configure"
13843 #include "confdefs.h"
13844 /* pthread test headers */
13845 #include <pthread.h>
13846 #ifndef NULL
13847 #define NULL (void*)0
13848 #endif
13849
13850 static void *task(p)
13851         void *p;
13852 {
13853         return (void *) (p == NULL);
13854 }
13855
13856
13857 int main(argc, argv)
13858         int argc;
13859         char **argv;
13860 {
13861
13862         /* pthread test function */
13863         pthread_t t;
13864         int status;
13865         int detach = 1;
13866
13867 #ifdef HAVE_PTHREADS_FINAL
13868         /* Final pthreads */
13869         pthread_attr_t attr;
13870
13871         status = pthread_attr_init(&attr);
13872         if( status ) return status;
13873
13874 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13875         if( !detach ) {
13876 #if defined( PTHREAD_CREATE_JOINABLE )
13877                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13878 #else
13879                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13880 #endif
13881
13882 #ifdef PTHREAD_CREATE_DETACHED
13883         } else {
13884                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13885 #endif
13886         }
13887         if( status ) return status;
13888 #endif
13889
13890         status = pthread_create( &t, &attr, task, NULL );
13891         if( status ) return status;
13892
13893 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13894         if( detach ) {
13895                 /* give thread a chance to complete */
13896                 /* it should remain joinable and hence detachable */
13897                 sleep( 1 );
13898
13899                 status = pthread_detach( t );
13900                 if( status ) return status;
13901         }
13902 #endif
13903
13904 #else
13905         /* Draft 4 pthreads */
13906         status = pthread_create( &t, pthread_attr_default, task, NULL );
13907         if( status ) return status;
13908
13909         if( detach ) {
13910                 /* give thread a chance to complete */
13911                 /* it should remain joinable and hence detachable */
13912                 sleep( 1 );
13913
13914                 status = pthread_detach( &t );
13915                 if( status ) return status;
13916         }
13917 #endif
13918
13919 #ifdef HAVE_LINUX_THREADS
13920         pthread_kill_other_threads_np();
13921 #endif
13922
13923         return 0;
13924
13925 }
13926
13927 EOF
13928 if { (eval echo configure:13929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13929 then
13930   ol_cv_pthread_lpthread=yes
13931 else
13932   echo "configure: failed program was:" >&5
13933   cat conftest.$ac_ext >&5
13934   rm -fr conftest*
13935   ol_cv_pthread_lpthread=no
13936 fi
13937 rm -fr conftest*
13938 fi
13939
13940
13941                 # restore the LIBS
13942                 LIBS="$ol_LIBS"
13943         
13944 fi
13945
13946 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13947
13948         if test $ol_cv_pthread_lpthread = yes ; then
13949                 ol_link_pthreads="-lpthread"
13950                 ol_link_threads=posix
13951         fi
13952 fi
13953
13954                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13955 if test "$ol_link_threads" = no ; then
13956         # try -lc_r
13957         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13958 echo "configure:13959: checking for pthread link with -lc_r" >&5
13959 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13960   echo $ac_n "(cached) $ac_c" 1>&6
13961 else
13962   
13963                 # save the flags
13964                 ol_LIBS="$LIBS"
13965                 LIBS="-lc_r $LIBS"
13966
13967                 if test "$cross_compiling" = yes; then
13968   cat > conftest.$ac_ext <<EOF
13969 #line 13970 "configure"
13970 #include "confdefs.h"
13971 /* pthread test headers */
13972 #include <pthread.h>
13973 #ifndef NULL
13974 #define NULL (void*)0
13975 #endif
13976
13977 static void *task(p)
13978         void *p;
13979 {
13980         return (void *) (p == NULL);
13981 }
13982
13983 int main() {
13984
13985         /* pthread test function */
13986         pthread_t t;
13987         int status;
13988         int detach = 1;
13989
13990 #ifdef HAVE_PTHREADS_FINAL
13991         /* Final pthreads */
13992         pthread_attr_t attr;
13993
13994         status = pthread_attr_init(&attr);
13995         if( status ) return status;
13996
13997 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13998         if( !detach ) {
13999 #if defined( PTHREAD_CREATE_JOINABLE )
14000                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14001 #else
14002                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14003 #endif
14004
14005 #ifdef PTHREAD_CREATE_DETACHED
14006         } else {
14007                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14008 #endif
14009         }
14010         if( status ) return status;
14011 #endif
14012
14013         status = pthread_create( &t, &attr, task, NULL );
14014         if( status ) return status;
14015
14016 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14017         if( detach ) {
14018                 /* give thread a chance to complete */
14019                 /* it should remain joinable and hence detachable */
14020                 sleep( 1 );
14021
14022                 status = pthread_detach( t );
14023                 if( status ) return status;
14024         }
14025 #endif
14026
14027 #else
14028         /* Draft 4 pthreads */
14029         status = pthread_create( &t, pthread_attr_default, task, NULL );
14030         if( status ) return status;
14031
14032         if( detach ) {
14033                 /* give thread a chance to complete */
14034                 /* it should remain joinable and hence detachable */
14035                 sleep( 1 );
14036
14037                 status = pthread_detach( &t );
14038                 if( status ) return status;
14039         }
14040 #endif
14041
14042 #ifdef HAVE_LINUX_THREADS
14043         pthread_kill_other_threads_np();
14044 #endif
14045
14046         return 0;
14047
14048 ; return 0; }
14049 EOF
14050 if { (eval echo configure:14051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14051   rm -rf conftest*
14052   ol_cv_pthread_lc_r=yes
14053 else
14054   echo "configure: failed program was:" >&5
14055   cat conftest.$ac_ext >&5
14056   rm -rf conftest*
14057   ol_cv_pthread_lc_r=no
14058 fi
14059 rm -f conftest*
14060 else
14061   cat > conftest.$ac_ext <<EOF
14062 #line 14063 "configure"
14063 #include "confdefs.h"
14064 /* pthread test headers */
14065 #include <pthread.h>
14066 #ifndef NULL
14067 #define NULL (void*)0
14068 #endif
14069
14070 static void *task(p)
14071         void *p;
14072 {
14073         return (void *) (p == NULL);
14074 }
14075
14076
14077 int main(argc, argv)
14078         int argc;
14079         char **argv;
14080 {
14081
14082         /* pthread test function */
14083         pthread_t t;
14084         int status;
14085         int detach = 1;
14086
14087 #ifdef HAVE_PTHREADS_FINAL
14088         /* Final pthreads */
14089         pthread_attr_t attr;
14090
14091         status = pthread_attr_init(&attr);
14092         if( status ) return status;
14093
14094 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14095         if( !detach ) {
14096 #if defined( PTHREAD_CREATE_JOINABLE )
14097                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14098 #else
14099                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14100 #endif
14101
14102 #ifdef PTHREAD_CREATE_DETACHED
14103         } else {
14104                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14105 #endif
14106         }
14107         if( status ) return status;
14108 #endif
14109
14110         status = pthread_create( &t, &attr, task, NULL );
14111         if( status ) return status;
14112
14113 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14114         if( detach ) {
14115                 /* give thread a chance to complete */
14116                 /* it should remain joinable and hence detachable */
14117                 sleep( 1 );
14118
14119                 status = pthread_detach( t );
14120                 if( status ) return status;
14121         }
14122 #endif
14123
14124 #else
14125         /* Draft 4 pthreads */
14126         status = pthread_create( &t, pthread_attr_default, task, NULL );
14127         if( status ) return status;
14128
14129         if( detach ) {
14130                 /* give thread a chance to complete */
14131                 /* it should remain joinable and hence detachable */
14132                 sleep( 1 );
14133
14134                 status = pthread_detach( &t );
14135                 if( status ) return status;
14136         }
14137 #endif
14138
14139 #ifdef HAVE_LINUX_THREADS
14140         pthread_kill_other_threads_np();
14141 #endif
14142
14143         return 0;
14144
14145 }
14146
14147 EOF
14148 if { (eval echo configure:14149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14149 then
14150   ol_cv_pthread_lc_r=yes
14151 else
14152   echo "configure: failed program was:" >&5
14153   cat conftest.$ac_ext >&5
14154   rm -fr conftest*
14155   ol_cv_pthread_lc_r=no
14156 fi
14157 rm -fr conftest*
14158 fi
14159
14160
14161                 # restore the LIBS
14162                 LIBS="$ol_LIBS"
14163         
14164 fi
14165
14166 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
14167
14168         if test $ol_cv_pthread_lc_r = yes ; then
14169                 ol_link_pthreads="-lc_r"
14170                 ol_link_threads=posix
14171         fi
14172 fi
14173
14174
14175                 # Pthread try link: -threads (ol_cv_pthread_threads)
14176 if test "$ol_link_threads" = no ; then
14177         # try -threads
14178         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
14179 echo "configure:14180: checking for pthread link with -threads" >&5
14180 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
14181   echo $ac_n "(cached) $ac_c" 1>&6
14182 else
14183   
14184                 # save the flags
14185                 ol_LIBS="$LIBS"
14186                 LIBS="-threads $LIBS"
14187
14188                 if test "$cross_compiling" = yes; then
14189   cat > conftest.$ac_ext <<EOF
14190 #line 14191 "configure"
14191 #include "confdefs.h"
14192 /* pthread test headers */
14193 #include <pthread.h>
14194 #ifndef NULL
14195 #define NULL (void*)0
14196 #endif
14197
14198 static void *task(p)
14199         void *p;
14200 {
14201         return (void *) (p == NULL);
14202 }
14203
14204 int main() {
14205
14206         /* pthread test function */
14207         pthread_t t;
14208         int status;
14209         int detach = 1;
14210
14211 #ifdef HAVE_PTHREADS_FINAL
14212         /* Final pthreads */
14213         pthread_attr_t attr;
14214
14215         status = pthread_attr_init(&attr);
14216         if( status ) return status;
14217
14218 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14219         if( !detach ) {
14220 #if defined( PTHREAD_CREATE_JOINABLE )
14221                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14222 #else
14223                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14224 #endif
14225
14226 #ifdef PTHREAD_CREATE_DETACHED
14227         } else {
14228                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14229 #endif
14230         }
14231         if( status ) return status;
14232 #endif
14233
14234         status = pthread_create( &t, &attr, task, NULL );
14235         if( status ) return status;
14236
14237 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14238         if( detach ) {
14239                 /* give thread a chance to complete */
14240                 /* it should remain joinable and hence detachable */
14241                 sleep( 1 );
14242
14243                 status = pthread_detach( t );
14244                 if( status ) return status;
14245         }
14246 #endif
14247
14248 #else
14249         /* Draft 4 pthreads */
14250         status = pthread_create( &t, pthread_attr_default, task, NULL );
14251         if( status ) return status;
14252
14253         if( detach ) {
14254                 /* give thread a chance to complete */
14255                 /* it should remain joinable and hence detachable */
14256                 sleep( 1 );
14257
14258                 status = pthread_detach( &t );
14259                 if( status ) return status;
14260         }
14261 #endif
14262
14263 #ifdef HAVE_LINUX_THREADS
14264         pthread_kill_other_threads_np();
14265 #endif
14266
14267         return 0;
14268
14269 ; return 0; }
14270 EOF
14271 if { (eval echo configure:14272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14272   rm -rf conftest*
14273   ol_cv_pthread_threads=yes
14274 else
14275   echo "configure: failed program was:" >&5
14276   cat conftest.$ac_ext >&5
14277   rm -rf conftest*
14278   ol_cv_pthread_threads=no
14279 fi
14280 rm -f conftest*
14281 else
14282   cat > conftest.$ac_ext <<EOF
14283 #line 14284 "configure"
14284 #include "confdefs.h"
14285 /* pthread test headers */
14286 #include <pthread.h>
14287 #ifndef NULL
14288 #define NULL (void*)0
14289 #endif
14290
14291 static void *task(p)
14292         void *p;
14293 {
14294         return (void *) (p == NULL);
14295 }
14296
14297
14298 int main(argc, argv)
14299         int argc;
14300         char **argv;
14301 {
14302
14303         /* pthread test function */
14304         pthread_t t;
14305         int status;
14306         int detach = 1;
14307
14308 #ifdef HAVE_PTHREADS_FINAL
14309         /* Final pthreads */
14310         pthread_attr_t attr;
14311
14312         status = pthread_attr_init(&attr);
14313         if( status ) return status;
14314
14315 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14316         if( !detach ) {
14317 #if defined( PTHREAD_CREATE_JOINABLE )
14318                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14319 #else
14320                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14321 #endif
14322
14323 #ifdef PTHREAD_CREATE_DETACHED
14324         } else {
14325                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14326 #endif
14327         }
14328         if( status ) return status;
14329 #endif
14330
14331         status = pthread_create( &t, &attr, task, NULL );
14332         if( status ) return status;
14333
14334 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14335         if( detach ) {
14336                 /* give thread a chance to complete */
14337                 /* it should remain joinable and hence detachable */
14338                 sleep( 1 );
14339
14340                 status = pthread_detach( t );
14341                 if( status ) return status;
14342         }
14343 #endif
14344
14345 #else
14346         /* Draft 4 pthreads */
14347         status = pthread_create( &t, pthread_attr_default, task, NULL );
14348         if( status ) return status;
14349
14350         if( detach ) {
14351                 /* give thread a chance to complete */
14352                 /* it should remain joinable and hence detachable */
14353                 sleep( 1 );
14354
14355                 status = pthread_detach( &t );
14356                 if( status ) return status;
14357         }
14358 #endif
14359
14360 #ifdef HAVE_LINUX_THREADS
14361         pthread_kill_other_threads_np();
14362 #endif
14363
14364         return 0;
14365
14366 }
14367
14368 EOF
14369 if { (eval echo configure:14370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14370 then
14371   ol_cv_pthread_threads=yes
14372 else
14373   echo "configure: failed program was:" >&5
14374   cat conftest.$ac_ext >&5
14375   rm -fr conftest*
14376   ol_cv_pthread_threads=no
14377 fi
14378 rm -fr conftest*
14379 fi
14380
14381
14382                 # restore the LIBS
14383                 LIBS="$ol_LIBS"
14384         
14385 fi
14386
14387 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14388
14389         if test $ol_cv_pthread_threads = yes ; then
14390                 ol_link_pthreads="-threads"
14391                 ol_link_threads=posix
14392         fi
14393 fi
14394
14395
14396                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14397 if test "$ol_link_threads" = no ; then
14398         # try -lpthreads -lmach -lexc -lc_r
14399         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14400 echo "configure:14401: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14401 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14402   echo $ac_n "(cached) $ac_c" 1>&6
14403 else
14404   
14405                 # save the flags
14406                 ol_LIBS="$LIBS"
14407                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14408
14409                 if test "$cross_compiling" = yes; then
14410   cat > conftest.$ac_ext <<EOF
14411 #line 14412 "configure"
14412 #include "confdefs.h"
14413 /* pthread test headers */
14414 #include <pthread.h>
14415 #ifndef NULL
14416 #define NULL (void*)0
14417 #endif
14418
14419 static void *task(p)
14420         void *p;
14421 {
14422         return (void *) (p == NULL);
14423 }
14424
14425 int main() {
14426
14427         /* pthread test function */
14428         pthread_t t;
14429         int status;
14430         int detach = 1;
14431
14432 #ifdef HAVE_PTHREADS_FINAL
14433         /* Final pthreads */
14434         pthread_attr_t attr;
14435
14436         status = pthread_attr_init(&attr);
14437         if( status ) return status;
14438
14439 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14440         if( !detach ) {
14441 #if defined( PTHREAD_CREATE_JOINABLE )
14442                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14443 #else
14444                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14445 #endif
14446
14447 #ifdef PTHREAD_CREATE_DETACHED
14448         } else {
14449                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14450 #endif
14451         }
14452         if( status ) return status;
14453 #endif
14454
14455         status = pthread_create( &t, &attr, task, NULL );
14456         if( status ) return status;
14457
14458 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14459         if( detach ) {
14460                 /* give thread a chance to complete */
14461                 /* it should remain joinable and hence detachable */
14462                 sleep( 1 );
14463
14464                 status = pthread_detach( t );
14465                 if( status ) return status;
14466         }
14467 #endif
14468
14469 #else
14470         /* Draft 4 pthreads */
14471         status = pthread_create( &t, pthread_attr_default, task, NULL );
14472         if( status ) return status;
14473
14474         if( detach ) {
14475                 /* give thread a chance to complete */
14476                 /* it should remain joinable and hence detachable */
14477                 sleep( 1 );
14478
14479                 status = pthread_detach( &t );
14480                 if( status ) return status;
14481         }
14482 #endif
14483
14484 #ifdef HAVE_LINUX_THREADS
14485         pthread_kill_other_threads_np();
14486 #endif
14487
14488         return 0;
14489
14490 ; return 0; }
14491 EOF
14492 if { (eval echo configure:14493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14493   rm -rf conftest*
14494   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14495 else
14496   echo "configure: failed program was:" >&5
14497   cat conftest.$ac_ext >&5
14498   rm -rf conftest*
14499   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14500 fi
14501 rm -f conftest*
14502 else
14503   cat > conftest.$ac_ext <<EOF
14504 #line 14505 "configure"
14505 #include "confdefs.h"
14506 /* pthread test headers */
14507 #include <pthread.h>
14508 #ifndef NULL
14509 #define NULL (void*)0
14510 #endif
14511
14512 static void *task(p)
14513         void *p;
14514 {
14515         return (void *) (p == NULL);
14516 }
14517
14518
14519 int main(argc, argv)
14520         int argc;
14521         char **argv;
14522 {
14523
14524         /* pthread test function */
14525         pthread_t t;
14526         int status;
14527         int detach = 1;
14528
14529 #ifdef HAVE_PTHREADS_FINAL
14530         /* Final pthreads */
14531         pthread_attr_t attr;
14532
14533         status = pthread_attr_init(&attr);
14534         if( status ) return status;
14535
14536 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14537         if( !detach ) {
14538 #if defined( PTHREAD_CREATE_JOINABLE )
14539                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14540 #else
14541                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14542 #endif
14543
14544 #ifdef PTHREAD_CREATE_DETACHED
14545         } else {
14546                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14547 #endif
14548         }
14549         if( status ) return status;
14550 #endif
14551
14552         status = pthread_create( &t, &attr, task, NULL );
14553         if( status ) return status;
14554
14555 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14556         if( detach ) {
14557                 /* give thread a chance to complete */
14558                 /* it should remain joinable and hence detachable */
14559                 sleep( 1 );
14560
14561                 status = pthread_detach( t );
14562                 if( status ) return status;
14563         }
14564 #endif
14565
14566 #else
14567         /* Draft 4 pthreads */
14568         status = pthread_create( &t, pthread_attr_default, task, NULL );
14569         if( status ) return status;
14570
14571         if( detach ) {
14572                 /* give thread a chance to complete */
14573                 /* it should remain joinable and hence detachable */
14574                 sleep( 1 );
14575
14576                 status = pthread_detach( &t );
14577                 if( status ) return status;
14578         }
14579 #endif
14580
14581 #ifdef HAVE_LINUX_THREADS
14582         pthread_kill_other_threads_np();
14583 #endif
14584
14585         return 0;
14586
14587 }
14588
14589 EOF
14590 if { (eval echo configure:14591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14591 then
14592   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14593 else
14594   echo "configure: failed program was:" >&5
14595   cat conftest.$ac_ext >&5
14596   rm -fr conftest*
14597   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14598 fi
14599 rm -fr conftest*
14600 fi
14601
14602
14603                 # restore the LIBS
14604                 LIBS="$ol_LIBS"
14605         
14606 fi
14607
14608 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14609
14610         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14611                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14612                 ol_link_threads=posix
14613         fi
14614 fi
14615
14616                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14617 if test "$ol_link_threads" = no ; then
14618         # try -lpthreads -lmach -lexc
14619         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14620 echo "configure:14621: checking for pthread link with -lpthreads -lmach -lexc" >&5
14621 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14622   echo $ac_n "(cached) $ac_c" 1>&6
14623 else
14624   
14625                 # save the flags
14626                 ol_LIBS="$LIBS"
14627                 LIBS="-lpthreads -lmach -lexc $LIBS"
14628
14629                 if test "$cross_compiling" = yes; then
14630   cat > conftest.$ac_ext <<EOF
14631 #line 14632 "configure"
14632 #include "confdefs.h"
14633 /* pthread test headers */
14634 #include <pthread.h>
14635 #ifndef NULL
14636 #define NULL (void*)0
14637 #endif
14638
14639 static void *task(p)
14640         void *p;
14641 {
14642         return (void *) (p == NULL);
14643 }
14644
14645 int main() {
14646
14647         /* pthread test function */
14648         pthread_t t;
14649         int status;
14650         int detach = 1;
14651
14652 #ifdef HAVE_PTHREADS_FINAL
14653         /* Final pthreads */
14654         pthread_attr_t attr;
14655
14656         status = pthread_attr_init(&attr);
14657         if( status ) return status;
14658
14659 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14660         if( !detach ) {
14661 #if defined( PTHREAD_CREATE_JOINABLE )
14662                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14663 #else
14664                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14665 #endif
14666
14667 #ifdef PTHREAD_CREATE_DETACHED
14668         } else {
14669                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14670 #endif
14671         }
14672         if( status ) return status;
14673 #endif
14674
14675         status = pthread_create( &t, &attr, task, NULL );
14676         if( status ) return status;
14677
14678 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14679         if( detach ) {
14680                 /* give thread a chance to complete */
14681                 /* it should remain joinable and hence detachable */
14682                 sleep( 1 );
14683
14684                 status = pthread_detach( t );
14685                 if( status ) return status;
14686         }
14687 #endif
14688
14689 #else
14690         /* Draft 4 pthreads */
14691         status = pthread_create( &t, pthread_attr_default, task, NULL );
14692         if( status ) return status;
14693
14694         if( detach ) {
14695                 /* give thread a chance to complete */
14696                 /* it should remain joinable and hence detachable */
14697                 sleep( 1 );
14698
14699                 status = pthread_detach( &t );
14700                 if( status ) return status;
14701         }
14702 #endif
14703
14704 #ifdef HAVE_LINUX_THREADS
14705         pthread_kill_other_threads_np();
14706 #endif
14707
14708         return 0;
14709
14710 ; return 0; }
14711 EOF
14712 if { (eval echo configure:14713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14713   rm -rf conftest*
14714   ol_cv_pthread_lpthreads_lmach_lexc=yes
14715 else
14716   echo "configure: failed program was:" >&5
14717   cat conftest.$ac_ext >&5
14718   rm -rf conftest*
14719   ol_cv_pthread_lpthreads_lmach_lexc=no
14720 fi
14721 rm -f conftest*
14722 else
14723   cat > conftest.$ac_ext <<EOF
14724 #line 14725 "configure"
14725 #include "confdefs.h"
14726 /* pthread test headers */
14727 #include <pthread.h>
14728 #ifndef NULL
14729 #define NULL (void*)0
14730 #endif
14731
14732 static void *task(p)
14733         void *p;
14734 {
14735         return (void *) (p == NULL);
14736 }
14737
14738
14739 int main(argc, argv)
14740         int argc;
14741         char **argv;
14742 {
14743
14744         /* pthread test function */
14745         pthread_t t;
14746         int status;
14747         int detach = 1;
14748
14749 #ifdef HAVE_PTHREADS_FINAL
14750         /* Final pthreads */
14751         pthread_attr_t attr;
14752
14753         status = pthread_attr_init(&attr);
14754         if( status ) return status;
14755
14756 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14757         if( !detach ) {
14758 #if defined( PTHREAD_CREATE_JOINABLE )
14759                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14760 #else
14761                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14762 #endif
14763
14764 #ifdef PTHREAD_CREATE_DETACHED
14765         } else {
14766                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14767 #endif
14768         }
14769         if( status ) return status;
14770 #endif
14771
14772         status = pthread_create( &t, &attr, task, NULL );
14773         if( status ) return status;
14774
14775 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14776         if( detach ) {
14777                 /* give thread a chance to complete */
14778                 /* it should remain joinable and hence detachable */
14779                 sleep( 1 );
14780
14781                 status = pthread_detach( t );
14782                 if( status ) return status;
14783         }
14784 #endif
14785
14786 #else
14787         /* Draft 4 pthreads */
14788         status = pthread_create( &t, pthread_attr_default, task, NULL );
14789         if( status ) return status;
14790
14791         if( detach ) {
14792                 /* give thread a chance to complete */
14793                 /* it should remain joinable and hence detachable */
14794                 sleep( 1 );
14795
14796                 status = pthread_detach( &t );
14797                 if( status ) return status;
14798         }
14799 #endif
14800
14801 #ifdef HAVE_LINUX_THREADS
14802         pthread_kill_other_threads_np();
14803 #endif
14804
14805         return 0;
14806
14807 }
14808
14809 EOF
14810 if { (eval echo configure:14811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14811 then
14812   ol_cv_pthread_lpthreads_lmach_lexc=yes
14813 else
14814   echo "configure: failed program was:" >&5
14815   cat conftest.$ac_ext >&5
14816   rm -fr conftest*
14817   ol_cv_pthread_lpthreads_lmach_lexc=no
14818 fi
14819 rm -fr conftest*
14820 fi
14821
14822
14823                 # restore the LIBS
14824                 LIBS="$ol_LIBS"
14825         
14826 fi
14827
14828 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14829
14830         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14831                 ol_link_pthreads="-lpthreads -lmach -lexc"
14832                 ol_link_threads=posix
14833         fi
14834 fi
14835
14836                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14837 if test "$ol_link_threads" = no ; then
14838         # try -lpthreads -lexc
14839         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14840 echo "configure:14841: checking for pthread link with -lpthreads -lexc" >&5
14841 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14842   echo $ac_n "(cached) $ac_c" 1>&6
14843 else
14844   
14845                 # save the flags
14846                 ol_LIBS="$LIBS"
14847                 LIBS="-lpthreads -lexc $LIBS"
14848
14849                 if test "$cross_compiling" = yes; then
14850   cat > conftest.$ac_ext <<EOF
14851 #line 14852 "configure"
14852 #include "confdefs.h"
14853 /* pthread test headers */
14854 #include <pthread.h>
14855 #ifndef NULL
14856 #define NULL (void*)0
14857 #endif
14858
14859 static void *task(p)
14860         void *p;
14861 {
14862         return (void *) (p == NULL);
14863 }
14864
14865 int main() {
14866
14867         /* pthread test function */
14868         pthread_t t;
14869         int status;
14870         int detach = 1;
14871
14872 #ifdef HAVE_PTHREADS_FINAL
14873         /* Final pthreads */
14874         pthread_attr_t attr;
14875
14876         status = pthread_attr_init(&attr);
14877         if( status ) return status;
14878
14879 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14880         if( !detach ) {
14881 #if defined( PTHREAD_CREATE_JOINABLE )
14882                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14883 #else
14884                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14885 #endif
14886
14887 #ifdef PTHREAD_CREATE_DETACHED
14888         } else {
14889                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14890 #endif
14891         }
14892         if( status ) return status;
14893 #endif
14894
14895         status = pthread_create( &t, &attr, task, NULL );
14896         if( status ) return status;
14897
14898 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14899         if( detach ) {
14900                 /* give thread a chance to complete */
14901                 /* it should remain joinable and hence detachable */
14902                 sleep( 1 );
14903
14904                 status = pthread_detach( t );
14905                 if( status ) return status;
14906         }
14907 #endif
14908
14909 #else
14910         /* Draft 4 pthreads */
14911         status = pthread_create( &t, pthread_attr_default, task, NULL );
14912         if( status ) return status;
14913
14914         if( detach ) {
14915                 /* give thread a chance to complete */
14916                 /* it should remain joinable and hence detachable */
14917                 sleep( 1 );
14918
14919                 status = pthread_detach( &t );
14920                 if( status ) return status;
14921         }
14922 #endif
14923
14924 #ifdef HAVE_LINUX_THREADS
14925         pthread_kill_other_threads_np();
14926 #endif
14927
14928         return 0;
14929
14930 ; return 0; }
14931 EOF
14932 if { (eval echo configure:14933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14933   rm -rf conftest*
14934   ol_cv_pthread_lpthreads_lexc=yes
14935 else
14936   echo "configure: failed program was:" >&5
14937   cat conftest.$ac_ext >&5
14938   rm -rf conftest*
14939   ol_cv_pthread_lpthreads_lexc=no
14940 fi
14941 rm -f conftest*
14942 else
14943   cat > conftest.$ac_ext <<EOF
14944 #line 14945 "configure"
14945 #include "confdefs.h"
14946 /* pthread test headers */
14947 #include <pthread.h>
14948 #ifndef NULL
14949 #define NULL (void*)0
14950 #endif
14951
14952 static void *task(p)
14953         void *p;
14954 {
14955         return (void *) (p == NULL);
14956 }
14957
14958
14959 int main(argc, argv)
14960         int argc;
14961         char **argv;
14962 {
14963
14964         /* pthread test function */
14965         pthread_t t;
14966         int status;
14967         int detach = 1;
14968
14969 #ifdef HAVE_PTHREADS_FINAL
14970         /* Final pthreads */
14971         pthread_attr_t attr;
14972
14973         status = pthread_attr_init(&attr);
14974         if( status ) return status;
14975
14976 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14977         if( !detach ) {
14978 #if defined( PTHREAD_CREATE_JOINABLE )
14979                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14980 #else
14981                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14982 #endif
14983
14984 #ifdef PTHREAD_CREATE_DETACHED
14985         } else {
14986                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14987 #endif
14988         }
14989         if( status ) return status;
14990 #endif
14991
14992         status = pthread_create( &t, &attr, task, NULL );
14993         if( status ) return status;
14994
14995 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14996         if( detach ) {
14997                 /* give thread a chance to complete */
14998                 /* it should remain joinable and hence detachable */
14999                 sleep( 1 );
15000
15001                 status = pthread_detach( t );
15002                 if( status ) return status;
15003         }
15004 #endif
15005
15006 #else
15007         /* Draft 4 pthreads */
15008         status = pthread_create( &t, pthread_attr_default, task, NULL );
15009         if( status ) return status;
15010
15011         if( detach ) {
15012                 /* give thread a chance to complete */
15013                 /* it should remain joinable and hence detachable */
15014                 sleep( 1 );
15015
15016                 status = pthread_detach( &t );
15017                 if( status ) return status;
15018         }
15019 #endif
15020
15021 #ifdef HAVE_LINUX_THREADS
15022         pthread_kill_other_threads_np();
15023 #endif
15024
15025         return 0;
15026
15027 }
15028
15029 EOF
15030 if { (eval echo configure:15031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15031 then
15032   ol_cv_pthread_lpthreads_lexc=yes
15033 else
15034   echo "configure: failed program was:" >&5
15035   cat conftest.$ac_ext >&5
15036   rm -fr conftest*
15037   ol_cv_pthread_lpthreads_lexc=no
15038 fi
15039 rm -fr conftest*
15040 fi
15041
15042
15043                 # restore the LIBS
15044                 LIBS="$ol_LIBS"
15045         
15046 fi
15047
15048 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
15049
15050         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
15051                 ol_link_pthreads="-lpthreads -lexc"
15052                 ol_link_threads=posix
15053         fi
15054 fi
15055
15056
15057                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
15058 if test "$ol_link_threads" = no ; then
15059         # try -lpthreads
15060         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
15061 echo "configure:15062: checking for pthread link with -lpthreads" >&5
15062 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
15063   echo $ac_n "(cached) $ac_c" 1>&6
15064 else
15065   
15066                 # save the flags
15067                 ol_LIBS="$LIBS"
15068                 LIBS="-lpthreads $LIBS"
15069
15070                 if test "$cross_compiling" = yes; then
15071   cat > conftest.$ac_ext <<EOF
15072 #line 15073 "configure"
15073 #include "confdefs.h"
15074 /* pthread test headers */
15075 #include <pthread.h>
15076 #ifndef NULL
15077 #define NULL (void*)0
15078 #endif
15079
15080 static void *task(p)
15081         void *p;
15082 {
15083         return (void *) (p == NULL);
15084 }
15085
15086 int main() {
15087
15088         /* pthread test function */
15089         pthread_t t;
15090         int status;
15091         int detach = 1;
15092
15093 #ifdef HAVE_PTHREADS_FINAL
15094         /* Final pthreads */
15095         pthread_attr_t attr;
15096
15097         status = pthread_attr_init(&attr);
15098         if( status ) return status;
15099
15100 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15101         if( !detach ) {
15102 #if defined( PTHREAD_CREATE_JOINABLE )
15103                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15104 #else
15105                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15106 #endif
15107
15108 #ifdef PTHREAD_CREATE_DETACHED
15109         } else {
15110                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15111 #endif
15112         }
15113         if( status ) return status;
15114 #endif
15115
15116         status = pthread_create( &t, &attr, task, NULL );
15117         if( status ) return status;
15118
15119 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15120         if( detach ) {
15121                 /* give thread a chance to complete */
15122                 /* it should remain joinable and hence detachable */
15123                 sleep( 1 );
15124
15125                 status = pthread_detach( t );
15126                 if( status ) return status;
15127         }
15128 #endif
15129
15130 #else
15131         /* Draft 4 pthreads */
15132         status = pthread_create( &t, pthread_attr_default, task, NULL );
15133         if( status ) return status;
15134
15135         if( detach ) {
15136                 /* give thread a chance to complete */
15137                 /* it should remain joinable and hence detachable */
15138                 sleep( 1 );
15139
15140                 status = pthread_detach( &t );
15141                 if( status ) return status;
15142         }
15143 #endif
15144
15145 #ifdef HAVE_LINUX_THREADS
15146         pthread_kill_other_threads_np();
15147 #endif
15148
15149         return 0;
15150
15151 ; return 0; }
15152 EOF
15153 if { (eval echo configure:15154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15154   rm -rf conftest*
15155   ol_cv_pthread_lib_lpthreads=yes
15156 else
15157   echo "configure: failed program was:" >&5
15158   cat conftest.$ac_ext >&5
15159   rm -rf conftest*
15160   ol_cv_pthread_lib_lpthreads=no
15161 fi
15162 rm -f conftest*
15163 else
15164   cat > conftest.$ac_ext <<EOF
15165 #line 15166 "configure"
15166 #include "confdefs.h"
15167 /* pthread test headers */
15168 #include <pthread.h>
15169 #ifndef NULL
15170 #define NULL (void*)0
15171 #endif
15172
15173 static void *task(p)
15174         void *p;
15175 {
15176         return (void *) (p == NULL);
15177 }
15178
15179
15180 int main(argc, argv)
15181         int argc;
15182         char **argv;
15183 {
15184
15185         /* pthread test function */
15186         pthread_t t;
15187         int status;
15188         int detach = 1;
15189
15190 #ifdef HAVE_PTHREADS_FINAL
15191         /* Final pthreads */
15192         pthread_attr_t attr;
15193
15194         status = pthread_attr_init(&attr);
15195         if( status ) return status;
15196
15197 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15198         if( !detach ) {
15199 #if defined( PTHREAD_CREATE_JOINABLE )
15200                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15201 #else
15202                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15203 #endif
15204
15205 #ifdef PTHREAD_CREATE_DETACHED
15206         } else {
15207                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15208 #endif
15209         }
15210         if( status ) return status;
15211 #endif
15212
15213         status = pthread_create( &t, &attr, task, NULL );
15214         if( status ) return status;
15215
15216 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15217         if( detach ) {
15218                 /* give thread a chance to complete */
15219                 /* it should remain joinable and hence detachable */
15220                 sleep( 1 );
15221
15222                 status = pthread_detach( t );
15223                 if( status ) return status;
15224         }
15225 #endif
15226
15227 #else
15228         /* Draft 4 pthreads */
15229         status = pthread_create( &t, pthread_attr_default, task, NULL );
15230         if( status ) return status;
15231
15232         if( detach ) {
15233                 /* give thread a chance to complete */
15234                 /* it should remain joinable and hence detachable */
15235                 sleep( 1 );
15236
15237                 status = pthread_detach( &t );
15238                 if( status ) return status;
15239         }
15240 #endif
15241
15242 #ifdef HAVE_LINUX_THREADS
15243         pthread_kill_other_threads_np();
15244 #endif
15245
15246         return 0;
15247
15248 }
15249
15250 EOF
15251 if { (eval echo configure:15252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15252 then
15253   ol_cv_pthread_lib_lpthreads=yes
15254 else
15255   echo "configure: failed program was:" >&5
15256   cat conftest.$ac_ext >&5
15257   rm -fr conftest*
15258   ol_cv_pthread_lib_lpthreads=no
15259 fi
15260 rm -fr conftest*
15261 fi
15262
15263
15264                 # restore the LIBS
15265                 LIBS="$ol_LIBS"
15266         
15267 fi
15268
15269 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
15270
15271         if test $ol_cv_pthread_lib_lpthreads = yes ; then
15272                 ol_link_pthreads="-lpthreads"
15273                 ol_link_threads=posix
15274         fi
15275 fi
15276
15277
15278                 if test $ol_link_threads != no ; then
15279                         cat >> confdefs.h <<\EOF
15280 #define HAVE_PTHREADS 1
15281 EOF
15282
15283
15284                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
15285
15286                                                 save_CPPFLAGS="$CPPFLAGS"
15287                         save_LIBS="$LIBS"
15288                         LIBS="$LTHREAD_LIBS $LIBS"
15289
15290                                                                                                 for ac_func in sched_yield pthread_yield
15291 do
15292 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15293 echo "configure:15294: checking for $ac_func" >&5
15294 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15295   echo $ac_n "(cached) $ac_c" 1>&6
15296 else
15297   cat > conftest.$ac_ext <<EOF
15298 #line 15299 "configure"
15299 #include "confdefs.h"
15300 /* System header to define __stub macros and hopefully few prototypes,
15301     which can conflict with char $ac_func(); below.  */
15302 #include <assert.h>
15303 /* Override any gcc2 internal prototype to avoid an error.  */
15304 /* We use char because int might match the return type of a gcc2
15305     builtin and then its argument prototype would still apply.  */
15306 char $ac_func();
15307 char (*f)();
15308
15309 int main() {
15310
15311 /* The GNU C library defines this for functions which it implements
15312     to always fail with ENOSYS.  Some functions are actually named
15313     something starting with __ and the normal name is an alias.  */
15314 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15315 choke me
15316 #else
15317 f = $ac_func;
15318 #endif
15319
15320 ; return 0; }
15321 EOF
15322 if { (eval echo configure:15323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15323   rm -rf conftest*
15324   eval "ac_cv_func_$ac_func=yes"
15325 else
15326   echo "configure: failed program was:" >&5
15327   cat conftest.$ac_ext >&5
15328   rm -rf conftest*
15329   eval "ac_cv_func_$ac_func=no"
15330 fi
15331 rm -f conftest*
15332 fi
15333
15334 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15335   echo "$ac_t""yes" 1>&6
15336     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15337   cat >> confdefs.h <<EOF
15338 #define $ac_tr_func 1
15339 EOF
15340  
15341 else
15342   echo "$ac_t""no" 1>&6
15343 fi
15344 done
15345
15346
15347                         if test $ac_cv_func_sched_yield = no -a \
15348                                 $ac_cv_func_pthread_yield = no ; then
15349                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
15350 echo "configure:15351: checking for sched_yield in -lrt" >&5
15351 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
15352 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15353   echo $ac_n "(cached) $ac_c" 1>&6
15354 else
15355   ac_save_LIBS="$LIBS"
15356 LIBS="-lrt  $LIBS"
15357 cat > conftest.$ac_ext <<EOF
15358 #line 15359 "configure"
15359 #include "confdefs.h"
15360 /* Override any gcc2 internal prototype to avoid an error.  */
15361 /* We use char because int might match the return type of a gcc2
15362     builtin and then its argument prototype would still apply.  */
15363 char sched_yield();
15364
15365 int main() {
15366 sched_yield()
15367 ; return 0; }
15368 EOF
15369 if { (eval echo configure:15370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15370   rm -rf conftest*
15371   eval "ac_cv_lib_$ac_lib_var=yes"
15372 else
15373   echo "configure: failed program was:" >&5
15374   cat conftest.$ac_ext >&5
15375   rm -rf conftest*
15376   eval "ac_cv_lib_$ac_lib_var=no"
15377 fi
15378 rm -f conftest*
15379 LIBS="$ac_save_LIBS"
15380
15381 fi
15382 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15383   echo "$ac_t""yes" 1>&6
15384   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
15385                                         cat >> confdefs.h <<\EOF
15386 #define HAVE_SCHED_YIELD 1
15387 EOF
15388
15389                                         ac_cv_func_sched_yield=yes
15390 else
15391   echo "$ac_t""no" 1>&6
15392 ac_cv_func_sched_yield=no
15393 fi
15394
15395                         fi
15396                         if test $ac_cv_func_sched_yield = no -a \
15397                                 $ac_cv_func_pthread_yield = no ; then
15398                                                                                                 for ac_func in thr_yield
15399 do
15400 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15401 echo "configure:15402: checking for $ac_func" >&5
15402 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15403   echo $ac_n "(cached) $ac_c" 1>&6
15404 else
15405   cat > conftest.$ac_ext <<EOF
15406 #line 15407 "configure"
15407 #include "confdefs.h"
15408 /* System header to define __stub macros and hopefully few prototypes,
15409     which can conflict with char $ac_func(); below.  */
15410 #include <assert.h>
15411 /* Override any gcc2 internal prototype to avoid an error.  */
15412 /* We use char because int might match the return type of a gcc2
15413     builtin and then its argument prototype would still apply.  */
15414 char $ac_func();
15415 char (*f)();
15416
15417 int main() {
15418
15419 /* The GNU C library defines this for functions which it implements
15420     to always fail with ENOSYS.  Some functions are actually named
15421     something starting with __ and the normal name is an alias.  */
15422 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15423 choke me
15424 #else
15425 f = $ac_func;
15426 #endif
15427
15428 ; return 0; }
15429 EOF
15430 if { (eval echo configure:15431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15431   rm -rf conftest*
15432   eval "ac_cv_func_$ac_func=yes"
15433 else
15434   echo "configure: failed program was:" >&5
15435   cat conftest.$ac_ext >&5
15436   rm -rf conftest*
15437   eval "ac_cv_func_$ac_func=no"
15438 fi
15439 rm -f conftest*
15440 fi
15441
15442 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15443   echo "$ac_t""yes" 1>&6
15444     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15445   cat >> confdefs.h <<EOF
15446 #define $ac_tr_func 1
15447 EOF
15448  
15449 else
15450   echo "$ac_t""no" 1>&6
15451 fi
15452 done
15453
15454                         fi
15455                         if test $ac_cv_func_sched_yield = no -a \
15456                                 $ac_cv_func_pthread_yield = no -a \
15457                                 "$ac_cv_func_thr_yield" = no ; then
15458                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
15459                         fi
15460
15461                                                 for ac_func in pthread_kill pthread_rwlock_destroy
15462 do
15463 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15464 echo "configure:15465: checking for $ac_func" >&5
15465 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15466   echo $ac_n "(cached) $ac_c" 1>&6
15467 else
15468   cat > conftest.$ac_ext <<EOF
15469 #line 15470 "configure"
15470 #include "confdefs.h"
15471 /* System header to define __stub macros and hopefully few prototypes,
15472     which can conflict with char $ac_func(); below.  */
15473 #include <assert.h>
15474 /* Override any gcc2 internal prototype to avoid an error.  */
15475 /* We use char because int might match the return type of a gcc2
15476     builtin and then its argument prototype would still apply.  */
15477 char $ac_func();
15478 char (*f)();
15479
15480 int main() {
15481
15482 /* The GNU C library defines this for functions which it implements
15483     to always fail with ENOSYS.  Some functions are actually named
15484     something starting with __ and the normal name is an alias.  */
15485 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15486 choke me
15487 #else
15488 f = $ac_func;
15489 #endif
15490
15491 ; return 0; }
15492 EOF
15493 if { (eval echo configure:15494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15494   rm -rf conftest*
15495   eval "ac_cv_func_$ac_func=yes"
15496 else
15497   echo "configure: failed program was:" >&5
15498   cat conftest.$ac_ext >&5
15499   rm -rf conftest*
15500   eval "ac_cv_func_$ac_func=no"
15501 fi
15502 rm -f conftest*
15503 fi
15504
15505 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15506   echo "$ac_t""yes" 1>&6
15507     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15508   cat >> confdefs.h <<EOF
15509 #define $ac_tr_func 1
15510 EOF
15511  
15512 else
15513   echo "$ac_t""no" 1>&6
15514 fi
15515 done
15516
15517
15518                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
15519 echo "configure:15520: checking for pthread_detach with <pthread.h>" >&5
15520 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
15521   echo $ac_n "(cached) $ac_c" 1>&6
15522 else
15523   
15524                                                                 cat > conftest.$ac_ext <<EOF
15525 #line 15526 "configure"
15526 #include "confdefs.h"
15527
15528 #include <pthread.h>
15529 #ifndef NULL
15530 #define NULL (void*)0
15531 #endif
15532
15533 int main() {
15534 pthread_detach(NULL);
15535 ; return 0; }
15536 EOF
15537 if { (eval echo configure:15538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15538   rm -rf conftest*
15539   ol_cv_func_pthread_detach=yes
15540 else
15541   echo "configure: failed program was:" >&5
15542   cat conftest.$ac_ext >&5
15543   rm -rf conftest*
15544   ol_cv_func_pthread_detach=no
15545 fi
15546 rm -f conftest*
15547                         
15548 fi
15549
15550 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15551
15552                         if test $ol_cv_func_pthread_detach = no ; then
15553                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15554                         fi
15555
15556                         cat >> confdefs.h <<\EOF
15557 #define HAVE_PTHREAD_DETACH 1
15558 EOF
15559
15560
15561                                                 for ac_func in \
15562                                 pthread_setconcurrency \
15563                                 pthread_getconcurrency \
15564                                 thr_setconcurrency \
15565                                 thr_getconcurrency \
15566                         
15567 do
15568 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15569 echo "configure:15570: checking for $ac_func" >&5
15570 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15571   echo $ac_n "(cached) $ac_c" 1>&6
15572 else
15573   cat > conftest.$ac_ext <<EOF
15574 #line 15575 "configure"
15575 #include "confdefs.h"
15576 /* System header to define __stub macros and hopefully few prototypes,
15577     which can conflict with char $ac_func(); below.  */
15578 #include <assert.h>
15579 /* Override any gcc2 internal prototype to avoid an error.  */
15580 /* We use char because int might match the return type of a gcc2
15581     builtin and then its argument prototype would still apply.  */
15582 char $ac_func();
15583 char (*f)();
15584
15585 int main() {
15586
15587 /* The GNU C library defines this for functions which it implements
15588     to always fail with ENOSYS.  Some functions are actually named
15589     something starting with __ and the normal name is an alias.  */
15590 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15591 choke me
15592 #else
15593 f = $ac_func;
15594 #endif
15595
15596 ; return 0; }
15597 EOF
15598 if { (eval echo configure:15599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15599   rm -rf conftest*
15600   eval "ac_cv_func_$ac_func=yes"
15601 else
15602   echo "configure: failed program was:" >&5
15603   cat conftest.$ac_ext >&5
15604   rm -rf conftest*
15605   eval "ac_cv_func_$ac_func=no"
15606 fi
15607 rm -f conftest*
15608 fi
15609
15610 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15611   echo "$ac_t""yes" 1>&6
15612     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15613   cat >> confdefs.h <<EOF
15614 #define $ac_tr_func 1
15615 EOF
15616  
15617 else
15618   echo "$ac_t""no" 1>&6
15619 fi
15620 done
15621
15622
15623                         
15624         for ac_func in pthread_kill_other_threads_np
15625 do
15626 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15627 echo "configure:15628: checking for $ac_func" >&5
15628 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15629   echo $ac_n "(cached) $ac_c" 1>&6
15630 else
15631   cat > conftest.$ac_ext <<EOF
15632 #line 15633 "configure"
15633 #include "confdefs.h"
15634 /* System header to define __stub macros and hopefully few prototypes,
15635     which can conflict with char $ac_func(); below.  */
15636 #include <assert.h>
15637 /* Override any gcc2 internal prototype to avoid an error.  */
15638 /* We use char because int might match the return type of a gcc2
15639     builtin and then its argument prototype would still apply.  */
15640 char $ac_func();
15641 char (*f)();
15642
15643 int main() {
15644
15645 /* The GNU C library defines this for functions which it implements
15646     to always fail with ENOSYS.  Some functions are actually named
15647     something starting with __ and the normal name is an alias.  */
15648 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15649 choke me
15650 #else
15651 f = $ac_func;
15652 #endif
15653
15654 ; return 0; }
15655 EOF
15656 if { (eval echo configure:15657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15657   rm -rf conftest*
15658   eval "ac_cv_func_$ac_func=yes"
15659 else
15660   echo "configure: failed program was:" >&5
15661   cat conftest.$ac_ext >&5
15662   rm -rf conftest*
15663   eval "ac_cv_func_$ac_func=no"
15664 fi
15665 rm -f conftest*
15666 fi
15667
15668 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15669   echo "$ac_t""yes" 1>&6
15670     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15671   cat >> confdefs.h <<EOF
15672 #define $ac_tr_func 1
15673 EOF
15674  
15675 else
15676   echo "$ac_t""no" 1>&6
15677 fi
15678 done
15679
15680         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15681 echo "configure:15682: checking for LinuxThreads implementation" >&5
15682 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15683   echo $ac_n "(cached) $ac_c" 1>&6
15684 else
15685   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15686 fi
15687
15688 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15689
15690                         
15691         
15692         
15693         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15694 echo "configure:15695: checking for LinuxThreads consistency" >&5
15695 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15696   echo $ac_n "(cached) $ac_c" 1>&6
15697 else
15698   
15699                 if test $ol_cv_header_linux_threads = yes -a \
15700                         $ol_cv_sys_linux_threads = yes; then
15701                         ol_cv_linux_threads=yes
15702                 elif test $ol_cv_header_linux_threads = no -a \
15703                         $ol_cv_sys_linux_threads = no; then
15704                         ol_cv_linux_threads=no
15705                 else
15706                         ol_cv_linux_threads=error
15707                 fi
15708         
15709 fi
15710
15711 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15712
15713
15714                         if test $ol_cv_linux_threads = error; then
15715                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15716                         fi
15717
15718                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15719 echo "configure:15720: checking if pthread_create() works" >&5
15720 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15721   echo $ac_n "(cached) $ac_c" 1>&6
15722 else
15723   
15724                         if test "$cross_compiling" = yes; then
15725                                 ol_cv_pthread_create_works=yes
15726 else
15727   cat > conftest.$ac_ext <<EOF
15728 #line 15729 "configure"
15729 #include "confdefs.h"
15730 /* pthread test headers */
15731 #include <pthread.h>
15732 #ifndef NULL
15733 #define NULL (void*)0
15734 #endif
15735
15736 static void *task(p)
15737         void *p;
15738 {
15739         return (void *) (p == NULL);
15740 }
15741
15742
15743 int main(argc, argv)
15744         int argc;
15745         char **argv;
15746 {
15747
15748         /* pthread test function */
15749         pthread_t t;
15750         int status;
15751         int detach = 1;
15752
15753 #ifdef HAVE_PTHREADS_FINAL
15754         /* Final pthreads */
15755         pthread_attr_t attr;
15756
15757         status = pthread_attr_init(&attr);
15758         if( status ) return status;
15759
15760 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15761         if( !detach ) {
15762 #if defined( PTHREAD_CREATE_JOINABLE )
15763                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15764 #else
15765                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15766 #endif
15767
15768 #ifdef PTHREAD_CREATE_DETACHED
15769         } else {
15770                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15771 #endif
15772         }
15773         if( status ) return status;
15774 #endif
15775
15776         status = pthread_create( &t, &attr, task, NULL );
15777         if( status ) return status;
15778
15779 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15780         if( detach ) {
15781                 /* give thread a chance to complete */
15782                 /* it should remain joinable and hence detachable */
15783                 sleep( 1 );
15784
15785                 status = pthread_detach( t );
15786                 if( status ) return status;
15787         }
15788 #endif
15789
15790 #else
15791         /* Draft 4 pthreads */
15792         status = pthread_create( &t, pthread_attr_default, task, NULL );
15793         if( status ) return status;
15794
15795         if( detach ) {
15796                 /* give thread a chance to complete */
15797                 /* it should remain joinable and hence detachable */
15798                 sleep( 1 );
15799
15800                 status = pthread_detach( &t );
15801                 if( status ) return status;
15802         }
15803 #endif
15804
15805 #ifdef HAVE_LINUX_THREADS
15806         pthread_kill_other_threads_np();
15807 #endif
15808
15809         return 0;
15810
15811 }
15812
15813 EOF
15814 if { (eval echo configure:15815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15815 then
15816   ol_cv_pthread_create_works=yes
15817 else
15818   echo "configure: failed program was:" >&5
15819   cat conftest.$ac_ext >&5
15820   rm -fr conftest*
15821   ol_cv_pthread_create_works=no
15822 fi
15823 rm -fr conftest*
15824 fi
15825
15826 fi
15827
15828 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15829
15830                         if test $ol_cv_pthread_create_works = no ; then
15831                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15832                         fi
15833
15834                                                 if test $ol_with_yielding_select = auto ; then
15835                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15836 echo "configure:15837: checking if select yields when using pthreads" >&5
15837 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15838   echo $ac_n "(cached) $ac_c" 1>&6
15839 else
15840   
15841                                 if test "$cross_compiling" = yes; then
15842   ol_cv_pthread_select_yields=cross
15843 else
15844   cat > conftest.$ac_ext <<EOF
15845 #line 15846 "configure"
15846 #include "confdefs.h"
15847
15848 #include <sys/types.h>
15849 #include <sys/time.h>
15850 #include <unistd.h>
15851 #include <pthread.h>
15852 #ifndef NULL
15853 #define NULL (void*) 0
15854 #endif
15855
15856 static int fildes[2];
15857
15858 static void *task(p)
15859         void *p;
15860 {
15861         int i;
15862         struct timeval tv;
15863
15864         fd_set rfds;
15865
15866         tv.tv_sec=10;
15867         tv.tv_usec=0;
15868
15869         FD_ZERO(&rfds);
15870         FD_SET(fildes[0], &rfds);
15871
15872         /* we're not interested in any fds */
15873         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15874
15875         if(i < 0) {
15876                 perror("select");
15877                 exit(10);
15878         }
15879
15880         exit(0); /* if we exit here, the select blocked the whole process */
15881 }
15882
15883 int main(argc, argv)
15884         int argc;
15885         char **argv;
15886 {
15887         pthread_t t;
15888
15889         /* create a pipe to select */
15890         if(pipe(&fildes[0])) {
15891                 perror("select");
15892                 exit(1);
15893         }
15894
15895 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15896         (void) pthread_setconcurrency(2);
15897 #else
15898 #ifdef HAVE_THR_SETCONCURRENCY
15899         /* Set Solaris LWP concurrency to 2 */
15900         thr_setconcurrency(2);
15901 #endif
15902 #endif
15903
15904 #if HAVE_PTHREADS_D4
15905         pthread_create(&t, pthread_attr_default, task, NULL);
15906 #else
15907         pthread_create(&t, NULL, task, NULL);
15908 #endif
15909
15910 #if HAVE_SCHED_YIELD
15911         sched_yield();  /* make sure task runs first */
15912 #else
15913 #ifdef HAVE_PTHREAD_YIELD
15914         pthread_yield();        /* make sure task runs first */
15915 #endif
15916 #endif
15917
15918         exit(2);
15919 }
15920 EOF
15921 if { (eval echo configure:15922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15922 then
15923   ol_cv_pthread_select_yields=no
15924 else
15925   echo "configure: failed program was:" >&5
15926   cat conftest.$ac_ext >&5
15927   rm -fr conftest*
15928   ol_cv_pthread_select_yields=yes
15929 fi
15930 rm -fr conftest*
15931 fi
15932
15933 fi
15934
15935 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15936
15937                                 if test $ol_cv_pthread_select_yields = cross ; then
15938                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15939                                 fi
15940
15941                                 if test $ol_cv_pthread_select_yields = yes ; then
15942                                         ol_with_yielding_select=yes
15943                                 fi
15944                         fi
15945
15946                                                 CPPFLAGS="$save_CPPFLAGS"
15947                         LIBS="$save_LIBS"
15948                 else
15949                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15950                 fi
15951         fi
15952
15953         if test $ol_with_threads = posix ; then
15954                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15955         fi
15956 fi
15957
15958 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15959         -o $ol_with_threads = mach ; then
15960
15961                 for ac_hdr in mach/cthreads.h cthreads.h
15962 do
15963 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15964 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15965 echo "configure:15966: checking for $ac_hdr" >&5
15966 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15967   echo $ac_n "(cached) $ac_c" 1>&6
15968 else
15969   cat > conftest.$ac_ext <<EOF
15970 #line 15971 "configure"
15971 #include "confdefs.h"
15972 #include <$ac_hdr>
15973 EOF
15974 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15975 { (eval echo configure:15976: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15976 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15977 if test -z "$ac_err"; then
15978   rm -rf conftest*
15979   eval "ac_cv_header_$ac_safe=yes"
15980 else
15981   echo "$ac_err" >&5
15982   echo "configure: failed program was:" >&5
15983   cat conftest.$ac_ext >&5
15984   rm -rf conftest*
15985   eval "ac_cv_header_$ac_safe=no"
15986 fi
15987 rm -f conftest*
15988 fi
15989 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15990   echo "$ac_t""yes" 1>&6
15991     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15992   cat >> confdefs.h <<EOF
15993 #define $ac_tr_hdr 1
15994 EOF
15995  
15996 else
15997   echo "$ac_t""no" 1>&6
15998 fi
15999 done
16000
16001         if test $ac_cv_header_mach_cthreads_h = yes ; then
16002                 ol_with_threads=found
16003
16004                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
16005 echo "configure:16006: checking for cthread_fork" >&5
16006 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
16007   echo $ac_n "(cached) $ac_c" 1>&6
16008 else
16009   cat > conftest.$ac_ext <<EOF
16010 #line 16011 "configure"
16011 #include "confdefs.h"
16012 /* System header to define __stub macros and hopefully few prototypes,
16013     which can conflict with char cthread_fork(); below.  */
16014 #include <assert.h>
16015 /* Override any gcc2 internal prototype to avoid an error.  */
16016 /* We use char because int might match the return type of a gcc2
16017     builtin and then its argument prototype would still apply.  */
16018 char cthread_fork();
16019 char (*f)();
16020
16021 int main() {
16022
16023 /* The GNU C library defines this for functions which it implements
16024     to always fail with ENOSYS.  Some functions are actually named
16025     something starting with __ and the normal name is an alias.  */
16026 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
16027 choke me
16028 #else
16029 f = cthread_fork;
16030 #endif
16031
16032 ; return 0; }
16033 EOF
16034 if { (eval echo configure:16035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16035   rm -rf conftest*
16036   eval "ac_cv_func_cthread_fork=yes"
16037 else
16038   echo "configure: failed program was:" >&5
16039   cat conftest.$ac_ext >&5
16040   rm -rf conftest*
16041   eval "ac_cv_func_cthread_fork=no"
16042 fi
16043 rm -f conftest*
16044 fi
16045
16046 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
16047   echo "$ac_t""yes" 1>&6
16048   ol_link_threads=yes
16049 else
16050   echo "$ac_t""no" 1>&6
16051 fi
16052
16053
16054                 if test $ol_link_threads = no ; then
16055                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
16056 echo "configure:16057: checking for cthread_fork with -all_load" >&5
16057 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
16058   echo $ac_n "(cached) $ac_c" 1>&6
16059 else
16060   
16061                                                                 save_LIBS="$LIBS"
16062                                 LIBS="-all_load $LIBS"
16063                                 cat > conftest.$ac_ext <<EOF
16064 #line 16065 "configure"
16065 #include "confdefs.h"
16066 #include <mach/cthreads.h>
16067 int main() {
16068
16069                                         cthread_fork((void *)0, (void *)0);
16070                                         
16071 ; return 0; }
16072 EOF
16073 if { (eval echo configure:16074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16074   rm -rf conftest*
16075   ol_cv_cthread_all_load=yes
16076 else
16077   echo "configure: failed program was:" >&5
16078   cat conftest.$ac_ext >&5
16079   rm -rf conftest*
16080   ol_cv_cthread_all_load=no
16081 fi
16082 rm -f conftest*
16083                                                                 LIBS="$save_LIBS"
16084                         
16085 fi
16086
16087 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
16088
16089                         if test $ol_cv_cthread_all_load = yes ; then
16090                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
16091                                 ol_link_threads=mach
16092                                 ol_with_threads=found
16093                         fi
16094                 fi
16095
16096         elif test $ac_cv_header_cthreads_h = yes ; then
16097                                 
16098                 ol_with_threads=found
16099  
16100                                 save_LIBS="$LIBS"
16101                 LIBS="$LIBS -lthreads"
16102                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
16103 echo "configure:16104: checking for cthread_fork" >&5
16104 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
16105   echo $ac_n "(cached) $ac_c" 1>&6
16106 else
16107   cat > conftest.$ac_ext <<EOF
16108 #line 16109 "configure"
16109 #include "confdefs.h"
16110 /* System header to define __stub macros and hopefully few prototypes,
16111     which can conflict with char cthread_fork(); below.  */
16112 #include <assert.h>
16113 /* Override any gcc2 internal prototype to avoid an error.  */
16114 /* We use char because int might match the return type of a gcc2
16115     builtin and then its argument prototype would still apply.  */
16116 char cthread_fork();
16117 char (*f)();
16118
16119 int main() {
16120
16121 /* The GNU C library defines this for functions which it implements
16122     to always fail with ENOSYS.  Some functions are actually named
16123     something starting with __ and the normal name is an alias.  */
16124 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
16125 choke me
16126 #else
16127 f = cthread_fork;
16128 #endif
16129
16130 ; return 0; }
16131 EOF
16132 if { (eval echo configure:16133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16133   rm -rf conftest*
16134   eval "ac_cv_func_cthread_fork=yes"
16135 else
16136   echo "configure: failed program was:" >&5
16137   cat conftest.$ac_ext >&5
16138   rm -rf conftest*
16139   eval "ac_cv_func_cthread_fork=no"
16140 fi
16141 rm -f conftest*
16142 fi
16143
16144 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
16145   echo "$ac_t""yes" 1>&6
16146   ol_link_threads=yes
16147 else
16148   echo "$ac_t""no" 1>&6
16149 fi
16150
16151                 LIBS="$save_LIBS"
16152
16153                 if test $ol_link_threads = yes ; then
16154                         LTHREAD_LIBS="-lthreads"
16155                         ol_link_threads=mach
16156                         ol_with_threads=found
16157                 else
16158                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
16159                 fi
16160
16161         elif test $ol_with_threads = mach ; then
16162                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
16163         fi
16164
16165         if test $ol_link_threads = mach ; then
16166                 cat >> confdefs.h <<\EOF
16167 #define HAVE_MACH_CTHREADS 1
16168 EOF
16169
16170         elif test $ol_with_threads = found ; then
16171                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
16172         fi
16173 fi
16174
16175 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16176         -o $ol_with_threads = pth ; then
16177
16178         for ac_hdr in pth.h
16179 do
16180 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16181 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16182 echo "configure:16183: checking for $ac_hdr" >&5
16183 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16184   echo $ac_n "(cached) $ac_c" 1>&6
16185 else
16186   cat > conftest.$ac_ext <<EOF
16187 #line 16188 "configure"
16188 #include "confdefs.h"
16189 #include <$ac_hdr>
16190 EOF
16191 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16192 { (eval echo configure:16193: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16193 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16194 if test -z "$ac_err"; then
16195   rm -rf conftest*
16196   eval "ac_cv_header_$ac_safe=yes"
16197 else
16198   echo "$ac_err" >&5
16199   echo "configure: failed program was:" >&5
16200   cat conftest.$ac_ext >&5
16201   rm -rf conftest*
16202   eval "ac_cv_header_$ac_safe=no"
16203 fi
16204 rm -f conftest*
16205 fi
16206 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16207   echo "$ac_t""yes" 1>&6
16208     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16209   cat >> confdefs.h <<EOF
16210 #define $ac_tr_hdr 1
16211 EOF
16212  
16213 else
16214   echo "$ac_t""no" 1>&6
16215 fi
16216 done
16217
16218
16219         if test $ac_cv_header_pth_h = yes ; then
16220                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
16221 echo "configure:16222: checking for pth_version in -lpth" >&5
16222 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
16223 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16224   echo $ac_n "(cached) $ac_c" 1>&6
16225 else
16226   ac_save_LIBS="$LIBS"
16227 LIBS="-lpth  $LIBS"
16228 cat > conftest.$ac_ext <<EOF
16229 #line 16230 "configure"
16230 #include "confdefs.h"
16231 /* Override any gcc2 internal prototype to avoid an error.  */
16232 /* We use char because int might match the return type of a gcc2
16233     builtin and then its argument prototype would still apply.  */
16234 char pth_version();
16235
16236 int main() {
16237 pth_version()
16238 ; return 0; }
16239 EOF
16240 if { (eval echo configure:16241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16241   rm -rf conftest*
16242   eval "ac_cv_lib_$ac_lib_var=yes"
16243 else
16244   echo "configure: failed program was:" >&5
16245   cat conftest.$ac_ext >&5
16246   rm -rf conftest*
16247   eval "ac_cv_lib_$ac_lib_var=no"
16248 fi
16249 rm -f conftest*
16250 LIBS="$ac_save_LIBS"
16251
16252 fi
16253 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16254   echo "$ac_t""yes" 1>&6
16255   have_pth=yes
16256 else
16257   echo "$ac_t""no" 1>&6
16258 have_pth=no
16259 fi
16260
16261
16262                 if test $have_pth = yes ; then
16263                         cat >> confdefs.h <<\EOF
16264 #define HAVE_GNU_PTH 1
16265 EOF
16266
16267                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
16268                         ol_link_threads=pth
16269                         ol_with_threads=found
16270
16271                         if test $ol_with_yielding_select = auto ; then
16272                                 ol_with_yielding_select=yes
16273                         fi
16274                 fi
16275         fi
16276 fi
16277
16278 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16279         -o $ol_with_threads = lwp ; then
16280
16281                 for ac_hdr in thread.h synch.h
16282 do
16283 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16284 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16285 echo "configure:16286: checking for $ac_hdr" >&5
16286 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16287   echo $ac_n "(cached) $ac_c" 1>&6
16288 else
16289   cat > conftest.$ac_ext <<EOF
16290 #line 16291 "configure"
16291 #include "confdefs.h"
16292 #include <$ac_hdr>
16293 EOF
16294 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16295 { (eval echo configure:16296: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16296 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16297 if test -z "$ac_err"; then
16298   rm -rf conftest*
16299   eval "ac_cv_header_$ac_safe=yes"
16300 else
16301   echo "$ac_err" >&5
16302   echo "configure: failed program was:" >&5
16303   cat conftest.$ac_ext >&5
16304   rm -rf conftest*
16305   eval "ac_cv_header_$ac_safe=no"
16306 fi
16307 rm -f conftest*
16308 fi
16309 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16310   echo "$ac_t""yes" 1>&6
16311     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16312   cat >> confdefs.h <<EOF
16313 #define $ac_tr_hdr 1
16314 EOF
16315  
16316 else
16317   echo "$ac_t""no" 1>&6
16318 fi
16319 done
16320
16321         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
16322                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
16323 echo "configure:16324: checking for thr_create in -lthread" >&5
16324 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
16325 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16326   echo $ac_n "(cached) $ac_c" 1>&6
16327 else
16328   ac_save_LIBS="$LIBS"
16329 LIBS="-lthread  $LIBS"
16330 cat > conftest.$ac_ext <<EOF
16331 #line 16332 "configure"
16332 #include "confdefs.h"
16333 /* Override any gcc2 internal prototype to avoid an error.  */
16334 /* We use char because int might match the return type of a gcc2
16335     builtin and then its argument prototype would still apply.  */
16336 char thr_create();
16337
16338 int main() {
16339 thr_create()
16340 ; return 0; }
16341 EOF
16342 if { (eval echo configure:16343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16343   rm -rf conftest*
16344   eval "ac_cv_lib_$ac_lib_var=yes"
16345 else
16346   echo "configure: failed program was:" >&5
16347   cat conftest.$ac_ext >&5
16348   rm -rf conftest*
16349   eval "ac_cv_lib_$ac_lib_var=no"
16350 fi
16351 rm -f conftest*
16352 LIBS="$ac_save_LIBS"
16353
16354 fi
16355 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16356   echo "$ac_t""yes" 1>&6
16357   have_thr=yes
16358 else
16359   echo "$ac_t""no" 1>&6
16360 have_thr=no
16361 fi
16362
16363
16364                 if test $have_thr = yes ; then
16365                         cat >> confdefs.h <<\EOF
16366 #define HAVE_THR 1
16367 EOF
16368
16369                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
16370                         ol_link_threads=thr
16371
16372                         if test $ol_with_yielding_select = auto ; then
16373                                 ol_with_yielding_select=yes
16374                         fi
16375
16376                                                 for ac_func in \
16377                                 thr_setconcurrency \
16378                                 thr_getconcurrency \
16379                         
16380 do
16381 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16382 echo "configure:16383: checking for $ac_func" >&5
16383 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16384   echo $ac_n "(cached) $ac_c" 1>&6
16385 else
16386   cat > conftest.$ac_ext <<EOF
16387 #line 16388 "configure"
16388 #include "confdefs.h"
16389 /* System header to define __stub macros and hopefully few prototypes,
16390     which can conflict with char $ac_func(); below.  */
16391 #include <assert.h>
16392 /* Override any gcc2 internal prototype to avoid an error.  */
16393 /* We use char because int might match the return type of a gcc2
16394     builtin and then its argument prototype would still apply.  */
16395 char $ac_func();
16396 char (*f)();
16397
16398 int main() {
16399
16400 /* The GNU C library defines this for functions which it implements
16401     to always fail with ENOSYS.  Some functions are actually named
16402     something starting with __ and the normal name is an alias.  */
16403 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16404 choke me
16405 #else
16406 f = $ac_func;
16407 #endif
16408
16409 ; return 0; }
16410 EOF
16411 if { (eval echo configure:16412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16412   rm -rf conftest*
16413   eval "ac_cv_func_$ac_func=yes"
16414 else
16415   echo "configure: failed program was:" >&5
16416   cat conftest.$ac_ext >&5
16417   rm -rf conftest*
16418   eval "ac_cv_func_$ac_func=no"
16419 fi
16420 rm -f conftest*
16421 fi
16422
16423 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16424   echo "$ac_t""yes" 1>&6
16425     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16426   cat >> confdefs.h <<EOF
16427 #define $ac_tr_func 1
16428 EOF
16429  
16430 else
16431   echo "$ac_t""no" 1>&6
16432 fi
16433 done
16434
16435                 fi
16436         fi
16437
16438                 for ac_hdr in lwp/lwp.h
16439 do
16440 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16441 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16442 echo "configure:16443: checking for $ac_hdr" >&5
16443 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16444   echo $ac_n "(cached) $ac_c" 1>&6
16445 else
16446   cat > conftest.$ac_ext <<EOF
16447 #line 16448 "configure"
16448 #include "confdefs.h"
16449 #include <$ac_hdr>
16450 EOF
16451 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16452 { (eval echo configure:16453: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16453 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16454 if test -z "$ac_err"; then
16455   rm -rf conftest*
16456   eval "ac_cv_header_$ac_safe=yes"
16457 else
16458   echo "$ac_err" >&5
16459   echo "configure: failed program was:" >&5
16460   cat conftest.$ac_ext >&5
16461   rm -rf conftest*
16462   eval "ac_cv_header_$ac_safe=no"
16463 fi
16464 rm -f conftest*
16465 fi
16466 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16467   echo "$ac_t""yes" 1>&6
16468     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16469   cat >> confdefs.h <<EOF
16470 #define $ac_tr_hdr 1
16471 EOF
16472  
16473 else
16474   echo "$ac_t""no" 1>&6
16475 fi
16476 done
16477
16478         if test $ac_cv_header_lwp_lwp_h = yes ; then
16479                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
16480 echo "configure:16481: checking for lwp_create in -llwp" >&5
16481 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
16482 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16483   echo $ac_n "(cached) $ac_c" 1>&6
16484 else
16485   ac_save_LIBS="$LIBS"
16486 LIBS="-llwp  $LIBS"
16487 cat > conftest.$ac_ext <<EOF
16488 #line 16489 "configure"
16489 #include "confdefs.h"
16490 /* Override any gcc2 internal prototype to avoid an error.  */
16491 /* We use char because int might match the return type of a gcc2
16492     builtin and then its argument prototype would still apply.  */
16493 char lwp_create();
16494
16495 int main() {
16496 lwp_create()
16497 ; return 0; }
16498 EOF
16499 if { (eval echo configure:16500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16500   rm -rf conftest*
16501   eval "ac_cv_lib_$ac_lib_var=yes"
16502 else
16503   echo "configure: failed program was:" >&5
16504   cat conftest.$ac_ext >&5
16505   rm -rf conftest*
16506   eval "ac_cv_lib_$ac_lib_var=no"
16507 fi
16508 rm -f conftest*
16509 LIBS="$ac_save_LIBS"
16510
16511 fi
16512 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16513   echo "$ac_t""yes" 1>&6
16514   have_lwp=yes
16515 else
16516   echo "$ac_t""no" 1>&6
16517 have_lwp=no
16518 fi
16519
16520
16521                 if test $have_lwp = yes ; then
16522                         cat >> confdefs.h <<\EOF
16523 #define HAVE_LWP 1
16524 EOF
16525
16526                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
16527                         ol_link_threads=lwp
16528
16529                         if test $ol_with_yielding_select = auto ; then
16530                                 ol_with_yielding_select=no
16531                         fi
16532                 fi
16533         fi
16534 fi
16535
16536 if test $ol_with_yielding_select = yes ; then
16537         cat >> confdefs.h <<\EOF
16538 #define HAVE_YIELDING_SELECT 1
16539 EOF
16540
16541 fi
16542
16543 if test $ol_with_threads = manual ; then
16544                 ol_link_threads=yes
16545
16546         echo "configure: warning: thread defines and link options must be set manually" 1>&2
16547
16548         for ac_hdr in pthread.h sched.h
16549 do
16550 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16551 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16552 echo "configure:16553: checking for $ac_hdr" >&5
16553 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16554   echo $ac_n "(cached) $ac_c" 1>&6
16555 else
16556   cat > conftest.$ac_ext <<EOF
16557 #line 16558 "configure"
16558 #include "confdefs.h"
16559 #include <$ac_hdr>
16560 EOF
16561 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16562 { (eval echo configure:16563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16563 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16564 if test -z "$ac_err"; then
16565   rm -rf conftest*
16566   eval "ac_cv_header_$ac_safe=yes"
16567 else
16568   echo "$ac_err" >&5
16569   echo "configure: failed program was:" >&5
16570   cat conftest.$ac_ext >&5
16571   rm -rf conftest*
16572   eval "ac_cv_header_$ac_safe=no"
16573 fi
16574 rm -f conftest*
16575 fi
16576 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16577   echo "$ac_t""yes" 1>&6
16578     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16579   cat >> confdefs.h <<EOF
16580 #define $ac_tr_hdr 1
16581 EOF
16582  
16583 else
16584   echo "$ac_t""no" 1>&6
16585 fi
16586 done
16587
16588         for ac_func in sched_yield pthread_yield
16589 do
16590 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16591 echo "configure:16592: checking for $ac_func" >&5
16592 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16593   echo $ac_n "(cached) $ac_c" 1>&6
16594 else
16595   cat > conftest.$ac_ext <<EOF
16596 #line 16597 "configure"
16597 #include "confdefs.h"
16598 /* System header to define __stub macros and hopefully few prototypes,
16599     which can conflict with char $ac_func(); below.  */
16600 #include <assert.h>
16601 /* Override any gcc2 internal prototype to avoid an error.  */
16602 /* We use char because int might match the return type of a gcc2
16603     builtin and then its argument prototype would still apply.  */
16604 char $ac_func();
16605 char (*f)();
16606
16607 int main() {
16608
16609 /* The GNU C library defines this for functions which it implements
16610     to always fail with ENOSYS.  Some functions are actually named
16611     something starting with __ and the normal name is an alias.  */
16612 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16613 choke me
16614 #else
16615 f = $ac_func;
16616 #endif
16617
16618 ; return 0; }
16619 EOF
16620 if { (eval echo configure:16621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16621   rm -rf conftest*
16622   eval "ac_cv_func_$ac_func=yes"
16623 else
16624   echo "configure: failed program was:" >&5
16625   cat conftest.$ac_ext >&5
16626   rm -rf conftest*
16627   eval "ac_cv_func_$ac_func=no"
16628 fi
16629 rm -f conftest*
16630 fi
16631
16632 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16633   echo "$ac_t""yes" 1>&6
16634     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16635   cat >> confdefs.h <<EOF
16636 #define $ac_tr_func 1
16637 EOF
16638  
16639 else
16640   echo "$ac_t""no" 1>&6
16641 fi
16642 done
16643
16644         
16645         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16646 echo "configure:16647: checking for LinuxThreads pthread.h" >&5
16647 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16648   echo $ac_n "(cached) $ac_c" 1>&6
16649 else
16650   cat > conftest.$ac_ext <<EOF
16651 #line 16652 "configure"
16652 #include "confdefs.h"
16653 #include <pthread.h>
16654 EOF
16655 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16656   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16657   rm -rf conftest*
16658   ol_cv_header_linux_threads=yes
16659 else
16660   rm -rf conftest*
16661   ol_cv_header_linux_threads=no
16662 fi
16663 rm -f conftest*
16664
16665                 
16666 fi
16667
16668 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16669         if test $ol_cv_header_linux_threads = yes; then
16670                 cat >> confdefs.h <<\EOF
16671 #define HAVE_LINUX_THREADS 1
16672 EOF
16673
16674         fi
16675
16676
16677         for ac_hdr in mach/cthreads.h
16678 do
16679 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16680 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16681 echo "configure:16682: checking for $ac_hdr" >&5
16682 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16683   echo $ac_n "(cached) $ac_c" 1>&6
16684 else
16685   cat > conftest.$ac_ext <<EOF
16686 #line 16687 "configure"
16687 #include "confdefs.h"
16688 #include <$ac_hdr>
16689 EOF
16690 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16691 { (eval echo configure:16692: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16692 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16693 if test -z "$ac_err"; then
16694   rm -rf conftest*
16695   eval "ac_cv_header_$ac_safe=yes"
16696 else
16697   echo "$ac_err" >&5
16698   echo "configure: failed program was:" >&5
16699   cat conftest.$ac_ext >&5
16700   rm -rf conftest*
16701   eval "ac_cv_header_$ac_safe=no"
16702 fi
16703 rm -f conftest*
16704 fi
16705 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16706   echo "$ac_t""yes" 1>&6
16707     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16708   cat >> confdefs.h <<EOF
16709 #define $ac_tr_hdr 1
16710 EOF
16711  
16712 else
16713   echo "$ac_t""no" 1>&6
16714 fi
16715 done
16716
16717         for ac_hdr in lwp/lwp.h
16718 do
16719 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16720 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16721 echo "configure:16722: checking for $ac_hdr" >&5
16722 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16723   echo $ac_n "(cached) $ac_c" 1>&6
16724 else
16725   cat > conftest.$ac_ext <<EOF
16726 #line 16727 "configure"
16727 #include "confdefs.h"
16728 #include <$ac_hdr>
16729 EOF
16730 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16731 { (eval echo configure:16732: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16732 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16733 if test -z "$ac_err"; then
16734   rm -rf conftest*
16735   eval "ac_cv_header_$ac_safe=yes"
16736 else
16737   echo "$ac_err" >&5
16738   echo "configure: failed program was:" >&5
16739   cat conftest.$ac_ext >&5
16740   rm -rf conftest*
16741   eval "ac_cv_header_$ac_safe=no"
16742 fi
16743 rm -f conftest*
16744 fi
16745 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16746   echo "$ac_t""yes" 1>&6
16747     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16748   cat >> confdefs.h <<EOF
16749 #define $ac_tr_hdr 1
16750 EOF
16751  
16752 else
16753   echo "$ac_t""no" 1>&6
16754 fi
16755 done
16756
16757         for ac_hdr in thread.h synch.h
16758 do
16759 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16760 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16761 echo "configure:16762: checking for $ac_hdr" >&5
16762 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16763   echo $ac_n "(cached) $ac_c" 1>&6
16764 else
16765   cat > conftest.$ac_ext <<EOF
16766 #line 16767 "configure"
16767 #include "confdefs.h"
16768 #include <$ac_hdr>
16769 EOF
16770 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16771 { (eval echo configure:16772: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16772 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16773 if test -z "$ac_err"; then
16774   rm -rf conftest*
16775   eval "ac_cv_header_$ac_safe=yes"
16776 else
16777   echo "$ac_err" >&5
16778   echo "configure: failed program was:" >&5
16779   cat conftest.$ac_ext >&5
16780   rm -rf conftest*
16781   eval "ac_cv_header_$ac_safe=no"
16782 fi
16783 rm -f conftest*
16784 fi
16785 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16786   echo "$ac_t""yes" 1>&6
16787     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16788   cat >> confdefs.h <<EOF
16789 #define $ac_tr_hdr 1
16790 EOF
16791  
16792 else
16793   echo "$ac_t""no" 1>&6
16794 fi
16795 done
16796
16797 fi
16798
16799 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16800                         cat >> confdefs.h <<\EOF
16801 #define REENTRANT 1
16802 EOF
16803
16804         cat >> confdefs.h <<\EOF
16805 #define _REENTRANT 1
16806 EOF
16807
16808         cat >> confdefs.h <<\EOF
16809 #define THREAD_SAFE 1
16810 EOF
16811
16812         cat >> confdefs.h <<\EOF
16813 #define _THREAD_SAFE 1
16814 EOF
16815
16816         cat >> confdefs.h <<\EOF
16817 #define THREADSAFE 1
16818 EOF
16819
16820         cat >> confdefs.h <<\EOF
16821 #define _THREADSAFE 1
16822 EOF
16823
16824         cat >> confdefs.h <<\EOF
16825 #define _SGI_MP_SOURCE 1
16826 EOF
16827
16828
16829                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16830 echo "configure:16831: checking for thread specific errno" >&5
16831 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16832   echo $ac_n "(cached) $ac_c" 1>&6
16833 else
16834   
16835                 cat > conftest.$ac_ext <<EOF
16836 #line 16837 "configure"
16837 #include "confdefs.h"
16838 #include <errno.h>
16839 int main() {
16840 errno = 0;
16841 ; return 0; }
16842 EOF
16843 if { (eval echo configure:16844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16844   rm -rf conftest*
16845   ol_cv_errno_thread_specific=yes
16846 else
16847   echo "configure: failed program was:" >&5
16848   cat conftest.$ac_ext >&5
16849   rm -rf conftest*
16850   ol_cv_errno_thread_specific=no
16851 fi
16852 rm -f conftest*
16853         
16854 fi
16855
16856 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16857
16858                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16859 echo "configure:16860: checking for thread specific h_errno" >&5
16860 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16861   echo $ac_n "(cached) $ac_c" 1>&6
16862 else
16863   
16864                 cat > conftest.$ac_ext <<EOF
16865 #line 16866 "configure"
16866 #include "confdefs.h"
16867 #include <netdb.h>
16868 int main() {
16869 h_errno = 0;
16870 ; return 0; }
16871 EOF
16872 if { (eval echo configure:16873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16873   rm -rf conftest*
16874   ol_cv_h_errno_thread_specific=yes
16875 else
16876   echo "configure: failed program was:" >&5
16877   cat conftest.$ac_ext >&5
16878   rm -rf conftest*
16879   ol_cv_h_errno_thread_specific=no
16880 fi
16881 rm -f conftest*
16882         
16883 fi
16884
16885 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16886
16887         if test $ol_cv_errno_thread_specific != yes \
16888                 -o $ol_cv_h_errno_thread_specific != yes ; then
16889                 LIBS="$LTHREAD_LIBS $LIBS"
16890                 LTHREAD_LIBS=""
16891         fi
16892
16893 fi  
16894
16895 if test $ol_link_threads = no ; then
16896         if test $ol_with_threads = yes ; then
16897                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16898         fi
16899
16900         if test $ol_with_threads = auto ; then
16901                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16902                 ol_with_threads=no
16903         fi
16904
16905         cat >> confdefs.h <<\EOF
16906 #define NO_THREADS 1
16907 EOF
16908
16909         LTHREAD_LIBS=""
16910 fi
16911
16912 if test $ol_link_threads != no ; then
16913         cat >> confdefs.h <<\EOF
16914 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16915 EOF
16916
16917 fi
16918
16919 ol_link_ldbm=no 
16920
16921 if test $ol_with_ldbm_api = auto \
16922         -o $ol_with_ldbm_api = berkeley \
16923         -o $ol_with_ldbm_api = bcompat ; then
16924
16925         if test $ol_with_ldbm_api = bcompat; then \
16926                 for ac_hdr in db_185.h db.h
16927 do
16928 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16929 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16930 echo "configure:16931: checking for $ac_hdr" >&5
16931 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16932   echo $ac_n "(cached) $ac_c" 1>&6
16933 else
16934   cat > conftest.$ac_ext <<EOF
16935 #line 16936 "configure"
16936 #include "confdefs.h"
16937 #include <$ac_hdr>
16938 EOF
16939 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16940 { (eval echo configure:16941: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16941 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16942 if test -z "$ac_err"; then
16943   rm -rf conftest*
16944   eval "ac_cv_header_$ac_safe=yes"
16945 else
16946   echo "$ac_err" >&5
16947   echo "configure: failed program was:" >&5
16948   cat conftest.$ac_ext >&5
16949   rm -rf conftest*
16950   eval "ac_cv_header_$ac_safe=no"
16951 fi
16952 rm -f conftest*
16953 fi
16954 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16955   echo "$ac_t""yes" 1>&6
16956     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16957   cat >> confdefs.h <<EOF
16958 #define $ac_tr_hdr 1
16959 EOF
16960  
16961 else
16962   echo "$ac_t""no" 1>&6
16963 fi
16964 done
16965
16966 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16967         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16968 echo "configure:16969: checking if Berkeley DB header compatibility" >&5
16969 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16970   echo $ac_n "(cached) $ac_c" 1>&6
16971 else
16972   
16973                 cat > conftest.$ac_ext <<EOF
16974 #line 16975 "configure"
16975 #include "confdefs.h"
16976
16977 #if HAVE_DB_185_H
16978 #       include <db_185.h>
16979 #else
16980 #       include <db.h>
16981 #endif
16982
16983  /* this check could be improved */
16984 #ifndef DB_VERSION_MAJOR
16985 #       define DB_VERSION_MAJOR 1
16986 #endif
16987
16988 #if DB_VERSION_MAJOR == 1 
16989         __db_version_1
16990 #endif
16991
16992 EOF
16993 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16994   egrep "__db_version_1" >/dev/null 2>&1; then
16995   rm -rf conftest*
16996   ol_cv_header_db1=yes
16997 else
16998   rm -rf conftest*
16999   ol_cv_header_db1=no
17000 fi
17001 rm -f conftest*
17002
17003 fi
17004
17005 echo "$ac_t""$ol_cv_header_db1" 1>&6
17006
17007         if test $ol_cv_header_db1 = yes ; then
17008                 ol_cv_lib_db=no
17009 if test $ol_cv_lib_db = no ; then
17010         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17011 echo "configure:17012: checking for Berkeley DB link (default)" >&5
17012 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17013   echo $ac_n "(cached) $ac_c" 1>&6
17014 else
17015   
17016         ol_DB_LIB=
17017         ol_LIBS=$LIBS
17018         LIBS="$ol_DB_LIB $LIBS"
17019
17020         cat > conftest.$ac_ext <<EOF
17021 #line 17022 "configure"
17022 #include "confdefs.h"
17023
17024 #ifdef HAVE_DB_185_H
17025 # include <db_185.h>
17026 #else
17027 # include <db.h>
17028 #endif
17029
17030 #ifndef DB_VERSION_MAJOR
17031 # define DB_VERSION_MAJOR 1
17032 #endif
17033
17034 #ifndef NULL
17035 #define NULL ((void*)0)
17036 #endif
17037
17038 int main() {
17039
17040 #if DB_VERSION_MAJOR > 1
17041         {
17042                 char *version;
17043                 int major, minor, patch;
17044
17045                 version = db_version( &major, &minor, &patch );
17046
17047                 if( major != DB_VERSION_MAJOR ||
17048                         minor < DB_VERSION_MINOR )
17049                 {
17050                         printf("Berkeley DB version mismatch\n"
17051                                 "\texpected: %s\n\tgot: %s\n",
17052                                 DB_VERSION_STRING, version);
17053                         return 1;
17054                 }
17055         }
17056 #endif
17057
17058 #if DB_VERSION_MAJOR > 2
17059         db_env_create( NULL, 0 );
17060 #elif DB_VERSION_MAJOR > 1
17061         db_appexit( NULL );
17062 #else
17063         (void) dbopen( NULL, 0, 0, 0, NULL);
17064 #endif
17065
17066 ; return 0; }
17067 EOF
17068 if { (eval echo configure:17069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17069   rm -rf conftest*
17070   ol_cv_db_none=yes
17071 else
17072   echo "configure: failed program was:" >&5
17073   cat conftest.$ac_ext >&5
17074   rm -rf conftest*
17075   ol_cv_db_none=no
17076 fi
17077 rm -f conftest*
17078
17079         LIBS="$ol_LIBS"
17080
17081 fi
17082
17083 echo "$ac_t""$ol_cv_db_none" 1>&6
17084
17085         if test $ol_cv_db_none = yes ; then
17086                 ol_cv_lib_db=yes
17087         fi
17088 fi
17089
17090 if test $ol_cv_lib_db = no ; then
17091         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17092 echo "configure:17093: checking for Berkeley DB link (-ldb4)" >&5
17093 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17094   echo $ac_n "(cached) $ac_c" 1>&6
17095 else
17096   
17097         ol_DB_LIB=-ldb4
17098         ol_LIBS=$LIBS
17099         LIBS="$ol_DB_LIB $LIBS"
17100
17101         cat > conftest.$ac_ext <<EOF
17102 #line 17103 "configure"
17103 #include "confdefs.h"
17104
17105 #ifdef HAVE_DB_185_H
17106 # include <db_185.h>
17107 #else
17108 # include <db.h>
17109 #endif
17110
17111 #ifndef DB_VERSION_MAJOR
17112 # define DB_VERSION_MAJOR 1
17113 #endif
17114
17115 #ifndef NULL
17116 #define NULL ((void*)0)
17117 #endif
17118
17119 int main() {
17120
17121 #if DB_VERSION_MAJOR > 1
17122         {
17123                 char *version;
17124                 int major, minor, patch;
17125
17126                 version = db_version( &major, &minor, &patch );
17127
17128                 if( major != DB_VERSION_MAJOR ||
17129                         minor < DB_VERSION_MINOR )
17130                 {
17131                         printf("Berkeley DB version mismatch\n"
17132                                 "\texpected: %s\n\tgot: %s\n",
17133                                 DB_VERSION_STRING, version);
17134                         return 1;
17135                 }
17136         }
17137 #endif
17138
17139 #if DB_VERSION_MAJOR > 2
17140         db_env_create( NULL, 0 );
17141 #elif DB_VERSION_MAJOR > 1
17142         db_appexit( NULL );
17143 #else
17144         (void) dbopen( NULL, 0, 0, 0, NULL);
17145 #endif
17146
17147 ; return 0; }
17148 EOF
17149 if { (eval echo configure:17150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17150   rm -rf conftest*
17151   ol_cv_db_db4=yes
17152 else
17153   echo "configure: failed program was:" >&5
17154   cat conftest.$ac_ext >&5
17155   rm -rf conftest*
17156   ol_cv_db_db4=no
17157 fi
17158 rm -f conftest*
17159
17160         LIBS="$ol_LIBS"
17161
17162 fi
17163
17164 echo "$ac_t""$ol_cv_db_db4" 1>&6
17165
17166         if test $ol_cv_db_db4 = yes ; then
17167                 ol_cv_lib_db=-ldb4
17168         fi
17169 fi
17170
17171 if test $ol_cv_lib_db = no ; then
17172         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17173 echo "configure:17174: checking for Berkeley DB link (-ldb-4)" >&5
17174 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17175   echo $ac_n "(cached) $ac_c" 1>&6
17176 else
17177   
17178         ol_DB_LIB=-ldb-4
17179         ol_LIBS=$LIBS
17180         LIBS="$ol_DB_LIB $LIBS"
17181
17182         cat > conftest.$ac_ext <<EOF
17183 #line 17184 "configure"
17184 #include "confdefs.h"
17185
17186 #ifdef HAVE_DB_185_H
17187 # include <db_185.h>
17188 #else
17189 # include <db.h>
17190 #endif
17191
17192 #ifndef DB_VERSION_MAJOR
17193 # define DB_VERSION_MAJOR 1
17194 #endif
17195
17196 #ifndef NULL
17197 #define NULL ((void*)0)
17198 #endif
17199
17200 int main() {
17201
17202 #if DB_VERSION_MAJOR > 1
17203         {
17204                 char *version;
17205                 int major, minor, patch;
17206
17207                 version = db_version( &major, &minor, &patch );
17208
17209                 if( major != DB_VERSION_MAJOR ||
17210                         minor < DB_VERSION_MINOR )
17211                 {
17212                         printf("Berkeley DB version mismatch\n"
17213                                 "\texpected: %s\n\tgot: %s\n",
17214                                 DB_VERSION_STRING, version);
17215                         return 1;
17216                 }
17217         }
17218 #endif
17219
17220 #if DB_VERSION_MAJOR > 2
17221         db_env_create( NULL, 0 );
17222 #elif DB_VERSION_MAJOR > 1
17223         db_appexit( NULL );
17224 #else
17225         (void) dbopen( NULL, 0, 0, 0, NULL);
17226 #endif
17227
17228 ; return 0; }
17229 EOF
17230 if { (eval echo configure:17231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17231   rm -rf conftest*
17232   ol_cv_db_db_4=yes
17233 else
17234   echo "configure: failed program was:" >&5
17235   cat conftest.$ac_ext >&5
17236   rm -rf conftest*
17237   ol_cv_db_db_4=no
17238 fi
17239 rm -f conftest*
17240
17241         LIBS="$ol_LIBS"
17242
17243 fi
17244
17245 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17246
17247         if test $ol_cv_db_db_4 = yes ; then
17248                 ol_cv_lib_db=-ldb-4
17249         fi
17250 fi
17251
17252 if test $ol_cv_lib_db = no ; then
17253         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17254 echo "configure:17255: checking for Berkeley DB link (-ldb)" >&5
17255 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17256   echo $ac_n "(cached) $ac_c" 1>&6
17257 else
17258   
17259         ol_DB_LIB=-ldb
17260         ol_LIBS=$LIBS
17261         LIBS="$ol_DB_LIB $LIBS"
17262
17263         cat > conftest.$ac_ext <<EOF
17264 #line 17265 "configure"
17265 #include "confdefs.h"
17266
17267 #ifdef HAVE_DB_185_H
17268 # include <db_185.h>
17269 #else
17270 # include <db.h>
17271 #endif
17272
17273 #ifndef DB_VERSION_MAJOR
17274 # define DB_VERSION_MAJOR 1
17275 #endif
17276
17277 #ifndef NULL
17278 #define NULL ((void*)0)
17279 #endif
17280
17281 int main() {
17282
17283 #if DB_VERSION_MAJOR > 1
17284         {
17285                 char *version;
17286                 int major, minor, patch;
17287
17288                 version = db_version( &major, &minor, &patch );
17289
17290                 if( major != DB_VERSION_MAJOR ||
17291                         minor < DB_VERSION_MINOR )
17292                 {
17293                         printf("Berkeley DB version mismatch\n"
17294                                 "\texpected: %s\n\tgot: %s\n",
17295                                 DB_VERSION_STRING, version);
17296                         return 1;
17297                 }
17298         }
17299 #endif
17300
17301 #if DB_VERSION_MAJOR > 2
17302         db_env_create( NULL, 0 );
17303 #elif DB_VERSION_MAJOR > 1
17304         db_appexit( NULL );
17305 #else
17306         (void) dbopen( NULL, 0, 0, 0, NULL);
17307 #endif
17308
17309 ; return 0; }
17310 EOF
17311 if { (eval echo configure:17312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17312   rm -rf conftest*
17313   ol_cv_db_db=yes
17314 else
17315   echo "configure: failed program was:" >&5
17316   cat conftest.$ac_ext >&5
17317   rm -rf conftest*
17318   ol_cv_db_db=no
17319 fi
17320 rm -f conftest*
17321
17322         LIBS="$ol_LIBS"
17323
17324 fi
17325
17326 echo "$ac_t""$ol_cv_db_db" 1>&6
17327
17328         if test $ol_cv_db_db = yes ; then
17329                 ol_cv_lib_db=-ldb
17330         fi
17331 fi
17332
17333 if test $ol_cv_lib_db = no ; then
17334         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17335 echo "configure:17336: checking for Berkeley DB link (-ldb3)" >&5
17336 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17337   echo $ac_n "(cached) $ac_c" 1>&6
17338 else
17339   
17340         ol_DB_LIB=-ldb3
17341         ol_LIBS=$LIBS
17342         LIBS="$ol_DB_LIB $LIBS"
17343
17344         cat > conftest.$ac_ext <<EOF
17345 #line 17346 "configure"
17346 #include "confdefs.h"
17347
17348 #ifdef HAVE_DB_185_H
17349 # include <db_185.h>
17350 #else
17351 # include <db.h>
17352 #endif
17353
17354 #ifndef DB_VERSION_MAJOR
17355 # define DB_VERSION_MAJOR 1
17356 #endif
17357
17358 #ifndef NULL
17359 #define NULL ((void*)0)
17360 #endif
17361
17362 int main() {
17363
17364 #if DB_VERSION_MAJOR > 1
17365         {
17366                 char *version;
17367                 int major, minor, patch;
17368
17369                 version = db_version( &major, &minor, &patch );
17370
17371                 if( major != DB_VERSION_MAJOR ||
17372                         minor < DB_VERSION_MINOR )
17373                 {
17374                         printf("Berkeley DB version mismatch\n"
17375                                 "\texpected: %s\n\tgot: %s\n",
17376                                 DB_VERSION_STRING, version);
17377                         return 1;
17378                 }
17379         }
17380 #endif
17381
17382 #if DB_VERSION_MAJOR > 2
17383         db_env_create( NULL, 0 );
17384 #elif DB_VERSION_MAJOR > 1
17385         db_appexit( NULL );
17386 #else
17387         (void) dbopen( NULL, 0, 0, 0, NULL);
17388 #endif
17389
17390 ; return 0; }
17391 EOF
17392 if { (eval echo configure:17393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17393   rm -rf conftest*
17394   ol_cv_db_db3=yes
17395 else
17396   echo "configure: failed program was:" >&5
17397   cat conftest.$ac_ext >&5
17398   rm -rf conftest*
17399   ol_cv_db_db3=no
17400 fi
17401 rm -f conftest*
17402
17403         LIBS="$ol_LIBS"
17404
17405 fi
17406
17407 echo "$ac_t""$ol_cv_db_db3" 1>&6
17408
17409         if test $ol_cv_db_db3 = yes ; then
17410                 ol_cv_lib_db=-ldb3
17411         fi
17412 fi
17413
17414 if test $ol_cv_lib_db = no ; then
17415         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17416 echo "configure:17417: checking for Berkeley DB link (-ldb-3)" >&5
17417 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17418   echo $ac_n "(cached) $ac_c" 1>&6
17419 else
17420   
17421         ol_DB_LIB=-ldb-3
17422         ol_LIBS=$LIBS
17423         LIBS="$ol_DB_LIB $LIBS"
17424
17425         cat > conftest.$ac_ext <<EOF
17426 #line 17427 "configure"
17427 #include "confdefs.h"
17428
17429 #ifdef HAVE_DB_185_H
17430 # include <db_185.h>
17431 #else
17432 # include <db.h>
17433 #endif
17434
17435 #ifndef DB_VERSION_MAJOR
17436 # define DB_VERSION_MAJOR 1
17437 #endif
17438
17439 #ifndef NULL
17440 #define NULL ((void*)0)
17441 #endif
17442
17443 int main() {
17444
17445 #if DB_VERSION_MAJOR > 1
17446         {
17447                 char *version;
17448                 int major, minor, patch;
17449
17450                 version = db_version( &major, &minor, &patch );
17451
17452                 if( major != DB_VERSION_MAJOR ||
17453                         minor < DB_VERSION_MINOR )
17454                 {
17455                         printf("Berkeley DB version mismatch\n"
17456                                 "\texpected: %s\n\tgot: %s\n",
17457                                 DB_VERSION_STRING, version);
17458                         return 1;
17459                 }
17460         }
17461 #endif
17462
17463 #if DB_VERSION_MAJOR > 2
17464         db_env_create( NULL, 0 );
17465 #elif DB_VERSION_MAJOR > 1
17466         db_appexit( NULL );
17467 #else
17468         (void) dbopen( NULL, 0, 0, 0, NULL);
17469 #endif
17470
17471 ; return 0; }
17472 EOF
17473 if { (eval echo configure:17474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17474   rm -rf conftest*
17475   ol_cv_db_db_3=yes
17476 else
17477   echo "configure: failed program was:" >&5
17478   cat conftest.$ac_ext >&5
17479   rm -rf conftest*
17480   ol_cv_db_db_3=no
17481 fi
17482 rm -f conftest*
17483
17484         LIBS="$ol_LIBS"
17485
17486 fi
17487
17488 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17489
17490         if test $ol_cv_db_db_3 = yes ; then
17491                 ol_cv_lib_db=-ldb-3
17492         fi
17493 fi
17494
17495 if test $ol_cv_lib_db = no ; then
17496         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17497 echo "configure:17498: checking for Berkeley DB link (-ldb2)" >&5
17498 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17499   echo $ac_n "(cached) $ac_c" 1>&6
17500 else
17501   
17502         ol_DB_LIB=-ldb2
17503         ol_LIBS=$LIBS
17504         LIBS="$ol_DB_LIB $LIBS"
17505
17506         cat > conftest.$ac_ext <<EOF
17507 #line 17508 "configure"
17508 #include "confdefs.h"
17509
17510 #ifdef HAVE_DB_185_H
17511 # include <db_185.h>
17512 #else
17513 # include <db.h>
17514 #endif
17515
17516 #ifndef DB_VERSION_MAJOR
17517 # define DB_VERSION_MAJOR 1
17518 #endif
17519
17520 #ifndef NULL
17521 #define NULL ((void*)0)
17522 #endif
17523
17524 int main() {
17525
17526 #if DB_VERSION_MAJOR > 1
17527         {
17528                 char *version;
17529                 int major, minor, patch;
17530
17531                 version = db_version( &major, &minor, &patch );
17532
17533                 if( major != DB_VERSION_MAJOR ||
17534                         minor < DB_VERSION_MINOR )
17535                 {
17536                         printf("Berkeley DB version mismatch\n"
17537                                 "\texpected: %s\n\tgot: %s\n",
17538                                 DB_VERSION_STRING, version);
17539                         return 1;
17540                 }
17541         }
17542 #endif
17543
17544 #if DB_VERSION_MAJOR > 2
17545         db_env_create( NULL, 0 );
17546 #elif DB_VERSION_MAJOR > 1
17547         db_appexit( NULL );
17548 #else
17549         (void) dbopen( NULL, 0, 0, 0, NULL);
17550 #endif
17551
17552 ; return 0; }
17553 EOF
17554 if { (eval echo configure:17555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17555   rm -rf conftest*
17556   ol_cv_db_db2=yes
17557 else
17558   echo "configure: failed program was:" >&5
17559   cat conftest.$ac_ext >&5
17560   rm -rf conftest*
17561   ol_cv_db_db2=no
17562 fi
17563 rm -f conftest*
17564
17565         LIBS="$ol_LIBS"
17566
17567 fi
17568
17569 echo "$ac_t""$ol_cv_db_db2" 1>&6
17570
17571         if test $ol_cv_db_db2 = yes ; then
17572                 ol_cv_lib_db=-ldb2
17573         fi
17574 fi
17575
17576 if test $ol_cv_lib_db = no ; then
17577         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17578 echo "configure:17579: checking for Berkeley DB link (-ldb-2)" >&5
17579 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17580   echo $ac_n "(cached) $ac_c" 1>&6
17581 else
17582   
17583         ol_DB_LIB=-ldb-2
17584         ol_LIBS=$LIBS
17585         LIBS="$ol_DB_LIB $LIBS"
17586
17587         cat > conftest.$ac_ext <<EOF
17588 #line 17589 "configure"
17589 #include "confdefs.h"
17590
17591 #ifdef HAVE_DB_185_H
17592 # include <db_185.h>
17593 #else
17594 # include <db.h>
17595 #endif
17596
17597 #ifndef DB_VERSION_MAJOR
17598 # define DB_VERSION_MAJOR 1
17599 #endif
17600
17601 #ifndef NULL
17602 #define NULL ((void*)0)
17603 #endif
17604
17605 int main() {
17606
17607 #if DB_VERSION_MAJOR > 1
17608         {
17609                 char *version;
17610                 int major, minor, patch;
17611
17612                 version = db_version( &major, &minor, &patch );
17613
17614                 if( major != DB_VERSION_MAJOR ||
17615                         minor < DB_VERSION_MINOR )
17616                 {
17617                         printf("Berkeley DB version mismatch\n"
17618                                 "\texpected: %s\n\tgot: %s\n",
17619                                 DB_VERSION_STRING, version);
17620                         return 1;
17621                 }
17622         }
17623 #endif
17624
17625 #if DB_VERSION_MAJOR > 2
17626         db_env_create( NULL, 0 );
17627 #elif DB_VERSION_MAJOR > 1
17628         db_appexit( NULL );
17629 #else
17630         (void) dbopen( NULL, 0, 0, 0, NULL);
17631 #endif
17632
17633 ; return 0; }
17634 EOF
17635 if { (eval echo configure:17636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17636   rm -rf conftest*
17637   ol_cv_db_db_2=yes
17638 else
17639   echo "configure: failed program was:" >&5
17640   cat conftest.$ac_ext >&5
17641   rm -rf conftest*
17642   ol_cv_db_db_2=no
17643 fi
17644 rm -f conftest*
17645
17646         LIBS="$ol_LIBS"
17647
17648 fi
17649
17650 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17651
17652         if test $ol_cv_db_db_2 = yes ; then
17653                 ol_cv_lib_db=-ldb-2
17654         fi
17655 fi
17656
17657 if test $ol_cv_lib_db = no ; then
17658         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17659 echo "configure:17660: checking for Berkeley DB link (-ldb1)" >&5
17660 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17661   echo $ac_n "(cached) $ac_c" 1>&6
17662 else
17663   
17664         ol_DB_LIB=-ldb1
17665         ol_LIBS=$LIBS
17666         LIBS="$ol_DB_LIB $LIBS"
17667
17668         cat > conftest.$ac_ext <<EOF
17669 #line 17670 "configure"
17670 #include "confdefs.h"
17671
17672 #ifdef HAVE_DB_185_H
17673 # include <db_185.h>
17674 #else
17675 # include <db.h>
17676 #endif
17677
17678 #ifndef DB_VERSION_MAJOR
17679 # define DB_VERSION_MAJOR 1
17680 #endif
17681
17682 #ifndef NULL
17683 #define NULL ((void*)0)
17684 #endif
17685
17686 int main() {
17687
17688 #if DB_VERSION_MAJOR > 1
17689         {
17690                 char *version;
17691                 int major, minor, patch;
17692
17693                 version = db_version( &major, &minor, &patch );
17694
17695                 if( major != DB_VERSION_MAJOR ||
17696                         minor < DB_VERSION_MINOR )
17697                 {
17698                         printf("Berkeley DB version mismatch\n"
17699                                 "\texpected: %s\n\tgot: %s\n",
17700                                 DB_VERSION_STRING, version);
17701                         return 1;
17702                 }
17703         }
17704 #endif
17705
17706 #if DB_VERSION_MAJOR > 2
17707         db_env_create( NULL, 0 );
17708 #elif DB_VERSION_MAJOR > 1
17709         db_appexit( NULL );
17710 #else
17711         (void) dbopen( NULL, 0, 0, 0, NULL);
17712 #endif
17713
17714 ; return 0; }
17715 EOF
17716 if { (eval echo configure:17717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17717   rm -rf conftest*
17718   ol_cv_db_db1=yes
17719 else
17720   echo "configure: failed program was:" >&5
17721   cat conftest.$ac_ext >&5
17722   rm -rf conftest*
17723   ol_cv_db_db1=no
17724 fi
17725 rm -f conftest*
17726
17727         LIBS="$ol_LIBS"
17728
17729 fi
17730
17731 echo "$ac_t""$ol_cv_db_db1" 1>&6
17732
17733         if test $ol_cv_db_db1 = yes ; then
17734                 ol_cv_lib_db=-ldb1
17735         fi
17736 fi
17737
17738 if test $ol_cv_lib_db = no ; then
17739         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
17740 echo "configure:17741: checking for Berkeley DB link (-ldb-1)" >&5
17741 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
17742   echo $ac_n "(cached) $ac_c" 1>&6
17743 else
17744   
17745         ol_DB_LIB=-ldb-1
17746         ol_LIBS=$LIBS
17747         LIBS="$ol_DB_LIB $LIBS"
17748
17749         cat > conftest.$ac_ext <<EOF
17750 #line 17751 "configure"
17751 #include "confdefs.h"
17752
17753 #ifdef HAVE_DB_185_H
17754 # include <db_185.h>
17755 #else
17756 # include <db.h>
17757 #endif
17758
17759 #ifndef DB_VERSION_MAJOR
17760 # define DB_VERSION_MAJOR 1
17761 #endif
17762
17763 #ifndef NULL
17764 #define NULL ((void*)0)
17765 #endif
17766
17767 int main() {
17768
17769 #if DB_VERSION_MAJOR > 1
17770         {
17771                 char *version;
17772                 int major, minor, patch;
17773
17774                 version = db_version( &major, &minor, &patch );
17775
17776                 if( major != DB_VERSION_MAJOR ||
17777                         minor < DB_VERSION_MINOR )
17778                 {
17779                         printf("Berkeley DB version mismatch\n"
17780                                 "\texpected: %s\n\tgot: %s\n",
17781                                 DB_VERSION_STRING, version);
17782                         return 1;
17783                 }
17784         }
17785 #endif
17786
17787 #if DB_VERSION_MAJOR > 2
17788         db_env_create( NULL, 0 );
17789 #elif DB_VERSION_MAJOR > 1
17790         db_appexit( NULL );
17791 #else
17792         (void) dbopen( NULL, 0, 0, 0, NULL);
17793 #endif
17794
17795 ; return 0; }
17796 EOF
17797 if { (eval echo configure:17798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17798   rm -rf conftest*
17799   ol_cv_db_db_1=yes
17800 else
17801   echo "configure: failed program was:" >&5
17802   cat conftest.$ac_ext >&5
17803   rm -rf conftest*
17804   ol_cv_db_db_1=no
17805 fi
17806 rm -f conftest*
17807
17808         LIBS="$ol_LIBS"
17809
17810 fi
17811
17812 echo "$ac_t""$ol_cv_db_db_1" 1>&6
17813
17814         if test $ol_cv_db_db_1 = yes ; then
17815                 ol_cv_lib_db=-ldb-1
17816         fi
17817 fi
17818
17819
17820                 if test "$ol_cv_lib_db" != no ; then
17821                         ol_cv_berkeley_db=yes
17822                 fi
17823         fi
17824 fi
17825
17826         else
17827                 ol_cv_berkeley_db=no
17828 for ac_hdr in db.h
17829 do
17830 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17831 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17832 echo "configure:17833: checking for $ac_hdr" >&5
17833 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17834   echo $ac_n "(cached) $ac_c" 1>&6
17835 else
17836   cat > conftest.$ac_ext <<EOF
17837 #line 17838 "configure"
17838 #include "confdefs.h"
17839 #include <$ac_hdr>
17840 EOF
17841 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17842 { (eval echo configure:17843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17843 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17844 if test -z "$ac_err"; then
17845   rm -rf conftest*
17846   eval "ac_cv_header_$ac_safe=yes"
17847 else
17848   echo "$ac_err" >&5
17849   echo "configure: failed program was:" >&5
17850   cat conftest.$ac_ext >&5
17851   rm -rf conftest*
17852   eval "ac_cv_header_$ac_safe=no"
17853 fi
17854 rm -f conftest*
17855 fi
17856 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17857   echo "$ac_t""yes" 1>&6
17858     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17859   cat >> confdefs.h <<EOF
17860 #define $ac_tr_hdr 1
17861 EOF
17862  
17863 else
17864   echo "$ac_t""no" 1>&6
17865 fi
17866 done
17867
17868 if test $ac_cv_header_db_h = yes; then
17869         ol_cv_lib_db=no
17870 if test $ol_cv_lib_db = no ; then
17871         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17872 echo "configure:17873: checking for Berkeley DB link (default)" >&5
17873 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17874   echo $ac_n "(cached) $ac_c" 1>&6
17875 else
17876   
17877         ol_DB_LIB=
17878         ol_LIBS=$LIBS
17879         LIBS="$ol_DB_LIB $LIBS"
17880
17881         cat > conftest.$ac_ext <<EOF
17882 #line 17883 "configure"
17883 #include "confdefs.h"
17884
17885 #ifdef HAVE_DB_185_H
17886 # include <db_185.h>
17887 #else
17888 # include <db.h>
17889 #endif
17890
17891 #ifndef DB_VERSION_MAJOR
17892 # define DB_VERSION_MAJOR 1
17893 #endif
17894
17895 #ifndef NULL
17896 #define NULL ((void*)0)
17897 #endif
17898
17899 int main() {
17900
17901 #if DB_VERSION_MAJOR > 1
17902         {
17903                 char *version;
17904                 int major, minor, patch;
17905
17906                 version = db_version( &major, &minor, &patch );
17907
17908                 if( major != DB_VERSION_MAJOR ||
17909                         minor < DB_VERSION_MINOR )
17910                 {
17911                         printf("Berkeley DB version mismatch\n"
17912                                 "\texpected: %s\n\tgot: %s\n",
17913                                 DB_VERSION_STRING, version);
17914                         return 1;
17915                 }
17916         }
17917 #endif
17918
17919 #if DB_VERSION_MAJOR > 2
17920         db_env_create( NULL, 0 );
17921 #elif DB_VERSION_MAJOR > 1
17922         db_appexit( NULL );
17923 #else
17924         (void) dbopen( NULL, 0, 0, 0, NULL);
17925 #endif
17926
17927 ; return 0; }
17928 EOF
17929 if { (eval echo configure:17930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17930   rm -rf conftest*
17931   ol_cv_db_none=yes
17932 else
17933   echo "configure: failed program was:" >&5
17934   cat conftest.$ac_ext >&5
17935   rm -rf conftest*
17936   ol_cv_db_none=no
17937 fi
17938 rm -f conftest*
17939
17940         LIBS="$ol_LIBS"
17941
17942 fi
17943
17944 echo "$ac_t""$ol_cv_db_none" 1>&6
17945
17946         if test $ol_cv_db_none = yes ; then
17947                 ol_cv_lib_db=yes
17948         fi
17949 fi
17950
17951 if test $ol_cv_lib_db = no ; then
17952         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17953 echo "configure:17954: checking for Berkeley DB link (-ldb4)" >&5
17954 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17955   echo $ac_n "(cached) $ac_c" 1>&6
17956 else
17957   
17958         ol_DB_LIB=-ldb4
17959         ol_LIBS=$LIBS
17960         LIBS="$ol_DB_LIB $LIBS"
17961
17962         cat > conftest.$ac_ext <<EOF
17963 #line 17964 "configure"
17964 #include "confdefs.h"
17965
17966 #ifdef HAVE_DB_185_H
17967 # include <db_185.h>
17968 #else
17969 # include <db.h>
17970 #endif
17971
17972 #ifndef DB_VERSION_MAJOR
17973 # define DB_VERSION_MAJOR 1
17974 #endif
17975
17976 #ifndef NULL
17977 #define NULL ((void*)0)
17978 #endif
17979
17980 int main() {
17981
17982 #if DB_VERSION_MAJOR > 1
17983         {
17984                 char *version;
17985                 int major, minor, patch;
17986
17987                 version = db_version( &major, &minor, &patch );
17988
17989                 if( major != DB_VERSION_MAJOR ||
17990                         minor < DB_VERSION_MINOR )
17991                 {
17992                         printf("Berkeley DB version mismatch\n"
17993                                 "\texpected: %s\n\tgot: %s\n",
17994                                 DB_VERSION_STRING, version);
17995                         return 1;
17996                 }
17997         }
17998 #endif
17999
18000 #if DB_VERSION_MAJOR > 2
18001         db_env_create( NULL, 0 );
18002 #elif DB_VERSION_MAJOR > 1
18003         db_appexit( NULL );
18004 #else
18005         (void) dbopen( NULL, 0, 0, 0, NULL);
18006 #endif
18007
18008 ; return 0; }
18009 EOF
18010 if { (eval echo configure:18011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18011   rm -rf conftest*
18012   ol_cv_db_db4=yes
18013 else
18014   echo "configure: failed program was:" >&5
18015   cat conftest.$ac_ext >&5
18016   rm -rf conftest*
18017   ol_cv_db_db4=no
18018 fi
18019 rm -f conftest*
18020
18021         LIBS="$ol_LIBS"
18022
18023 fi
18024
18025 echo "$ac_t""$ol_cv_db_db4" 1>&6
18026
18027         if test $ol_cv_db_db4 = yes ; then
18028                 ol_cv_lib_db=-ldb4
18029         fi
18030 fi
18031
18032 if test $ol_cv_lib_db = no ; then
18033         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18034 echo "configure:18035: checking for Berkeley DB link (-ldb-4)" >&5
18035 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18036   echo $ac_n "(cached) $ac_c" 1>&6
18037 else
18038   
18039         ol_DB_LIB=-ldb-4
18040         ol_LIBS=$LIBS
18041         LIBS="$ol_DB_LIB $LIBS"
18042
18043         cat > conftest.$ac_ext <<EOF
18044 #line 18045 "configure"
18045 #include "confdefs.h"
18046
18047 #ifdef HAVE_DB_185_H
18048 # include <db_185.h>
18049 #else
18050 # include <db.h>
18051 #endif
18052
18053 #ifndef DB_VERSION_MAJOR
18054 # define DB_VERSION_MAJOR 1
18055 #endif
18056
18057 #ifndef NULL
18058 #define NULL ((void*)0)
18059 #endif
18060
18061 int main() {
18062
18063 #if DB_VERSION_MAJOR > 1
18064         {
18065                 char *version;
18066                 int major, minor, patch;
18067
18068                 version = db_version( &major, &minor, &patch );
18069
18070                 if( major != DB_VERSION_MAJOR ||
18071                         minor < DB_VERSION_MINOR )
18072                 {
18073                         printf("Berkeley DB version mismatch\n"
18074                                 "\texpected: %s\n\tgot: %s\n",
18075                                 DB_VERSION_STRING, version);
18076                         return 1;
18077                 }
18078         }
18079 #endif
18080
18081 #if DB_VERSION_MAJOR > 2
18082         db_env_create( NULL, 0 );
18083 #elif DB_VERSION_MAJOR > 1
18084         db_appexit( NULL );
18085 #else
18086         (void) dbopen( NULL, 0, 0, 0, NULL);
18087 #endif
18088
18089 ; return 0; }
18090 EOF
18091 if { (eval echo configure:18092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18092   rm -rf conftest*
18093   ol_cv_db_db_4=yes
18094 else
18095   echo "configure: failed program was:" >&5
18096   cat conftest.$ac_ext >&5
18097   rm -rf conftest*
18098   ol_cv_db_db_4=no
18099 fi
18100 rm -f conftest*
18101
18102         LIBS="$ol_LIBS"
18103
18104 fi
18105
18106 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18107
18108         if test $ol_cv_db_db_4 = yes ; then
18109                 ol_cv_lib_db=-ldb-4
18110         fi
18111 fi
18112
18113 if test $ol_cv_lib_db = no ; then
18114         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18115 echo "configure:18116: checking for Berkeley DB link (-ldb)" >&5
18116 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18117   echo $ac_n "(cached) $ac_c" 1>&6
18118 else
18119   
18120         ol_DB_LIB=-ldb
18121         ol_LIBS=$LIBS
18122         LIBS="$ol_DB_LIB $LIBS"
18123
18124         cat > conftest.$ac_ext <<EOF
18125 #line 18126 "configure"
18126 #include "confdefs.h"
18127
18128 #ifdef HAVE_DB_185_H
18129 # include <db_185.h>
18130 #else
18131 # include <db.h>
18132 #endif
18133
18134 #ifndef DB_VERSION_MAJOR
18135 # define DB_VERSION_MAJOR 1
18136 #endif
18137
18138 #ifndef NULL
18139 #define NULL ((void*)0)
18140 #endif
18141
18142 int main() {
18143
18144 #if DB_VERSION_MAJOR > 1
18145         {
18146                 char *version;
18147                 int major, minor, patch;
18148
18149                 version = db_version( &major, &minor, &patch );
18150
18151                 if( major != DB_VERSION_MAJOR ||
18152                         minor < DB_VERSION_MINOR )
18153                 {
18154                         printf("Berkeley DB version mismatch\n"
18155                                 "\texpected: %s\n\tgot: %s\n",
18156                                 DB_VERSION_STRING, version);
18157                         return 1;
18158                 }
18159         }
18160 #endif
18161
18162 #if DB_VERSION_MAJOR > 2
18163         db_env_create( NULL, 0 );
18164 #elif DB_VERSION_MAJOR > 1
18165         db_appexit( NULL );
18166 #else
18167         (void) dbopen( NULL, 0, 0, 0, NULL);
18168 #endif
18169
18170 ; return 0; }
18171 EOF
18172 if { (eval echo configure:18173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18173   rm -rf conftest*
18174   ol_cv_db_db=yes
18175 else
18176   echo "configure: failed program was:" >&5
18177   cat conftest.$ac_ext >&5
18178   rm -rf conftest*
18179   ol_cv_db_db=no
18180 fi
18181 rm -f conftest*
18182
18183         LIBS="$ol_LIBS"
18184
18185 fi
18186
18187 echo "$ac_t""$ol_cv_db_db" 1>&6
18188
18189         if test $ol_cv_db_db = yes ; then
18190                 ol_cv_lib_db=-ldb
18191         fi
18192 fi
18193
18194 if test $ol_cv_lib_db = no ; then
18195         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
18196 echo "configure:18197: checking for Berkeley DB link (-ldb3)" >&5
18197 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
18198   echo $ac_n "(cached) $ac_c" 1>&6
18199 else
18200   
18201         ol_DB_LIB=-ldb3
18202         ol_LIBS=$LIBS
18203         LIBS="$ol_DB_LIB $LIBS"
18204
18205         cat > conftest.$ac_ext <<EOF
18206 #line 18207 "configure"
18207 #include "confdefs.h"
18208
18209 #ifdef HAVE_DB_185_H
18210 # include <db_185.h>
18211 #else
18212 # include <db.h>
18213 #endif
18214
18215 #ifndef DB_VERSION_MAJOR
18216 # define DB_VERSION_MAJOR 1
18217 #endif
18218
18219 #ifndef NULL
18220 #define NULL ((void*)0)
18221 #endif
18222
18223 int main() {
18224
18225 #if DB_VERSION_MAJOR > 1
18226         {
18227                 char *version;
18228                 int major, minor, patch;
18229
18230                 version = db_version( &major, &minor, &patch );
18231
18232                 if( major != DB_VERSION_MAJOR ||
18233                         minor < DB_VERSION_MINOR )
18234                 {
18235                         printf("Berkeley DB version mismatch\n"
18236                                 "\texpected: %s\n\tgot: %s\n",
18237                                 DB_VERSION_STRING, version);
18238                         return 1;
18239                 }
18240         }
18241 #endif
18242
18243 #if DB_VERSION_MAJOR > 2
18244         db_env_create( NULL, 0 );
18245 #elif DB_VERSION_MAJOR > 1
18246         db_appexit( NULL );
18247 #else
18248         (void) dbopen( NULL, 0, 0, 0, NULL);
18249 #endif
18250
18251 ; return 0; }
18252 EOF
18253 if { (eval echo configure:18254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18254   rm -rf conftest*
18255   ol_cv_db_db3=yes
18256 else
18257   echo "configure: failed program was:" >&5
18258   cat conftest.$ac_ext >&5
18259   rm -rf conftest*
18260   ol_cv_db_db3=no
18261 fi
18262 rm -f conftest*
18263
18264         LIBS="$ol_LIBS"
18265
18266 fi
18267
18268 echo "$ac_t""$ol_cv_db_db3" 1>&6
18269
18270         if test $ol_cv_db_db3 = yes ; then
18271                 ol_cv_lib_db=-ldb3
18272         fi
18273 fi
18274
18275 if test $ol_cv_lib_db = no ; then
18276         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
18277 echo "configure:18278: checking for Berkeley DB link (-ldb-3)" >&5
18278 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
18279   echo $ac_n "(cached) $ac_c" 1>&6
18280 else
18281   
18282         ol_DB_LIB=-ldb-3
18283         ol_LIBS=$LIBS
18284         LIBS="$ol_DB_LIB $LIBS"
18285
18286         cat > conftest.$ac_ext <<EOF
18287 #line 18288 "configure"
18288 #include "confdefs.h"
18289
18290 #ifdef HAVE_DB_185_H
18291 # include <db_185.h>
18292 #else
18293 # include <db.h>
18294 #endif
18295
18296 #ifndef DB_VERSION_MAJOR
18297 # define DB_VERSION_MAJOR 1
18298 #endif
18299
18300 #ifndef NULL
18301 #define NULL ((void*)0)
18302 #endif
18303
18304 int main() {
18305
18306 #if DB_VERSION_MAJOR > 1
18307         {
18308                 char *version;
18309                 int major, minor, patch;
18310
18311                 version = db_version( &major, &minor, &patch );
18312
18313                 if( major != DB_VERSION_MAJOR ||
18314                         minor < DB_VERSION_MINOR )
18315                 {
18316                         printf("Berkeley DB version mismatch\n"
18317                                 "\texpected: %s\n\tgot: %s\n",
18318                                 DB_VERSION_STRING, version);
18319                         return 1;
18320                 }
18321         }
18322 #endif
18323
18324 #if DB_VERSION_MAJOR > 2
18325         db_env_create( NULL, 0 );
18326 #elif DB_VERSION_MAJOR > 1
18327         db_appexit( NULL );
18328 #else
18329         (void) dbopen( NULL, 0, 0, 0, NULL);
18330 #endif
18331
18332 ; return 0; }
18333 EOF
18334 if { (eval echo configure:18335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18335   rm -rf conftest*
18336   ol_cv_db_db_3=yes
18337 else
18338   echo "configure: failed program was:" >&5
18339   cat conftest.$ac_ext >&5
18340   rm -rf conftest*
18341   ol_cv_db_db_3=no
18342 fi
18343 rm -f conftest*
18344
18345         LIBS="$ol_LIBS"
18346
18347 fi
18348
18349 echo "$ac_t""$ol_cv_db_db_3" 1>&6
18350
18351         if test $ol_cv_db_db_3 = yes ; then
18352                 ol_cv_lib_db=-ldb-3
18353         fi
18354 fi
18355
18356 if test $ol_cv_lib_db = no ; then
18357         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
18358 echo "configure:18359: checking for Berkeley DB link (-ldb2)" >&5
18359 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
18360   echo $ac_n "(cached) $ac_c" 1>&6
18361 else
18362   
18363         ol_DB_LIB=-ldb2
18364         ol_LIBS=$LIBS
18365         LIBS="$ol_DB_LIB $LIBS"
18366
18367         cat > conftest.$ac_ext <<EOF
18368 #line 18369 "configure"
18369 #include "confdefs.h"
18370
18371 #ifdef HAVE_DB_185_H
18372 # include <db_185.h>
18373 #else
18374 # include <db.h>
18375 #endif
18376
18377 #ifndef DB_VERSION_MAJOR
18378 # define DB_VERSION_MAJOR 1
18379 #endif
18380
18381 #ifndef NULL
18382 #define NULL ((void*)0)
18383 #endif
18384
18385 int main() {
18386
18387 #if DB_VERSION_MAJOR > 1
18388         {
18389                 char *version;
18390                 int major, minor, patch;
18391
18392                 version = db_version( &major, &minor, &patch );
18393
18394                 if( major != DB_VERSION_MAJOR ||
18395                         minor < DB_VERSION_MINOR )
18396                 {
18397                         printf("Berkeley DB version mismatch\n"
18398                                 "\texpected: %s\n\tgot: %s\n",
18399                                 DB_VERSION_STRING, version);
18400                         return 1;
18401                 }
18402         }
18403 #endif
18404
18405 #if DB_VERSION_MAJOR > 2
18406         db_env_create( NULL, 0 );
18407 #elif DB_VERSION_MAJOR > 1
18408         db_appexit( NULL );
18409 #else
18410         (void) dbopen( NULL, 0, 0, 0, NULL);
18411 #endif
18412
18413 ; return 0; }
18414 EOF
18415 if { (eval echo configure:18416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18416   rm -rf conftest*
18417   ol_cv_db_db2=yes
18418 else
18419   echo "configure: failed program was:" >&5
18420   cat conftest.$ac_ext >&5
18421   rm -rf conftest*
18422   ol_cv_db_db2=no
18423 fi
18424 rm -f conftest*
18425
18426         LIBS="$ol_LIBS"
18427
18428 fi
18429
18430 echo "$ac_t""$ol_cv_db_db2" 1>&6
18431
18432         if test $ol_cv_db_db2 = yes ; then
18433                 ol_cv_lib_db=-ldb2
18434         fi
18435 fi
18436
18437 if test $ol_cv_lib_db = no ; then
18438         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18439 echo "configure:18440: checking for Berkeley DB link (-ldb-2)" >&5
18440 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18441   echo $ac_n "(cached) $ac_c" 1>&6
18442 else
18443   
18444         ol_DB_LIB=-ldb-2
18445         ol_LIBS=$LIBS
18446         LIBS="$ol_DB_LIB $LIBS"
18447
18448         cat > conftest.$ac_ext <<EOF
18449 #line 18450 "configure"
18450 #include "confdefs.h"
18451
18452 #ifdef HAVE_DB_185_H
18453 # include <db_185.h>
18454 #else
18455 # include <db.h>
18456 #endif
18457
18458 #ifndef DB_VERSION_MAJOR
18459 # define DB_VERSION_MAJOR 1
18460 #endif
18461
18462 #ifndef NULL
18463 #define NULL ((void*)0)
18464 #endif
18465
18466 int main() {
18467
18468 #if DB_VERSION_MAJOR > 1
18469         {
18470                 char *version;
18471                 int major, minor, patch;
18472
18473                 version = db_version( &major, &minor, &patch );
18474
18475                 if( major != DB_VERSION_MAJOR ||
18476                         minor < DB_VERSION_MINOR )
18477                 {
18478                         printf("Berkeley DB version mismatch\n"
18479                                 "\texpected: %s\n\tgot: %s\n",
18480                                 DB_VERSION_STRING, version);
18481                         return 1;
18482                 }
18483         }
18484 #endif
18485
18486 #if DB_VERSION_MAJOR > 2
18487         db_env_create( NULL, 0 );
18488 #elif DB_VERSION_MAJOR > 1
18489         db_appexit( NULL );
18490 #else
18491         (void) dbopen( NULL, 0, 0, 0, NULL);
18492 #endif
18493
18494 ; return 0; }
18495 EOF
18496 if { (eval echo configure:18497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18497   rm -rf conftest*
18498   ol_cv_db_db_2=yes
18499 else
18500   echo "configure: failed program was:" >&5
18501   cat conftest.$ac_ext >&5
18502   rm -rf conftest*
18503   ol_cv_db_db_2=no
18504 fi
18505 rm -f conftest*
18506
18507         LIBS="$ol_LIBS"
18508
18509 fi
18510
18511 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18512
18513         if test $ol_cv_db_db_2 = yes ; then
18514                 ol_cv_lib_db=-ldb-2
18515         fi
18516 fi
18517
18518 if test $ol_cv_lib_db = no ; then
18519         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18520 echo "configure:18521: checking for Berkeley DB link (-ldb1)" >&5
18521 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18522   echo $ac_n "(cached) $ac_c" 1>&6
18523 else
18524   
18525         ol_DB_LIB=-ldb1
18526         ol_LIBS=$LIBS
18527         LIBS="$ol_DB_LIB $LIBS"
18528
18529         cat > conftest.$ac_ext <<EOF
18530 #line 18531 "configure"
18531 #include "confdefs.h"
18532
18533 #ifdef HAVE_DB_185_H
18534 # include <db_185.h>
18535 #else
18536 # include <db.h>
18537 #endif
18538
18539 #ifndef DB_VERSION_MAJOR
18540 # define DB_VERSION_MAJOR 1
18541 #endif
18542
18543 #ifndef NULL
18544 #define NULL ((void*)0)
18545 #endif
18546
18547 int main() {
18548
18549 #if DB_VERSION_MAJOR > 1
18550         {
18551                 char *version;
18552                 int major, minor, patch;
18553
18554                 version = db_version( &major, &minor, &patch );
18555
18556                 if( major != DB_VERSION_MAJOR ||
18557                         minor < DB_VERSION_MINOR )
18558                 {
18559                         printf("Berkeley DB version mismatch\n"
18560                                 "\texpected: %s\n\tgot: %s\n",
18561                                 DB_VERSION_STRING, version);
18562                         return 1;
18563                 }
18564         }
18565 #endif
18566
18567 #if DB_VERSION_MAJOR > 2
18568         db_env_create( NULL, 0 );
18569 #elif DB_VERSION_MAJOR > 1
18570         db_appexit( NULL );
18571 #else
18572         (void) dbopen( NULL, 0, 0, 0, NULL);
18573 #endif
18574
18575 ; return 0; }
18576 EOF
18577 if { (eval echo configure:18578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18578   rm -rf conftest*
18579   ol_cv_db_db1=yes
18580 else
18581   echo "configure: failed program was:" >&5
18582   cat conftest.$ac_ext >&5
18583   rm -rf conftest*
18584   ol_cv_db_db1=no
18585 fi
18586 rm -f conftest*
18587
18588         LIBS="$ol_LIBS"
18589
18590 fi
18591
18592 echo "$ac_t""$ol_cv_db_db1" 1>&6
18593
18594         if test $ol_cv_db_db1 = yes ; then
18595                 ol_cv_lib_db=-ldb1
18596         fi
18597 fi
18598
18599 if test $ol_cv_lib_db = no ; then
18600         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18601 echo "configure:18602: checking for Berkeley DB link (-ldb-1)" >&5
18602 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18603   echo $ac_n "(cached) $ac_c" 1>&6
18604 else
18605   
18606         ol_DB_LIB=-ldb-1
18607         ol_LIBS=$LIBS
18608         LIBS="$ol_DB_LIB $LIBS"
18609
18610         cat > conftest.$ac_ext <<EOF
18611 #line 18612 "configure"
18612 #include "confdefs.h"
18613
18614 #ifdef HAVE_DB_185_H
18615 # include <db_185.h>
18616 #else
18617 # include <db.h>
18618 #endif
18619
18620 #ifndef DB_VERSION_MAJOR
18621 # define DB_VERSION_MAJOR 1
18622 #endif
18623
18624 #ifndef NULL
18625 #define NULL ((void*)0)
18626 #endif
18627
18628 int main() {
18629
18630 #if DB_VERSION_MAJOR > 1
18631         {
18632                 char *version;
18633                 int major, minor, patch;
18634
18635                 version = db_version( &major, &minor, &patch );
18636
18637                 if( major != DB_VERSION_MAJOR ||
18638                         minor < DB_VERSION_MINOR )
18639                 {
18640                         printf("Berkeley DB version mismatch\n"
18641                                 "\texpected: %s\n\tgot: %s\n",
18642                                 DB_VERSION_STRING, version);
18643                         return 1;
18644                 }
18645         }
18646 #endif
18647
18648 #if DB_VERSION_MAJOR > 2
18649         db_env_create( NULL, 0 );
18650 #elif DB_VERSION_MAJOR > 1
18651         db_appexit( NULL );
18652 #else
18653         (void) dbopen( NULL, 0, 0, 0, NULL);
18654 #endif
18655
18656 ; return 0; }
18657 EOF
18658 if { (eval echo configure:18659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18659   rm -rf conftest*
18660   ol_cv_db_db_1=yes
18661 else
18662   echo "configure: failed program was:" >&5
18663   cat conftest.$ac_ext >&5
18664   rm -rf conftest*
18665   ol_cv_db_db_1=no
18666 fi
18667 rm -f conftest*
18668
18669         LIBS="$ol_LIBS"
18670
18671 fi
18672
18673 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18674
18675         if test $ol_cv_db_db_1 = yes ; then
18676                 ol_cv_lib_db=-ldb-1
18677         fi
18678 fi
18679
18680
18681         if test "$ol_cv_lib_db" != no ; then
18682                 ol_cv_berkeley_db=yes
18683                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
18684 echo "configure:18685: checking for Berkeley DB thread support" >&5
18685 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
18686   echo $ac_n "(cached) $ac_c" 1>&6
18687 else
18688   
18689         ol_LIBS="$LIBS"
18690         if test $ol_cv_lib_db != yes ; then
18691                 LIBS="$ol_cv_lib_db"
18692         fi
18693
18694         if test "$cross_compiling" = yes; then
18695   ol_cv_berkeley_db_thread=cross
18696 else
18697   cat > conftest.$ac_ext <<EOF
18698 #line 18699 "configure"
18699 #include "confdefs.h"
18700
18701 #ifdef HAVE_DB_185_H
18702         choke me;
18703 #else
18704 #include <db.h>
18705 #endif
18706 #ifndef NULL
18707 #define NULL ((void *)0)
18708 #endif
18709 main()
18710 {
18711         int rc;
18712         u_int32_t flags = DB_CREATE |
18713 #ifdef DB_PRIVATE
18714                 DB_PRIVATE |
18715 #endif
18716                 DB_THREAD;
18717
18718 #if DB_VERSION_MAJOR > 2
18719         DB_ENV *env = NULL;
18720
18721         rc = db_env_create( &env, 0 );
18722
18723         flags |= DB_INIT_MPOOL;
18724 #ifdef DB_MPOOL_PRIVATE
18725         flags |= DB_MPOOL_PRIVATE;
18726 #endif
18727
18728         if( rc ) {
18729                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18730                 return rc;
18731         }
18732
18733 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
18734         rc = env->open( env, NULL, flags, 0 );
18735 #else
18736         rc = env->open( env, NULL, NULL, flags, 0 );
18737 #endif
18738
18739         if ( rc == 0 ) {
18740                 rc = env->close( env, 0 );
18741         }
18742
18743         if( rc ) {
18744                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18745                 return rc;
18746         }
18747
18748 #else
18749         DB_ENV env;
18750         memset( &env, '\0', sizeof(env) );
18751
18752         rc = db_appinit( NULL, NULL, &env, flags );
18753
18754         if( rc == 0 ) {
18755                 db_appexit( &env );
18756         }
18757
18758         unlink("__db_mpool.share");
18759         unlink("__db_lock.share");
18760 #endif
18761
18762         return rc;
18763 }
18764 EOF
18765 if { (eval echo configure:18766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
18766 then
18767   ol_cv_berkeley_db_thread=yes
18768 else
18769   echo "configure: failed program was:" >&5
18770   cat conftest.$ac_ext >&5
18771   rm -fr conftest*
18772   ol_cv_berkeley_db_thread=no
18773 fi
18774 rm -fr conftest*
18775 fi
18776
18777
18778         LIBS="$ol_LIBS"
18779
18780         if test $ol_cv_berkeley_db_thread != no ; then
18781                 cat >> confdefs.h <<\EOF
18782 #define HAVE_BERKELEY_DB_THREAD 1
18783 EOF
18784
18785         fi
18786
18787 fi
18788
18789 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
18790         fi
18791 fi
18792
18793         fi
18794
18795         if test $ol_cv_berkeley_db != no ; then
18796                 cat >> confdefs.h <<\EOF
18797 #define HAVE_BERKELEY_DB 1
18798 EOF
18799
18800
18801                 ol_link_ldbm=berkeley
18802                 ol_with_ldbm_api=berkeley
18803
18804                 if test $ol_with_ldbm_type = hash ; then
18805                         cat >> confdefs.h <<\EOF
18806 #define LDBM_USE_DBHASH 1
18807 EOF
18808
18809                 else
18810                         cat >> confdefs.h <<\EOF
18811 #define LDBM_USE_DBBTREE 1
18812 EOF
18813
18814                 fi
18815
18816                                                 if test $ol_cv_lib_db != yes ; then
18817                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
18818                 fi
18819         fi
18820 fi
18821
18822 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
18823         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
18824 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
18825         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
18826 echo "configure:18827: checking Berkeley DB version for BDB backend" >&5
18827 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
18828   echo $ac_n "(cached) $ac_c" 1>&6
18829 else
18830   
18831         cat > conftest.$ac_ext <<EOF
18832 #line 18833 "configure"
18833 #include "confdefs.h"
18834
18835 #include <db.h>
18836
18837  /* this check could be improved */
18838 #ifndef DB_VERSION_MAJOR
18839 #       define DB_VERSION_MAJOR 1
18840 #endif
18841
18842 /* require 4.0 or later */
18843 #if DB_VERSION_MAJOR >= 4 
18844         __db_version_compat
18845 #endif
18846         
18847 EOF
18848 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18849   egrep "__db_version_compat" >/dev/null 2>&1; then
18850   rm -rf conftest*
18851   ol_cv_bdb_compat=yes
18852 else
18853   rm -rf conftest*
18854   ol_cv_bdb_compat=no
18855 fi
18856 rm -f conftest*
18857
18858 fi
18859
18860 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
18861
18862
18863         if test $ol_cv_bdb_compat = yes ; then
18864                 ol_enable_bdb=yes
18865         elif test $ol_enable_bdb = yes ; then
18866                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
18867         else
18868                 ol_enable_bdb=no
18869         fi
18870 fi
18871
18872 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
18873         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
18874         ol_with_ldbm_api=none
18875 fi
18876
18877 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
18878         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
18879 echo "configure:18880: checking for MDBM library" >&5
18880 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
18881   echo $ac_n "(cached) $ac_c" 1>&6
18882 else
18883         ol_LIBS="$LIBS"
18884         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
18885 echo "configure:18886: checking for mdbm_set_chain" >&5
18886 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
18887   echo $ac_n "(cached) $ac_c" 1>&6
18888 else
18889   cat > conftest.$ac_ext <<EOF
18890 #line 18891 "configure"
18891 #include "confdefs.h"
18892 /* System header to define __stub macros and hopefully few prototypes,
18893     which can conflict with char mdbm_set_chain(); below.  */
18894 #include <assert.h>
18895 /* Override any gcc2 internal prototype to avoid an error.  */
18896 /* We use char because int might match the return type of a gcc2
18897     builtin and then its argument prototype would still apply.  */
18898 char mdbm_set_chain();
18899 char (*f)();
18900
18901 int main() {
18902
18903 /* The GNU C library defines this for functions which it implements
18904     to always fail with ENOSYS.  Some functions are actually named
18905     something starting with __ and the normal name is an alias.  */
18906 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
18907 choke me
18908 #else
18909 f = mdbm_set_chain;
18910 #endif
18911
18912 ; return 0; }
18913 EOF
18914 if { (eval echo configure:18915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18915   rm -rf conftest*
18916   eval "ac_cv_func_mdbm_set_chain=yes"
18917 else
18918   echo "configure: failed program was:" >&5
18919   cat conftest.$ac_ext >&5
18920   rm -rf conftest*
18921   eval "ac_cv_func_mdbm_set_chain=no"
18922 fi
18923 rm -f conftest*
18924 fi
18925
18926 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
18927   echo "$ac_t""yes" 1>&6
18928   ol_cv_lib_mdbm=yes
18929 else
18930   echo "$ac_t""no" 1>&6
18931
18932                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
18933 echo "configure:18934: checking for mdbm_set_chain in -lmdbm" >&5
18934 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
18935 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18936   echo $ac_n "(cached) $ac_c" 1>&6
18937 else
18938   ac_save_LIBS="$LIBS"
18939 LIBS="-lmdbm  $LIBS"
18940 cat > conftest.$ac_ext <<EOF
18941 #line 18942 "configure"
18942 #include "confdefs.h"
18943 /* Override any gcc2 internal prototype to avoid an error.  */
18944 /* We use char because int might match the return type of a gcc2
18945     builtin and then its argument prototype would still apply.  */
18946 char mdbm_set_chain();
18947
18948 int main() {
18949 mdbm_set_chain()
18950 ; return 0; }
18951 EOF
18952 if { (eval echo configure:18953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18953   rm -rf conftest*
18954   eval "ac_cv_lib_$ac_lib_var=yes"
18955 else
18956   echo "configure: failed program was:" >&5
18957   cat conftest.$ac_ext >&5
18958   rm -rf conftest*
18959   eval "ac_cv_lib_$ac_lib_var=no"
18960 fi
18961 rm -f conftest*
18962 LIBS="$ac_save_LIBS"
18963
18964 fi
18965 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18966   echo "$ac_t""yes" 1>&6
18967   ol_cv_lib_mdbm=-lmdbm
18968 else
18969   echo "$ac_t""no" 1>&6
18970 ol_cv_lib_mdbm=no
18971 fi
18972
18973         
18974 fi
18975
18976         LIBS="$ol_LIBS"
18977
18978 fi
18979
18980 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
18981
18982
18983  for ac_hdr in mdbm.h
18984 do
18985 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18986 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18987 echo "configure:18988: checking for $ac_hdr" >&5
18988 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18989   echo $ac_n "(cached) $ac_c" 1>&6
18990 else
18991   cat > conftest.$ac_ext <<EOF
18992 #line 18993 "configure"
18993 #include "confdefs.h"
18994 #include <$ac_hdr>
18995 EOF
18996 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18997 { (eval echo configure:18998: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18998 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18999 if test -z "$ac_err"; then
19000   rm -rf conftest*
19001   eval "ac_cv_header_$ac_safe=yes"
19002 else
19003   echo "$ac_err" >&5
19004   echo "configure: failed program was:" >&5
19005   cat conftest.$ac_ext >&5
19006   rm -rf conftest*
19007   eval "ac_cv_header_$ac_safe=no"
19008 fi
19009 rm -f conftest*
19010 fi
19011 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19012   echo "$ac_t""yes" 1>&6
19013     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19014   cat >> confdefs.h <<EOF
19015 #define $ac_tr_hdr 1
19016 EOF
19017  
19018 else
19019   echo "$ac_t""no" 1>&6
19020 fi
19021 done
19022
19023  echo $ac_n "checking for db""... $ac_c" 1>&6
19024 echo "configure:19025: checking for db" >&5
19025 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
19026   echo $ac_n "(cached) $ac_c" 1>&6
19027 else
19028   
19029         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
19030                 ol_cv_mdbm=no
19031         else
19032                 ol_cv_mdbm=yes
19033         fi
19034
19035 fi
19036
19037 echo "$ac_t""$ol_cv_mdbm" 1>&6
19038  if test $ol_cv_mdbm = yes ; then
19039         cat >> confdefs.h <<\EOF
19040 #define HAVE_MDBM 1
19041 EOF
19042
19043  fi
19044
19045
19046         if test $ol_cv_mdbm = yes ; then
19047                 ol_link_ldbm=mdbm
19048                 ol_with_ldbm_api=mdbm
19049                 if test $ol_cv_lib_mdbm != yes ; then
19050                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
19051                 fi
19052         fi
19053 fi
19054
19055 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
19056         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
19057 echo "configure:19058: checking for GDBM library" >&5
19058 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
19059   echo $ac_n "(cached) $ac_c" 1>&6
19060 else
19061         ol_LIBS="$LIBS"
19062         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
19063 echo "configure:19064: checking for gdbm_open" >&5
19064 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
19065   echo $ac_n "(cached) $ac_c" 1>&6
19066 else
19067   cat > conftest.$ac_ext <<EOF
19068 #line 19069 "configure"
19069 #include "confdefs.h"
19070 /* System header to define __stub macros and hopefully few prototypes,
19071     which can conflict with char gdbm_open(); below.  */
19072 #include <assert.h>
19073 /* Override any gcc2 internal prototype to avoid an error.  */
19074 /* We use char because int might match the return type of a gcc2
19075     builtin and then its argument prototype would still apply.  */
19076 char gdbm_open();
19077 char (*f)();
19078
19079 int main() {
19080
19081 /* The GNU C library defines this for functions which it implements
19082     to always fail with ENOSYS.  Some functions are actually named
19083     something starting with __ and the normal name is an alias.  */
19084 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
19085 choke me
19086 #else
19087 f = gdbm_open;
19088 #endif
19089
19090 ; return 0; }
19091 EOF
19092 if { (eval echo configure:19093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19093   rm -rf conftest*
19094   eval "ac_cv_func_gdbm_open=yes"
19095 else
19096   echo "configure: failed program was:" >&5
19097   cat conftest.$ac_ext >&5
19098   rm -rf conftest*
19099   eval "ac_cv_func_gdbm_open=no"
19100 fi
19101 rm -f conftest*
19102 fi
19103
19104 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
19105   echo "$ac_t""yes" 1>&6
19106   ol_cv_lib_gdbm=yes
19107 else
19108   echo "$ac_t""no" 1>&6
19109
19110                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
19111 echo "configure:19112: checking for gdbm_open in -lgdbm" >&5
19112 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
19113 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19114   echo $ac_n "(cached) $ac_c" 1>&6
19115 else
19116   ac_save_LIBS="$LIBS"
19117 LIBS="-lgdbm  $LIBS"
19118 cat > conftest.$ac_ext <<EOF
19119 #line 19120 "configure"
19120 #include "confdefs.h"
19121 /* Override any gcc2 internal prototype to avoid an error.  */
19122 /* We use char because int might match the return type of a gcc2
19123     builtin and then its argument prototype would still apply.  */
19124 char gdbm_open();
19125
19126 int main() {
19127 gdbm_open()
19128 ; return 0; }
19129 EOF
19130 if { (eval echo configure:19131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19131   rm -rf conftest*
19132   eval "ac_cv_lib_$ac_lib_var=yes"
19133 else
19134   echo "configure: failed program was:" >&5
19135   cat conftest.$ac_ext >&5
19136   rm -rf conftest*
19137   eval "ac_cv_lib_$ac_lib_var=no"
19138 fi
19139 rm -f conftest*
19140 LIBS="$ac_save_LIBS"
19141
19142 fi
19143 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19144   echo "$ac_t""yes" 1>&6
19145   ol_cv_lib_gdbm=-lgdbm
19146 else
19147   echo "$ac_t""no" 1>&6
19148 ol_cv_lib_gdbm=no
19149 fi
19150
19151         
19152 fi
19153
19154         LIBS="$ol_LIBS"
19155
19156 fi
19157
19158 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
19159
19160
19161  for ac_hdr in gdbm.h
19162 do
19163 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19164 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19165 echo "configure:19166: checking for $ac_hdr" >&5
19166 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19167   echo $ac_n "(cached) $ac_c" 1>&6
19168 else
19169   cat > conftest.$ac_ext <<EOF
19170 #line 19171 "configure"
19171 #include "confdefs.h"
19172 #include <$ac_hdr>
19173 EOF
19174 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19175 { (eval echo configure:19176: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19176 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19177 if test -z "$ac_err"; then
19178   rm -rf conftest*
19179   eval "ac_cv_header_$ac_safe=yes"
19180 else
19181   echo "$ac_err" >&5
19182   echo "configure: failed program was:" >&5
19183   cat conftest.$ac_ext >&5
19184   rm -rf conftest*
19185   eval "ac_cv_header_$ac_safe=no"
19186 fi
19187 rm -f conftest*
19188 fi
19189 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19190   echo "$ac_t""yes" 1>&6
19191     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19192   cat >> confdefs.h <<EOF
19193 #define $ac_tr_hdr 1
19194 EOF
19195  
19196 else
19197   echo "$ac_t""no" 1>&6
19198 fi
19199 done
19200
19201  echo $ac_n "checking for db""... $ac_c" 1>&6
19202 echo "configure:19203: checking for db" >&5
19203 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
19204   echo $ac_n "(cached) $ac_c" 1>&6
19205 else
19206   
19207         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
19208                 ol_cv_gdbm=no
19209         else
19210                 ol_cv_gdbm=yes
19211         fi
19212
19213 fi
19214
19215 echo "$ac_t""$ol_cv_gdbm" 1>&6
19216  if test $ol_cv_gdbm = yes ; then
19217         cat >> confdefs.h <<\EOF
19218 #define HAVE_GDBM 1
19219 EOF
19220
19221  fi
19222
19223
19224         if test $ol_cv_gdbm = yes ; then
19225                 ol_link_ldbm=gdbm
19226                 ol_with_ldbm_api=gdbm
19227
19228                 if test $ol_cv_lib_gdbm != yes ; then
19229                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
19230                 fi
19231         fi
19232 fi
19233
19234 if test $ol_with_ldbm_api = ndbm ; then
19235         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
19236 echo "configure:19237: checking for NDBM library" >&5
19237 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
19238   echo $ac_n "(cached) $ac_c" 1>&6
19239 else
19240         ol_LIBS="$LIBS"
19241         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
19242 echo "configure:19243: checking for dbm_open" >&5
19243 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
19244   echo $ac_n "(cached) $ac_c" 1>&6
19245 else
19246   cat > conftest.$ac_ext <<EOF
19247 #line 19248 "configure"
19248 #include "confdefs.h"
19249 /* System header to define __stub macros and hopefully few prototypes,
19250     which can conflict with char dbm_open(); below.  */
19251 #include <assert.h>
19252 /* Override any gcc2 internal prototype to avoid an error.  */
19253 /* We use char because int might match the return type of a gcc2
19254     builtin and then its argument prototype would still apply.  */
19255 char dbm_open();
19256 char (*f)();
19257
19258 int main() {
19259
19260 /* The GNU C library defines this for functions which it implements
19261     to always fail with ENOSYS.  Some functions are actually named
19262     something starting with __ and the normal name is an alias.  */
19263 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
19264 choke me
19265 #else
19266 f = dbm_open;
19267 #endif
19268
19269 ; return 0; }
19270 EOF
19271 if { (eval echo configure:19272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19272   rm -rf conftest*
19273   eval "ac_cv_func_dbm_open=yes"
19274 else
19275   echo "configure: failed program was:" >&5
19276   cat conftest.$ac_ext >&5
19277   rm -rf conftest*
19278   eval "ac_cv_func_dbm_open=no"
19279 fi
19280 rm -f conftest*
19281 fi
19282
19283 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
19284   echo "$ac_t""yes" 1>&6
19285   ol_cv_lib_ndbm=yes
19286 else
19287   echo "$ac_t""no" 1>&6
19288
19289                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
19290 echo "configure:19291: checking for dbm_open in -lndbm" >&5
19291 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19292 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19293   echo $ac_n "(cached) $ac_c" 1>&6
19294 else
19295   ac_save_LIBS="$LIBS"
19296 LIBS="-lndbm  $LIBS"
19297 cat > conftest.$ac_ext <<EOF
19298 #line 19299 "configure"
19299 #include "confdefs.h"
19300 /* Override any gcc2 internal prototype to avoid an error.  */
19301 /* We use char because int might match the return type of a gcc2
19302     builtin and then its argument prototype would still apply.  */
19303 char dbm_open();
19304
19305 int main() {
19306 dbm_open()
19307 ; return 0; }
19308 EOF
19309 if { (eval echo configure:19310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19310   rm -rf conftest*
19311   eval "ac_cv_lib_$ac_lib_var=yes"
19312 else
19313   echo "configure: failed program was:" >&5
19314   cat conftest.$ac_ext >&5
19315   rm -rf conftest*
19316   eval "ac_cv_lib_$ac_lib_var=no"
19317 fi
19318 rm -f conftest*
19319 LIBS="$ac_save_LIBS"
19320
19321 fi
19322 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19323   echo "$ac_t""yes" 1>&6
19324   ol_cv_lib_ndbm=-lndbm
19325 else
19326   echo "$ac_t""no" 1>&6
19327
19328                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
19329 echo "configure:19330: checking for dbm_open in -ldbm" >&5
19330 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19331 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19332   echo $ac_n "(cached) $ac_c" 1>&6
19333 else
19334   ac_save_LIBS="$LIBS"
19335 LIBS="-ldbm  $LIBS"
19336 cat > conftest.$ac_ext <<EOF
19337 #line 19338 "configure"
19338 #include "confdefs.h"
19339 /* Override any gcc2 internal prototype to avoid an error.  */
19340 /* We use char because int might match the return type of a gcc2
19341     builtin and then its argument prototype would still apply.  */
19342 char dbm_open();
19343
19344 int main() {
19345 dbm_open()
19346 ; return 0; }
19347 EOF
19348 if { (eval echo configure:19349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19349   rm -rf conftest*
19350   eval "ac_cv_lib_$ac_lib_var=yes"
19351 else
19352   echo "configure: failed program was:" >&5
19353   cat conftest.$ac_ext >&5
19354   rm -rf conftest*
19355   eval "ac_cv_lib_$ac_lib_var=no"
19356 fi
19357 rm -f conftest*
19358 LIBS="$ac_save_LIBS"
19359
19360 fi
19361 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19362   echo "$ac_t""yes" 1>&6
19363   ol_cv_lib_ndbm=-ldbm
19364 else
19365   echo "$ac_t""no" 1>&6
19366 ol_cv_lib_ndbm=no
19367 fi
19368                 
19369 fi
19370
19371         
19372 fi
19373
19374         LIBS="$ol_LIBS"
19375
19376 fi
19377
19378 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
19379
19380
19381  for ac_hdr in ndbm.h
19382 do
19383 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19384 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19385 echo "configure:19386: checking for $ac_hdr" >&5
19386 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19387   echo $ac_n "(cached) $ac_c" 1>&6
19388 else
19389   cat > conftest.$ac_ext <<EOF
19390 #line 19391 "configure"
19391 #include "confdefs.h"
19392 #include <$ac_hdr>
19393 EOF
19394 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19395 { (eval echo configure:19396: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19396 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19397 if test -z "$ac_err"; then
19398   rm -rf conftest*
19399   eval "ac_cv_header_$ac_safe=yes"
19400 else
19401   echo "$ac_err" >&5
19402   echo "configure: failed program was:" >&5
19403   cat conftest.$ac_ext >&5
19404   rm -rf conftest*
19405   eval "ac_cv_header_$ac_safe=no"
19406 fi
19407 rm -f conftest*
19408 fi
19409 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19410   echo "$ac_t""yes" 1>&6
19411     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19412   cat >> confdefs.h <<EOF
19413 #define $ac_tr_hdr 1
19414 EOF
19415  
19416 else
19417   echo "$ac_t""no" 1>&6
19418 fi
19419 done
19420
19421  echo $ac_n "checking for db""... $ac_c" 1>&6
19422 echo "configure:19423: checking for db" >&5
19423 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
19424   echo $ac_n "(cached) $ac_c" 1>&6
19425 else
19426   
19427         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
19428                 ol_cv_ndbm=no
19429         else
19430                 ol_cv_ndbm=yes
19431         fi
19432
19433 fi
19434
19435 echo "$ac_t""$ol_cv_ndbm" 1>&6
19436  if test $ol_cv_ndbm = yes ; then
19437         cat >> confdefs.h <<\EOF
19438 #define HAVE_NDBM 1
19439 EOF
19440
19441  fi
19442
19443
19444         if test $ol_cv_ndbm = yes ; then
19445                 ol_link_ldbm=ndbm
19446                 ol_with_ldbm_api=ndbm
19447
19448                 if test $ol_cv_lib_ndbm != yes ; then
19449                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
19450                 fi
19451         fi
19452 fi
19453
19454 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
19455         echo "configure: warning: could not find suitable LDBM backend" 1>&2
19456         if test $ol_enable_ldbm = yes ; then
19457                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
19458         fi
19459
19460         echo "configure: warning: disabling LDBM" 1>&2
19461         ol_enable_ldbm=no
19462 fi
19463
19464 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
19465         BUILD_LIBS_DYNAMIC=shared
19466         cat >> confdefs.h <<\EOF
19467 #define LDAP_LIBS_DYNAMIC 1
19468 EOF
19469
19470 else
19471         BUILD_LIBS_DYNAMIC=static
19472 fi
19473
19474 if test $ol_enable_wrappers != no ; then
19475         for ac_hdr in tcpd.h
19476 do
19477 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19478 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19479 echo "configure:19480: checking for $ac_hdr" >&5
19480 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19481   echo $ac_n "(cached) $ac_c" 1>&6
19482 else
19483   cat > conftest.$ac_ext <<EOF
19484 #line 19485 "configure"
19485 #include "confdefs.h"
19486 #include <$ac_hdr>
19487 EOF
19488 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19489 { (eval echo configure:19490: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19490 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19491 if test -z "$ac_err"; then
19492   rm -rf conftest*
19493   eval "ac_cv_header_$ac_safe=yes"
19494 else
19495   echo "$ac_err" >&5
19496   echo "configure: failed program was:" >&5
19497   cat conftest.$ac_ext >&5
19498   rm -rf conftest*
19499   eval "ac_cv_header_$ac_safe=no"
19500 fi
19501 rm -f conftest*
19502 fi
19503 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19504   echo "$ac_t""yes" 1>&6
19505     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19506   cat >> confdefs.h <<EOF
19507 #define $ac_tr_hdr 1
19508 EOF
19509  
19510                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
19511 echo "configure:19512: checking for TCP wrappers library" >&5
19512                 save_LIBS="$LIBS"
19513                 LIBS="$LIBS -lwrap"
19514                 cat > conftest.$ac_ext <<EOF
19515 #line 19516 "configure"
19516 #include "confdefs.h"
19517
19518 #include <tcpd.h>
19519 int allow_severity = 0;
19520 int deny_severity  = 0;
19521
19522 struct request_info *req;
19523                 
19524 int main() {
19525
19526 hosts_access(req)
19527                 
19528 ; return 0; }
19529 EOF
19530 if { (eval echo configure:19531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19531   rm -rf conftest*
19532   echo "$ac_t""-lwrap" 1>&6
19533                 have_wrappers=yes
19534                 LIBS="$save_LIBS"
19535 else
19536   echo "configure: failed program was:" >&5
19537   cat conftest.$ac_ext >&5
19538   rm -rf conftest*
19539   
19540                                 LIBS="$LIBS -lnsl"
19541                 cat > conftest.$ac_ext <<EOF
19542 #line 19543 "configure"
19543 #include "confdefs.h"
19544
19545 #include <tcpd.h>
19546 int allow_severity = 0;
19547 int deny_severity  = 0;
19548
19549 struct request_info *req;
19550                 
19551 int main() {
19552
19553 hosts_access(req)
19554                 
19555 ; return 0; }
19556 EOF
19557 if { (eval echo configure:19558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19558   rm -rf conftest*
19559   echo "$ac_t""-lwrap -lnsl" 1>&6
19560                 have_wrappers=yes
19561                 LIBS="$save_LIBS -lnsl"
19562 else
19563   echo "configure: failed program was:" >&5
19564   cat conftest.$ac_ext >&5
19565   rm -rf conftest*
19566   
19567                 echo "$ac_t""no" 1>&6
19568                 have_wrappers=no
19569                 LIBS=$save_LIBS
19570 fi
19571 rm -f conftest*
19572 fi
19573 rm -f conftest*
19574 else
19575   echo "$ac_t""no" 1>&6
19576 have_wrappers=no
19577 fi
19578 done
19579
19580
19581         if test $have_wrappers = yes ; then
19582                 cat >> confdefs.h <<\EOF
19583 #define HAVE_TCPD 1
19584 EOF
19585
19586                 WRAP_LIBS="-lwrap"
19587         elif test $ol_enable_wrappers = yes ; then
19588                 { echo "configure: error: could not find TCP wrappers, select apppropriate options ore disable" 1>&2; exit 1; }
19589         else
19590                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
19591                 WRAP_LIBS=""
19592         fi
19593 fi
19594
19595 if test $ol_enable_syslog != no ; then
19596         echo $ac_n "checking for openlog""... $ac_c" 1>&6
19597 echo "configure:19598: checking for openlog" >&5
19598 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
19599   echo $ac_n "(cached) $ac_c" 1>&6
19600 else
19601   cat > conftest.$ac_ext <<EOF
19602 #line 19603 "configure"
19603 #include "confdefs.h"
19604 /* System header to define __stub macros and hopefully few prototypes,
19605     which can conflict with char openlog(); below.  */
19606 #include <assert.h>
19607 /* Override any gcc2 internal prototype to avoid an error.  */
19608 /* We use char because int might match the return type of a gcc2
19609     builtin and then its argument prototype would still apply.  */
19610 char openlog();
19611 char (*f)();
19612
19613 int main() {
19614
19615 /* The GNU C library defines this for functions which it implements
19616     to always fail with ENOSYS.  Some functions are actually named
19617     something starting with __ and the normal name is an alias.  */
19618 #if defined (__stub_openlog) || defined (__stub___openlog)
19619 choke me
19620 #else
19621 f = openlog;
19622 #endif
19623
19624 ; return 0; }
19625 EOF
19626 if { (eval echo configure:19627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19627   rm -rf conftest*
19628   eval "ac_cv_func_openlog=yes"
19629 else
19630   echo "configure: failed program was:" >&5
19631   cat conftest.$ac_ext >&5
19632   rm -rf conftest*
19633   eval "ac_cv_func_openlog=no"
19634 fi
19635 rm -f conftest*
19636 fi
19637
19638 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
19639   echo "$ac_t""yes" 1>&6
19640   :
19641 else
19642   echo "$ac_t""no" 1>&6
19643 fi
19644
19645         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
19646                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
19647         fi
19648         ol_enable_syslog=$ac_cv_func_openlog
19649 fi
19650
19651
19652 ol_link_sql=no
19653 if test $ol_enable_sql != no ; then
19654         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
19655 echo "configure:19656: checking for SQLDriverConnect in -liodbc" >&5
19656 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19657 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19658   echo $ac_n "(cached) $ac_c" 1>&6
19659 else
19660   ac_save_LIBS="$LIBS"
19661 LIBS="-liodbc  $LIBS"
19662 cat > conftest.$ac_ext <<EOF
19663 #line 19664 "configure"
19664 #include "confdefs.h"
19665 /* Override any gcc2 internal prototype to avoid an error.  */
19666 /* We use char because int might match the return type of a gcc2
19667     builtin and then its argument prototype would still apply.  */
19668 char SQLDriverConnect();
19669
19670 int main() {
19671 SQLDriverConnect()
19672 ; return 0; }
19673 EOF
19674 if { (eval echo configure:19675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19675   rm -rf conftest*
19676   eval "ac_cv_lib_$ac_lib_var=yes"
19677 else
19678   echo "configure: failed program was:" >&5
19679   cat conftest.$ac_ext >&5
19680   rm -rf conftest*
19681   eval "ac_cv_lib_$ac_lib_var=no"
19682 fi
19683 rm -f conftest*
19684 LIBS="$ac_save_LIBS"
19685
19686 fi
19687 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19688   echo "$ac_t""yes" 1>&6
19689   have_iodbc=yes
19690 else
19691   echo "$ac_t""no" 1>&6
19692 have_iodbc=no
19693 fi
19694
19695         if test $have_iodbc = yes ; then
19696                 ol_link_sql="-liodbc"
19697         else
19698                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
19699 echo "configure:19700: checking for SQLDriverConnect in -lodbc" >&5
19700 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19701 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19702   echo $ac_n "(cached) $ac_c" 1>&6
19703 else
19704   ac_save_LIBS="$LIBS"
19705 LIBS="-lodbc  $LIBS"
19706 cat > conftest.$ac_ext <<EOF
19707 #line 19708 "configure"
19708 #include "confdefs.h"
19709 /* Override any gcc2 internal prototype to avoid an error.  */
19710 /* We use char because int might match the return type of a gcc2
19711     builtin and then its argument prototype would still apply.  */
19712 char SQLDriverConnect();
19713
19714 int main() {
19715 SQLDriverConnect()
19716 ; return 0; }
19717 EOF
19718 if { (eval echo configure:19719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19719   rm -rf conftest*
19720   eval "ac_cv_lib_$ac_lib_var=yes"
19721 else
19722   echo "configure: failed program was:" >&5
19723   cat conftest.$ac_ext >&5
19724   rm -rf conftest*
19725   eval "ac_cv_lib_$ac_lib_var=no"
19726 fi
19727 rm -f conftest*
19728 LIBS="$ac_save_LIBS"
19729
19730 fi
19731 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19732   echo "$ac_t""yes" 1>&6
19733   have_odbc=yes
19734 else
19735   echo "$ac_t""no" 1>&6
19736 have_odbc=no
19737 fi
19738
19739                 if test $have_odbc = yes ; then
19740                         ol_link_sql="-lodbc"
19741                 fi
19742         fi
19743
19744         if test $ol_link_sql != no ; then
19745                 SLAPD_SQL_LIBS="$ol_link_sql"
19746
19747         elif test $ol_enable_sql != auto ; then
19748                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
19749         fi
19750 fi
19751
19752 ol_link_termcap=no
19753 for ac_hdr in termcap.h ncurses.h
19754 do
19755 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19756 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19757 echo "configure:19758: checking for $ac_hdr" >&5
19758 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19759   echo $ac_n "(cached) $ac_c" 1>&6
19760 else
19761   cat > conftest.$ac_ext <<EOF
19762 #line 19763 "configure"
19763 #include "confdefs.h"
19764 #include <$ac_hdr>
19765 EOF
19766 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19767 { (eval echo configure:19768: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19768 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19769 if test -z "$ac_err"; then
19770   rm -rf conftest*
19771   eval "ac_cv_header_$ac_safe=yes"
19772 else
19773   echo "$ac_err" >&5
19774   echo "configure: failed program was:" >&5
19775   cat conftest.$ac_ext >&5
19776   rm -rf conftest*
19777   eval "ac_cv_header_$ac_safe=no"
19778 fi
19779 rm -f conftest*
19780 fi
19781 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19782   echo "$ac_t""yes" 1>&6
19783     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19784   cat >> confdefs.h <<EOF
19785 #define $ac_tr_hdr 1
19786 EOF
19787  
19788 else
19789   echo "$ac_t""no" 1>&6
19790 fi
19791 done
19792
19793
19794 if test $ol_link_termcap = no ; then
19795         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
19796 echo "configure:19797: checking for tputs in -ltermcap" >&5
19797 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
19798 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19799   echo $ac_n "(cached) $ac_c" 1>&6
19800 else
19801   ac_save_LIBS="$LIBS"
19802 LIBS="-ltermcap  $LIBS"
19803 cat > conftest.$ac_ext <<EOF
19804 #line 19805 "configure"
19805 #include "confdefs.h"
19806 /* Override any gcc2 internal prototype to avoid an error.  */
19807 /* We use char because int might match the return type of a gcc2
19808     builtin and then its argument prototype would still apply.  */
19809 char tputs();
19810
19811 int main() {
19812 tputs()
19813 ; return 0; }
19814 EOF
19815 if { (eval echo configure:19816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19816   rm -rf conftest*
19817   eval "ac_cv_lib_$ac_lib_var=yes"
19818 else
19819   echo "configure: failed program was:" >&5
19820   cat conftest.$ac_ext >&5
19821   rm -rf conftest*
19822   eval "ac_cv_lib_$ac_lib_var=no"
19823 fi
19824 rm -f conftest*
19825 LIBS="$ac_save_LIBS"
19826
19827 fi
19828 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19829   echo "$ac_t""yes" 1>&6
19830   have_termcap=yes
19831 else
19832   echo "$ac_t""no" 1>&6
19833 have_termcap=no
19834 fi
19835
19836         if test $have_termcap = yes ; then
19837                 cat >> confdefs.h <<\EOF
19838 #define HAVE_TERMCAP 1
19839 EOF
19840
19841                 ol_link_termcap=yes
19842                 TERMCAP_LIBS=-ltermcap
19843         fi
19844 fi
19845
19846 if test $ol_link_termcap = no ; then
19847         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
19848 echo "configure:19849: checking for initscr in -lncurses" >&5
19849 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
19850 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19851   echo $ac_n "(cached) $ac_c" 1>&6
19852 else
19853   ac_save_LIBS="$LIBS"
19854 LIBS="-lncurses  $LIBS"
19855 cat > conftest.$ac_ext <<EOF
19856 #line 19857 "configure"
19857 #include "confdefs.h"
19858 /* Override any gcc2 internal prototype to avoid an error.  */
19859 /* We use char because int might match the return type of a gcc2
19860     builtin and then its argument prototype would still apply.  */
19861 char initscr();
19862
19863 int main() {
19864 initscr()
19865 ; return 0; }
19866 EOF
19867 if { (eval echo configure:19868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19868   rm -rf conftest*
19869   eval "ac_cv_lib_$ac_lib_var=yes"
19870 else
19871   echo "configure: failed program was:" >&5
19872   cat conftest.$ac_ext >&5
19873   rm -rf conftest*
19874   eval "ac_cv_lib_$ac_lib_var=no"
19875 fi
19876 rm -f conftest*
19877 LIBS="$ac_save_LIBS"
19878
19879 fi
19880 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19881   echo "$ac_t""yes" 1>&6
19882   have_ncurses=yes
19883 else
19884   echo "$ac_t""no" 1>&6
19885 have_ncurses=no
19886 fi
19887
19888         if test $have_ncurses = yes ; then
19889                 cat >> confdefs.h <<\EOF
19890 #define HAVE_NCURSES 1
19891 EOF
19892
19893                 ol_link_termcap=yes
19894                 TERMCAP_LIBS=-lncurses
19895         fi
19896 fi
19897
19898 if test $ol_link_termcap = no ; then
19899         cat >> confdefs.h <<\EOF
19900 #define NO_TERMCAP 1
19901 EOF
19902
19903         TERMCAP_LIBS=
19904 fi
19905
19906 ol_link_sasl=no
19907 ol_link_spasswd=no
19908 if test $ol_with_cyrus_sasl != no ; then
19909         for ac_hdr in sasl/sasl.h sasl.h
19910 do
19911 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19912 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19913 echo "configure:19914: checking for $ac_hdr" >&5
19914 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19915   echo $ac_n "(cached) $ac_c" 1>&6
19916 else
19917   cat > conftest.$ac_ext <<EOF
19918 #line 19919 "configure"
19919 #include "confdefs.h"
19920 #include <$ac_hdr>
19921 EOF
19922 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19923 { (eval echo configure:19924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19924 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19925 if test -z "$ac_err"; then
19926   rm -rf conftest*
19927   eval "ac_cv_header_$ac_safe=yes"
19928 else
19929   echo "$ac_err" >&5
19930   echo "configure: failed program was:" >&5
19931   cat conftest.$ac_ext >&5
19932   rm -rf conftest*
19933   eval "ac_cv_header_$ac_safe=no"
19934 fi
19935 rm -f conftest*
19936 fi
19937 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19938   echo "$ac_t""yes" 1>&6
19939     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19940   cat >> confdefs.h <<EOF
19941 #define $ac_tr_hdr 1
19942 EOF
19943  
19944 else
19945   echo "$ac_t""no" 1>&6
19946 fi
19947 done
19948
19949
19950         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
19951                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
19952 echo "configure:19953: checking for sasl_client_init in -lsasl2" >&5
19953 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
19954 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19955   echo $ac_n "(cached) $ac_c" 1>&6
19956 else
19957   ac_save_LIBS="$LIBS"
19958 LIBS="-lsasl2  $LIBS"
19959 cat > conftest.$ac_ext <<EOF
19960 #line 19961 "configure"
19961 #include "confdefs.h"
19962 /* Override any gcc2 internal prototype to avoid an error.  */
19963 /* We use char because int might match the return type of a gcc2
19964     builtin and then its argument prototype would still apply.  */
19965 char sasl_client_init();
19966
19967 int main() {
19968 sasl_client_init()
19969 ; return 0; }
19970 EOF
19971 if { (eval echo configure:19972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19972   rm -rf conftest*
19973   eval "ac_cv_lib_$ac_lib_var=yes"
19974 else
19975   echo "configure: failed program was:" >&5
19976   cat conftest.$ac_ext >&5
19977   rm -rf conftest*
19978   eval "ac_cv_lib_$ac_lib_var=no"
19979 fi
19980 rm -f conftest*
19981 LIBS="$ac_save_LIBS"
19982
19983 fi
19984 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19985   echo "$ac_t""yes" 1>&6
19986   ol_link_sasl="-lsasl2"
19987 else
19988   echo "$ac_t""no" 1>&6
19989 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
19990 echo "configure:19991: checking for sasl_client_init in -lsasl" >&5
19991 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
19992 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19993   echo $ac_n "(cached) $ac_c" 1>&6
19994 else
19995   ac_save_LIBS="$LIBS"
19996 LIBS="-lsasl  $LIBS"
19997 cat > conftest.$ac_ext <<EOF
19998 #line 19999 "configure"
19999 #include "confdefs.h"
20000 /* Override any gcc2 internal prototype to avoid an error.  */
20001 /* We use char because int might match the return type of a gcc2
20002     builtin and then its argument prototype would still apply.  */
20003 char sasl_client_init();
20004
20005 int main() {
20006 sasl_client_init()
20007 ; return 0; }
20008 EOF
20009 if { (eval echo configure:20010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20010   rm -rf conftest*
20011   eval "ac_cv_lib_$ac_lib_var=yes"
20012 else
20013   echo "configure: failed program was:" >&5
20014   cat conftest.$ac_ext >&5
20015   rm -rf conftest*
20016   eval "ac_cv_lib_$ac_lib_var=no"
20017 fi
20018 rm -f conftest*
20019 LIBS="$ac_save_LIBS"
20020
20021 fi
20022 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20023   echo "$ac_t""yes" 1>&6
20024   ol_link_sasl="-lsasl"
20025 else
20026   echo "$ac_t""no" 1>&6
20027 fi
20028
20029 fi
20030
20031         fi
20032
20033         if test $ol_link_sasl = no ; then
20034                 if test $ol_with_cyrus_sasl != auto ; then
20035                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
20036                 else
20037                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
20038                         echo "configure: warning: SASL authentication not supported!" 1>&2
20039                         if test $ol_link_tls = no ; then
20040                                 echo "configure: warning: Strong authentication not supported!" 1>&2
20041                         fi
20042                 fi
20043         else
20044                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
20045 echo "configure:20046: checking Cyrus SASL library version" >&5
20046 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
20047   echo $ac_n "(cached) $ac_c" 1>&6
20048 else
20049   
20050         cat > conftest.$ac_ext <<EOF
20051 #line 20052 "configure"
20052 #include "confdefs.h"
20053
20054 #ifdef HAVE_SASL_SASL_H
20055 #include <sasl/sasl.h>
20056 #else
20057 #include <sasl.h>
20058 #endif
20059
20060 /* require 2.1.3 or later */
20061 #if SASL_VERSION_MAJOR == 1  && SASL_VERSION_MINOR >= 5
20062         char *__sasl_compat = "1.5.x okay";
20063 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
20064         __sasl_compat "2.2+ or better okay (we guess)";
20065 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
20066         && SASL_VERSION_STEP >=3
20067         __sasl_compat = "2.1.3+ or better okay";
20068 #endif
20069         
20070 EOF
20071 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20072   egrep "__sasl_compat" >/dev/null 2>&1; then
20073   rm -rf conftest*
20074   ol_cv_sasl_compat=yes
20075 else
20076   rm -rf conftest*
20077   ol_cv_sasl_compat=no
20078 fi
20079 rm -f conftest*
20080
20081 fi
20082
20083 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
20084
20085                 if test $ol_cv_sasl_compat = no ; then
20086                         ol_link_sasl=no
20087                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
20088                 fi
20089
20090                 cat >> confdefs.h <<\EOF
20091 #define HAVE_CYRUS_SASL 1
20092 EOF
20093
20094                 SASL_LIBS="$ol_link_sasl"
20095                 if test $ol_enable_spasswd != no ; then
20096                         ol_link_spasswd=yes
20097                 fi
20098         fi
20099
20100 else
20101         echo "configure: warning: SASL authentication not supported!" 1>&2
20102         if test $ol_link_tls = no ; then
20103                 echo "configure: warning: Strong authentication not supported!" 1>&2
20104         fi
20105 fi
20106
20107 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
20108         dev=no
20109         if test -r /dev/urandom ; then
20110                 dev="/dev/urandom";
20111         elif test -r /idev/urandom ; then
20112                 dev="/idev/urandom";
20113         elif test -r /dev/srandom ; then
20114                 dev="/dev/srandom";
20115         elif test -r /dev/random ; then
20116                 dev="/dev/random";
20117         elif test -r /idev/random ; then
20118                 dev="/idev/random";
20119         fi
20120
20121         if test $dev != no ; then
20122                 cat >> confdefs.h <<EOF
20123 #define URANDOM_DEVICE "$dev"
20124 EOF
20125
20126         fi
20127 fi
20128
20129 ol_link_fetch=no
20130 if test $ol_with_fetch != no ; then
20131         ol_LIBS=$LIBS
20132 LIBS="-lfetch -lcom_err $LIBS"
20133 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
20134 echo "configure:20135: checking fetch(3) library" >&5
20135 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
20136   echo $ac_n "(cached) $ac_c" 1>&6
20137 else
20138   
20139         cat > conftest.$ac_ext <<EOF
20140 #line 20141 "configure"
20141 #include "confdefs.h"
20142
20143 #include <sys/param.h>
20144 #include <stdio.h>
20145 #include <fetch.h>
20146 int main() {
20147 struct url *u = fetchParseURL("file:///"); 
20148 ; return 0; }
20149 EOF
20150 if { (eval echo configure:20151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20151   rm -rf conftest*
20152   ol_cv_lib_fetch=yes
20153 else
20154   echo "configure: failed program was:" >&5
20155   cat conftest.$ac_ext >&5
20156   rm -rf conftest*
20157   ol_cv_lib_fetch=no
20158 fi
20159 rm -f conftest*
20160 fi
20161
20162 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
20163 LIBS=$ol_LIBS
20164 if test $ol_cv_lib_fetch != no ; then
20165         ol_link_fetch="-lfetch -lcom_err"
20166         cat >> confdefs.h <<\EOF
20167 #define HAVE_FETCH 1
20168 EOF
20169
20170 fi
20171
20172
20173         if test $ol_cv_lib_fetch != no ; then
20174                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
20175                 ol_link_fetch=freebsd
20176
20177         elif test $ol_with_fetch != auto ; then
20178                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
20179         fi 
20180 fi
20181
20182 ol_link_readline=no
20183 if test $ol_with_readline != no ; then
20184         for ac_hdr in readline/readline.h readline/history.h
20185 do
20186 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20187 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20188 echo "configure:20189: checking for $ac_hdr" >&5
20189 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20190   echo $ac_n "(cached) $ac_c" 1>&6
20191 else
20192   cat > conftest.$ac_ext <<EOF
20193 #line 20194 "configure"
20194 #include "confdefs.h"
20195 #include <$ac_hdr>
20196 EOF
20197 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20198 { (eval echo configure:20199: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20199 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20200 if test -z "$ac_err"; then
20201   rm -rf conftest*
20202   eval "ac_cv_header_$ac_safe=yes"
20203 else
20204   echo "$ac_err" >&5
20205   echo "configure: failed program was:" >&5
20206   cat conftest.$ac_ext >&5
20207   rm -rf conftest*
20208   eval "ac_cv_header_$ac_safe=no"
20209 fi
20210 rm -f conftest*
20211 fi
20212 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20213   echo "$ac_t""yes" 1>&6
20214     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20215   cat >> confdefs.h <<EOF
20216 #define $ac_tr_hdr 1
20217 EOF
20218  
20219 else
20220   echo "$ac_t""no" 1>&6
20221 fi
20222 done
20223
20224
20225         if test $ac_cv_header_readline_readline_h = yes ; then
20226                 save_LIBS="$LIBS"
20227                 LIBS="$TERMCAP_LIBS $LIBS"
20228                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
20229 echo "configure:20230: checking for readline in -lreadline" >&5
20230 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
20231 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20232   echo $ac_n "(cached) $ac_c" 1>&6
20233 else
20234   ac_save_LIBS="$LIBS"
20235 LIBS="-lreadline  $LIBS"
20236 cat > conftest.$ac_ext <<EOF
20237 #line 20238 "configure"
20238 #include "confdefs.h"
20239 /* Override any gcc2 internal prototype to avoid an error.  */
20240 /* We use char because int might match the return type of a gcc2
20241     builtin and then its argument prototype would still apply.  */
20242 char readline();
20243
20244 int main() {
20245 readline()
20246 ; return 0; }
20247 EOF
20248 if { (eval echo configure:20249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20249   rm -rf conftest*
20250   eval "ac_cv_lib_$ac_lib_var=yes"
20251 else
20252   echo "configure: failed program was:" >&5
20253   cat conftest.$ac_ext >&5
20254   rm -rf conftest*
20255   eval "ac_cv_lib_$ac_lib_var=no"
20256 fi
20257 rm -f conftest*
20258 LIBS="$ac_save_LIBS"
20259
20260 fi
20261 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20262   echo "$ac_t""yes" 1>&6
20263   have_readline=yes
20264 else
20265   echo "$ac_t""no" 1>&6
20266 have_readline=no
20267 fi
20268
20269                 LIBS="$save_LIBS"
20270                         
20271                 if test $have_readline = yes ; then
20272                         ol_with_readline=found
20273                         ol_link_readline=yes
20274
20275                         READLINE_LIBS="-lreadline"
20276                 fi
20277         fi
20278 fi
20279
20280 if test $ol_link_readline = yes ; then
20281         cat >> confdefs.h <<\EOF
20282 #define HAVE_READLINE 1
20283 EOF
20284
20285 fi
20286
20287
20288 if test $ol_enable_crypt != no ; then
20289         echo $ac_n "checking for crypt""... $ac_c" 1>&6
20290 echo "configure:20291: checking for crypt" >&5
20291 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
20292   echo $ac_n "(cached) $ac_c" 1>&6
20293 else
20294   cat > conftest.$ac_ext <<EOF
20295 #line 20296 "configure"
20296 #include "confdefs.h"
20297 /* System header to define __stub macros and hopefully few prototypes,
20298     which can conflict with char crypt(); below.  */
20299 #include <assert.h>
20300 /* Override any gcc2 internal prototype to avoid an error.  */
20301 /* We use char because int might match the return type of a gcc2
20302     builtin and then its argument prototype would still apply.  */
20303 char crypt();
20304 char (*f)();
20305
20306 int main() {
20307
20308 /* The GNU C library defines this for functions which it implements
20309     to always fail with ENOSYS.  Some functions are actually named
20310     something starting with __ and the normal name is an alias.  */
20311 #if defined (__stub_crypt) || defined (__stub___crypt)
20312 choke me
20313 #else
20314 f = crypt;
20315 #endif
20316
20317 ; return 0; }
20318 EOF
20319 if { (eval echo configure:20320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20320   rm -rf conftest*
20321   eval "ac_cv_func_crypt=yes"
20322 else
20323   echo "configure: failed program was:" >&5
20324   cat conftest.$ac_ext >&5
20325   rm -rf conftest*
20326   eval "ac_cv_func_crypt=no"
20327 fi
20328 rm -f conftest*
20329 fi
20330
20331 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
20332   echo "$ac_t""yes" 1>&6
20333   have_crypt=yes
20334 else
20335   echo "$ac_t""no" 1>&6
20336
20337                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
20338 echo "configure:20339: checking for crypt in -lcrypt" >&5
20339 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
20340 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20341   echo $ac_n "(cached) $ac_c" 1>&6
20342 else
20343   ac_save_LIBS="$LIBS"
20344 LIBS="-lcrypt  $LIBS"
20345 cat > conftest.$ac_ext <<EOF
20346 #line 20347 "configure"
20347 #include "confdefs.h"
20348 /* Override any gcc2 internal prototype to avoid an error.  */
20349 /* We use char because int might match the return type of a gcc2
20350     builtin and then its argument prototype would still apply.  */
20351 char crypt();
20352
20353 int main() {
20354 crypt()
20355 ; return 0; }
20356 EOF
20357 if { (eval echo configure:20358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20358   rm -rf conftest*
20359   eval "ac_cv_lib_$ac_lib_var=yes"
20360 else
20361   echo "configure: failed program was:" >&5
20362   cat conftest.$ac_ext >&5
20363   rm -rf conftest*
20364   eval "ac_cv_lib_$ac_lib_var=no"
20365 fi
20366 rm -f conftest*
20367 LIBS="$ac_save_LIBS"
20368
20369 fi
20370 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20371   echo "$ac_t""yes" 1>&6
20372   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
20373                         have_crypt=yes
20374 else
20375   echo "$ac_t""no" 1>&6
20376 have_crypt=no
20377 fi
20378
20379 fi
20380
20381
20382         if test $have_crypt = yes ; then
20383                 cat >> confdefs.h <<\EOF
20384 #define HAVE_CRYPT 1
20385 EOF
20386
20387         else
20388                 echo "configure: warning: could not find crypt" 1>&2
20389                 if test $ol_enable_crypt = yes ; then
20390                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
20391                 fi
20392
20393                 echo "configure: warning: disabling crypt support" 1>&2
20394                 ol_enable_crypt=no
20395         fi
20396 fi
20397
20398 if test $ol_enable_proctitle != no ; then
20399         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
20400 echo "configure:20401: checking for setproctitle" >&5
20401 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
20402   echo $ac_n "(cached) $ac_c" 1>&6
20403 else
20404   cat > conftest.$ac_ext <<EOF
20405 #line 20406 "configure"
20406 #include "confdefs.h"
20407 /* System header to define __stub macros and hopefully few prototypes,
20408     which can conflict with char setproctitle(); below.  */
20409 #include <assert.h>
20410 /* Override any gcc2 internal prototype to avoid an error.  */
20411 /* We use char because int might match the return type of a gcc2
20412     builtin and then its argument prototype would still apply.  */
20413 char setproctitle();
20414 char (*f)();
20415
20416 int main() {
20417
20418 /* The GNU C library defines this for functions which it implements
20419     to always fail with ENOSYS.  Some functions are actually named
20420     something starting with __ and the normal name is an alias.  */
20421 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
20422 choke me
20423 #else
20424 f = setproctitle;
20425 #endif
20426
20427 ; return 0; }
20428 EOF
20429 if { (eval echo configure:20430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20430   rm -rf conftest*
20431   eval "ac_cv_func_setproctitle=yes"
20432 else
20433   echo "configure: failed program was:" >&5
20434   cat conftest.$ac_ext >&5
20435   rm -rf conftest*
20436   eval "ac_cv_func_setproctitle=no"
20437 fi
20438 rm -f conftest*
20439 fi
20440
20441 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
20442   echo "$ac_t""yes" 1>&6
20443   have_setproctitle=yes
20444 else
20445   echo "$ac_t""no" 1>&6
20446
20447                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
20448 echo "configure:20449: checking for setproctitle in -lutil" >&5
20449 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
20450 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20451   echo $ac_n "(cached) $ac_c" 1>&6
20452 else
20453   ac_save_LIBS="$LIBS"
20454 LIBS="-lutil  $LIBS"
20455 cat > conftest.$ac_ext <<EOF
20456 #line 20457 "configure"
20457 #include "confdefs.h"
20458 /* Override any gcc2 internal prototype to avoid an error.  */
20459 /* We use char because int might match the return type of a gcc2
20460     builtin and then its argument prototype would still apply.  */
20461 char setproctitle();
20462
20463 int main() {
20464 setproctitle()
20465 ; return 0; }
20466 EOF
20467 if { (eval echo configure:20468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20468   rm -rf conftest*
20469   eval "ac_cv_lib_$ac_lib_var=yes"
20470 else
20471   echo "configure: failed program was:" >&5
20472   cat conftest.$ac_ext >&5
20473   rm -rf conftest*
20474   eval "ac_cv_lib_$ac_lib_var=no"
20475 fi
20476 rm -f conftest*
20477 LIBS="$ac_save_LIBS"
20478
20479 fi
20480 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20481   echo "$ac_t""yes" 1>&6
20482   have_setproctitle=yes
20483                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
20484 else
20485   echo "$ac_t""no" 1>&6
20486 have_setproctitle=no
20487                         LIBOBJS="$LIBOBJS setproctitle.o"
20488                         LIBSRCS="$LIBSRCS setproctitle.c"
20489 fi
20490
20491 fi
20492
20493
20494         if test $have_setproctitle = yes ; then
20495                 cat >> confdefs.h <<\EOF
20496 #define HAVE_SETPROCTITLE 1
20497 EOF
20498
20499         fi
20500 fi
20501
20502 if test $ol_enable_slp != no ; then
20503         for ac_hdr in slp.h 
20504 do
20505 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20506 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20507 echo "configure:20508: checking for $ac_hdr" >&5
20508 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20509   echo $ac_n "(cached) $ac_c" 1>&6
20510 else
20511   cat > conftest.$ac_ext <<EOF
20512 #line 20513 "configure"
20513 #include "confdefs.h"
20514 #include <$ac_hdr>
20515 EOF
20516 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20517 { (eval echo configure:20518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20518 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20519 if test -z "$ac_err"; then
20520   rm -rf conftest*
20521   eval "ac_cv_header_$ac_safe=yes"
20522 else
20523   echo "$ac_err" >&5
20524   echo "configure: failed program was:" >&5
20525   cat conftest.$ac_ext >&5
20526   rm -rf conftest*
20527   eval "ac_cv_header_$ac_safe=no"
20528 fi
20529 rm -f conftest*
20530 fi
20531 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20532   echo "$ac_t""yes" 1>&6
20533     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20534   cat >> confdefs.h <<EOF
20535 #define $ac_tr_hdr 1
20536 EOF
20537  
20538 else
20539   echo "$ac_t""no" 1>&6
20540 fi
20541 done
20542
20543
20544         if test $ac_cv_header_slp_h = yes ; then
20545                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
20546 echo "configure:20547: checking for SLPOpen in -lslp" >&5
20547 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
20548 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20549   echo $ac_n "(cached) $ac_c" 1>&6
20550 else
20551   ac_save_LIBS="$LIBS"
20552 LIBS="-lslp  $LIBS"
20553 cat > conftest.$ac_ext <<EOF
20554 #line 20555 "configure"
20555 #include "confdefs.h"
20556 /* Override any gcc2 internal prototype to avoid an error.  */
20557 /* We use char because int might match the return type of a gcc2
20558     builtin and then its argument prototype would still apply.  */
20559 char SLPOpen();
20560
20561 int main() {
20562 SLPOpen()
20563 ; return 0; }
20564 EOF
20565 if { (eval echo configure:20566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20566   rm -rf conftest*
20567   eval "ac_cv_lib_$ac_lib_var=yes"
20568 else
20569   echo "configure: failed program was:" >&5
20570   cat conftest.$ac_ext >&5
20571   rm -rf conftest*
20572   eval "ac_cv_lib_$ac_lib_var=no"
20573 fi
20574 rm -f conftest*
20575 LIBS="$ac_save_LIBS"
20576
20577 fi
20578 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20579   echo "$ac_t""yes" 1>&6
20580   have_slp=yes
20581 else
20582   echo "$ac_t""no" 1>&6
20583 have_slp=no
20584 fi
20585
20586                 if test $have_slp = yes ; then
20587                         cat >> confdefs.h <<\EOF
20588 #define HAVE_SLP 1
20589 EOF
20590
20591                         SLAPD_SLP_LIBS=-lslp
20592                 fi
20593
20594         elif test $ol_enable_slp = yes ; then
20595                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
20596         fi
20597 fi
20598
20599 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
20600 echo "configure:20601: checking for ANSI C header files" >&5
20601 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
20602   echo $ac_n "(cached) $ac_c" 1>&6
20603 else
20604   cat > conftest.$ac_ext <<EOF
20605 #line 20606 "configure"
20606 #include "confdefs.h"
20607 #include <stdlib.h>
20608 #include <stdarg.h>
20609 #include <string.h>
20610 #include <float.h>
20611 EOF
20612 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20613 { (eval echo configure:20614: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20614 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20615 if test -z "$ac_err"; then
20616   rm -rf conftest*
20617   ac_cv_header_stdc=yes
20618 else
20619   echo "$ac_err" >&5
20620   echo "configure: failed program was:" >&5
20621   cat conftest.$ac_ext >&5
20622   rm -rf conftest*
20623   ac_cv_header_stdc=no
20624 fi
20625 rm -f conftest*
20626
20627 if test $ac_cv_header_stdc = yes; then
20628   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
20629 cat > conftest.$ac_ext <<EOF
20630 #line 20631 "configure"
20631 #include "confdefs.h"
20632 #include <string.h>
20633 EOF
20634 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20635   egrep "memchr" >/dev/null 2>&1; then
20636   :
20637 else
20638   rm -rf conftest*
20639   ac_cv_header_stdc=no
20640 fi
20641 rm -f conftest*
20642
20643 fi
20644
20645 if test $ac_cv_header_stdc = yes; then
20646   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
20647 cat > conftest.$ac_ext <<EOF
20648 #line 20649 "configure"
20649 #include "confdefs.h"
20650 #include <stdlib.h>
20651 EOF
20652 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20653   egrep "free" >/dev/null 2>&1; then
20654   :
20655 else
20656   rm -rf conftest*
20657   ac_cv_header_stdc=no
20658 fi
20659 rm -f conftest*
20660
20661 fi
20662
20663 if test $ac_cv_header_stdc = yes; then
20664   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
20665 if test "$cross_compiling" = yes; then
20666   :
20667 else
20668   cat > conftest.$ac_ext <<EOF
20669 #line 20670 "configure"
20670 #include "confdefs.h"
20671 #include <ctype.h>
20672 #if ((' ' & 0x0FF) == 0x020)
20673 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
20674 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
20675 #else
20676 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
20677  || ('j' <= (c) && (c) <= 'r') \
20678  || ('s' <= (c) && (c) <= 'z'))
20679 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
20680 #endif
20681 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
20682 int main () { int i; for (i = 0; i < 256; i++)
20683 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
20684 exit (0); }
20685
20686 EOF
20687 if { (eval echo configure:20688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20688 then
20689   :
20690 else
20691   echo "configure: failed program was:" >&5
20692   cat conftest.$ac_ext >&5
20693   rm -fr conftest*
20694   ac_cv_header_stdc=no
20695 fi
20696 rm -fr conftest*
20697 fi
20698
20699 fi
20700 fi
20701
20702 echo "$ac_t""$ac_cv_header_stdc" 1>&6
20703 if test $ac_cv_header_stdc = yes; then
20704   cat >> confdefs.h <<\EOF
20705 #define STDC_HEADERS 1
20706 EOF
20707
20708 fi
20709
20710 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
20711 echo "configure:20712: checking for mode_t" >&5
20712 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
20713   echo $ac_n "(cached) $ac_c" 1>&6
20714 else
20715   cat > conftest.$ac_ext <<EOF
20716 #line 20717 "configure"
20717 #include "confdefs.h"
20718 #include <sys/types.h>
20719 #if STDC_HEADERS
20720 #include <stdlib.h>
20721 #include <stddef.h>
20722 #endif
20723
20724 EOF
20725 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20726   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20727   rm -rf conftest*
20728   eval "ac_cv_type_mode_t=yes"
20729 else
20730   rm -rf conftest*
20731   eval "ac_cv_type_mode_t=no"
20732 fi
20733 rm -f conftest*
20734
20735 fi
20736 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
20737   echo "$ac_t""yes" 1>&6
20738 else
20739   echo "$ac_t""no" 1>&6
20740   cat >> confdefs.h <<EOF
20741 #define mode_t int
20742 EOF
20743
20744 fi
20745
20746 echo $ac_n "checking for off_t""... $ac_c" 1>&6
20747 echo "configure:20748: checking for off_t" >&5
20748 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
20749   echo $ac_n "(cached) $ac_c" 1>&6
20750 else
20751   cat > conftest.$ac_ext <<EOF
20752 #line 20753 "configure"
20753 #include "confdefs.h"
20754 #include <sys/types.h>
20755 #if STDC_HEADERS
20756 #include <stdlib.h>
20757 #include <stddef.h>
20758 #endif
20759
20760 EOF
20761 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20762   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20763   rm -rf conftest*
20764   eval "ac_cv_type_off_t=yes"
20765 else
20766   rm -rf conftest*
20767   eval "ac_cv_type_off_t=no"
20768 fi
20769 rm -f conftest*
20770
20771 fi
20772 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
20773   echo "$ac_t""yes" 1>&6
20774 else
20775   echo "$ac_t""no" 1>&6
20776   cat >> confdefs.h <<EOF
20777 #define off_t long
20778 EOF
20779
20780 fi
20781
20782 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
20783 echo "configure:20784: checking for pid_t" >&5
20784 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
20785   echo $ac_n "(cached) $ac_c" 1>&6
20786 else
20787   cat > conftest.$ac_ext <<EOF
20788 #line 20789 "configure"
20789 #include "confdefs.h"
20790 #include <sys/types.h>
20791 #if STDC_HEADERS
20792 #include <stdlib.h>
20793 #include <stddef.h>
20794 #endif
20795
20796 EOF
20797 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20798   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20799   rm -rf conftest*
20800   eval "ac_cv_type_pid_t=yes"
20801 else
20802   rm -rf conftest*
20803   eval "ac_cv_type_pid_t=no"
20804 fi
20805 rm -f conftest*
20806
20807 fi
20808 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
20809   echo "$ac_t""yes" 1>&6
20810 else
20811   echo "$ac_t""no" 1>&6
20812   cat >> confdefs.h <<EOF
20813 #define pid_t int
20814 EOF
20815
20816 fi
20817
20818 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
20819 echo "configure:20820: checking for ptrdiff_t" >&5
20820 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
20821   echo $ac_n "(cached) $ac_c" 1>&6
20822 else
20823   cat > conftest.$ac_ext <<EOF
20824 #line 20825 "configure"
20825 #include "confdefs.h"
20826 #include <stddef.h>
20827 int main() {
20828 ptrdiff_t p
20829 ; return 0; }
20830 EOF
20831 if { (eval echo configure:20832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20832   rm -rf conftest*
20833   am_cv_type_ptrdiff_t=yes
20834 else
20835   echo "configure: failed program was:" >&5
20836   cat conftest.$ac_ext >&5
20837   rm -rf conftest*
20838   am_cv_type_ptrdiff_t=no
20839 fi
20840 rm -f conftest*
20841 fi
20842
20843 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
20844    if test $am_cv_type_ptrdiff_t = yes; then
20845      cat >> confdefs.h <<\EOF
20846 #define HAVE_PTRDIFF_T 1
20847 EOF
20848
20849    fi
20850
20851 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
20852 echo "configure:20853: checking return type of signal handlers" >&5
20853 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
20854   echo $ac_n "(cached) $ac_c" 1>&6
20855 else
20856   cat > conftest.$ac_ext <<EOF
20857 #line 20858 "configure"
20858 #include "confdefs.h"
20859 #include <sys/types.h>
20860 #include <signal.h>
20861 #ifdef signal
20862 #undef signal
20863 #endif
20864 #ifdef __cplusplus
20865 extern "C" void (*signal (int, void (*)(int)))(int);
20866 #else
20867 void (*signal ()) ();
20868 #endif
20869
20870 int main() {
20871 int i;
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   ac_cv_type_signal=void
20877 else
20878   echo "configure: failed program was:" >&5
20879   cat conftest.$ac_ext >&5
20880   rm -rf conftest*
20881   ac_cv_type_signal=int
20882 fi
20883 rm -f conftest*
20884 fi
20885
20886 echo "$ac_t""$ac_cv_type_signal" 1>&6
20887 cat >> confdefs.h <<EOF
20888 #define RETSIGTYPE $ac_cv_type_signal
20889 EOF
20890
20891
20892 echo $ac_n "checking for size_t""... $ac_c" 1>&6
20893 echo "configure:20894: checking for size_t" >&5
20894 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
20895   echo $ac_n "(cached) $ac_c" 1>&6
20896 else
20897   cat > conftest.$ac_ext <<EOF
20898 #line 20899 "configure"
20899 #include "confdefs.h"
20900 #include <sys/types.h>
20901 #if STDC_HEADERS
20902 #include <stdlib.h>
20903 #include <stddef.h>
20904 #endif
20905
20906 EOF
20907 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20908   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20909   rm -rf conftest*
20910   eval "ac_cv_type_size_t=yes"
20911 else
20912   rm -rf conftest*
20913   eval "ac_cv_type_size_t=no"
20914 fi
20915 rm -f conftest*
20916
20917 fi
20918 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
20919   echo "$ac_t""yes" 1>&6
20920 else
20921   echo "$ac_t""no" 1>&6
20922   cat >> confdefs.h <<EOF
20923 #define size_t unsigned
20924 EOF
20925
20926 fi
20927
20928
20929 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
20930 echo "configure:20931: checking for ssize_t" >&5
20931 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
20932   echo $ac_n "(cached) $ac_c" 1>&6
20933 else
20934   cat > conftest.$ac_ext <<EOF
20935 #line 20936 "configure"
20936 #include "confdefs.h"
20937 #include <sys/types.h>
20938 #if STDC_HEADERS
20939 #include <stdlib.h>
20940 #include <stddef.h>
20941 #endif
20942
20943 EOF
20944 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20945   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20946   rm -rf conftest*
20947   eval "ac_cv_type_ssize_t=yes"
20948 else
20949   rm -rf conftest*
20950   eval "ac_cv_type_ssize_t=no"
20951 fi
20952 rm -f conftest*
20953
20954 fi
20955 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
20956   echo "$ac_t""yes" 1>&6
20957 else
20958   echo "$ac_t""no" 1>&6
20959   cat >> confdefs.h <<EOF
20960 #define ssize_t signed int
20961 EOF
20962
20963 fi
20964
20965 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
20966 echo "configure:20967: checking for caddr_t" >&5
20967 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
20968   echo $ac_n "(cached) $ac_c" 1>&6
20969 else
20970   cat > conftest.$ac_ext <<EOF
20971 #line 20972 "configure"
20972 #include "confdefs.h"
20973 #include <sys/types.h>
20974 #if STDC_HEADERS
20975 #include <stdlib.h>
20976 #include <stddef.h>
20977 #endif
20978
20979 EOF
20980 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20981   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20982   rm -rf conftest*
20983   eval "ac_cv_type_caddr_t=yes"
20984 else
20985   rm -rf conftest*
20986   eval "ac_cv_type_caddr_t=no"
20987 fi
20988 rm -f conftest*
20989
20990 fi
20991 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
20992   echo "$ac_t""yes" 1>&6
20993 else
20994   echo "$ac_t""no" 1>&6
20995   cat >> confdefs.h <<EOF
20996 #define caddr_t char *
20997 EOF
20998
20999 fi
21000
21001
21002 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
21003 echo "configure:21004: checking for socklen_t" >&5
21004 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
21005   echo $ac_n "(cached) $ac_c" 1>&6
21006 else
21007   cat > conftest.$ac_ext <<EOF
21008 #line 21009 "configure"
21009 #include "confdefs.h"
21010
21011 #ifdef HAVE_SYS_TYPES_H
21012 #include <sys/types.h>
21013 #endif
21014 #ifdef HAVE_SYS_SOCKET_H
21015 #include <sys/socket.h>
21016 #endif
21017
21018 int main() {
21019 socklen_t len;
21020 ; return 0; }
21021 EOF
21022 if { (eval echo configure:21023: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21023   rm -rf conftest*
21024   ol_cv_type_socklen_t=yes
21025 else
21026   echo "configure: failed program was:" >&5
21027   cat conftest.$ac_ext >&5
21028   rm -rf conftest*
21029   ol_cv_type_socklen_t=no
21030 fi
21031 rm -f conftest*
21032 fi
21033
21034 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
21035   if test $ol_cv_type_socklen_t = no; then
21036     cat >> confdefs.h <<\EOF
21037 #define socklen_t int
21038 EOF
21039
21040   fi
21041  
21042 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
21043 echo "configure:21044: checking for member st_blksize in aggregate type struct stat" >&5
21044 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
21045   echo $ac_n "(cached) $ac_c" 1>&6
21046 else
21047   cat > conftest.$ac_ext <<EOF
21048 #line 21049 "configure"
21049 #include "confdefs.h"
21050 #include <sys/types.h>
21051 #include <sys/stat.h>
21052 int main() {
21053 struct stat foo; foo.st_blksize;
21054 ; return 0; }
21055 EOF
21056 if { (eval echo configure:21057: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21057   rm -rf conftest*
21058   ac_cv_c_struct_member_st_blksize=yes
21059 else
21060   echo "configure: failed program was:" >&5
21061   cat conftest.$ac_ext >&5
21062   rm -rf conftest*
21063   ac_cv_c_struct_member_st_blksize=no
21064 fi
21065 rm -f conftest*
21066 fi
21067
21068 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
21069 st_blksize="$ac_cv_c_struct_member_st_blksize"
21070 if test $ac_cv_c_struct_member_st_blksize = yes; then
21071   cat >> confdefs.h <<\EOF
21072 #define HAVE_ST_BLKSIZE 1
21073 EOF
21074
21075 fi
21076
21077 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
21078 echo "configure:21079: checking whether time.h and sys/time.h may both be included" >&5
21079 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
21080   echo $ac_n "(cached) $ac_c" 1>&6
21081 else
21082   cat > conftest.$ac_ext <<EOF
21083 #line 21084 "configure"
21084 #include "confdefs.h"
21085 #include <sys/types.h>
21086 #include <sys/time.h>
21087 #include <time.h>
21088 int main() {
21089 struct tm *tp;
21090 ; return 0; }
21091 EOF
21092 if { (eval echo configure:21093: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21093   rm -rf conftest*
21094   ac_cv_header_time=yes
21095 else
21096   echo "configure: failed program was:" >&5
21097   cat conftest.$ac_ext >&5
21098   rm -rf conftest*
21099   ac_cv_header_time=no
21100 fi
21101 rm -f conftest*
21102 fi
21103
21104 echo "$ac_t""$ac_cv_header_time" 1>&6
21105 if test $ac_cv_header_time = yes; then
21106   cat >> confdefs.h <<\EOF
21107 #define TIME_WITH_SYS_TIME 1
21108 EOF
21109
21110 fi
21111
21112 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
21113 echo "configure:21114: checking whether struct tm is in sys/time.h or time.h" >&5
21114 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
21115   echo $ac_n "(cached) $ac_c" 1>&6
21116 else
21117   cat > conftest.$ac_ext <<EOF
21118 #line 21119 "configure"
21119 #include "confdefs.h"
21120 #include <sys/types.h>
21121 #include <time.h>
21122 int main() {
21123 struct tm *tp; tp->tm_sec;
21124 ; return 0; }
21125 EOF
21126 if { (eval echo configure:21127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21127   rm -rf conftest*
21128   ac_cv_struct_tm=time.h
21129 else
21130   echo "configure: failed program was:" >&5
21131   cat conftest.$ac_ext >&5
21132   rm -rf conftest*
21133   ac_cv_struct_tm=sys/time.h
21134 fi
21135 rm -f conftest*
21136 fi
21137
21138 echo "$ac_t""$ac_cv_struct_tm" 1>&6
21139 if test $ac_cv_struct_tm = sys/time.h; then
21140   cat >> confdefs.h <<\EOF
21141 #define TM_IN_SYS_TIME 1
21142 EOF
21143
21144 fi
21145
21146 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
21147 echo "configure:21148: checking for uid_t in sys/types.h" >&5
21148 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
21149   echo $ac_n "(cached) $ac_c" 1>&6
21150 else
21151   cat > conftest.$ac_ext <<EOF
21152 #line 21153 "configure"
21153 #include "confdefs.h"
21154 #include <sys/types.h>
21155 EOF
21156 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21157   egrep "uid_t" >/dev/null 2>&1; then
21158   rm -rf conftest*
21159   ac_cv_type_uid_t=yes
21160 else
21161   rm -rf conftest*
21162   ac_cv_type_uid_t=no
21163 fi
21164 rm -f conftest*
21165
21166 fi
21167
21168 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
21169 if test $ac_cv_type_uid_t = no; then
21170   cat >> confdefs.h <<\EOF
21171 #define uid_t int
21172 EOF
21173
21174   cat >> confdefs.h <<\EOF
21175 #define gid_t int
21176 EOF
21177
21178 fi
21179
21180 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
21181 echo "configure:21182: checking for sig_atomic_t" >&5
21182 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
21183   echo $ac_n "(cached) $ac_c" 1>&6
21184 else
21185   cat > conftest.$ac_ext <<EOF
21186 #line 21187 "configure"
21187 #include "confdefs.h"
21188 #include <signal.h>
21189 int main() {
21190 sig_atomic_t atomic;
21191 ; return 0; }
21192 EOF
21193 if { (eval echo configure:21194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21194   rm -rf conftest*
21195   ol_cv_type_sig_atomic_t=yes
21196 else
21197   echo "configure: failed program was:" >&5
21198   cat conftest.$ac_ext >&5
21199   rm -rf conftest*
21200   ol_cv_type_sig_atomic_t=no
21201 fi
21202 rm -f conftest*
21203 fi
21204
21205 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
21206   if test $ol_cv_type_sig_atomic_t = no; then
21207     cat >> confdefs.h <<\EOF
21208 #define sig_atomic_t int
21209 EOF
21210
21211   fi
21212  
21213
21214
21215 # test for pw_gecos in struct passwd
21216 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
21217 echo "configure:21218: checking struct passwd for pw_gecos" >&5
21218 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
21219   echo $ac_n "(cached) $ac_c" 1>&6
21220 else
21221   
21222         cat > conftest.$ac_ext <<EOF
21223 #line 21224 "configure"
21224 #include "confdefs.h"
21225 #include <pwd.h>
21226 int main() {
21227
21228         struct passwd pwd;
21229         pwd.pw_gecos = pwd.pw_name;
21230
21231 ; return 0; }
21232 EOF
21233 if { (eval echo configure:21234: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21234   rm -rf conftest*
21235   ol_cv_struct_passwd_pw_gecos=yes
21236 else
21237   echo "configure: failed program was:" >&5
21238   cat conftest.$ac_ext >&5
21239   rm -rf conftest*
21240   ol_cv_struct_passwd_pw_gecos=no
21241 fi
21242 rm -f conftest*
21243 fi
21244
21245 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
21246 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
21247         cat >> confdefs.h <<\EOF
21248 #define HAVE_PW_GECOS 1
21249 EOF
21250
21251 fi
21252
21253 # test for pw_passwd in struct passwd
21254 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
21255 echo "configure:21256: checking struct passwd for pw_passwd" >&5
21256 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
21257   echo $ac_n "(cached) $ac_c" 1>&6
21258 else
21259   
21260         cat > conftest.$ac_ext <<EOF
21261 #line 21262 "configure"
21262 #include "confdefs.h"
21263 #include <pwd.h>
21264 int main() {
21265
21266         struct passwd pwd;
21267         pwd.pw_passwd = pwd.pw_name;
21268
21269 ; return 0; }
21270 EOF
21271 if { (eval echo configure:21272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21272   rm -rf conftest*
21273   ol_cv_struct_passwd_pw_passwd=yes
21274 else
21275   echo "configure: failed program was:" >&5
21276   cat conftest.$ac_ext >&5
21277   rm -rf conftest*
21278   ol_cv_struct_passwd_pw_passwd=no
21279 fi
21280 rm -f conftest*
21281 fi
21282
21283 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
21284 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
21285         cat >> confdefs.h <<\EOF
21286 #define HAVE_PW_PASSWD 1
21287 EOF
21288
21289 fi
21290
21291
21292 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
21293 echo "configure:21294: checking if toupper() requires islower()" >&5
21294 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
21295   echo $ac_n "(cached) $ac_c" 1>&6
21296 else
21297   
21298         if test "$cross_compiling" = yes; then
21299   ol_cv_c_upper_lower=safe
21300 else
21301   cat > conftest.$ac_ext <<EOF
21302 #line 21303 "configure"
21303 #include "confdefs.h"
21304
21305 #include <ctype.h>
21306 main()
21307 {
21308         if ('C' == toupper('C'))
21309                 exit(0);
21310         else
21311                 exit(1);
21312 }
21313 EOF
21314 if { (eval echo configure:21315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21315 then
21316   ol_cv_c_upper_lower=no
21317 else
21318   echo "configure: failed program was:" >&5
21319   cat conftest.$ac_ext >&5
21320   rm -fr conftest*
21321   ol_cv_c_upper_lower=yes
21322 fi
21323 rm -fr conftest*
21324 fi
21325
21326 fi
21327
21328 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
21329 if test $ol_cv_c_upper_lower != no ; then
21330         cat >> confdefs.h <<\EOF
21331 #define C_UPPER_LOWER 1
21332 EOF
21333
21334 fi
21335
21336 echo $ac_n "checking for working const""... $ac_c" 1>&6
21337 echo "configure:21338: checking for working const" >&5
21338 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
21339   echo $ac_n "(cached) $ac_c" 1>&6
21340 else
21341   cat > conftest.$ac_ext <<EOF
21342 #line 21343 "configure"
21343 #include "confdefs.h"
21344
21345 int main() {
21346
21347 /* Ultrix mips cc rejects this.  */
21348 typedef int charset[2]; const charset x;
21349 /* SunOS 4.1.1 cc rejects this.  */
21350 char const *const *ccp;
21351 char **p;
21352 /* NEC SVR4.0.2 mips cc rejects this.  */
21353 struct point {int x, y;};
21354 static struct point const zero = {0,0};
21355 /* AIX XL C 1.02.0.0 rejects this.
21356    It does not let you subtract one const X* pointer from another in an arm
21357    of an if-expression whose if-part is not a constant expression */
21358 const char *g = "string";
21359 ccp = &g + (g ? g-g : 0);
21360 /* HPUX 7.0 cc rejects these. */
21361 ++ccp;
21362 p = (char**) ccp;
21363 ccp = (char const *const *) p;
21364 { /* SCO 3.2v4 cc rejects this.  */
21365   char *t;
21366   char const *s = 0 ? (char *) 0 : (char const *) 0;
21367
21368   *t++ = 0;
21369 }
21370 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
21371   int x[] = {25, 17};
21372   const int *foo = &x[0];
21373   ++foo;
21374 }
21375 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21376   typedef const int *iptr;
21377   iptr p = 0;
21378   ++p;
21379 }
21380 { /* AIX XL C 1.02.0.0 rejects this saying
21381      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21382   struct s { int j; const int *ap[3]; };
21383   struct s *b; b->j = 5;
21384 }
21385 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21386   const int foo = 10;
21387 }
21388
21389 ; return 0; }
21390 EOF
21391 if { (eval echo configure:21392: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21392   rm -rf conftest*
21393   ac_cv_c_const=yes
21394 else
21395   echo "configure: failed program was:" >&5
21396   cat conftest.$ac_ext >&5
21397   rm -rf conftest*
21398   ac_cv_c_const=no
21399 fi
21400 rm -f conftest*
21401 fi
21402
21403 echo "$ac_t""$ac_cv_c_const" 1>&6
21404 if test $ac_cv_c_const = no; then
21405   cat >> confdefs.h <<\EOF
21406 #define const 
21407 EOF
21408
21409 fi
21410
21411 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
21412 echo "configure:21413: checking if compiler understands volatile" >&5
21413 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
21414   echo $ac_n "(cached) $ac_c" 1>&6
21415 else
21416   cat > conftest.$ac_ext <<EOF
21417 #line 21418 "configure"
21418 #include "confdefs.h"
21419 int x, y, z;
21420 int main() {
21421 volatile int a; int * volatile b = x ? &y : &z;
21422       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
21423       *b = 0;
21424 ; return 0; }
21425 EOF
21426 if { (eval echo configure:21427: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21427   rm -rf conftest*
21428   ol_cv_c_volatile=yes
21429 else
21430   echo "configure: failed program was:" >&5
21431   cat conftest.$ac_ext >&5
21432   rm -rf conftest*
21433   ol_cv_c_volatile=no
21434 fi
21435 rm -f conftest*
21436 fi
21437
21438 echo "$ac_t""$ol_cv_c_volatile" 1>&6
21439   if test $ol_cv_c_volatile = yes; then
21440     : 
21441   else
21442     cat >> confdefs.h <<\EOF
21443 #define volatile 
21444 EOF
21445
21446   fi
21447  
21448
21449 if test $cross_compiling = yes ; then
21450         cat >> confdefs.h <<\EOF
21451 #define CROSS_COMPILING 1
21452 EOF
21453
21454 else
21455         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
21456 echo "configure:21457: checking whether byte ordering is bigendian" >&5
21457 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
21458   echo $ac_n "(cached) $ac_c" 1>&6
21459 else
21460   ac_cv_c_bigendian=unknown
21461 # See if sys/param.h defines the BYTE_ORDER macro.
21462 cat > conftest.$ac_ext <<EOF
21463 #line 21464 "configure"
21464 #include "confdefs.h"
21465 #include <sys/types.h>
21466 #include <sys/param.h>
21467 int main() {
21468
21469 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
21470  bogus endian macros
21471 #endif
21472 ; return 0; }
21473 EOF
21474 if { (eval echo configure:21475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21475   rm -rf conftest*
21476   # It does; now see whether it defined to BIG_ENDIAN or not.
21477 cat > conftest.$ac_ext <<EOF
21478 #line 21479 "configure"
21479 #include "confdefs.h"
21480 #include <sys/types.h>
21481 #include <sys/param.h>
21482 int main() {
21483
21484 #if BYTE_ORDER != BIG_ENDIAN
21485  not big endian
21486 #endif
21487 ; return 0; }
21488 EOF
21489 if { (eval echo configure:21490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21490   rm -rf conftest*
21491   ac_cv_c_bigendian=yes
21492 else
21493   echo "configure: failed program was:" >&5
21494   cat conftest.$ac_ext >&5
21495   rm -rf conftest*
21496   ac_cv_c_bigendian=no
21497 fi
21498 rm -f conftest*
21499 else
21500   echo "configure: failed program was:" >&5
21501   cat conftest.$ac_ext >&5
21502 fi
21503 rm -f conftest*
21504 if test $ac_cv_c_bigendian = unknown; then
21505 if test "$cross_compiling" = yes; then
21506     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
21507 else
21508   cat > conftest.$ac_ext <<EOF
21509 #line 21510 "configure"
21510 #include "confdefs.h"
21511 main () {
21512   /* Are we little or big endian?  From Harbison&Steele.  */
21513   union
21514   {
21515     long l;
21516     char c[sizeof (long)];
21517   } u;
21518   u.l = 1;
21519   exit (u.c[sizeof (long) - 1] == 1);
21520 }
21521 EOF
21522 if { (eval echo configure:21523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21523 then
21524   ac_cv_c_bigendian=no
21525 else
21526   echo "configure: failed program was:" >&5
21527   cat conftest.$ac_ext >&5
21528   rm -fr conftest*
21529   ac_cv_c_bigendian=yes
21530 fi
21531 rm -fr conftest*
21532 fi
21533
21534 fi
21535 fi
21536
21537 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
21538 if test $ac_cv_c_bigendian = yes; then
21539   cat >> confdefs.h <<\EOF
21540 #define WORDS_BIGENDIAN 1
21541 EOF
21542
21543 fi
21544
21545 fi
21546
21547 echo $ac_n "checking size of short""... $ac_c" 1>&6
21548 echo "configure:21549: checking size of short" >&5 
21549 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
21550   echo $ac_n "(cached) $ac_c" 1>&6
21551 else
21552   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21553   cat > conftest.$ac_ext <<EOF
21554 #line 21555 "configure"
21555 #include "confdefs.h"
21556 #include "confdefs.h" 
21557 #include <sys/types.h> 
21558  
21559
21560 int main() {
21561 switch (0) case 0: case (sizeof (short) == $ac_size):;
21562 ; return 0; }
21563 EOF
21564 if { (eval echo configure:21565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21565   rm -rf conftest*
21566   ac_cv_sizeof_short=$ac_size
21567 else
21568   echo "configure: failed program was:" >&5
21569   cat conftest.$ac_ext >&5
21570 fi
21571 rm -f conftest* 
21572   if test x$ac_cv_sizeof_short != x ; then break; fi 
21573 done 
21574
21575 fi
21576  
21577 if test x$ac_cv_sizeof_short = x ; then 
21578   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
21579 fi 
21580 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
21581 cat >> confdefs.h <<EOF
21582 #define SIZEOF_SHORT $ac_cv_sizeof_short
21583 EOF
21584  
21585  
21586 echo $ac_n "checking size of int""... $ac_c" 1>&6
21587 echo "configure:21588: checking size of int" >&5 
21588 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
21589   echo $ac_n "(cached) $ac_c" 1>&6
21590 else
21591   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21592   cat > conftest.$ac_ext <<EOF
21593 #line 21594 "configure"
21594 #include "confdefs.h"
21595 #include "confdefs.h" 
21596 #include <sys/types.h> 
21597  
21598
21599 int main() {
21600 switch (0) case 0: case (sizeof (int) == $ac_size):;
21601 ; return 0; }
21602 EOF
21603 if { (eval echo configure:21604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21604   rm -rf conftest*
21605   ac_cv_sizeof_int=$ac_size
21606 else
21607   echo "configure: failed program was:" >&5
21608   cat conftest.$ac_ext >&5
21609 fi
21610 rm -f conftest* 
21611   if test x$ac_cv_sizeof_int != x ; then break; fi 
21612 done 
21613
21614 fi
21615  
21616 if test x$ac_cv_sizeof_int = x ; then 
21617   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
21618 fi 
21619 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
21620 cat >> confdefs.h <<EOF
21621 #define SIZEOF_INT $ac_cv_sizeof_int
21622 EOF
21623  
21624  
21625 echo $ac_n "checking size of long""... $ac_c" 1>&6
21626 echo "configure:21627: checking size of long" >&5 
21627 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
21628   echo $ac_n "(cached) $ac_c" 1>&6
21629 else
21630   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21631   cat > conftest.$ac_ext <<EOF
21632 #line 21633 "configure"
21633 #include "confdefs.h"
21634 #include "confdefs.h" 
21635 #include <sys/types.h> 
21636  
21637
21638 int main() {
21639 switch (0) case 0: case (sizeof (long) == $ac_size):;
21640 ; return 0; }
21641 EOF
21642 if { (eval echo configure:21643: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21643   rm -rf conftest*
21644   ac_cv_sizeof_long=$ac_size
21645 else
21646   echo "configure: failed program was:" >&5
21647   cat conftest.$ac_ext >&5
21648 fi
21649 rm -f conftest* 
21650   if test x$ac_cv_sizeof_long != x ; then break; fi 
21651 done 
21652
21653 fi
21654  
21655 if test x$ac_cv_sizeof_long = x ; then 
21656   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
21657 fi 
21658 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
21659 cat >> confdefs.h <<EOF
21660 #define SIZEOF_LONG $ac_cv_sizeof_long
21661 EOF
21662  
21663
21664
21665 if test "$ac_cv_sizeof_int" -lt 4 ; then
21666         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
21667
21668         cat >> confdefs.h <<\EOF
21669 #define LBER_INT_T long
21670 EOF
21671
21672 else
21673         cat >> confdefs.h <<\EOF
21674 #define LBER_INT_T int
21675 EOF
21676
21677 fi
21678
21679 cat >> confdefs.h <<\EOF
21680 #define LBER_LEN_T long
21681 EOF
21682
21683 cat >> confdefs.h <<\EOF
21684 #define LBER_SOCKET_T int
21685 EOF
21686
21687 cat >> confdefs.h <<\EOF
21688 #define LBER_TAG_T long
21689 EOF
21690
21691
21692 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
21693 echo "configure:21694: checking for 8-bit clean memcmp" >&5
21694 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
21695   echo $ac_n "(cached) $ac_c" 1>&6
21696 else
21697   if test "$cross_compiling" = yes; then
21698   ac_cv_func_memcmp_clean=no
21699 else
21700   cat > conftest.$ac_ext <<EOF
21701 #line 21702 "configure"
21702 #include "confdefs.h"
21703
21704 main()
21705 {
21706   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
21707   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
21708 }
21709
21710 EOF
21711 if { (eval echo configure:21712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21712 then
21713   ac_cv_func_memcmp_clean=yes
21714 else
21715   echo "configure: failed program was:" >&5
21716   cat conftest.$ac_ext >&5
21717   rm -fr conftest*
21718   ac_cv_func_memcmp_clean=no
21719 fi
21720 rm -fr conftest*
21721 fi
21722
21723 fi
21724
21725 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
21726 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
21727
21728 echo $ac_n "checking for strftime""... $ac_c" 1>&6
21729 echo "configure:21730: checking for strftime" >&5
21730 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
21731   echo $ac_n "(cached) $ac_c" 1>&6
21732 else
21733   cat > conftest.$ac_ext <<EOF
21734 #line 21735 "configure"
21735 #include "confdefs.h"
21736 /* System header to define __stub macros and hopefully few prototypes,
21737     which can conflict with char strftime(); below.  */
21738 #include <assert.h>
21739 /* Override any gcc2 internal prototype to avoid an error.  */
21740 /* We use char because int might match the return type of a gcc2
21741     builtin and then its argument prototype would still apply.  */
21742 char strftime();
21743 char (*f)();
21744
21745 int main() {
21746
21747 /* The GNU C library defines this for functions which it implements
21748     to always fail with ENOSYS.  Some functions are actually named
21749     something starting with __ and the normal name is an alias.  */
21750 #if defined (__stub_strftime) || defined (__stub___strftime)
21751 choke me
21752 #else
21753 f = strftime;
21754 #endif
21755
21756 ; return 0; }
21757 EOF
21758 if { (eval echo configure:21759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21759   rm -rf conftest*
21760   eval "ac_cv_func_strftime=yes"
21761 else
21762   echo "configure: failed program was:" >&5
21763   cat conftest.$ac_ext >&5
21764   rm -rf conftest*
21765   eval "ac_cv_func_strftime=no"
21766 fi
21767 rm -f conftest*
21768 fi
21769
21770 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
21771   echo "$ac_t""yes" 1>&6
21772   cat >> confdefs.h <<\EOF
21773 #define HAVE_STRFTIME 1
21774 EOF
21775
21776 else
21777   echo "$ac_t""no" 1>&6
21778 # strftime is in -lintl on SCO UNIX.
21779 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
21780 echo "configure:21781: checking for strftime in -lintl" >&5
21781 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
21782 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21783   echo $ac_n "(cached) $ac_c" 1>&6
21784 else
21785   ac_save_LIBS="$LIBS"
21786 LIBS="-lintl  $LIBS"
21787 cat > conftest.$ac_ext <<EOF
21788 #line 21789 "configure"
21789 #include "confdefs.h"
21790 /* Override any gcc2 internal prototype to avoid an error.  */
21791 /* We use char because int might match the return type of a gcc2
21792     builtin and then its argument prototype would still apply.  */
21793 char strftime();
21794
21795 int main() {
21796 strftime()
21797 ; return 0; }
21798 EOF
21799 if { (eval echo configure:21800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21800   rm -rf conftest*
21801   eval "ac_cv_lib_$ac_lib_var=yes"
21802 else
21803   echo "configure: failed program was:" >&5
21804   cat conftest.$ac_ext >&5
21805   rm -rf conftest*
21806   eval "ac_cv_lib_$ac_lib_var=no"
21807 fi
21808 rm -f conftest*
21809 LIBS="$ac_save_LIBS"
21810
21811 fi
21812 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21813   echo "$ac_t""yes" 1>&6
21814   cat >> confdefs.h <<\EOF
21815 #define HAVE_STRFTIME 1
21816 EOF
21817
21818 LIBS="-lintl $LIBS"
21819 else
21820   echo "$ac_t""no" 1>&6
21821 fi
21822
21823 fi
21824
21825
21826 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
21827 echo "configure:21828: checking for inet_aton()" >&5
21828 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
21829   echo $ac_n "(cached) $ac_c" 1>&6
21830 else
21831   cat > conftest.$ac_ext <<EOF
21832 #line 21833 "configure"
21833 #include "confdefs.h"
21834
21835 #ifdef HAVE_SYS_TYPES_H
21836 #       include <sys/types.h>
21837 #endif
21838 #ifdef HAVE_SYS_SOCKET_H
21839 #       include <sys/socket.h>
21840 #       ifdef HAVE_SYS_SELECT_H
21841 #               include <sys/select.h>
21842 #       endif
21843 #       include <netinet/in.h>
21844 #       ifdef HAVE_ARPA_INET_H
21845 #               include <arpa/inet.h>
21846 #       endif
21847 #endif
21848
21849 int main() {
21850 struct in_addr in;
21851 int rc = inet_aton( "255.255.255.255", &in );
21852 ; return 0; }
21853 EOF
21854 if { (eval echo configure:21855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21855   rm -rf conftest*
21856   ol_cv_func_inet_aton=yes
21857 else
21858   echo "configure: failed program was:" >&5
21859   cat conftest.$ac_ext >&5
21860   rm -rf conftest*
21861   ol_cv_func_inet_aton=no
21862 fi
21863 rm -f conftest*
21864 fi
21865
21866 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
21867   if test $ol_cv_func_inet_aton != no; then
21868     cat >> confdefs.h <<\EOF
21869 #define HAVE_INET_ATON 1
21870 EOF
21871
21872   fi
21873  
21874
21875 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
21876 echo "configure:21877: checking for _spawnlp" >&5
21877 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
21878   echo $ac_n "(cached) $ac_c" 1>&6
21879 else
21880   cat > conftest.$ac_ext <<EOF
21881 #line 21882 "configure"
21882 #include "confdefs.h"
21883 /* System header to define __stub macros and hopefully few prototypes,
21884     which can conflict with char _spawnlp(); below.  */
21885 #include <assert.h>
21886 /* Override any gcc2 internal prototype to avoid an error.  */
21887 /* We use char because int might match the return type of a gcc2
21888     builtin and then its argument prototype would still apply.  */
21889 char _spawnlp();
21890 char (*f)();
21891
21892 int main() {
21893
21894 /* The GNU C library defines this for functions which it implements
21895     to always fail with ENOSYS.  Some functions are actually named
21896     something starting with __ and the normal name is an alias.  */
21897 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
21898 choke me
21899 #else
21900 f = _spawnlp;
21901 #endif
21902
21903 ; return 0; }
21904 EOF
21905 if { (eval echo configure:21906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21906   rm -rf conftest*
21907   eval "ac_cv_func__spawnlp=yes"
21908 else
21909   echo "configure: failed program was:" >&5
21910   cat conftest.$ac_ext >&5
21911   rm -rf conftest*
21912   eval "ac_cv_func__spawnlp=no"
21913 fi
21914 rm -f conftest*
21915 fi
21916
21917 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
21918   echo "$ac_t""yes" 1>&6
21919   cat >> confdefs.h <<\EOF
21920 #define HAVE_SPAWNLP 1
21921 EOF
21922
21923 else
21924   echo "$ac_t""no" 1>&6
21925 fi
21926
21927
21928 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
21929 echo "configure:21930: checking for _snprintf" >&5
21930 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
21931   echo $ac_n "(cached) $ac_c" 1>&6
21932 else
21933   cat > conftest.$ac_ext <<EOF
21934 #line 21935 "configure"
21935 #include "confdefs.h"
21936 /* System header to define __stub macros and hopefully few prototypes,
21937     which can conflict with char _snprintf(); below.  */
21938 #include <assert.h>
21939 /* Override any gcc2 internal prototype to avoid an error.  */
21940 /* We use char because int might match the return type of a gcc2
21941     builtin and then its argument prototype would still apply.  */
21942 char _snprintf();
21943 char (*f)();
21944
21945 int main() {
21946
21947 /* The GNU C library defines this for functions which it implements
21948     to always fail with ENOSYS.  Some functions are actually named
21949     something starting with __ and the normal name is an alias.  */
21950 #if defined (__stub__snprintf) || defined (__stub____snprintf)
21951 choke me
21952 #else
21953 f = _snprintf;
21954 #endif
21955
21956 ; return 0; }
21957 EOF
21958 if { (eval echo configure:21959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21959   rm -rf conftest*
21960   eval "ac_cv_func__snprintf=yes"
21961 else
21962   echo "configure: failed program was:" >&5
21963   cat conftest.$ac_ext >&5
21964   rm -rf conftest*
21965   eval "ac_cv_func__snprintf=no"
21966 fi
21967 rm -f conftest*
21968 fi
21969
21970 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
21971   echo "$ac_t""yes" 1>&6
21972   ac_cv_func_snprintf=yes
21973         cat >> confdefs.h <<\EOF
21974 #define snprintf _snprintf
21975 EOF
21976
21977
21978 else
21979   echo "$ac_t""no" 1>&6
21980 fi
21981
21982
21983 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
21984 echo "configure:21985: checking for _vsnprintf" >&5
21985 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
21986   echo $ac_n "(cached) $ac_c" 1>&6
21987 else
21988   cat > conftest.$ac_ext <<EOF
21989 #line 21990 "configure"
21990 #include "confdefs.h"
21991 /* System header to define __stub macros and hopefully few prototypes,
21992     which can conflict with char _vsnprintf(); below.  */
21993 #include <assert.h>
21994 /* Override any gcc2 internal prototype to avoid an error.  */
21995 /* We use char because int might match the return type of a gcc2
21996     builtin and then its argument prototype would still apply.  */
21997 char _vsnprintf();
21998 char (*f)();
21999
22000 int main() {
22001
22002 /* The GNU C library defines this for functions which it implements
22003     to always fail with ENOSYS.  Some functions are actually named
22004     something starting with __ and the normal name is an alias.  */
22005 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
22006 choke me
22007 #else
22008 f = _vsnprintf;
22009 #endif
22010
22011 ; return 0; }
22012 EOF
22013 if { (eval echo configure:22014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22014   rm -rf conftest*
22015   eval "ac_cv_func__vsnprintf=yes"
22016 else
22017   echo "configure: failed program was:" >&5
22018   cat conftest.$ac_ext >&5
22019   rm -rf conftest*
22020   eval "ac_cv_func__vsnprintf=no"
22021 fi
22022 rm -f conftest*
22023 fi
22024
22025 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
22026   echo "$ac_t""yes" 1>&6
22027   ac_cv_func_vsnprintf=yes
22028         cat >> confdefs.h <<\EOF
22029 #define vsnprintf _vsnprintf
22030 EOF
22031
22032
22033 else
22034   echo "$ac_t""no" 1>&6
22035 fi
22036
22037
22038 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
22039 echo "configure:22040: checking for vprintf" >&5
22040 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
22041   echo $ac_n "(cached) $ac_c" 1>&6
22042 else
22043   cat > conftest.$ac_ext <<EOF
22044 #line 22045 "configure"
22045 #include "confdefs.h"
22046 /* System header to define __stub macros and hopefully few prototypes,
22047     which can conflict with char vprintf(); below.  */
22048 #include <assert.h>
22049 /* Override any gcc2 internal prototype to avoid an error.  */
22050 /* We use char because int might match the return type of a gcc2
22051     builtin and then its argument prototype would still apply.  */
22052 char vprintf();
22053 char (*f)();
22054
22055 int main() {
22056
22057 /* The GNU C library defines this for functions which it implements
22058     to always fail with ENOSYS.  Some functions are actually named
22059     something starting with __ and the normal name is an alias.  */
22060 #if defined (__stub_vprintf) || defined (__stub___vprintf)
22061 choke me
22062 #else
22063 f = vprintf;
22064 #endif
22065
22066 ; return 0; }
22067 EOF
22068 if { (eval echo configure:22069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22069   rm -rf conftest*
22070   eval "ac_cv_func_vprintf=yes"
22071 else
22072   echo "configure: failed program was:" >&5
22073   cat conftest.$ac_ext >&5
22074   rm -rf conftest*
22075   eval "ac_cv_func_vprintf=no"
22076 fi
22077 rm -f conftest*
22078 fi
22079
22080 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
22081   echo "$ac_t""yes" 1>&6
22082   cat >> confdefs.h <<\EOF
22083 #define HAVE_VPRINTF 1
22084 EOF
22085
22086 else
22087   echo "$ac_t""no" 1>&6
22088 fi
22089
22090 if test "$ac_cv_func_vprintf" != yes; then
22091 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
22092 echo "configure:22093: checking for _doprnt" >&5
22093 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
22094   echo $ac_n "(cached) $ac_c" 1>&6
22095 else
22096   cat > conftest.$ac_ext <<EOF
22097 #line 22098 "configure"
22098 #include "confdefs.h"
22099 /* System header to define __stub macros and hopefully few prototypes,
22100     which can conflict with char _doprnt(); below.  */
22101 #include <assert.h>
22102 /* Override any gcc2 internal prototype to avoid an error.  */
22103 /* We use char because int might match the return type of a gcc2
22104     builtin and then its argument prototype would still apply.  */
22105 char _doprnt();
22106 char (*f)();
22107
22108 int main() {
22109
22110 /* The GNU C library defines this for functions which it implements
22111     to always fail with ENOSYS.  Some functions are actually named
22112     something starting with __ and the normal name is an alias.  */
22113 #if defined (__stub__doprnt) || defined (__stub____doprnt)
22114 choke me
22115 #else
22116 f = _doprnt;
22117 #endif
22118
22119 ; return 0; }
22120 EOF
22121 if { (eval echo configure:22122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22122   rm -rf conftest*
22123   eval "ac_cv_func__doprnt=yes"
22124 else
22125   echo "configure: failed program was:" >&5
22126   cat conftest.$ac_ext >&5
22127   rm -rf conftest*
22128   eval "ac_cv_func__doprnt=no"
22129 fi
22130 rm -f conftest*
22131 fi
22132
22133 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
22134   echo "$ac_t""yes" 1>&6
22135   cat >> confdefs.h <<\EOF
22136 #define HAVE_DOPRNT 1
22137 EOF
22138
22139 else
22140   echo "$ac_t""no" 1>&6
22141 fi
22142
22143 fi
22144
22145
22146 if test $ac_cv_func_vprintf = yes ; then
22147                 for ac_func in vsnprintf vsprintf
22148 do
22149 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22150 echo "configure:22151: checking for $ac_func" >&5
22151 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22152   echo $ac_n "(cached) $ac_c" 1>&6
22153 else
22154   cat > conftest.$ac_ext <<EOF
22155 #line 22156 "configure"
22156 #include "confdefs.h"
22157 /* System header to define __stub macros and hopefully few prototypes,
22158     which can conflict with char $ac_func(); below.  */
22159 #include <assert.h>
22160 /* Override any gcc2 internal prototype to avoid an error.  */
22161 /* We use char because int might match the return type of a gcc2
22162     builtin and then its argument prototype would still apply.  */
22163 char $ac_func();
22164 char (*f)();
22165
22166 int main() {
22167
22168 /* The GNU C library defines this for functions which it implements
22169     to always fail with ENOSYS.  Some functions are actually named
22170     something starting with __ and the normal name is an alias.  */
22171 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22172 choke me
22173 #else
22174 f = $ac_func;
22175 #endif
22176
22177 ; return 0; }
22178 EOF
22179 if { (eval echo configure:22180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22180   rm -rf conftest*
22181   eval "ac_cv_func_$ac_func=yes"
22182 else
22183   echo "configure: failed program was:" >&5
22184   cat conftest.$ac_ext >&5
22185   rm -rf conftest*
22186   eval "ac_cv_func_$ac_func=no"
22187 fi
22188 rm -f conftest*
22189 fi
22190
22191 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22192   echo "$ac_t""yes" 1>&6
22193     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22194   cat >> confdefs.h <<EOF
22195 #define $ac_tr_func 1
22196 EOF
22197  
22198 else
22199   echo "$ac_t""no" 1>&6
22200 fi
22201 done
22202
22203 fi
22204
22205 for ac_func in \
22206         bcopy                   \
22207         closesocket             \
22208         chroot                  \
22209         endgrent                \
22210         endpwent                \
22211         fcntl                   \
22212         flock                   \
22213         getdtablesize   \
22214         getgrgid                \
22215         gethostname             \
22216         getpass                 \
22217         getpassphrase   \
22218         getpwuid                \
22219         getpwnam                \
22220         getspnam                \
22221         gettimeofday    \
22222         initgroups              \
22223         lockf                   \
22224         memcpy                  \
22225         memmove                 \
22226         mkstemp                 \
22227         mktemp                  \
22228         pipe                    \
22229         read                    \
22230         recv                    \
22231         recvfrom                \
22232         recvmsg                 \
22233         setpwfile               \
22234         setgid                  \
22235         setegid                 \
22236         setsid                  \
22237         setuid                  \
22238         seteuid                 \
22239         sigaction               \
22240         signal                  \
22241         sigset                  \
22242         strdup                  \
22243         strerror                \
22244         strpbrk                 \
22245         strrchr                 \
22246         strsep                  \
22247         strstr                  \
22248         strtol                  \
22249         strtoul                 \
22250         strspn                  \
22251         sysconf                 \
22252         usleep                  \
22253         waitpid                 \
22254         wait4                   \
22255         write                   \
22256         send                    \
22257         sendto                  \
22258
22259 do
22260 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22261 echo "configure:22262: checking for $ac_func" >&5
22262 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22263   echo $ac_n "(cached) $ac_c" 1>&6
22264 else
22265   cat > conftest.$ac_ext <<EOF
22266 #line 22267 "configure"
22267 #include "confdefs.h"
22268 /* System header to define __stub macros and hopefully few prototypes,
22269     which can conflict with char $ac_func(); below.  */
22270 #include <assert.h>
22271 /* Override any gcc2 internal prototype to avoid an error.  */
22272 /* We use char because int might match the return type of a gcc2
22273     builtin and then its argument prototype would still apply.  */
22274 char $ac_func();
22275 char (*f)();
22276
22277 int main() {
22278
22279 /* The GNU C library defines this for functions which it implements
22280     to always fail with ENOSYS.  Some functions are actually named
22281     something starting with __ and the normal name is an alias.  */
22282 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22283 choke me
22284 #else
22285 f = $ac_func;
22286 #endif
22287
22288 ; return 0; }
22289 EOF
22290 if { (eval echo configure:22291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22291   rm -rf conftest*
22292   eval "ac_cv_func_$ac_func=yes"
22293 else
22294   echo "configure: failed program was:" >&5
22295   cat conftest.$ac_ext >&5
22296   rm -rf conftest*
22297   eval "ac_cv_func_$ac_func=no"
22298 fi
22299 rm -f conftest*
22300 fi
22301
22302 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22303   echo "$ac_t""yes" 1>&6
22304     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22305   cat >> confdefs.h <<EOF
22306 #define $ac_tr_func 1
22307 EOF
22308  
22309 else
22310   echo "$ac_t""no" 1>&6
22311 fi
22312 done
22313
22314
22315 for ac_func in getopt
22316 do
22317 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22318 echo "configure:22319: checking for $ac_func" >&5
22319 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22320   echo $ac_n "(cached) $ac_c" 1>&6
22321 else
22322   cat > conftest.$ac_ext <<EOF
22323 #line 22324 "configure"
22324 #include "confdefs.h"
22325 /* System header to define __stub macros and hopefully few prototypes,
22326     which can conflict with char $ac_func(); below.  */
22327 #include <assert.h>
22328 /* Override any gcc2 internal prototype to avoid an error.  */
22329 /* We use char because int might match the return type of a gcc2
22330     builtin and then its argument prototype would still apply.  */
22331 char $ac_func();
22332 char (*f)();
22333
22334 int main() {
22335
22336 /* The GNU C library defines this for functions which it implements
22337     to always fail with ENOSYS.  Some functions are actually named
22338     something starting with __ and the normal name is an alias.  */
22339 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22340 choke me
22341 #else
22342 f = $ac_func;
22343 #endif
22344
22345 ; return 0; }
22346 EOF
22347 if { (eval echo configure:22348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22348   rm -rf conftest*
22349   eval "ac_cv_func_$ac_func=yes"
22350 else
22351   echo "configure: failed program was:" >&5
22352   cat conftest.$ac_ext >&5
22353   rm -rf conftest*
22354   eval "ac_cv_func_$ac_func=no"
22355 fi
22356 rm -f conftest*
22357 fi
22358
22359 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22360   echo "$ac_t""yes" 1>&6
22361     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22362   cat >> confdefs.h <<EOF
22363 #define $ac_tr_func 1
22364 EOF
22365  
22366 else
22367   echo "$ac_t""no" 1>&6
22368 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
22369 fi
22370 done
22371
22372
22373
22374 if test "$ac_cv_func_getopt" != yes; then
22375         LIBSRCS="$LIBSRCS getopt.c"
22376 fi
22377
22378 # Check Configuration
22379 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
22380 echo "configure:22381: checking declaration of sys_errlist" >&5
22381 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
22382   echo $ac_n "(cached) $ac_c" 1>&6
22383 else
22384   
22385         cat > conftest.$ac_ext <<EOF
22386 #line 22387 "configure"
22387 #include "confdefs.h"
22388
22389 #include <stdio.h>
22390 #include <sys/types.h>
22391 #include <errno.h>
22392 #ifdef WINNT
22393 #include <stdlib.h>
22394 #endif 
22395 int main() {
22396 char *c = (char *) *sys_errlist
22397 ; return 0; }
22398 EOF
22399 if { (eval echo configure:22400: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22400   rm -rf conftest*
22401   ol_cv_dcl_sys_errlist=yes
22402         ol_cv_have_sys_errlist=yes
22403 else
22404   echo "configure: failed program was:" >&5
22405   cat conftest.$ac_ext >&5
22406   rm -rf conftest*
22407   ol_cv_dcl_sys_errlist=no
22408 fi
22409 rm -f conftest*
22410 fi
22411
22412 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
22413 #
22414 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
22415 if test $ol_cv_dcl_sys_errlist = no ; then
22416         cat >> confdefs.h <<\EOF
22417 #define DECL_SYS_ERRLIST 1
22418 EOF
22419
22420
22421         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
22422 echo "configure:22423: checking existence of sys_errlist" >&5
22423 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
22424   echo $ac_n "(cached) $ac_c" 1>&6
22425 else
22426   
22427                 cat > conftest.$ac_ext <<EOF
22428 #line 22429 "configure"
22429 #include "confdefs.h"
22430 #include <errno.h>
22431 int main() {
22432 char *c = (char *) *sys_errlist
22433 ; return 0; }
22434 EOF
22435 if { (eval echo configure:22436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22436   rm -rf conftest*
22437   ol_cv_have_sys_errlist=yes
22438 else
22439   echo "configure: failed program was:" >&5
22440   cat conftest.$ac_ext >&5
22441   rm -rf conftest*
22442   ol_cv_have_sys_errlist=no
22443 fi
22444 rm -f conftest*
22445 fi
22446
22447 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
22448 fi
22449 if test $ol_cv_have_sys_errlist = yes ; then
22450         cat >> confdefs.h <<\EOF
22451 #define HAVE_SYS_ERRLIST 1
22452 EOF
22453
22454 fi
22455
22456
22457
22458 if test "$ol_enable_debug" != no ; then
22459         cat >> confdefs.h <<\EOF
22460 #define LDAP_DEBUG 1
22461 EOF
22462
22463 fi
22464 if test "$ol_enable_syslog" = yes ; then
22465         cat >> confdefs.h <<\EOF
22466 #define LDAP_SYSLOG 1
22467 EOF
22468
22469 fi
22470 if test "$ol_enable_cache" = no ; then
22471         cat >> confdefs.h <<\EOF
22472 #define LDAP_NOCACHE 1
22473 EOF
22474
22475 fi
22476 if test "$ol_link_kbind" != no ; then
22477         cat >> confdefs.h <<\EOF
22478 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
22479 EOF
22480
22481 fi
22482 if test "$ol_enable_proctitle" != no ; then
22483         cat >> confdefs.h <<\EOF
22484 #define LDAP_PROCTITLE 1
22485 EOF
22486
22487 fi
22488 if test "$ol_enable_referrals" != no ; then
22489         cat >> confdefs.h <<\EOF
22490 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
22491 EOF
22492
22493 fi
22494 if test "$ol_enable_local" != no; then
22495         cat >> confdefs.h <<\EOF
22496 #define LDAP_PF_LOCAL 1
22497 EOF
22498
22499 fi
22500 if test "$ol_link_ipv6" != no; then
22501         cat >> confdefs.h <<\EOF
22502 #define LDAP_PF_INET6 1
22503 EOF
22504
22505 fi
22506 if test "$ol_enable_cleartext" != no ; then
22507         cat >> confdefs.h <<\EOF
22508 #define SLAPD_CLEARTEXT 1
22509 EOF
22510
22511 fi
22512 if test "$ol_enable_crypt" != no ; then
22513         cat >> confdefs.h <<\EOF
22514 #define SLAPD_CRYPT 1
22515 EOF
22516
22517 fi
22518 if test "$ol_link_kpasswd" != no ; then
22519         cat >> confdefs.h <<\EOF
22520 #define SLAPD_KPASSWD 1
22521 EOF
22522
22523 fi
22524 if test "$ol_link_spasswd" != no ; then
22525         cat >> confdefs.h <<\EOF
22526 #define SLAPD_SPASSWD 1
22527 EOF
22528
22529 fi
22530 if test "$ol_enable_multimaster" != no ; then
22531         cat >> confdefs.h <<\EOF
22532 #define SLAPD_MULTIMASTER 1
22533 EOF
22534
22535 fi
22536 if test "$ol_enable_phonetic" != no ; then
22537         cat >> confdefs.h <<\EOF
22538 #define SLAPD_PHONETIC 1
22539 EOF
22540
22541 fi
22542 if test "$ol_enable_rlookups" != no ; then
22543         cat >> confdefs.h <<\EOF
22544 #define SLAPD_RLOOKUPS 1
22545 EOF
22546
22547 fi
22548 if test "$ol_enable_aci" != no ; then
22549         cat >> confdefs.h <<\EOF
22550 #define SLAPD_ACI_ENABLED 1
22551 EOF
22552
22553 fi
22554
22555 if test "$ol_link_modules" != no ; then
22556         cat >> confdefs.h <<\EOF
22557 #define SLAPD_MODULES 1
22558 EOF
22559
22560         BUILD_SLAPD=yes
22561         SLAPD_MODULES_LDFLAGS="-dlopen self"
22562 fi
22563
22564 if test "$ol_enable_bdb" != no ; then
22565         cat >> confdefs.h <<\EOF
22566 #define SLAPD_BDB 1
22567 EOF
22568
22569         BUILD_SLAPD=yes
22570         BUILD_BDB=yes
22571         if test "$ol_with_bdb_module" != static ; then
22572                 cat >> confdefs.h <<\EOF
22573 #define SLAPD_BDB_DYNAMIC 1
22574 EOF
22575
22576                 BUILD_BDB=mod
22577                 BUILD_BDB_DYNAMIC=shared
22578                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
22579         else
22580                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
22581         fi
22582 fi
22583
22584 if test "$ol_link_dnssrv" != no ; then
22585         cat >> confdefs.h <<\EOF
22586 #define SLAPD_DNSSRV 1
22587 EOF
22588
22589         BUILD_SLAPD=yes
22590         BUILD_DNSSRV=yes
22591         if test "$ol_with_dnssrv_module" != static ; then
22592                 cat >> confdefs.h <<\EOF
22593 #define SLAPD_DNSSRV_DYNAMIC 1
22594 EOF
22595
22596                 BUILD_DNSSRV=mod
22597                 BUILD_DNSSRV_DYNAMIC=shared
22598                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
22599         else
22600                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
22601         fi
22602 fi
22603
22604 if test "$ol_enable_ldap" != no ; then
22605         cat >> confdefs.h <<\EOF
22606 #define SLAPD_LDAP 1
22607 EOF
22608
22609         BUILD_SLAPD=yes
22610         BUILD_LDAP=yes
22611         if test "$ol_with_ldap_module" != static ; then
22612                 cat >> confdefs.h <<\EOF
22613 #define SLAPD_LDAP_DYNAMIC 1
22614 EOF
22615
22616                 BUILD_LDAP=mod
22617                 BUILD_LDAP_DYNAMIC=shared
22618                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
22619         else
22620                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
22621         fi
22622 fi
22623
22624 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
22625         cat >> confdefs.h <<\EOF
22626 #define SLAPD_LDBM 1
22627 EOF
22628
22629         BUILD_SLAPD=yes
22630         BUILD_LDBM=yes
22631         LDBM_LIB="-lldbm"
22632         if test "$ol_with_ldbm_module" != static ; then
22633                 cat >> confdefs.h <<\EOF
22634 #define SLAPD_LDBM_DYNAMIC 1
22635 EOF
22636
22637                 BUILD_LDBM=mod
22638                 BUILD_LDBM_DYNAMIC=shared
22639                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
22640         else
22641                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
22642         fi
22643 fi
22644
22645 if test "$ol_enable_meta" != no ; then
22646         if test "$ol_enable_ldap" = no ; then
22647                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
22648         fi
22649         if test "$ol_enable_rewrite" = no ; then
22650                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
22651         fi
22652         cat >> confdefs.h <<\EOF
22653 #define SLAPD_META 1
22654 EOF
22655
22656         BUILD_SLAPD=yes
22657         BUILD_META=yes
22658         BUILD_LDAP=yes
22659         BUILD_REWRITE=yes
22660         if test "$ol_with_meta_module" != static ; then
22661                 cat >> confdefs.h <<\EOF
22662 #define SLAPD_META_DYNAMIC 1
22663 EOF
22664
22665                 BUILD_META=mod
22666                 BUILD_META_DYNAMIC=shared
22667                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
22668         else
22669                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
22670         fi
22671 fi
22672
22673 if test "$ol_enable_monitor" != no ; then
22674         cat >> confdefs.h <<\EOF
22675 #define SLAPD_MONITOR 1
22676 EOF
22677
22678         BUILD_SLAPD=yes
22679         BUILD_MONITOR=yes
22680         if test "$ol_with_monitor_module" != static ; then
22681                 cat >> confdefs.h <<\EOF
22682 #define SLAPD_MONITOR_DYNAMIC 1
22683 EOF
22684
22685                 BUILD_MONITOR=mod
22686                 BUILD_MONITOR_DYNAMIC=shared
22687                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
22688         else
22689                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
22690         fi
22691 fi
22692
22693 if test "$ol_enable_null" != no ; then
22694         cat >> confdefs.h <<\EOF
22695 #define SLAPD_NULL 1
22696 EOF
22697
22698         BUILD_SLAPD=yes
22699         BUILD_NULL=yes
22700         if test "$ol_with_null_module" != static ; then
22701                 cat >> confdefs.h <<\EOF
22702 #define SLAPD_NULL_DYNAMIC 1
22703 EOF
22704
22705                 BUILD_NULL=mod
22706                 BUILD_NULL_DYNAMIC=shared
22707                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
22708         else
22709                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
22710         fi
22711 fi
22712
22713 if test "$ol_enable_passwd" != no ; then
22714         cat >> confdefs.h <<\EOF
22715 #define SLAPD_PASSWD 1
22716 EOF
22717
22718         BUILD_SLAPD=yes
22719         BUILD_PASSWD=yes
22720         if test "$ol_with_passwd_module" != static ; then
22721                 cat >> confdefs.h <<\EOF
22722 #define SLAPD_PASSWD_DYNAMIC 1
22723 EOF
22724
22725                 BUILD_PASSWD=mod
22726                 BUILD_PASSWD_DYNAMIC=shared
22727                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
22728         else
22729                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
22730         fi
22731 fi
22732
22733 if test "$ol_link_perl" != no ; then
22734         cat >> confdefs.h <<\EOF
22735 #define SLAPD_PERL 1
22736 EOF
22737
22738         BUILD_SLAPD=yes
22739         BUILD_PERL=yes
22740         if test "$ol_with_perl_module" != static ; then
22741                 cat >> confdefs.h <<\EOF
22742 #define SLAPD_PERL_DYNAMIC 1
22743 EOF
22744
22745                 BUILD_PERL=mod
22746                 BUILD_PERL_DYNAMIC=shared
22747                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
22748         else
22749                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
22750         fi
22751 fi
22752
22753 if test "$ol_enable_shell" != no ; then
22754         cat >> confdefs.h <<\EOF
22755 #define SLAPD_SHELL 1
22756 EOF
22757
22758         BUILD_SLAPD=yes
22759         BUILD_SHELL=yes
22760         if test "$ol_with_shell_module" != static ; then
22761                 cat >> confdefs.h <<\EOF
22762 #define SLAPD_SHELL_DYNAMIC 1
22763 EOF
22764
22765                 BUILD_SHELL=mod
22766                 BUILD_SHELL_DYNAMIC=shared
22767                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
22768         else
22769                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
22770         fi
22771 fi
22772
22773 if test "$ol_link_sql" != no ; then
22774         cat >> confdefs.h <<\EOF
22775 #define SLAPD_SQL 1
22776 EOF
22777
22778         BUILD_SLAPD=yes
22779         BUILD_SQL=yes
22780         if test "$ol_with_sql_module" != static; then
22781                 cat >> confdefs.h <<\EOF
22782 #define SLAPD_SQL_DYNAMIC 1
22783 EOF
22784
22785                 BUILD_SQL=mod
22786                 BUILD_SQL_DYNAMIC=shared
22787                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
22788         else
22789                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
22790         fi
22791 fi
22792
22793 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
22794         $BUILD_SLAPD = yes ; then
22795         BUILD_SLURPD=yes
22796 fi
22797
22798 if test "$ol_enable_rewrite" != no ; then
22799         cat >> confdefs.h <<\EOF
22800 #define ENABLE_REWRITE 1
22801 EOF
22802
22803         BUILD_REWRITE=yes
22804 fi
22805
22806
22807
22808 if test "$ac_cv_mingw32" = yes ; then
22809         PLAT=NT
22810         SLAPD_MODULES_LDFLAGS=
22811 else
22812         PLAT=UNIX
22813 fi
22814
22815
22816
22817
22818
22819
22820   
22821   
22822   
22823   
22824   
22825   
22826   
22827   
22828   
22829   
22830   
22831   
22832   
22833   
22834   
22835   
22836   
22837   
22838   
22839   
22840   
22841   
22842
22843
22844
22845
22846
22847
22848
22849
22850
22851
22852
22853
22854
22855
22856
22857
22858
22859
22860
22861
22862
22863
22864
22865
22866
22867
22868
22869
22870
22871
22872
22873
22874
22875
22876
22877
22878
22879
22880 # Check whether --with-xxinstall or --without-xxinstall was given.
22881 if test "${with_xxinstall+set}" = set; then
22882   withval="$with_xxinstall"
22883   :
22884 fi
22885
22886
22887
22888 trap '' 1 2 15
22889
22890 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
22891
22892 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22893 # Let make expand exec_prefix.
22894 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22895
22896 # Any assignment to VPATH causes Sun make to only execute
22897 # the first set of double-colon rules, so remove it if not needed.
22898 # If there is a colon in the path, we need to keep it.
22899 if test "x$srcdir" = x.; then
22900   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
22901 fi
22902
22903 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
22904
22905 DEFS=-DHAVE_CONFIG_H
22906
22907 # Without the "./", some shells look in PATH for config.status.
22908 : ${CONFIG_STATUS=./config.status}
22909
22910 echo creating $CONFIG_STATUS
22911 rm -f $CONFIG_STATUS
22912 cat > $CONFIG_STATUS <<EOF
22913 #! /bin/sh
22914 # Generated automatically by configure.
22915 # Run this file to recreate the current configuration.
22916 # This directory was configured as follows,
22917 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
22918 #
22919 # $0 $ac_configure_args
22920 #
22921 # Compiler output produced by configure, useful for debugging
22922 # configure, is in ./config.log if it exists.
22923
22924 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
22925 for ac_option
22926 do
22927   case "\$ac_option" in
22928   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22929     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
22930     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
22931   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
22932     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
22933     exit 0 ;;
22934   -help | --help | --hel | --he | --h)
22935     echo "\$ac_cs_usage"; exit 0 ;;
22936   *) echo "\$ac_cs_usage"; exit 1 ;;
22937   esac
22938 done
22939
22940 ac_given_srcdir=$srcdir
22941 ac_given_INSTALL="$INSTALL"
22942
22943 trap 'rm -fr `echo "\
22944 Makefile:build/top.mk:Makefile.in:build/dir.mk \
22945 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
22946 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
22947 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
22948 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
22949 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
22950 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
22951 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
22952 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
22953 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
22954 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
22955 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
22956 include/Makefile:build/top.mk:include/Makefile.in \
22957 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
22958 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
22959 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22960 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22961 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
22962 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
22963 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
22964 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
22965 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
22966 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
22967 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
22968 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
22969 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
22970 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
22971 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
22972 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
22973 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
22974 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
22975 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
22976 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
22977 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
22978 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
22979 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
22980 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
22981 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
22982 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
22983 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
22984 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
22985  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
22986 EOF
22987 cat >> $CONFIG_STATUS <<EOF
22988
22989 # Protect against being on the right side of a sed subst in config.status.
22990 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
22991  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
22992 $ac_vpsub
22993 $extrasub
22994 s%@SHELL@%$SHELL%g
22995 s%@CFLAGS@%$CFLAGS%g
22996 s%@CPPFLAGS@%$CPPFLAGS%g
22997 s%@CXXFLAGS@%$CXXFLAGS%g
22998 s%@FFLAGS@%$FFLAGS%g
22999 s%@DEFS@%$DEFS%g
23000 s%@LDFLAGS@%$LDFLAGS%g
23001 s%@LIBS@%$LIBS%g
23002 s%@exec_prefix@%$exec_prefix%g
23003 s%@prefix@%$prefix%g
23004 s%@program_transform_name@%$program_transform_name%g
23005 s%@bindir@%$bindir%g
23006 s%@sbindir@%$sbindir%g
23007 s%@libexecdir@%$libexecdir%g
23008 s%@datadir@%$datadir%g
23009 s%@sysconfdir@%$sysconfdir%g
23010 s%@sharedstatedir@%$sharedstatedir%g
23011 s%@localstatedir@%$localstatedir%g
23012 s%@libdir@%$libdir%g
23013 s%@includedir@%$includedir%g
23014 s%@oldincludedir@%$oldincludedir%g
23015 s%@infodir@%$infodir%g
23016 s%@mandir@%$mandir%g
23017 s%@host@%$host%g
23018 s%@host_alias@%$host_alias%g
23019 s%@host_cpu@%$host_cpu%g
23020 s%@host_vendor@%$host_vendor%g
23021 s%@host_os@%$host_os%g
23022 s%@target@%$target%g
23023 s%@target_alias@%$target_alias%g
23024 s%@target_cpu@%$target_cpu%g
23025 s%@target_vendor@%$target_vendor%g
23026 s%@target_os@%$target_os%g
23027 s%@build@%$build%g
23028 s%@build_alias@%$build_alias%g
23029 s%@build_cpu@%$build_cpu%g
23030 s%@build_vendor@%$build_vendor%g
23031 s%@build_os@%$build_os%g
23032 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
23033 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
23034 s%@INSTALL_DATA@%$INSTALL_DATA%g
23035 s%@PACKAGE@%$PACKAGE%g
23036 s%@VERSION@%$VERSION%g
23037 s%@ACLOCAL@%$ACLOCAL%g
23038 s%@AUTOCONF@%$AUTOCONF%g
23039 s%@AUTOMAKE@%$AUTOMAKE%g
23040 s%@AUTOHEADER@%$AUTOHEADER%g
23041 s%@MAKEINFO@%$MAKEINFO%g
23042 s%@install_sh@%$install_sh%g
23043 s%@AMTAR@%$AMTAR%g
23044 s%@AWK@%$AWK%g
23045 s%@AMTARFLAGS@%$AMTARFLAGS%g
23046 s%@SET_MAKE@%$SET_MAKE%g
23047 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
23048 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
23049 s%@top_builddir@%$top_builddir%g
23050 s%@ldap_subdir@%$ldap_subdir%g
23051 s%@CC@%$CC%g
23052 s%@AR@%$AR%g
23053 s%@LN_S@%$LN_S%g
23054 s%@OBJEXT@%$OBJEXT%g
23055 s%@EXEEXT@%$EXEEXT%g
23056 s%@ECHO@%$ECHO%g
23057 s%@RANLIB@%$RANLIB%g
23058 s%@STRIP@%$STRIP%g
23059 s%@DLLTOOL@%$DLLTOOL%g
23060 s%@AS@%$AS%g
23061 s%@OBJDUMP@%$OBJDUMP%g
23062 s%@CPP@%$CPP%g
23063 s%@LIBTOOL@%$LIBTOOL%g
23064 s%@LN_H@%$LN_H%g
23065 s%@SENDMAIL@%$SENDMAIL%g
23066 s%@EDITOR@%$EDITOR%g
23067 s%@PERLBIN@%$PERLBIN%g
23068 s%@OL_MKDEP@%$OL_MKDEP%g
23069 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
23070 s%@LIBOBJS@%$LIBOBJS%g
23071 s%@LIBSRCS@%$LIBSRCS%g
23072 s%@PLAT@%$PLAT%g
23073 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
23074 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
23075 s%@BUILD_BDB@%$BUILD_BDB%g
23076 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
23077 s%@BUILD_LDAP@%$BUILD_LDAP%g
23078 s%@BUILD_LDBM@%$BUILD_LDBM%g
23079 s%@BUILD_META@%$BUILD_META%g
23080 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
23081 s%@BUILD_NULL@%$BUILD_NULL%g
23082 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
23083 s%@BUILD_PERL@%$BUILD_PERL%g
23084 s%@BUILD_SHELL@%$BUILD_SHELL%g
23085 s%@BUILD_SQL@%$BUILD_SQL%g
23086 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
23087 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
23088 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
23089 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
23090 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
23091 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
23092 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
23093 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
23094 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
23095 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
23096 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
23097 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
23098 s%@LDBM_LIB@%$LDBM_LIB%g
23099 s%@LDAP_LIBS@%$LDAP_LIBS%g
23100 s%@LDIF_LIBS@%$LDIF_LIBS%g
23101 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
23102 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
23103 s%@LDBM_LIBS@%$LDBM_LIBS%g
23104 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
23105 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
23106 s%@WRAP_LIBS@%$WRAP_LIBS%g
23107 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
23108 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
23109 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
23110 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
23111 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
23112 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
23113 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
23114 s%@KRB4_LIBS@%$KRB4_LIBS%g
23115 s%@KRB5_LIBS@%$KRB5_LIBS%g
23116 s%@READLINE_LIBS@%$READLINE_LIBS%g
23117 s%@SASL_LIBS@%$SASL_LIBS%g
23118 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
23119 s%@TLS_LIBS@%$TLS_LIBS%g
23120 s%@MODULES_LIBS@%$MODULES_LIBS%g
23121 s%@AUTH_LIBS@%$AUTH_LIBS%g
23122 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
23123 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
23124 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
23125 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
23126
23127 CEOF
23128 EOF
23129
23130 cat >> $CONFIG_STATUS <<\EOF
23131
23132 # Split the substitutions into bite-sized pieces for seds with
23133 # small command number limits, like on Digital OSF/1 and HP-UX.
23134 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
23135 ac_file=1 # Number of current file.
23136 ac_beg=1 # First line for current file.
23137 ac_end=$ac_max_sed_cmds # Line after last line for current file.
23138 ac_more_lines=:
23139 ac_sed_cmds=""
23140 while $ac_more_lines; do
23141   if test $ac_beg -gt 1; then
23142     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
23143   else
23144     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
23145   fi
23146   if test ! -s conftest.s$ac_file; then
23147     ac_more_lines=false
23148     rm -f conftest.s$ac_file
23149   else
23150     if test -z "$ac_sed_cmds"; then
23151       ac_sed_cmds="sed -f conftest.s$ac_file"
23152     else
23153       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
23154     fi
23155     ac_file=`expr $ac_file + 1`
23156     ac_beg=$ac_end
23157     ac_end=`expr $ac_end + $ac_max_sed_cmds`
23158   fi
23159 done
23160 if test -z "$ac_sed_cmds"; then
23161   ac_sed_cmds=cat
23162 fi
23163 EOF
23164
23165 cat >> $CONFIG_STATUS <<EOF
23166
23167 CONFIG_FILES=\${CONFIG_FILES-"\
23168 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23169 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23170 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23171 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23172 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23173 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23174 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23175 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23176 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
23177 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
23178 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
23179 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23180 include/Makefile:build/top.mk:include/Makefile.in \
23181 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23182 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
23183 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23184 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23185 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23186 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
23187 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
23188 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23189 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23190 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23191 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23192 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23193 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23194 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23195 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23196 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23197 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23198 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23199 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23200 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23201 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23202 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23203 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23204 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23205 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
23206 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23207 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23208 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23209 "}
23210 EOF
23211 cat >> $CONFIG_STATUS <<\EOF
23212 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
23213   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23214   case "$ac_file" in
23215   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23216        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23217   *) ac_file_in="${ac_file}.in" ;;
23218   esac
23219
23220   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
23221
23222   # Remove last slash and all that follows it.  Not all systems have dirname.
23223   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23224   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23225     # The file is in a subdirectory.
23226     test ! -d "$ac_dir" && mkdir "$ac_dir"
23227     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
23228     # A "../" for each directory in $ac_dir_suffix.
23229     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
23230   else
23231     ac_dir_suffix= ac_dots=
23232   fi
23233
23234   case "$ac_given_srcdir" in
23235   .)  srcdir=.
23236       if test -z "$ac_dots"; then top_srcdir=.
23237       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
23238   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
23239   *) # Relative path.
23240     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
23241     top_srcdir="$ac_dots$ac_given_srcdir" ;;
23242   esac
23243
23244   case "$ac_given_INSTALL" in
23245   [/$]*) INSTALL="$ac_given_INSTALL" ;;
23246   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
23247   esac
23248
23249   echo creating "$ac_file"
23250   rm -f "$ac_file"
23251   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
23252   case "$ac_file" in
23253   *[Mm]akefile*) ac_comsub="1i\\
23254 # $configure_input" ;;
23255   *) ac_comsub= ;;
23256   esac
23257
23258   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23259   sed -e "$ac_comsub
23260 s%@configure_input@%$configure_input%g
23261 s%@srcdir@%$srcdir%g
23262 s%@top_srcdir@%$top_srcdir%g
23263 s%@INSTALL@%$INSTALL%g
23264 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
23265 fi; done
23266 rm -f conftest.s*
23267
23268 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23269 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23270 #
23271 # ac_d sets the value in "#define NAME VALUE" lines.
23272 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23273 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
23274 ac_dC='\3'
23275 ac_dD='%g'
23276 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23277 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23278 ac_uB='\([      ]\)%\1#\2define\3'
23279 ac_uC=' '
23280 ac_uD='\4%g'
23281 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23282 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23283 ac_eB='$%\1#\2define\3'
23284 ac_eC=' '
23285 ac_eD='%g'
23286
23287 if test "${CONFIG_HEADERS+set}" != set; then
23288 EOF
23289 cat >> $CONFIG_STATUS <<EOF
23290   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
23291 EOF
23292 cat >> $CONFIG_STATUS <<\EOF
23293 fi
23294 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
23295   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23296   case "$ac_file" in
23297   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23298        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23299   *) ac_file_in="${ac_file}.in" ;;
23300   esac
23301
23302   echo creating $ac_file
23303
23304   rm -f conftest.frag conftest.in conftest.out
23305   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23306   cat $ac_file_inputs > conftest.in
23307
23308 EOF
23309
23310 # Transform confdefs.h into a sed script conftest.vals that substitutes
23311 # the proper values into config.h.in to produce config.h.  And first:
23312 # Protect against being on the right side of a sed subst in config.status.
23313 # Protect against being in an unquoted here document in config.status.
23314 rm -f conftest.vals
23315 cat > conftest.hdr <<\EOF
23316 s/[\\&%]/\\&/g
23317 s%[\\$`]%\\&%g
23318 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
23319 s%ac_d%ac_u%gp
23320 s%ac_u%ac_e%gp
23321 EOF
23322 sed -n -f conftest.hdr confdefs.h > conftest.vals
23323 rm -f conftest.hdr
23324
23325 # This sed command replaces #undef with comments.  This is necessary, for
23326 # example, in the case of _POSIX_SOURCE, which is predefined and required
23327 # on some systems where configure will not decide to define it.
23328 cat >> conftest.vals <<\EOF
23329 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
23330 EOF
23331
23332 # Break up conftest.vals because some shells have a limit on
23333 # the size of here documents, and old seds have small limits too.
23334
23335 rm -f conftest.tail
23336 while :
23337 do
23338   ac_lines=`grep -c . conftest.vals`
23339   # grep -c gives empty output for an empty file on some AIX systems.
23340   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
23341   # Write a limited-size here document to conftest.frag.
23342   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
23343   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
23344   echo 'CEOF
23345   sed -f conftest.frag conftest.in > conftest.out
23346   rm -f conftest.in
23347   mv conftest.out conftest.in
23348 ' >> $CONFIG_STATUS
23349   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23350   rm -f conftest.vals
23351   mv conftest.tail conftest.vals
23352 done
23353 rm -f conftest.vals
23354
23355 cat >> $CONFIG_STATUS <<\EOF
23356   rm -f conftest.frag conftest.h
23357   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
23358   cat conftest.in >> conftest.h
23359   rm -f conftest.in
23360   if cmp -s $ac_file conftest.h 2>/dev/null; then
23361     echo "$ac_file is unchanged"
23362     rm -f conftest.h
23363   else
23364     # Remove last slash and all that follows it.  Not all systems have dirname.
23365       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23366       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23367       # The file is in a subdirectory.
23368       test ! -d "$ac_dir" && mkdir "$ac_dir"
23369     fi
23370     rm -f $ac_file
23371     mv conftest.h $ac_file
23372   fi
23373 fi; done
23374
23375 EOF
23376 cat >> $CONFIG_STATUS <<EOF
23377
23378 EOF
23379 cat >> $CONFIG_STATUS <<\EOF
23380
23381 date > stamp-h
23382 echo Please run \"make depend\" to build dependencies
23383
23384 exit 0
23385 EOF
23386 chmod +x $CONFIG_STATUS
23387 rm -fr confdefs* $ac_clean_files
23388 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
23389