]> git.sur5r.net Git - openldap/blob - configure
Update Cyrus SASL detection to always look for <sasl.h> regardless
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.402 2002/02/10 13:23:55 hyc Exp  
4
5 # Copyright 1998-2002 The OpenLDAP Foundation.  All Rights Reserved.
6
7 # Redistribution and use in source and binary forms, with or without
8 # modification, are permitted only as authorized by the OpenLDAP
9 # Public License.  A copy of this license is available at
10 # http://www.OpenLDAP.org/license.html or in file LICENSE in the
11 # top-level directory of the distribution.
12
13 echo "Copyright 1998-2002 The OpenLDAP Foundation,  All Rights Reserved."
14 echo "Restrictions apply, see COPYRIGHT and LICENSE files."
15
16 # Guess values for system-dependent variables and create Makefiles.
17 # Generated automatically using autoconf version 2.13.1 
18 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
19 #
20 # This configure script is free software; the Free Software Foundation
21 # gives unlimited permission to copy, distribute and modify it.
22
23 # Defaults:
24 ac_help=
25 ac_default_prefix=/usr/local
26 # Any additions from configure.in:
27 ac_default_prefix=/usr/local
28 ac_help="$ac_help
29   --with-subdir=DIR       change default subdirectory used for installs"
30 ac_help="$ac_help
31   --enable-debug          enable debugging [yes]"
32 ac_help="$ac_help
33   --enable-syslog         enable syslog support [auto]"
34 ac_help="$ac_help
35   --enable-proctitle      enable proctitle support [yes]"
36 ac_help="$ac_help
37   --enable-cache          enable caching (experimental) [no]"
38 ac_help="$ac_help
39   --enable-referrals      enable LDAPv2+ Referrals (experimental) [no]"
40 ac_help="$ac_help
41   --enable-kbind          enable LDAPv2+ Kerberos IV bind (deprecated) [no]"
42 ac_help="$ac_help
43   --enable-ipv6           enable IPv6 support [auto]"
44 ac_help="$ac_help
45   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
46 ac_help="$ac_help
47   --enable-rewrite        enable rewrite [no]"
48 ac_help="$ac_help
49   --enable-x-compile      enable cross compiling [no]"
50 ac_help="$ac_help
51   --with-cyrus-sasl       with Cyrus SASL support [auto]"
52 ac_help="$ac_help
53   --with-fetch            with fetch URL support [auto]"
54 ac_help="$ac_help
55   --with-kerberos         with Kerberos support [auto]"
56 ac_help="$ac_help
57   --with-readline         with readline support [auto]"
58 ac_help="$ac_help
59   --with-threads          with threads [auto]"
60 ac_help="$ac_help
61   --with-tls              with TLS/SSL support [auto]"
62 ac_help="$ac_help
63   --with-yielding-select  with implicitly yielding select [auto]"
64 ac_help="$ac_help
65 SLAPD (Standalone LDAP Daemon) Options:"
66 ac_help="$ac_help
67   --enable-slapd          enable building slapd [yes]"
68 ac_help="$ac_help
69     --enable-aci          enable per-object ACIs (experimental) [no]"
70 ac_help="$ac_help
71     --enable-cleartext    enable cleartext passwords [yes]"
72 ac_help="$ac_help
73     --enable-crypt        enable crypt(3) passwords [no]"
74 ac_help="$ac_help
75     --enable-dynamic      enable linking built binaries with dynamic libs [no]"
76 ac_help="$ac_help
77     --enable-kpasswd      enable Kerberos password verification [no]"
78 ac_help="$ac_help
79     --enable-lmpasswd     enable LAN Manager passwords [no]"
80 ac_help="$ac_help
81     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
82 ac_help="$ac_help
83     --enable-modules      enable dynamic module support [no]"
84 ac_help="$ac_help
85     --enable-phonetic     enable phonetic/soundex [no]"
86 ac_help="$ac_help
87     --enable-rlookups     enable reverse lookups [no]"
88 ac_help="$ac_help
89     --enable-slp          enable SLPv2 support [no]"
90 ac_help="$ac_help
91     --enable-wrappers     enable tcp wrapper support [no]"
92 ac_help="$ac_help
93     --enable-bdb          enable Berkeley DB backend [yes]"
94 ac_help="$ac_help
95     --with-bdb-module     module type [static]"
96 ac_help="$ac_help
97     --enable-dnssrv       enable dnssrv backend [no]"
98 ac_help="$ac_help
99     --with-dnssrv-module  module type [static]"
100 ac_help="$ac_help
101     --enable-ldap         enable ldap backend [no]"
102 ac_help="$ac_help
103     --with-ldap-module    module type [static]"
104 ac_help="$ac_help
105     --enable-ldbm         enable ldbm backend [no]"
106 ac_help="$ac_help
107     --with-ldbm-api       with LDBM API [auto]"
108 ac_help="$ac_help
109     --with-ldbm-module    module type [static]"
110 ac_help="$ac_help
111     --with-ldbm-type      use LDBM type [auto]"
112 ac_help="$ac_help
113     --enable-meta         enable metadirectory backend [no]"
114 ac_help="$ac_help
115     --with-meta-module    module type [static]"
116 ac_help="$ac_help
117     --enable-monitor      enable monitor backend [no]"
118 ac_help="$ac_help
119     --with-monitor-module module type [static]"
120 ac_help="$ac_help
121     --enable-passwd       enable passwd backend [no]"
122 ac_help="$ac_help
123     --with-passwd-module  module type [static]"
124 ac_help="$ac_help
125     --enable-perl         enable perl backend [no]"
126 ac_help="$ac_help
127     --with-perl-module    module type [static]"
128 ac_help="$ac_help
129     --enable-shell        enable shell backend [no]"
130 ac_help="$ac_help
131     --with-shell-module   module type [static]"
132 ac_help="$ac_help
133     --enable-sql          enable sql backend [no]"
134 ac_help="$ac_help
135     --with-sql-module     module type [static]"
136 ac_help="$ac_help
137     --enable-tcl          enable tcl backend [no]"
138 ac_help="$ac_help
139     --with-tcl-module     module type [static]"
140 ac_help="$ac_help
141 SLURPD (Replication Daemon) Options:"
142 ac_help="$ac_help
143   --enable-slurpd         enable building slurpd [auto]"
144 ac_help="$ac_help
145 Library Generation & Linking Options"
146 ac_help="$ac_help
147   --enable-static[=PKGS]  build static libraries [default=yes]"
148 ac_help="$ac_help
149   --enable-shared[=PKGS]  build shared libraries [default=yes]"
150 ac_help="$ac_help
151   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
152 ac_help="$ac_help
153   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
154
155 # Find the correct PATH separator.  Usually this is `:', but
156 # DJGPP uses `;' like DOS.
157 if test "X${PATH_SEPARATOR+set}" != Xset; then
158   UNAME=${UNAME-`uname 2>/dev/null`}
159   case X$UNAME in
160     *-DOS) lt_cv_sys_path_separator=';' ;;
161     *)     lt_cv_sys_path_separator=':' ;;
162   esac
163   PATH_SEPARATOR=$lt_cv_sys_path_separator
164 fi
165
166
167 # Check that we are running under the correct shell.
168 SHELL=${CONFIG_SHELL-/bin/sh}
169
170 case X$ECHO in
171 X*--fallback-echo)
172   # Remove one level of quotation (which was required for Make).
173   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
174   ;;
175 esac
176
177 echo=${ECHO-echo}
178 if test "X$1" = X--no-reexec; then
179   # Discard the --no-reexec flag, and continue.
180   shift
181 elif test "X$1" = X--fallback-echo; then
182   # Avoid inline document here, it may be left over
183   :
184 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
185   # Yippee, $echo works!
186   :
187 else
188   # Restart under the correct shell.
189   exec $SHELL "$0" --no-reexec ${1+"$@"}
190 fi
191
192 if test "X$1" = X--fallback-echo; then
193   # used as fallback echo
194   shift
195   cat <<EOF
196
197 EOF
198   exit 0
199 fi
200
201 # The HP-UX ksh and POSIX shell print the target directory to stdout
202 # if CDPATH is set.
203 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
204
205 if test -z "$ECHO"; then
206 if test "X${echo_test_string+set}" != Xset; then
207 # find a string as large as possible, as long as the shell can cope with it
208   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
209     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
210     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
211        echo_test_string="`eval $cmd`" &&
212        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
213     then
214       break
215     fi
216   done
217 fi
218
219 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
220    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
221    test "X$echo_testing_string" = "X$echo_test_string"; then
222   :
223 else
224   # The Solaris, AIX, and Digital Unix default echo programs unquote
225   # backslashes.  This makes it impossible to quote backslashes using
226   #   echo "$something" | sed 's/\\/\\\\/g'
227   #
228   # So, first we look for a working echo in the user's PATH.
229
230   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
231   for dir in $PATH /usr/ucb; do
232     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
233        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
234        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
235        test "X$echo_testing_string" = "X$echo_test_string"; then
236       echo="$dir/echo"
237       break
238     fi
239   done
240   IFS="$save_ifs"
241
242   if test "X$echo" = Xecho; then
243     # We didn't find a better echo, so look for alternatives.
244     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
245        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
246        test "X$echo_testing_string" = "X$echo_test_string"; then
247       # This shell has a builtin print -r that does the trick.
248       echo='print -r'
249     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
250          test "X$CONFIG_SHELL" != X/bin/ksh; then
251       # If we have ksh, try running configure again with it.
252       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
253       export ORIGINAL_CONFIG_SHELL
254       CONFIG_SHELL=/bin/ksh
255       export CONFIG_SHELL
256       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
257     else
258       # Try using printf.
259       echo='printf %s\n'
260       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
261          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
262          test "X$echo_testing_string" = "X$echo_test_string"; then
263         # Cool, printf works
264         :
265       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
266            test "X$echo_testing_string" = 'X\t' &&
267            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
268            test "X$echo_testing_string" = "X$echo_test_string"; then
269         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
270         export CONFIG_SHELL
271         SHELL="$CONFIG_SHELL"
272         export SHELL
273         echo="$CONFIG_SHELL $0 --fallback-echo"
274       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
275            test "X$echo_testing_string" = 'X\t' &&
276            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
277            test "X$echo_testing_string" = "X$echo_test_string"; then
278         echo="$CONFIG_SHELL $0 --fallback-echo"
279       else
280         # maybe with a smaller string...
281         prev=:
282
283         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
284           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
285           then
286             break
287           fi
288           prev="$cmd"
289         done
290
291         if test "$prev" != 'sed 50q "$0"'; then
292           echo_test_string=`eval $prev`
293           export echo_test_string
294           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
295         else
296           # Oops.  We lost completely, so just stick with echo.
297           echo=echo
298         fi
299       fi
300     fi
301   fi
302 fi
303 fi
304
305 # Copy echo and quote the copy suitably for passing to libtool from
306 # the Makefile, instead of quoting the original, which is used later.
307 ECHO=$echo
308 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
309    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
310 fi
311
312
313 ac_help="$ac_help
314   --disable-libtool-lock  avoid locking (might break parallel builds)"
315 ac_help="$ac_help
316   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
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
866 TB=`$SHTOOL echo -e %B`
867 TN=`$SHTOOL echo -e %b`
868
869 echo "Configuring $TB$OL_STRING$TN ..."
870
871
872 echo $ac_n "checking host system type""... $ac_c" 1>&6
873 echo "configure:874: checking host system type" >&5
874 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
875
876 # Make sure we can run config.sub.
877   if $ac_config_sub sun4 >/dev/null 2>&1; then :
878     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
879   fi
880
881   ac_cv_host_alias=$host
882   case "$ac_cv_host_alias" in
883   NONE)
884     case $nonopt in
885     NONE)
886       if ac_cv_host_alias=`$ac_config_guess`; then :
887       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
888       fi ;;
889     *) ac_cv_host_alias=$nonopt ;;
890     esac ;;
891   esac
892
893   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
894   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
895   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
896   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
897 else
898   echo $ac_n "(cached) $ac_c" 1>&6
899 fi
900
901 echo "$ac_t""$ac_cv_host" 1>&6
902
903 host=$ac_cv_host
904 host_alias=$ac_cv_host_alias
905 host_cpu=$ac_cv_host_cpu
906 host_vendor=$ac_cv_host_vendor
907 host_os=$ac_cv_host_os
908
909
910
911
912
913 echo $ac_n "checking target system type""... $ac_c" 1>&6
914 echo "configure:915: checking target system type" >&5
915 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
916
917 # Make sure we can run config.sub.
918   if $ac_config_sub sun4 >/dev/null 2>&1; then :
919     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
920   fi
921
922   ac_cv_target_alias=$target
923   case "$ac_cv_target_alias" in
924   NONE)
925     case $nonopt in
926     NONE)
927       ac_cv_target_alias=$host_alias ;;
928
929     *) ac_cv_target_alias=$nonopt ;;
930     esac ;;
931   esac
932
933   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
934   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
935   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
936   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
937 else
938   echo $ac_n "(cached) $ac_c" 1>&6
939 fi
940
941 echo "$ac_t""$ac_cv_target" 1>&6
942
943 target=$ac_cv_target
944 target_alias=$ac_cv_target_alias
945 target_cpu=$ac_cv_target_cpu
946 target_vendor=$ac_cv_target_vendor
947 target_os=$ac_cv_target_os
948
949
950
951
952
953 echo $ac_n "checking build system type""... $ac_c" 1>&6
954 echo "configure:955: checking build system type" >&5
955 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
956
957 # Make sure we can run config.sub.
958   if $ac_config_sub sun4 >/dev/null 2>&1; then :
959     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
960   fi
961
962   ac_cv_build_alias=$build
963   case "$ac_cv_build_alias" in
964   NONE)
965     case $nonopt in
966     NONE)
967       ac_cv_build_alias=$host_alias ;;
968
969     *) ac_cv_build_alias=$nonopt ;;
970     esac ;;
971   esac
972
973   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
974   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
975   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
976   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
977 else
978   echo $ac_n "(cached) $ac_c" 1>&6
979 fi
980
981 echo "$ac_t""$ac_cv_build" 1>&6
982
983 build=$ac_cv_build
984 build_alias=$ac_cv_build_alias
985 build_cpu=$ac_cv_build_cpu
986 build_vendor=$ac_cv_build_vendor
987 build_os=$ac_cv_build_os
988
989
990
991
992
993 # Do some error checking and defaulting for the host and target type.
994 # The inputs are:
995 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
996 #
997 # The rules are:
998 # 1. You are not allowed to specify --host, --target, and nonopt at the
999 #    same time.
1000 # 2. Host defaults to nonopt.
1001 # 3. If nonopt is not specified, then host defaults to the current host,
1002 #    as determined by config.guess.
1003 # 4. Target and build default to nonopt.
1004 # 5. If nonopt is not specified, then target and build default to host.
1005
1006 # The aliases save the names the user supplied, while $host etc.
1007 # will get canonicalized.
1008 case $host---$target---$nonopt in
1009 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1010 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1011 esac
1012
1013 test "$host_alias" != "$target_alias" &&
1014   test "$program_prefix$program_suffix$program_transform_name" = \
1015     NONENONEs,x,x, &&
1016   program_prefix=${target_alias}-
1017
1018
1019 # Find a good install program.  We prefer a C program (faster),
1020 # so one script is as good as another.  But avoid the broken or
1021 # incompatible versions:
1022 # SysV /etc/install, /usr/sbin/install
1023 # SunOS /usr/etc/install
1024 # IRIX /sbin/install
1025 # AIX /bin/install
1026 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1027 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1028 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1029 # ./install, which can be erroneously created by make from ./install.sh.
1030 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1031 echo "configure:1032: checking for a BSD compatible install" >&5
1032 if test -z "$INSTALL"; then
1033 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1034   echo $ac_n "(cached) $ac_c" 1>&6
1035 else
1036     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1037   for ac_dir in $PATH; do
1038     # Account for people who put trailing slashes in PATH elements.
1039     case "$ac_dir/" in
1040     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1041     *)
1042       # OSF1 and SCO ODT 3.0 have their own names for install.
1043       # Don't use installbsd from OSF since it installs stuff as root
1044       # by default.
1045       for ac_prog in ginstall scoinst install; do
1046         if test -f $ac_dir/$ac_prog; then
1047           if test $ac_prog = install &&
1048             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1049             # AIX install.  It has an incompatible calling convention.
1050             :
1051           elif test $ac_prog = install &&
1052             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1053             # program-specific install script used by HP pwplus--don't use.
1054             :
1055           else
1056             ac_cv_path_install="$ac_dir/$ac_prog -c"
1057             break 2
1058           fi
1059         fi
1060       done
1061       ;;
1062     esac
1063   done
1064   IFS="$ac_save_IFS"
1065
1066 fi
1067   if test "${ac_cv_path_install+set}" = set; then
1068     INSTALL="$ac_cv_path_install"
1069   else
1070     # As a last resort, use the slow shell script.  We don't cache a
1071     # path for INSTALL within a source directory, because that will
1072     # break other packages using the cache if that directory is
1073     # removed, or if the path is relative.
1074     INSTALL="$ac_install_sh"
1075   fi
1076 fi
1077 echo "$ac_t""$INSTALL" 1>&6
1078
1079 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1080 # It thinks the first close brace ends the variable substitution.
1081 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1082
1083 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1084
1085 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1086
1087 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1088 echo "configure:1089: checking whether build environment is sane" >&5
1089 # Just in case
1090 sleep 1
1091 echo timestamp > conftestfile
1092 # Do `set' in a subshell so we don't clobber the current shell's
1093 # arguments.  Must try -L first in case configure is actually a
1094 # symlink; some systems play weird games with the mod time of symlinks
1095 # (eg FreeBSD returns the mod time of the symlink's containing
1096 # directory).
1097 if (
1098    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1099    if test "$*" = "X"; then
1100       # -L didn't work.
1101       set X `ls -t $srcdir/configure conftestfile`
1102    fi
1103    if test "$*" != "X $srcdir/configure conftestfile" \
1104       && test "$*" != "X conftestfile $srcdir/configure"; then
1105
1106       # If neither matched, then we have a broken ls.  This can happen
1107       # if, for instance, CONFIG_SHELL is bash and it inherits a
1108       # broken ls alias from the environment.  This has actually
1109       # happened.  Such a system could not be considered "sane".
1110       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1111 alias in your environment" 1>&2; exit 1; }
1112    fi
1113
1114    test "$2" = conftestfile
1115    )
1116 then
1117    # Ok.
1118    :
1119 else
1120    { echo "configure: error: newly created file is older than distributed files!
1121 Check your system clock" 1>&2; exit 1; }
1122 fi
1123 rm -f conftest*
1124 echo "$ac_t""yes" 1>&6
1125 if test "$program_transform_name" = s,x,x,; then
1126   program_transform_name=
1127 else
1128   # Double any \ or $.  echo might interpret backslashes.
1129   cat <<\EOF_SED > conftestsed
1130 s,\\,\\\\,g; s,\$,$$,g
1131 EOF_SED
1132   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1133   rm -f conftestsed
1134 fi
1135 test "$program_prefix" != NONE &&
1136   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1137 # Use a double $ so make ignores it.
1138 test "$program_suffix" != NONE &&
1139   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1140
1141 # sed with no file args requires a program.
1142 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1143
1144 for ac_prog in mawk gawk nawk awk
1145 do
1146 # Extract the first word of "$ac_prog", so it can be a program name with args.
1147 set dummy $ac_prog; ac_word=$2
1148 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1149 echo "configure:1150: checking for $ac_word" >&5
1150 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1151   echo $ac_n "(cached) $ac_c" 1>&6
1152 else
1153   if test -n "$AWK"; then
1154   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1155 else
1156   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1157   ac_dummy="$PATH"
1158   for ac_dir in $ac_dummy; do
1159     test -z "$ac_dir" && ac_dir=.
1160     if test -f $ac_dir/$ac_word; then
1161       ac_cv_prog_AWK="$ac_prog"
1162       break
1163     fi
1164   done
1165   IFS="$ac_save_ifs"
1166 fi
1167 fi
1168 AWK="$ac_cv_prog_AWK"
1169 if test -n "$AWK"; then
1170   echo "$ac_t""$AWK" 1>&6
1171 else
1172   echo "$ac_t""no" 1>&6
1173 fi
1174
1175 test -n "$AWK" && break
1176 done
1177
1178 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1179 echo "configure:1180: checking whether ${MAKE-make} sets \${MAKE}" >&5
1180 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1181 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1182   echo $ac_n "(cached) $ac_c" 1>&6
1183 else
1184   cat > conftestmake <<\EOF
1185 all:
1186         @echo 'ac_maketemp="${MAKE}"'
1187 EOF
1188 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1189 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1190 if test -n "$ac_maketemp"; then
1191   eval ac_cv_prog_make_${ac_make}_set=yes
1192 else
1193   eval ac_cv_prog_make_${ac_make}_set=no
1194 fi
1195 rm -f conftestmake
1196 fi
1197 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1198   echo "$ac_t""yes" 1>&6
1199   SET_MAKE=
1200 else
1201   echo "$ac_t""no" 1>&6
1202   SET_MAKE="MAKE=${MAKE-make}"
1203 fi
1204
1205
1206
1207 PACKAGE=$OL_PACKAGE
1208
1209 VERSION=$OL_VERSION
1210
1211 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1212   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1213 fi
1214
1215
1216
1217 missing_dir=`cd $ac_aux_dir && pwd`
1218 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1219 echo "configure:1220: checking for working aclocal" >&5
1220 # Run test in a subshell; some versions of sh will print an error if
1221 # an executable is not found, even if stderr is redirected.
1222 # Redirect stdin to placate older versions of autoconf.  Sigh.
1223 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1224    ACLOCAL=aclocal
1225    echo "$ac_t""found" 1>&6
1226 else
1227    ACLOCAL="$missing_dir/missing aclocal"
1228    echo "$ac_t""missing" 1>&6
1229 fi
1230
1231 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1232 echo "configure:1233: checking for working autoconf" >&5
1233 # Run test in a subshell; some versions of sh will print an error if
1234 # an executable is not found, even if stderr is redirected.
1235 # Redirect stdin to placate older versions of autoconf.  Sigh.
1236 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1237    AUTOCONF=autoconf
1238    echo "$ac_t""found" 1>&6
1239 else
1240    AUTOCONF="$missing_dir/missing autoconf"
1241    echo "$ac_t""missing" 1>&6
1242 fi
1243
1244 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1245 echo "configure:1246: checking for working automake" >&5
1246 # Run test in a subshell; some versions of sh will print an error if
1247 # an executable is not found, even if stderr is redirected.
1248 # Redirect stdin to placate older versions of autoconf.  Sigh.
1249 if (automake --version) < /dev/null > /dev/null 2>&1; then
1250    AUTOMAKE=automake
1251    echo "$ac_t""found" 1>&6
1252 else
1253    AUTOMAKE="$missing_dir/missing automake"
1254    echo "$ac_t""missing" 1>&6
1255 fi
1256
1257 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1258 echo "configure:1259: checking for working autoheader" >&5
1259 # Run test in a subshell; some versions of sh will print an error if
1260 # an executable is not found, even if stderr is redirected.
1261 # Redirect stdin to placate older versions of autoconf.  Sigh.
1262 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1263    AUTOHEADER=autoheader
1264    echo "$ac_t""found" 1>&6
1265 else
1266    AUTOHEADER="$missing_dir/missing autoheader"
1267    echo "$ac_t""missing" 1>&6
1268 fi
1269
1270 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1271 echo "configure:1272: checking for working makeinfo" >&5
1272 # Run test in a subshell; some versions of sh will print an error if
1273 # an executable is not found, even if stderr is redirected.
1274 # Redirect stdin to placate older versions of autoconf.  Sigh.
1275 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1276    MAKEINFO=makeinfo
1277    echo "$ac_t""found" 1>&6
1278 else
1279    MAKEINFO="$missing_dir/missing makeinfo"
1280    echo "$ac_t""missing" 1>&6
1281 fi
1282
1283 install_sh="$missing_dir/install-sh"
1284 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1285
1286 for ac_prog in gnutar gtar tar
1287 do
1288 # Extract the first word of "$ac_prog", so it can be a program name with args.
1289 set dummy $ac_prog; ac_word=$2
1290 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1291 echo "configure:1292: checking for $ac_word" >&5
1292 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1293   echo $ac_n "(cached) $ac_c" 1>&6
1294 else
1295   if test -n "$AMTAR"; then
1296   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1297 else
1298   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1299   ac_dummy="$PATH"
1300   for ac_dir in $ac_dummy; do
1301     test -z "$ac_dir" && ac_dir=.
1302     if test -f $ac_dir/$ac_word; then
1303       ac_cv_prog_AMTAR="$ac_prog"
1304       break
1305     fi
1306   done
1307   IFS="$ac_save_ifs"
1308 fi
1309 fi
1310 AMTAR="$ac_cv_prog_AMTAR"
1311 if test -n "$AMTAR"; then
1312   echo "$ac_t""$AMTAR" 1>&6
1313 else
1314   echo "$ac_t""no" 1>&6
1315 fi
1316
1317 test -n "$AMTAR" && break
1318 done
1319
1320
1321 AMTARFLAGS=
1322 if test -n "$AMTAR"; then
1323   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1324         AMTARFLAGS=o
1325   fi
1326 fi
1327
1328 cat >> confdefs.h <<EOF
1329 #define OPENLDAP_PACKAGE "$PACKAGE"
1330 EOF
1331
1332 cat >> confdefs.h <<EOF
1333 #define OPENLDAP_VERSION "$VERSION"
1334 EOF
1335
1336
1337 cat >> confdefs.h <<EOF
1338 #define LDAP_VENDOR_VERSION $OL_API_INC
1339 EOF
1340
1341 cat >> confdefs.h <<EOF
1342 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1343 EOF
1344
1345 cat >> confdefs.h <<EOF
1346 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1347 EOF
1348
1349 cat >> confdefs.h <<EOF
1350 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1351 EOF
1352
1353
1354 OPENLDAP_LIBVERSION=$OL_API_LIB
1355
1356
1357
1358 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1359 echo "configure:1360: checking configure arguments" >&5
1360
1361
1362 top_builddir=`pwd`
1363
1364 ldap_subdir="/openldap"
1365
1366 # Check whether --with-subdir or --without-subdir was given.
1367 if test "${with_subdir+set}" = set; then
1368   withval="$with_subdir"
1369   case "$withval" in
1370         no) ldap_subdir=""
1371                 ;;
1372         yes)
1373                 ;;
1374         /*|\\*)
1375                 ldap_subdir="$withval"
1376                 ;;
1377         *)
1378                 ldap_subdir="/$withval"
1379                 ;;
1380 esac
1381
1382 fi
1383
1384
1385 # OpenLDAP --enable-debug
1386         # Check whether --enable-debug or --disable-debug was given.
1387 if test "${enable_debug+set}" = set; then
1388   enableval="$enable_debug"
1389   
1390         ol_arg=invalid
1391         for ol_val in auto yes no ; do
1392                 if test "$enableval" = "$ol_val" ; then
1393                         ol_arg="$ol_val"
1394                 fi
1395         done
1396         if test "$ol_arg" = "invalid" ; then
1397                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1398         fi
1399         ol_enable_debug="$ol_arg"
1400
1401 else
1402         ol_enable_debug="yes"
1403 fi
1404 # end --enable-debug
1405 # OpenLDAP --enable-syslog
1406         # Check whether --enable-syslog or --disable-syslog was given.
1407 if test "${enable_syslog+set}" = set; then
1408   enableval="$enable_syslog"
1409   
1410         ol_arg=invalid
1411         for ol_val in auto yes no ; do
1412                 if test "$enableval" = "$ol_val" ; then
1413                         ol_arg="$ol_val"
1414                 fi
1415         done
1416         if test "$ol_arg" = "invalid" ; then
1417                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1418         fi
1419         ol_enable_syslog="$ol_arg"
1420
1421 else
1422         ol_enable_syslog="auto"
1423 fi
1424 # end --enable-syslog
1425 # OpenLDAP --enable-proctitle
1426         # Check whether --enable-proctitle or --disable-proctitle was given.
1427 if test "${enable_proctitle+set}" = set; then
1428   enableval="$enable_proctitle"
1429   
1430         ol_arg=invalid
1431         for ol_val in auto yes no ; do
1432                 if test "$enableval" = "$ol_val" ; then
1433                         ol_arg="$ol_val"
1434                 fi
1435         done
1436         if test "$ol_arg" = "invalid" ; then
1437                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1438         fi
1439         ol_enable_proctitle="$ol_arg"
1440
1441 else
1442         ol_enable_proctitle="yes"
1443 fi
1444 # end --enable-proctitle
1445 # OpenLDAP --enable-cache
1446         # Check whether --enable-cache or --disable-cache was given.
1447 if test "${enable_cache+set}" = set; then
1448   enableval="$enable_cache"
1449   
1450         ol_arg=invalid
1451         for ol_val in auto yes no ; do
1452                 if test "$enableval" = "$ol_val" ; then
1453                         ol_arg="$ol_val"
1454                 fi
1455         done
1456         if test "$ol_arg" = "invalid" ; then
1457                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1458         fi
1459         ol_enable_cache="$ol_arg"
1460
1461 else
1462         ol_enable_cache="no"
1463 fi
1464 # end --enable-cache
1465 # OpenLDAP --enable-referrals
1466         # Check whether --enable-referrals or --disable-referrals was given.
1467 if test "${enable_referrals+set}" = set; then
1468   enableval="$enable_referrals"
1469   
1470         ol_arg=invalid
1471         for ol_val in auto yes no ; do
1472                 if test "$enableval" = "$ol_val" ; then
1473                         ol_arg="$ol_val"
1474                 fi
1475         done
1476         if test "$ol_arg" = "invalid" ; then
1477                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1478         fi
1479         ol_enable_referrals="$ol_arg"
1480
1481 else
1482         ol_enable_referrals="no"
1483 fi
1484 # end --enable-referrals
1485 # OpenLDAP --enable-kbind
1486         # Check whether --enable-kbind or --disable-kbind was given.
1487 if test "${enable_kbind+set}" = set; then
1488   enableval="$enable_kbind"
1489   
1490         ol_arg=invalid
1491         for ol_val in auto yes no ; do
1492                 if test "$enableval" = "$ol_val" ; then
1493                         ol_arg="$ol_val"
1494                 fi
1495         done
1496         if test "$ol_arg" = "invalid" ; then
1497                 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1498         fi
1499         ol_enable_kbind="$ol_arg"
1500
1501 else
1502         ol_enable_kbind="no"
1503 fi
1504 # end --enable-kbind
1505 # OpenLDAP --enable-ipv6
1506         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1507 if test "${enable_ipv6+set}" = set; then
1508   enableval="$enable_ipv6"
1509   
1510         ol_arg=invalid
1511         for ol_val in auto yes no ; do
1512                 if test "$enableval" = "$ol_val" ; then
1513                         ol_arg="$ol_val"
1514                 fi
1515         done
1516         if test "$ol_arg" = "invalid" ; then
1517                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1518         fi
1519         ol_enable_ipv6="$ol_arg"
1520
1521 else
1522         ol_enable_ipv6="auto"
1523 fi
1524 # end --enable-ipv6
1525 # OpenLDAP --enable-local
1526         # Check whether --enable-local or --disable-local was given.
1527 if test "${enable_local+set}" = set; then
1528   enableval="$enable_local"
1529   
1530         ol_arg=invalid
1531         for ol_val in auto yes no ; do
1532                 if test "$enableval" = "$ol_val" ; then
1533                         ol_arg="$ol_val"
1534                 fi
1535         done
1536         if test "$ol_arg" = "invalid" ; then
1537                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1538         fi
1539         ol_enable_local="$ol_arg"
1540
1541 else
1542         ol_enable_local="auto"
1543 fi
1544 # end --enable-local
1545 # OpenLDAP --enable-rewrite
1546         # Check whether --enable-rewrite or --disable-rewrite was given.
1547 if test "${enable_rewrite+set}" = set; then
1548   enableval="$enable_rewrite"
1549   
1550         ol_arg=invalid
1551         for ol_val in auto yes no ; do
1552                 if test "$enableval" = "$ol_val" ; then
1553                         ol_arg="$ol_val"
1554                 fi
1555         done
1556         if test "$ol_arg" = "invalid" ; then
1557                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1558         fi
1559         ol_enable_rewrite="$ol_arg"
1560
1561 else
1562         ol_enable_rewrite="no"
1563 fi
1564 # end --enable-rewrite
1565 # OpenLDAP --enable-x_compile
1566         # Check whether --enable-x_compile or --disable-x_compile was given.
1567 if test "${enable_x_compile+set}" = set; then
1568   enableval="$enable_x_compile"
1569   
1570         ol_arg=invalid
1571         for ol_val in yes no ; do
1572                 if test "$enableval" = "$ol_val" ; then
1573                         ol_arg="$ol_val"
1574                 fi
1575         done
1576         if test "$ol_arg" = "invalid" ; then
1577                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1578         fi
1579         ol_enable_x_compile="$ol_arg"
1580
1581 else
1582         ol_enable_x_compile="no"
1583 fi
1584 # end --enable-x_compile
1585
1586
1587 # OpenLDAP --with-cyrus_sasl
1588         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1589 if test "${with_cyrus_sasl+set}" = set; then
1590   withval="$with_cyrus_sasl"
1591   
1592         ol_arg=invalid
1593         for ol_val in auto yes no  ; do
1594                 if test "$withval" = "$ol_val" ; then
1595                         ol_arg="$ol_val"
1596                 fi
1597         done
1598         if test "$ol_arg" = "invalid" ; then
1599                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1600         fi
1601         ol_with_cyrus_sasl="$ol_arg"
1602
1603 else
1604         ol_with_cyrus_sasl="auto"
1605 fi
1606 # end --with-cyrus_sasl
1607
1608 # OpenLDAP --with-fetch
1609         # Check whether --with-fetch or --without-fetch was given.
1610 if test "${with_fetch+set}" = set; then
1611   withval="$with_fetch"
1612   
1613         ol_arg=invalid
1614         for ol_val in auto yes no  ; do
1615                 if test "$withval" = "$ol_val" ; then
1616                         ol_arg="$ol_val"
1617                 fi
1618         done
1619         if test "$ol_arg" = "invalid" ; then
1620                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1621         fi
1622         ol_with_fetch="$ol_arg"
1623
1624 else
1625         ol_with_fetch="auto"
1626 fi
1627 # end --with-fetch
1628
1629 # OpenLDAP --with-kerberos
1630         # Check whether --with-kerberos or --without-kerberos was given.
1631 if test "${with_kerberos+set}" = set; then
1632   withval="$with_kerberos"
1633   
1634         ol_arg=invalid
1635         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1636                 if test "$withval" = "$ol_val" ; then
1637                         ol_arg="$ol_val"
1638                 fi
1639         done
1640         if test "$ol_arg" = "invalid" ; then
1641                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1642         fi
1643         ol_with_kerberos="$ol_arg"
1644
1645 else
1646         ol_with_kerberos="auto"
1647 fi
1648 # end --with-kerberos
1649
1650 # OpenLDAP --with-readline
1651         # Check whether --with-readline or --without-readline was given.
1652 if test "${with_readline+set}" = set; then
1653   withval="$with_readline"
1654   
1655         ol_arg=invalid
1656         for ol_val in auto yes no  ; do
1657                 if test "$withval" = "$ol_val" ; then
1658                         ol_arg="$ol_val"
1659                 fi
1660         done
1661         if test "$ol_arg" = "invalid" ; then
1662                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1663         fi
1664         ol_with_readline="$ol_arg"
1665
1666 else
1667         ol_with_readline="auto"
1668 fi
1669 # end --with-readline
1670
1671 # OpenLDAP --with-threads
1672         # Check whether --with-threads or --without-threads was given.
1673 if test "${with_threads+set}" = set; then
1674   withval="$with_threads"
1675   
1676         ol_arg=invalid
1677         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1678                 if test "$withval" = "$ol_val" ; then
1679                         ol_arg="$ol_val"
1680                 fi
1681         done
1682         if test "$ol_arg" = "invalid" ; then
1683                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1684         fi
1685         ol_with_threads="$ol_arg"
1686
1687 else
1688         ol_with_threads="auto"
1689 fi
1690 # end --with-threads
1691
1692 # OpenLDAP --with-tls
1693         # Check whether --with-tls or --without-tls was given.
1694 if test "${with_tls+set}" = set; then
1695   withval="$with_tls"
1696   
1697         ol_arg=invalid
1698         for ol_val in auto ssleay openssl yes no  ; do
1699                 if test "$withval" = "$ol_val" ; then
1700                         ol_arg="$ol_val"
1701                 fi
1702         done
1703         if test "$ol_arg" = "invalid" ; then
1704                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1705         fi
1706         ol_with_tls="$ol_arg"
1707
1708 else
1709         ol_with_tls="auto"
1710 fi
1711 # end --with-tls
1712
1713 # OpenLDAP --with-yielding_select
1714         # Check whether --with-yielding_select or --without-yielding_select was given.
1715 if test "${with_yielding_select+set}" = set; then
1716   withval="$with_yielding_select"
1717   
1718         ol_arg=invalid
1719         for ol_val in auto yes no manual  ; do
1720                 if test "$withval" = "$ol_val" ; then
1721                         ol_arg="$ol_val"
1722                 fi
1723         done
1724         if test "$ol_arg" = "invalid" ; then
1725                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1726         fi
1727         ol_with_yielding_select="$ol_arg"
1728
1729 else
1730         ol_with_yielding_select="auto"
1731 fi
1732 # end --with-yielding_select
1733
1734
1735
1736 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1737 if test "${with_xxslapdoptions+set}" = set; then
1738   withval="$with_xxslapdoptions"
1739   :
1740 fi
1741
1742 # OpenLDAP --enable-slapd
1743         # Check whether --enable-slapd or --disable-slapd was given.
1744 if test "${enable_slapd+set}" = set; then
1745   enableval="$enable_slapd"
1746   
1747         ol_arg=invalid
1748         for ol_val in auto yes no ; do
1749                 if test "$enableval" = "$ol_val" ; then
1750                         ol_arg="$ol_val"
1751                 fi
1752         done
1753         if test "$ol_arg" = "invalid" ; then
1754                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1755         fi
1756         ol_enable_slapd="$ol_arg"
1757
1758 else
1759         ol_enable_slapd="yes"
1760 fi
1761 # end --enable-slapd
1762 # OpenLDAP --enable-aci
1763         # Check whether --enable-aci or --disable-aci was given.
1764 if test "${enable_aci+set}" = set; then
1765   enableval="$enable_aci"
1766   
1767         ol_arg=invalid
1768         for ol_val in auto yes no ; do
1769                 if test "$enableval" = "$ol_val" ; then
1770                         ol_arg="$ol_val"
1771                 fi
1772         done
1773         if test "$ol_arg" = "invalid" ; then
1774                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1775         fi
1776         ol_enable_aci="$ol_arg"
1777
1778 else
1779         ol_enable_aci="no"
1780 fi
1781 # end --enable-aci
1782 # OpenLDAP --enable-cleartext
1783         # Check whether --enable-cleartext or --disable-cleartext was given.
1784 if test "${enable_cleartext+set}" = set; then
1785   enableval="$enable_cleartext"
1786   
1787         ol_arg=invalid
1788         for ol_val in auto yes no ; do
1789                 if test "$enableval" = "$ol_val" ; then
1790                         ol_arg="$ol_val"
1791                 fi
1792         done
1793         if test "$ol_arg" = "invalid" ; then
1794                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1795         fi
1796         ol_enable_cleartext="$ol_arg"
1797
1798 else
1799         ol_enable_cleartext="yes"
1800 fi
1801 # end --enable-cleartext
1802 # OpenLDAP --enable-crypt
1803         # Check whether --enable-crypt or --disable-crypt was given.
1804 if test "${enable_crypt+set}" = set; then
1805   enableval="$enable_crypt"
1806   
1807         ol_arg=invalid
1808         for ol_val in auto yes no ; do
1809                 if test "$enableval" = "$ol_val" ; then
1810                         ol_arg="$ol_val"
1811                 fi
1812         done
1813         if test "$ol_arg" = "invalid" ; then
1814                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1815         fi
1816         ol_enable_crypt="$ol_arg"
1817
1818 else
1819         ol_enable_crypt="no"
1820 fi
1821 # end --enable-crypt
1822 # OpenLDAP --enable-dynamic
1823         # Check whether --enable-dynamic or --disable-dynamic was given.
1824 if test "${enable_dynamic+set}" = set; then
1825   enableval="$enable_dynamic"
1826   
1827         ol_arg=invalid
1828         for ol_val in auto yes no ; do
1829                 if test "$enableval" = "$ol_val" ; then
1830                         ol_arg="$ol_val"
1831                 fi
1832         done
1833         if test "$ol_arg" = "invalid" ; then
1834                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1835         fi
1836         ol_enable_dynamic="$ol_arg"
1837
1838 else
1839         ol_enable_dynamic="no"
1840 fi
1841 # end --enable-dynamic
1842 # OpenLDAP --enable-kpasswd
1843         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1844 if test "${enable_kpasswd+set}" = set; then
1845   enableval="$enable_kpasswd"
1846   
1847         ol_arg=invalid
1848         for ol_val in auto yes no ; do
1849                 if test "$enableval" = "$ol_val" ; then
1850                         ol_arg="$ol_val"
1851                 fi
1852         done
1853         if test "$ol_arg" = "invalid" ; then
1854                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1855         fi
1856         ol_enable_kpasswd="$ol_arg"
1857
1858 else
1859         ol_enable_kpasswd="no"
1860 fi
1861 # end --enable-kpasswd
1862 # OpenLDAP --enable-lmpasswd
1863         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1864 if test "${enable_lmpasswd+set}" = set; then
1865   enableval="$enable_lmpasswd"
1866   
1867         ol_arg=invalid
1868         for ol_val in auto yes no ; do
1869                 if test "$enableval" = "$ol_val" ; then
1870                         ol_arg="$ol_val"
1871                 fi
1872         done
1873         if test "$ol_arg" = "invalid" ; then
1874                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1875         fi
1876         ol_enable_lmpasswd="$ol_arg"
1877
1878 else
1879         ol_enable_lmpasswd="no"
1880 fi
1881 # end --enable-lmpasswd
1882 # OpenLDAP --enable-spasswd
1883         # Check whether --enable-spasswd or --disable-spasswd was given.
1884 if test "${enable_spasswd+set}" = set; then
1885   enableval="$enable_spasswd"
1886   
1887         ol_arg=invalid
1888         for ol_val in auto yes no ; do
1889                 if test "$enableval" = "$ol_val" ; then
1890                         ol_arg="$ol_val"
1891                 fi
1892         done
1893         if test "$ol_arg" = "invalid" ; then
1894                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1895         fi
1896         ol_enable_spasswd="$ol_arg"
1897
1898 else
1899         ol_enable_spasswd="no"
1900 fi
1901 # end --enable-spasswd
1902 # OpenLDAP --enable-modules
1903         # Check whether --enable-modules or --disable-modules was given.
1904 if test "${enable_modules+set}" = set; then
1905   enableval="$enable_modules"
1906   
1907         ol_arg=invalid
1908         for ol_val in auto yes no ; do
1909                 if test "$enableval" = "$ol_val" ; then
1910                         ol_arg="$ol_val"
1911                 fi
1912         done
1913         if test "$ol_arg" = "invalid" ; then
1914                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1915         fi
1916         ol_enable_modules="$ol_arg"
1917
1918 else
1919         ol_enable_modules="no"
1920 fi
1921 # end --enable-modules
1922 # OpenLDAP --enable-phonetic
1923         # Check whether --enable-phonetic or --disable-phonetic was given.
1924 if test "${enable_phonetic+set}" = set; then
1925   enableval="$enable_phonetic"
1926   
1927         ol_arg=invalid
1928         for ol_val in auto yes no ; do
1929                 if test "$enableval" = "$ol_val" ; then
1930                         ol_arg="$ol_val"
1931                 fi
1932         done
1933         if test "$ol_arg" = "invalid" ; then
1934                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1935         fi
1936         ol_enable_phonetic="$ol_arg"
1937
1938 else
1939         ol_enable_phonetic="no"
1940 fi
1941 # end --enable-phonetic
1942 # OpenLDAP --enable-rlookups
1943         # Check whether --enable-rlookups or --disable-rlookups was given.
1944 if test "${enable_rlookups+set}" = set; then
1945   enableval="$enable_rlookups"
1946   
1947         ol_arg=invalid
1948         for ol_val in auto yes no ; do
1949                 if test "$enableval" = "$ol_val" ; then
1950                         ol_arg="$ol_val"
1951                 fi
1952         done
1953         if test "$ol_arg" = "invalid" ; then
1954                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1955         fi
1956         ol_enable_rlookups="$ol_arg"
1957
1958 else
1959         ol_enable_rlookups="no"
1960 fi
1961 # end --enable-rlookups
1962 # OpenLDAP --enable-slp
1963         # Check whether --enable-slp or --disable-slp was given.
1964 if test "${enable_slp+set}" = set; then
1965   enableval="$enable_slp"
1966   
1967         ol_arg=invalid
1968         for ol_val in auto yes no ; do
1969                 if test "$enableval" = "$ol_val" ; then
1970                         ol_arg="$ol_val"
1971                 fi
1972         done
1973         if test "$ol_arg" = "invalid" ; then
1974                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1975         fi
1976         ol_enable_slp="$ol_arg"
1977
1978 else
1979         ol_enable_slp="no"
1980 fi
1981 # end --enable-slp
1982 # OpenLDAP --enable-wrappers
1983         # Check whether --enable-wrappers or --disable-wrappers was given.
1984 if test "${enable_wrappers+set}" = set; then
1985   enableval="$enable_wrappers"
1986   
1987         ol_arg=invalid
1988         for ol_val in auto yes no ; do
1989                 if test "$enableval" = "$ol_val" ; then
1990                         ol_arg="$ol_val"
1991                 fi
1992         done
1993         if test "$ol_arg" = "invalid" ; then
1994                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1995         fi
1996         ol_enable_wrappers="$ol_arg"
1997
1998 else
1999         ol_enable_wrappers="no"
2000 fi
2001 # end --enable-wrappers
2002
2003 # OpenLDAP --enable-bdb
2004         # Check whether --enable-bdb or --disable-bdb was given.
2005 if test "${enable_bdb+set}" = set; then
2006   enableval="$enable_bdb"
2007   
2008         ol_arg=invalid
2009         for ol_val in auto yes no ; do
2010                 if test "$enableval" = "$ol_val" ; then
2011                         ol_arg="$ol_val"
2012                 fi
2013         done
2014         if test "$ol_arg" = "invalid" ; then
2015                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
2016         fi
2017         ol_enable_bdb="$ol_arg"
2018
2019 else
2020         ol_enable_bdb="yes"
2021 fi
2022 # end --enable-bdb
2023 # OpenLDAP --with-bdb_module
2024         # Check whether --with-bdb_module or --without-bdb_module was given.
2025 if test "${with_bdb_module+set}" = set; then
2026   withval="$with_bdb_module"
2027   
2028         ol_arg=invalid
2029         for ol_val in static dynamic ; do
2030                 if test "$withval" = "$ol_val" ; then
2031                         ol_arg="$ol_val"
2032                 fi
2033         done
2034         if test "$ol_arg" = "invalid" ; then
2035                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
2036         fi
2037         ol_with_bdb_module="$ol_arg"
2038
2039 else
2040         ol_with_bdb_module="static"
2041 fi
2042 # end --with-bdb_module
2043
2044 # OpenLDAP --enable-dnssrv
2045         # Check whether --enable-dnssrv or --disable-dnssrv was given.
2046 if test "${enable_dnssrv+set}" = set; then
2047   enableval="$enable_dnssrv"
2048   
2049         ol_arg=invalid
2050         for ol_val in auto yes no ; do
2051                 if test "$enableval" = "$ol_val" ; then
2052                         ol_arg="$ol_val"
2053                 fi
2054         done
2055         if test "$ol_arg" = "invalid" ; then
2056                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
2057         fi
2058         ol_enable_dnssrv="$ol_arg"
2059
2060 else
2061         ol_enable_dnssrv="no"
2062 fi
2063 # end --enable-dnssrv
2064 # OpenLDAP --with-dnssrv_module
2065         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
2066 if test "${with_dnssrv_module+set}" = set; then
2067   withval="$with_dnssrv_module"
2068   
2069         ol_arg=invalid
2070         for ol_val in static dynamic ; do
2071                 if test "$withval" = "$ol_val" ; then
2072                         ol_arg="$ol_val"
2073                 fi
2074         done
2075         if test "$ol_arg" = "invalid" ; then
2076                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
2077         fi
2078         ol_with_dnssrv_module="$ol_arg"
2079
2080 else
2081         ol_with_dnssrv_module="static"
2082 fi
2083 # end --with-dnssrv_module
2084
2085 # OpenLDAP --enable-ldap
2086         # Check whether --enable-ldap or --disable-ldap was given.
2087 if test "${enable_ldap+set}" = set; then
2088   enableval="$enable_ldap"
2089   
2090         ol_arg=invalid
2091         for ol_val in auto yes no ; do
2092                 if test "$enableval" = "$ol_val" ; then
2093                         ol_arg="$ol_val"
2094                 fi
2095         done
2096         if test "$ol_arg" = "invalid" ; then
2097                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2098         fi
2099         ol_enable_ldap="$ol_arg"
2100
2101 else
2102         ol_enable_ldap="no"
2103 fi
2104 # end --enable-ldap
2105 # OpenLDAP --with-ldap_module
2106         # Check whether --with-ldap_module or --without-ldap_module was given.
2107 if test "${with_ldap_module+set}" = set; then
2108   withval="$with_ldap_module"
2109   
2110         ol_arg=invalid
2111         for ol_val in static dynamic ; do
2112                 if test "$withval" = "$ol_val" ; then
2113                         ol_arg="$ol_val"
2114                 fi
2115         done
2116         if test "$ol_arg" = "invalid" ; then
2117                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
2118         fi
2119         ol_with_ldap_module="$ol_arg"
2120
2121 else
2122         ol_with_ldap_module="static"
2123 fi
2124 # end --with-ldap_module
2125
2126 # OpenLDAP --enable-ldbm
2127         # Check whether --enable-ldbm or --disable-ldbm was given.
2128 if test "${enable_ldbm+set}" = set; then
2129   enableval="$enable_ldbm"
2130   
2131         ol_arg=invalid
2132         for ol_val in auto yes no ; do
2133                 if test "$enableval" = "$ol_val" ; then
2134                         ol_arg="$ol_val"
2135                 fi
2136         done
2137         if test "$ol_arg" = "invalid" ; then
2138                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2139         fi
2140         ol_enable_ldbm="$ol_arg"
2141
2142 else
2143         ol_enable_ldbm="no"
2144 fi
2145 # end --enable-ldbm
2146 # OpenLDAP --with-ldbm_api
2147         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2148 if test "${with_ldbm_api+set}" = set; then
2149   withval="$with_ldbm_api"
2150   
2151         ol_arg=invalid
2152         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2153                 if test "$withval" = "$ol_val" ; then
2154                         ol_arg="$ol_val"
2155                 fi
2156         done
2157         if test "$ol_arg" = "invalid" ; then
2158                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2159         fi
2160         ol_with_ldbm_api="$ol_arg"
2161
2162 else
2163         ol_with_ldbm_api="auto"
2164 fi
2165 # end --with-ldbm_api
2166
2167 # OpenLDAP --with-ldbm_module
2168         # Check whether --with-ldbm_module or --without-ldbm_module was given.
2169 if test "${with_ldbm_module+set}" = set; then
2170   withval="$with_ldbm_module"
2171   
2172         ol_arg=invalid
2173         for ol_val in static dynamic ; do
2174                 if test "$withval" = "$ol_val" ; then
2175                         ol_arg="$ol_val"
2176                 fi
2177         done
2178         if test "$ol_arg" = "invalid" ; then
2179                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2180         fi
2181         ol_with_ldbm_module="$ol_arg"
2182
2183 else
2184         ol_with_ldbm_module="static"
2185 fi
2186 # end --with-ldbm_module
2187
2188 # OpenLDAP --with-ldbm_type
2189         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2190 if test "${with_ldbm_type+set}" = set; then
2191   withval="$with_ldbm_type"
2192   
2193         ol_arg=invalid
2194         for ol_val in auto btree hash ; do
2195                 if test "$withval" = "$ol_val" ; then
2196                         ol_arg="$ol_val"
2197                 fi
2198         done
2199         if test "$ol_arg" = "invalid" ; then
2200                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2201         fi
2202         ol_with_ldbm_type="$ol_arg"
2203
2204 else
2205         ol_with_ldbm_type="auto"
2206 fi
2207 # end --with-ldbm_type
2208
2209 # OpenLDAP --enable-meta
2210         # Check whether --enable-meta or --disable-meta was given.
2211 if test "${enable_meta+set}" = set; then
2212   enableval="$enable_meta"
2213   
2214         ol_arg=invalid
2215         for ol_val in auto yes no ; do
2216                 if test "$enableval" = "$ol_val" ; then
2217                         ol_arg="$ol_val"
2218                 fi
2219         done
2220         if test "$ol_arg" = "invalid" ; then
2221                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2222         fi
2223         ol_enable_meta="$ol_arg"
2224
2225 else
2226         ol_enable_meta="no"
2227 fi
2228 # end --enable-meta
2229 # OpenLDAP --with-meta_module
2230         # Check whether --with-meta_module or --without-meta_module was given.
2231 if test "${with_meta_module+set}" = set; then
2232   withval="$with_meta_module"
2233   
2234         ol_arg=invalid
2235         for ol_val in static dynamic ; do
2236                 if test "$withval" = "$ol_val" ; then
2237                         ol_arg="$ol_val"
2238                 fi
2239         done
2240         if test "$ol_arg" = "invalid" ; then
2241                 { echo "configure: error: bad value $withval for --with-meta_module" 1>&2; exit 1; }
2242         fi
2243         ol_with_meta_module="$ol_arg"
2244
2245 else
2246         ol_with_meta_module="static"
2247 fi
2248 # end --with-meta_module
2249
2250 # OpenLDAP --enable-monitor
2251         # Check whether --enable-monitor or --disable-monitor was given.
2252 if test "${enable_monitor+set}" = set; then
2253   enableval="$enable_monitor"
2254   
2255         ol_arg=invalid
2256         for ol_val in auto yes no ; do
2257                 if test "$enableval" = "$ol_val" ; then
2258                         ol_arg="$ol_val"
2259                 fi
2260         done
2261         if test "$ol_arg" = "invalid" ; then
2262                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2263         fi
2264         ol_enable_monitor="$ol_arg"
2265
2266 else
2267         ol_enable_monitor="no"
2268 fi
2269 # end --enable-monitor
2270 # OpenLDAP --with-monitor_module
2271         # Check whether --with-monitor_module or --without-monitor_module was given.
2272 if test "${with_monitor_module+set}" = set; then
2273   withval="$with_monitor_module"
2274   
2275         ol_arg=invalid
2276         for ol_val in static dynamic ; do
2277                 if test "$withval" = "$ol_val" ; then
2278                         ol_arg="$ol_val"
2279                 fi
2280         done
2281         if test "$ol_arg" = "invalid" ; then
2282                 { echo "configure: error: bad value $withval for --with-monitor_module" 1>&2; exit 1; }
2283         fi
2284         ol_with_monitor_module="$ol_arg"
2285
2286 else
2287         ol_with_monitor_module="static"
2288 fi
2289 # end --with-monitor_module
2290
2291 # OpenLDAP --enable-passwd
2292         # Check whether --enable-passwd or --disable-passwd was given.
2293 if test "${enable_passwd+set}" = set; then
2294   enableval="$enable_passwd"
2295   
2296         ol_arg=invalid
2297         for ol_val in auto yes no ; do
2298                 if test "$enableval" = "$ol_val" ; then
2299                         ol_arg="$ol_val"
2300                 fi
2301         done
2302         if test "$ol_arg" = "invalid" ; then
2303                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2304         fi
2305         ol_enable_passwd="$ol_arg"
2306
2307 else
2308         ol_enable_passwd="no"
2309 fi
2310 # end --enable-passwd
2311 # OpenLDAP --with-passwd_module
2312         # Check whether --with-passwd_module or --without-passwd_module was given.
2313 if test "${with_passwd_module+set}" = set; then
2314   withval="$with_passwd_module"
2315   
2316         ol_arg=invalid
2317         for ol_val in static dynamic ; do
2318                 if test "$withval" = "$ol_val" ; then
2319                         ol_arg="$ol_val"
2320                 fi
2321         done
2322         if test "$ol_arg" = "invalid" ; then
2323                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2324         fi
2325         ol_with_passwd_module="$ol_arg"
2326
2327 else
2328         ol_with_passwd_module="static"
2329 fi
2330 # end --with-passwd_module
2331
2332 # OpenLDAP --enable-perl
2333         # Check whether --enable-perl or --disable-perl was given.
2334 if test "${enable_perl+set}" = set; then
2335   enableval="$enable_perl"
2336   
2337         ol_arg=invalid
2338         for ol_val in auto yes no ; do
2339                 if test "$enableval" = "$ol_val" ; then
2340                         ol_arg="$ol_val"
2341                 fi
2342         done
2343         if test "$ol_arg" = "invalid" ; then
2344                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2345         fi
2346         ol_enable_perl="$ol_arg"
2347
2348 else
2349         ol_enable_perl="no"
2350 fi
2351 # end --enable-perl
2352 # OpenLDAP --with-perl_module
2353         # Check whether --with-perl_module or --without-perl_module was given.
2354 if test "${with_perl_module+set}" = set; then
2355   withval="$with_perl_module"
2356   
2357         ol_arg=invalid
2358         for ol_val in static dynamic ; do
2359                 if test "$withval" = "$ol_val" ; then
2360                         ol_arg="$ol_val"
2361                 fi
2362         done
2363         if test "$ol_arg" = "invalid" ; then
2364                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2365         fi
2366         ol_with_perl_module="$ol_arg"
2367
2368 else
2369         ol_with_perl_module="static"
2370 fi
2371 # end --with-perl_module
2372
2373 # OpenLDAP --enable-shell
2374         # Check whether --enable-shell or --disable-shell was given.
2375 if test "${enable_shell+set}" = set; then
2376   enableval="$enable_shell"
2377   
2378         ol_arg=invalid
2379         for ol_val in auto yes no ; do
2380                 if test "$enableval" = "$ol_val" ; then
2381                         ol_arg="$ol_val"
2382                 fi
2383         done
2384         if test "$ol_arg" = "invalid" ; then
2385                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2386         fi
2387         ol_enable_shell="$ol_arg"
2388
2389 else
2390         ol_enable_shell="no"
2391 fi
2392 # end --enable-shell
2393 # OpenLDAP --with-shell_module
2394         # Check whether --with-shell_module or --without-shell_module was given.
2395 if test "${with_shell_module+set}" = set; then
2396   withval="$with_shell_module"
2397   
2398         ol_arg=invalid
2399         for ol_val in static dynamic ; do
2400                 if test "$withval" = "$ol_val" ; then
2401                         ol_arg="$ol_val"
2402                 fi
2403         done
2404         if test "$ol_arg" = "invalid" ; then
2405                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2406         fi
2407         ol_with_shell_module="$ol_arg"
2408
2409 else
2410         ol_with_shell_module="static"
2411 fi
2412 # end --with-shell_module
2413
2414 # OpenLDAP --enable-sql
2415         # Check whether --enable-sql or --disable-sql was given.
2416 if test "${enable_sql+set}" = set; then
2417   enableval="$enable_sql"
2418   
2419         ol_arg=invalid
2420         for ol_val in auto yes no ; do
2421                 if test "$enableval" = "$ol_val" ; then
2422                         ol_arg="$ol_val"
2423                 fi
2424         done
2425         if test "$ol_arg" = "invalid" ; then
2426                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2427         fi
2428         ol_enable_sql="$ol_arg"
2429
2430 else
2431         ol_enable_sql="no"
2432 fi
2433 # end --enable-sql
2434 # OpenLDAP --with-sql_module
2435         # Check whether --with-sql_module or --without-sql_module was given.
2436 if test "${with_sql_module+set}" = set; then
2437   withval="$with_sql_module"
2438   
2439         ol_arg=invalid
2440         for ol_val in static dynamic ; do
2441                 if test "$withval" = "$ol_val" ; then
2442                         ol_arg="$ol_val"
2443                 fi
2444         done
2445         if test "$ol_arg" = "invalid" ; then
2446                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2447         fi
2448         ol_with_sql_module="$ol_arg"
2449
2450 else
2451         ol_with_sql_module="static"
2452 fi
2453 # end --with-sql_module
2454
2455 # OpenLDAP --enable-tcl
2456         # Check whether --enable-tcl or --disable-tcl was given.
2457 if test "${enable_tcl+set}" = set; then
2458   enableval="$enable_tcl"
2459   
2460         ol_arg=invalid
2461         for ol_val in auto yes no ; do
2462                 if test "$enableval" = "$ol_val" ; then
2463                         ol_arg="$ol_val"
2464                 fi
2465         done
2466         if test "$ol_arg" = "invalid" ; then
2467                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2468         fi
2469         ol_enable_tcl="$ol_arg"
2470
2471 else
2472         ol_enable_tcl="no"
2473 fi
2474 # end --enable-tcl
2475 # OpenLDAP --with-tcl_module
2476         # Check whether --with-tcl_module or --without-tcl_module was given.
2477 if test "${with_tcl_module+set}" = set; then
2478   withval="$with_tcl_module"
2479   
2480         ol_arg=invalid
2481         for ol_val in static dynamic ; do
2482                 if test "$withval" = "$ol_val" ; then
2483                         ol_arg="$ol_val"
2484                 fi
2485         done
2486         if test "$ol_arg" = "invalid" ; then
2487                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2488         fi
2489         ol_with_tcl_module="$ol_arg"
2490
2491 else
2492         ol_with_tcl_module="static"
2493 fi
2494 # end --with-tcl_module
2495
2496
2497 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2498 if test "${with_xxslurpdoptions+set}" = set; then
2499   withval="$with_xxslurpdoptions"
2500   :
2501 fi
2502
2503 # OpenLDAP --enable-slurpd
2504         # Check whether --enable-slurpd or --disable-slurpd was given.
2505 if test "${enable_slurpd+set}" = set; then
2506   enableval="$enable_slurpd"
2507   
2508         ol_arg=invalid
2509         for ol_val in auto yes no ; do
2510                 if test "$enableval" = "$ol_val" ; then
2511                         ol_arg="$ol_val"
2512                 fi
2513         done
2514         if test "$ol_arg" = "invalid" ; then
2515                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2516         fi
2517         ol_enable_slurpd="$ol_arg"
2518
2519 else
2520         ol_enable_slurpd="auto"
2521 fi
2522 # end --enable-slurpd
2523
2524 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2525 if test "${with_xxliboptions+set}" = set; then
2526   withval="$with_xxliboptions"
2527   :
2528 fi
2529
2530 # Check whether --enable-static or --disable-static was given.
2531 if test "${enable_static+set}" = set; then
2532   enableval="$enable_static"
2533   p=${PACKAGE-default}
2534 case $enableval in
2535 yes) enable_static=yes ;;
2536 no) enable_static=no ;;
2537 *)
2538   enable_static=no
2539   # Look at the argument we got.  We use all the common list separators.
2540   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2541   for pkg in $enableval; do
2542     if test "X$pkg" = "X$p"; then
2543       enable_static=yes
2544     fi
2545   done
2546   IFS="$ac_save_ifs"
2547   ;;
2548 esac
2549 else
2550   enable_static=yes
2551 fi
2552
2553 # Check whether --enable-shared or --disable-shared was given.
2554 if test "${enable_shared+set}" = set; then
2555   enableval="$enable_shared"
2556   p=${PACKAGE-default}
2557 case $enableval in
2558 yes) enable_shared=yes ;;
2559 no) enable_shared=no ;;
2560 *)
2561   enable_shared=no
2562   # Look at the argument we got.  We use all the common list separators.
2563   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2564   for pkg in $enableval; do
2565     if test "X$pkg" = "X$p"; then
2566       enable_shared=yes
2567     fi
2568   done
2569   IFS="$ac_save_ifs"
2570   ;;
2571 esac
2572 else
2573   enable_shared=yes
2574 fi
2575
2576
2577
2578 # validate options
2579 if test $ol_enable_slapd = no ; then
2580                 if test $ol_enable_bdb = yes ; then
2581                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2582         fi
2583         if test $ol_enable_dnssrv = yes ; then
2584                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2585         fi
2586         if test $ol_enable_ldap = yes ; then
2587                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2588         fi
2589         if test $ol_enable_ldbm = yes ; then
2590                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2591         fi
2592         if test $ol_enable_meta = yes ; then
2593                 echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2
2594         fi
2595         if test $ol_enable_monitor = yes ; then
2596                 echo "configure: warning: slapd disabled, ignoring --enable-monitor argument" 1>&2
2597         fi
2598         if test $ol_enable_passwd = yes ; then
2599                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2600         fi
2601         if test $ol_enable_perl = yes ; then
2602                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2603         fi
2604         if test $ol_enable_shell = yes ; then
2605                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2606         fi
2607         if test $ol_enable_tcl = yes ; then
2608                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2609         fi
2610         if test $ol_enable_sql = yes ; then
2611                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2612         fi
2613         if test $ol_enable_modules = yes ; then
2614                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2615         fi
2616         if test $ol_enable_wrappers = yes ; then
2617                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2618         fi
2619         if test $ol_enable_phonetic = yes ; then
2620                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2621         fi
2622         if test $ol_enable_rlookups = yes ; then
2623                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2624         fi
2625         if test $ol_enable_aci = yes ; then
2626                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2627         fi
2628         if test $ol_with_ldbm_api != auto ; then
2629                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2630         fi
2631         if test $ol_with_ldbm_type != auto ; then
2632                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2633         fi
2634         if test $ol_with_bdb_module != static ; then
2635                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2636         fi
2637         if test $ol_with_dnssrv_module != static ; then
2638                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2639         fi
2640         if test $ol_with_ldap_module != static ; then
2641                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2642         fi
2643         if test $ol_with_ldbm_module != static ; then
2644                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2645         fi
2646         if test $ol_with_meta_module != static ; then
2647                 echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2
2648         fi
2649         if test $ol_with_monitor_module != static ; then
2650                 echo "configure: warning: slapd disabled, ignoring --with-monitor-module argument" 1>&2
2651         fi
2652         if test $ol_with_passwd_module != static ; then
2653                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2654         fi
2655         if test $ol_with_perl_module != static ; then
2656                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2657         fi
2658         if test $ol_with_shell_module != static ; then
2659                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2660         fi
2661         if test $ol_with_tcl_module != static ; then
2662                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2663         fi
2664         if test $ol_with_sql_module != static ; then
2665                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2666         fi
2667         if test $ol_enable_slurpd = yes ; then
2668                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2669         fi
2670         if test $ol_enable_rewrite = yes ; then
2671                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2672         fi
2673
2674         # force settings to no
2675         ol_enable_bdb=no
2676         ol_enable_dnssrv=no
2677         ol_enable_ldap=no
2678         ol_enable_ldbm=no
2679         ol_enable_meta=no
2680         ol_enable_monitor=no
2681         ol_enable_passwd=no
2682         ol_enable_perl=no
2683         ol_enable_shell=no
2684         ol_enable_tcl=no
2685         ol_enable_sql=no
2686
2687         ol_enable_modules=no
2688         ol_enable_phonetic=no
2689         ol_enable_rlookups=no
2690         ol_enable_aci=no
2691         ol_enable_wrappers=no
2692         ol_enable_dynamic=no
2693
2694         ol_with_ldbm_api=no
2695         ol_with_ldbm_type=no
2696
2697         ol_with_bdb_module=static
2698         ol_with_dnssrv_module=static
2699         ol_with_ldap_module=static
2700         ol_with_ldbm_module=static
2701         ol_with_meta_module=static
2702         ol_with_monitor_module=static
2703         ol_with_passwd_module=static
2704         ol_with_perl_module=static
2705         ol_with_shell_module=static
2706         ol_with_tcl_module=static
2707         ol_with_sql_module=static
2708
2709         ol_enable_slurpd=no
2710
2711         ol_enable_rewrite=no
2712
2713 elif test $ol_enable_ldbm = no ; then
2714         
2715         if test $ol_with_ldbm_api != auto ; then
2716                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2717         fi
2718
2719         if test $ol_with_ldbm_type != auto ; then
2720                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2721         fi
2722
2723         if test $ol_with_ldbm_module != static ; then
2724                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2725         fi
2726
2727         if test $ol_enable_modules != yes -a \
2728                 $ol_enable_bdb = no -a \
2729                 $ol_enable_dnssrv = no -a \
2730                 $ol_enable_ldap = no -a \
2731                 $ol_enable_meta = no -a \
2732                 $ol_enable_monitor = no -a \
2733                 $ol_enable_passwd = no -a \
2734                 $ol_enable_perl = no -a \
2735                 $ol_enable_shell = no -a \
2736                 $ol_enable_sql = no -a \
2737                 $ol_enable_tcl = no ; then
2738
2739                 if test $ol_enable_slapd = yes ; then
2740                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2741                 else
2742                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2743                         ol_enable_slapd=no
2744                 fi
2745         fi
2746
2747         ol_with_ldbm_api=no
2748         ol_with_ldbm_type=no
2749         ol_with_ldbm_module=static
2750
2751         if test $ol_enable_bdb != no ; then
2752                 ol_with_ldbm_api=berkeley
2753         fi
2754
2755 else
2756                 if test $ol_with_ldbm_api = gdbm -a \
2757                 $ol_with_ldbm_type = btree ; then
2758                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2759         fi
2760         if test $ol_with_ldbm_api = mdbm -a \
2761                 $ol_with_ldbm_type = btree ; then
2762                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2763         fi
2764         if test $ol_with_ldbm_api = ndbm -a \
2765                 $ol_with_ldbm_type = btree ; then
2766                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2767         fi
2768
2769         if test $ol_enable_bdb = yes ; then
2770                 if test $ol_with_ldbm_api = auto ; then
2771                         ol_with_ldbm_api=berkeley
2772                 elif test $ol_with_ldbm_api != berkeley ; then
2773                         { echo "configure: error: LDBM API not compatible with BDB" 1>&2; exit 1; }
2774                 fi
2775
2776         elif test $ol_enable_bdb = auto ; then
2777                 if test $ol_with_ldbm_api != berkeley \
2778                         -o $ol_with_ldbm_api != auto ; then
2779                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2780                         ol_enable_bdb=no
2781                 fi
2782         fi
2783 fi
2784
2785 if test $ol_enable_slurpd = yes ; then
2786                 if test $ol_with_threads = no ; then
2787                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2788         fi
2789 fi
2790
2791 if test $ol_enable_lmpasswd = yes ; then
2792         if test $ol_with_tls = no ; then
2793                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2794         fi
2795 fi
2796
2797 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2798         if test $ol_with_kerberos = no ; then
2799                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2800         elif test $ol_with_kerberos = auto ; then
2801                 ol_with_kerberos=yes
2802         fi
2803
2804 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2805         if test $ol_with_kerberos = auto ; then
2806                 ol_with_kerberos=no
2807         elif test $ol_with_kerberos != no ; then
2808                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2809                 ol_with_kerberos=no
2810         fi
2811 fi
2812
2813 if test $ol_enable_spasswd = yes ; then
2814         if test $ol_with_cyrus_sasl = no ; then
2815                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2816         fi
2817         ol_with_cyrus_sasl=yes
2818 fi
2819
2820 echo "$ac_t""done" 1>&6
2821
2822 LDAP_LIBS=
2823 LDIF_LIBS=
2824 LDBM_LIB=
2825 LDBM_LIBS=
2826 LTHREAD_LIBS=
2827 LUTIL_LIBS=
2828
2829 SLAPD_LIBS=
2830 SLURPD_LIBS=
2831
2832 BUILD_SLAPD=no
2833 BUILD_SLURPD=no
2834
2835 BUILD_THREAD=no
2836
2837 BUILD_BDB=no
2838 BUILD_DNSSRV=no
2839 BUILD_LDAP=no
2840 BUILD_LDBM=no
2841 BUILD_META=no
2842 BUILD_MONITOR=no
2843 BUILD_PASSWD=no
2844 BUILD_PERL=no
2845 BUILD_SHELL=no
2846 BUILD_SQL=no
2847 BUILD_TCL=no
2848
2849 BUILD_BDB_DYNAMIC=static
2850 BUILD_DNSSRV_DYNAMIC=static
2851 BUILD_LDAP_DYNAMIC=static
2852 BUILD_LDBM_DYNAMIC=static
2853 BUILD_META_DYNAMIC=static
2854 BUILD_MONITOR_DYNAMIC=static
2855 BUILD_PASSWD_DYNAMIC=static
2856 BUILD_PERL_DYNAMIC=static
2857 BUILD_SHELL_DYNAMIC=static
2858 BUILD_TCL_DYNAMIC=static
2859 BUILD_SQL_DYNAMIC=static
2860
2861 SLAPD_MODULES_LDFLAGS=
2862 SLAPD_MODULES_CPPFLAGS=
2863 SLAPD_MODULES_LIST=
2864
2865 SLAPD_STATIC_BACKENDS=
2866 SLAPD_DYNAMIC_BACKENDS=
2867
2868 SLAPD_PERL_LDFLAGS=
2869 MOD_PERL_LDFLAGS=
2870 PERL_CPPFLAGS=
2871
2872 SLAPD_SQL_LDFLAGS=
2873 SLAPD_SQL_LIBS=
2874 SLAPD_SQL_INCLUDES=
2875
2876 MOD_TCL_LIB=
2877 KRB4_LIBS=
2878 KRB5_LIBS=
2879 READLINE_LIBS=
2880 SASL_LIBS=
2881 TERMCAP_LIBS=
2882 TLS_LIBS=
2883 MODULES_LIBS=
2884 AUTH_LIBS=
2885
2886 SLAPD_SLP_LIBS=
2887
2888
2889 # Find a good install program.  We prefer a C program (faster),
2890 # so one script is as good as another.  But avoid the broken or
2891 # incompatible versions:
2892 # SysV /etc/install, /usr/sbin/install
2893 # SunOS /usr/etc/install
2894 # IRIX /sbin/install
2895 # AIX /bin/install
2896 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2897 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2898 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2899 # ./install, which can be erroneously created by make from ./install.sh.
2900 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2901 echo "configure:2902: checking for a BSD compatible install" >&5
2902 if test -z "$INSTALL"; then
2903 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2904   echo $ac_n "(cached) $ac_c" 1>&6
2905 else
2906     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2907   for ac_dir in $PATH; do
2908     # Account for people who put trailing slashes in PATH elements.
2909     case "$ac_dir/" in
2910     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2911     *)
2912       # OSF1 and SCO ODT 3.0 have their own names for install.
2913       # Don't use installbsd from OSF since it installs stuff as root
2914       # by default.
2915       for ac_prog in ginstall scoinst install; do
2916         if test -f $ac_dir/$ac_prog; then
2917           if test $ac_prog = install &&
2918             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2919             # AIX install.  It has an incompatible calling convention.
2920             :
2921           elif test $ac_prog = install &&
2922             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2923             # program-specific install script used by HP pwplus--don't use.
2924             :
2925           else
2926             ac_cv_path_install="$ac_dir/$ac_prog -c"
2927             break 2
2928           fi
2929         fi
2930       done
2931       ;;
2932     esac
2933   done
2934   IFS="$ac_save_IFS"
2935
2936 fi
2937   if test "${ac_cv_path_install+set}" = set; then
2938     INSTALL="$ac_cv_path_install"
2939   else
2940     # As a last resort, use the slow shell script.  We don't cache a
2941     # path for INSTALL within a source directory, because that will
2942     # break other packages using the cache if that directory is
2943     # removed, or if the path is relative.
2944     INSTALL="$ac_install_sh"
2945   fi
2946 fi
2947 echo "$ac_t""$INSTALL" 1>&6
2948
2949 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2950 # It thinks the first close brace ends the variable substitution.
2951 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2952
2953 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2954
2955 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2956
2957
2958 cat >> confdefs.h <<\EOF
2959 #define HAVE_MKVERSION 1
2960 EOF
2961
2962
2963
2964
2965 ol_aix_threads=no
2966 case "$target" in
2967 *-*-aix*)       if test -z "$CC" ; then
2968                 case "$ol_with_threads" in
2969                 auto | yes |  posix) ol_aix_threads=yes ;;
2970                 esac
2971         fi
2972 ;;
2973 esac
2974
2975 if test $ol_aix_threads = yes ; then
2976         if test -z "${CC}" ; then
2977                 for ac_prog in cc_r xlc_r cc
2978 do
2979 # Extract the first word of "$ac_prog", so it can be a program name with args.
2980 set dummy $ac_prog; ac_word=$2
2981 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2982 echo "configure:2983: checking for $ac_word" >&5
2983 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2984   echo $ac_n "(cached) $ac_c" 1>&6
2985 else
2986   if test -n "$CC"; then
2987   ac_cv_prog_CC="$CC" # Let the user override the test.
2988 else
2989   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2990   ac_dummy="$PATH"
2991   for ac_dir in $ac_dummy; do
2992     test -z "$ac_dir" && ac_dir=.
2993     if test -f $ac_dir/$ac_word; then
2994       ac_cv_prog_CC="$ac_prog"
2995       break
2996     fi
2997   done
2998   IFS="$ac_save_ifs"
2999 fi
3000 fi
3001 CC="$ac_cv_prog_CC"
3002 if test -n "$CC"; then
3003   echo "$ac_t""$CC" 1>&6
3004 else
3005   echo "$ac_t""no" 1>&6
3006 fi
3007
3008 test -n "$CC" && break
3009 done
3010
3011
3012                 if test "$CC" = cc ; then
3013                                                 if test $ol_with_threads != auto ; then
3014                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
3015                         else
3016                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
3017                         fi
3018                         ol_with_threads=no
3019                 fi
3020         fi
3021
3022         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3023                 ol_with_threads=posix
3024                 ol_cv_pthread_create=yes
3025         fi
3026 fi
3027
3028 if test -z "${CC}"; then
3029         for ac_prog in cc
3030 do
3031 # Extract the first word of "$ac_prog", so it can be a program name with args.
3032 set dummy $ac_prog; ac_word=$2
3033 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3034 echo "configure:3035: checking for $ac_word" >&5
3035 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3036   echo $ac_n "(cached) $ac_c" 1>&6
3037 else
3038   if test -n "$CC"; then
3039   ac_cv_prog_CC="$CC" # Let the user override the test.
3040 else
3041   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3042   ac_dummy="$PATH"
3043   for ac_dir in $ac_dummy; do
3044     test -z "$ac_dir" && ac_dir=.
3045     if test -f $ac_dir/$ac_word; then
3046       ac_cv_prog_CC="$ac_prog"
3047       break
3048     fi
3049   done
3050   IFS="$ac_save_ifs"
3051 fi
3052 fi
3053 CC="$ac_cv_prog_CC"
3054 if test -n "$CC"; then
3055   echo "$ac_t""$CC" 1>&6
3056 else
3057   echo "$ac_t""no" 1>&6
3058 fi
3059
3060 test -n "$CC" && break
3061 done
3062
3063 fi
3064
3065
3066 for ac_prog in ar gar
3067 do
3068 # Extract the first word of "$ac_prog", so it can be a program name with args.
3069 set dummy $ac_prog; ac_word=$2
3070 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3071 echo "configure:3072: checking for $ac_word" >&5
3072 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3073   echo $ac_n "(cached) $ac_c" 1>&6
3074 else
3075   if test -n "$AR"; then
3076   ac_cv_prog_AR="$AR" # Let the user override the test.
3077 else
3078   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3079   ac_dummy="$PATH"
3080   for ac_dir in $ac_dummy; do
3081     test -z "$ac_dir" && ac_dir=.
3082     if test -f $ac_dir/$ac_word; then
3083       ac_cv_prog_AR="$ac_prog"
3084       break
3085     fi
3086   done
3087   IFS="$ac_save_ifs"
3088 fi
3089 fi
3090 AR="$ac_cv_prog_AR"
3091 if test -n "$AR"; then
3092   echo "$ac_t""$AR" 1>&6
3093 else
3094   echo "$ac_t""no" 1>&6
3095 fi
3096
3097 test -n "$AR" && break
3098 done
3099 test -n "$AR" || AR="ar"
3100
3101
3102
3103
3104 # Find the correct PATH separator.  Usually this is `:', but
3105 # DJGPP uses `;' like DOS.
3106 if test "X${PATH_SEPARATOR+set}" != Xset; then
3107   UNAME=${UNAME-`uname 2>/dev/null`}
3108   case X$UNAME in
3109     *-DOS) lt_cv_sys_path_separator=';' ;;
3110     *)     lt_cv_sys_path_separator=':' ;;
3111   esac
3112   PATH_SEPARATOR=$lt_cv_sys_path_separator
3113 fi
3114
3115 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3116 echo "configure:3117: checking for Cygwin environment" >&5
3117 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3118   echo $ac_n "(cached) $ac_c" 1>&6
3119 else
3120   cat > conftest.$ac_ext <<EOF
3121 #line 3122 "configure"
3122 #include "confdefs.h"
3123
3124 int main() {
3125
3126 #ifndef __CYGWIN__
3127 #define __CYGWIN__ __CYGWIN32__
3128 #endif
3129 return __CYGWIN__;
3130 ; return 0; }
3131 EOF
3132 if { (eval echo configure:3133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3133   rm -rf conftest*
3134   ac_cv_cygwin=yes
3135 else
3136   echo "configure: failed program was:" >&5
3137   cat conftest.$ac_ext >&5
3138   rm -rf conftest*
3139   ac_cv_cygwin=no
3140 fi
3141 rm -f conftest*
3142 fi
3143
3144 echo "$ac_t""$ac_cv_cygwin" 1>&6
3145 CYGWIN=
3146 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3147 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3148 echo "configure:3149: checking for mingw32 environment" >&5
3149 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3150   echo $ac_n "(cached) $ac_c" 1>&6
3151 else
3152   cat > conftest.$ac_ext <<EOF
3153 #line 3154 "configure"
3154 #include "confdefs.h"
3155
3156 int main() {
3157 return __MINGW32__;
3158 ; return 0; }
3159 EOF
3160 if { (eval echo configure:3161: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3161   rm -rf conftest*
3162   ac_cv_mingw32=yes
3163 else
3164   echo "configure: failed program was:" >&5
3165   cat conftest.$ac_ext >&5
3166   rm -rf conftest*
3167   ac_cv_mingw32=no
3168 fi
3169 rm -f conftest*
3170 fi
3171
3172 echo "$ac_t""$ac_cv_mingw32" 1>&6
3173 MINGW32=
3174 test "$ac_cv_mingw32" = yes && MINGW32=yes
3175 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3176 echo "configure:3177: checking for EMX OS/2 environment" >&5
3177 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3178   echo $ac_n "(cached) $ac_c" 1>&6
3179 else
3180   cat > conftest.$ac_ext <<EOF
3181 #line 3182 "configure"
3182 #include "confdefs.h"
3183
3184 int main() {
3185 return __EMX__;
3186 ; return 0; }
3187 EOF
3188 if { (eval echo configure:3189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3189   rm -rf conftest*
3190   ac_cv_emxos2=yes
3191 else
3192   echo "configure: failed program was:" >&5
3193   cat conftest.$ac_ext >&5
3194   rm -rf conftest*
3195   ac_cv_emxos2=no
3196 fi
3197 rm -f conftest*
3198 fi
3199
3200 echo "$ac_t""$ac_cv_emxos2" 1>&6
3201 EMXOS2=
3202 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3203 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3204 echo "configure:3205: checking how to run the C preprocessor" >&5
3205 # On Suns, sometimes $CPP names a directory.
3206 if test -n "$CPP" && test -d "$CPP"; then
3207   CPP=
3208 fi
3209 if test -z "$CPP"; then
3210 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3211   echo $ac_n "(cached) $ac_c" 1>&6
3212 else
3213     # This must be in double quotes, not single quotes, because CPP may get
3214   # substituted into the Makefile and "${CC-cc}" will confuse make.
3215   CPP="${CC-cc} -E"
3216   # On the NeXT, cc -E runs the code through the compiler's parser,
3217   # not just through cpp.
3218   cat > conftest.$ac_ext <<EOF
3219 #line 3220 "configure"
3220 #include "confdefs.h"
3221 #include <assert.h>
3222 Syntax Error
3223 EOF
3224 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3225 { (eval echo configure:3226: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3226 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3227 if test -z "$ac_err"; then
3228   :
3229 else
3230   echo "$ac_err" >&5
3231   echo "configure: failed program was:" >&5
3232   cat conftest.$ac_ext >&5
3233   rm -rf conftest*
3234   CPP="${CC-cc} -E -traditional-cpp"
3235   cat > conftest.$ac_ext <<EOF
3236 #line 3237 "configure"
3237 #include "confdefs.h"
3238 #include <assert.h>
3239 Syntax Error
3240 EOF
3241 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3242 { (eval echo configure:3243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3243 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3244 if test -z "$ac_err"; then
3245   :
3246 else
3247   echo "$ac_err" >&5
3248   echo "configure: failed program was:" >&5
3249   cat conftest.$ac_ext >&5
3250   rm -rf conftest*
3251   CPP="${CC-cc} -nologo -E"
3252   cat > conftest.$ac_ext <<EOF
3253 #line 3254 "configure"
3254 #include "confdefs.h"
3255 #include <assert.h>
3256 Syntax Error
3257 EOF
3258 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3259 { (eval echo configure:3260: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3260 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3261 if test -z "$ac_err"; then
3262   :
3263 else
3264   echo "$ac_err" >&5
3265   echo "configure: failed program was:" >&5
3266   cat conftest.$ac_ext >&5
3267   rm -rf conftest*
3268   CPP=/lib/cpp
3269 fi
3270 rm -f conftest*
3271 fi
3272 rm -f conftest*
3273 fi
3274 rm -f conftest*
3275   ac_cv_prog_CPP="$CPP"
3276 fi
3277   CPP="$ac_cv_prog_CPP"
3278 else
3279   ac_cv_prog_CPP="$CPP"
3280 fi
3281 echo "$ac_t""$CPP" 1>&6
3282
3283 # Check whether --enable-fast-install or --disable-fast-install was given.
3284 if test "${enable_fast_install+set}" = set; then
3285   enableval="$enable_fast_install"
3286   p=${PACKAGE-default}
3287 case $enableval in
3288 yes) enable_fast_install=yes ;;
3289 no) enable_fast_install=no ;;
3290 *)
3291   enable_fast_install=no
3292   # Look at the argument we got.  We use all the common list separators.
3293   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3294   for pkg in $enableval; do
3295     if test "X$pkg" = "X$p"; then
3296       enable_fast_install=yes
3297     fi
3298   done
3299   IFS="$ac_save_ifs"
3300   ;;
3301 esac
3302 else
3303   enable_fast_install=yes
3304 fi
3305
3306 # Extract the first word of "gcc", so it can be a program name with args.
3307 set dummy gcc; ac_word=$2
3308 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3309 echo "configure:3310: checking for $ac_word" >&5
3310 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3311   echo $ac_n "(cached) $ac_c" 1>&6
3312 else
3313   if test -n "$CC"; then
3314   ac_cv_prog_CC="$CC" # Let the user override the test.
3315 else
3316   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3317   ac_dummy="$PATH"
3318   for ac_dir in $ac_dummy; do
3319     test -z "$ac_dir" && ac_dir=.
3320     if test -f $ac_dir/$ac_word; then
3321       ac_cv_prog_CC="gcc"
3322       break
3323     fi
3324   done
3325   IFS="$ac_save_ifs"
3326 fi
3327 fi
3328 CC="$ac_cv_prog_CC"
3329 if test -n "$CC"; then
3330   echo "$ac_t""$CC" 1>&6
3331 else
3332   echo "$ac_t""no" 1>&6
3333 fi
3334
3335 if test -z "$CC"; then
3336   # Extract the first word of "cc", so it can be a program name with args.
3337 set dummy cc; ac_word=$2
3338 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3339 echo "configure:3340: checking for $ac_word" >&5
3340 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3341   echo $ac_n "(cached) $ac_c" 1>&6
3342 else
3343   if test -n "$CC"; then
3344   ac_cv_prog_CC="$CC" # Let the user override the test.
3345 else
3346   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3347   ac_prog_rejected=no
3348   ac_dummy="$PATH"
3349   for ac_dir in $ac_dummy; do
3350     test -z "$ac_dir" && ac_dir=.
3351     if test -f $ac_dir/$ac_word; then
3352       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3353         ac_prog_rejected=yes
3354         continue
3355       fi
3356       ac_cv_prog_CC="cc"
3357       break
3358     fi
3359   done
3360   IFS="$ac_save_ifs"
3361 if test $ac_prog_rejected = yes; then
3362   # We found a bogon in the path, so make sure we never use it.
3363   set dummy $ac_cv_prog_CC
3364   shift
3365   if test $# -gt 0; then
3366     # We chose a different compiler from the bogus one.
3367     # However, it has the same basename, so the bogon will be chosen
3368     # first if we set CC to just the basename; use the full file name.
3369     shift
3370     set dummy "$ac_dir/$ac_word" "$@"
3371     shift
3372     ac_cv_prog_CC="$@"
3373   fi
3374 fi
3375 fi
3376 fi
3377 CC="$ac_cv_prog_CC"
3378 if test -n "$CC"; then
3379   echo "$ac_t""$CC" 1>&6
3380 else
3381   echo "$ac_t""no" 1>&6
3382 fi
3383
3384   if test -z "$CC"; then
3385     case "`uname -s`" in
3386     *win32* | *WIN32* | *CYGWIN*)
3387       # Extract the first word of "cl", so it can be a program name with args.
3388 set dummy cl; ac_word=$2
3389 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3390 echo "configure:3391: checking for $ac_word" >&5
3391 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3392   echo $ac_n "(cached) $ac_c" 1>&6
3393 else
3394   if test -n "$CC"; then
3395   ac_cv_prog_CC="$CC" # Let the user override the test.
3396 else
3397   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3398   ac_dummy="$PATH"
3399   for ac_dir in $ac_dummy; do
3400     test -z "$ac_dir" && ac_dir=.
3401     if test -f $ac_dir/$ac_word; then
3402       ac_cv_prog_CC="cl"
3403       break
3404     fi
3405   done
3406   IFS="$ac_save_ifs"
3407 fi
3408 fi
3409 CC="$ac_cv_prog_CC"
3410 if test -n "$CC"; then
3411   echo "$ac_t""$CC" 1>&6
3412 else
3413   echo "$ac_t""no" 1>&6
3414 fi
3415  ;;
3416     esac
3417   fi
3418   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3419 fi
3420
3421 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3422 echo "configure:3423: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3423
3424 ac_ext=c
3425 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3426 ac_cpp='$CPP $CPPFLAGS'
3427 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3428 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3429 cross_compiling=$ac_cv_prog_cc_cross
3430
3431 cat > conftest.$ac_ext << EOF
3432
3433 #line 3434 "configure"
3434 #include "confdefs.h"
3435
3436 main(){return(0);}
3437 EOF
3438 if { (eval echo configure:3439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3439   ac_cv_prog_cc_works=yes
3440   # If we can't run a trivial program, we are probably using a cross compiler.
3441   if (./conftest; exit) 2>/dev/null; then
3442     ac_cv_prog_cc_cross=no
3443   else
3444     ac_cv_prog_cc_cross=yes
3445   fi
3446 else
3447   echo "configure: failed program was:" >&5
3448   cat conftest.$ac_ext >&5
3449   ac_cv_prog_cc_works=no
3450 fi
3451 rm -fr conftest*
3452 ac_ext=c
3453 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3454 ac_cpp='$CPP $CPPFLAGS'
3455 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3456 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3457 cross_compiling=$ac_cv_prog_cc_cross
3458
3459 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3460 if test $ac_cv_prog_cc_works = no; then
3461   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3462 fi
3463 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3464 echo "configure:3465: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3465 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3466 cross_compiling=$ac_cv_prog_cc_cross
3467
3468 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3469 echo "configure:3470: checking whether we are using GNU C" >&5
3470 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3471   echo $ac_n "(cached) $ac_c" 1>&6
3472 else
3473   cat > conftest.c <<EOF
3474 #ifdef __GNUC__
3475   yes;
3476 #endif
3477 EOF
3478 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3479: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3479   ac_cv_prog_gcc=yes
3480 else
3481   ac_cv_prog_gcc=no
3482 fi
3483 fi
3484
3485 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3486
3487 if test $ac_cv_prog_gcc = yes; then
3488   GCC=yes
3489 else
3490   GCC=
3491 fi
3492
3493 ac_test_CFLAGS="${CFLAGS+set}"
3494 ac_save_CFLAGS="$CFLAGS"
3495 CFLAGS=
3496 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3497 echo "configure:3498: checking whether ${CC-cc} accepts -g" >&5
3498 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3499   echo $ac_n "(cached) $ac_c" 1>&6
3500 else
3501   echo 'void f(){}' > conftest.c
3502 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3503   ac_cv_prog_cc_g=yes
3504 else
3505   ac_cv_prog_cc_g=no
3506 fi
3507 rm -f conftest*
3508
3509 fi
3510
3511 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3512 if test "$ac_test_CFLAGS" = set; then
3513   CFLAGS="$ac_save_CFLAGS"
3514 elif test $ac_cv_prog_cc_g = yes; then
3515   if test "$GCC" = yes; then
3516     CFLAGS="-g -O2"
3517   else
3518     CFLAGS="-g"
3519   fi
3520 else
3521   if test "$GCC" = yes; then
3522     CFLAGS="-O2"
3523   else
3524     CFLAGS=
3525   fi
3526 fi
3527
3528 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3529 if test "${with_gnu_ld+set}" = set; then
3530   withval="$with_gnu_ld"
3531   test "$withval" = no || with_gnu_ld=yes
3532 else
3533   with_gnu_ld=no
3534 fi
3535
3536 ac_prog=ld
3537 if test "$GCC" = yes; then
3538   # Check if gcc -print-prog-name=ld gives a path.
3539   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3540 echo "configure:3541: checking for ld used by GCC" >&5
3541   case $host in
3542   *-*-mingw*)
3543     # gcc leaves a trailing carriage return which upsets mingw
3544     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3545   *)
3546     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3547   esac
3548   case $ac_prog in
3549     # Accept absolute paths.
3550     [\\/]* | [A-Za-z]:[\\/]*)
3551       re_direlt='/[^/][^/]*/\.\./'
3552       # Canonicalize the path of ld
3553       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3554       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3555         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3556       done
3557       test -z "$LD" && LD="$ac_prog"
3558       ;;
3559   "")
3560     # If it fails, then pretend we aren't using GCC.
3561     ac_prog=ld
3562     ;;
3563   *)
3564     # If it is relative, then search for the first ld in PATH.
3565     with_gnu_ld=unknown
3566     ;;
3567   esac
3568 elif test "$with_gnu_ld" = yes; then
3569   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3570 echo "configure:3571: checking for GNU ld" >&5
3571 else
3572   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3573 echo "configure:3574: checking for non-GNU ld" >&5
3574 fi
3575 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3576   echo $ac_n "(cached) $ac_c" 1>&6
3577 else
3578   if test -z "$LD"; then
3579   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3580   for ac_dir in $PATH; do
3581     test -z "$ac_dir" && ac_dir=.
3582     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3583       lt_cv_path_LD="$ac_dir/$ac_prog"
3584       # Check to see if the program is GNU ld.  I'd rather use --version,
3585       # but apparently some GNU ld's only accept -v.
3586       # Break only if it was the GNU/non-GNU ld that we prefer.
3587       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3588         test "$with_gnu_ld" != no && break
3589       else
3590         test "$with_gnu_ld" != yes && break
3591       fi
3592     fi
3593   done
3594   IFS="$ac_save_ifs"
3595 else
3596   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3597 fi
3598 fi
3599
3600 LD="$lt_cv_path_LD"
3601 if test -n "$LD"; then
3602   echo "$ac_t""$LD" 1>&6
3603 else
3604   echo "$ac_t""no" 1>&6
3605 fi
3606 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3607 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3608 echo "configure:3609: checking if the linker ($LD) is GNU ld" >&5
3609 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3610   echo $ac_n "(cached) $ac_c" 1>&6
3611 else
3612   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3613 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3614   lt_cv_prog_gnu_ld=yes
3615 else
3616   lt_cv_prog_gnu_ld=no
3617 fi
3618 fi
3619
3620 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3621 with_gnu_ld=$lt_cv_prog_gnu_ld
3622
3623
3624 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3625 echo "configure:3626: checking for $LD option to reload object files" >&5
3626 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3627   echo $ac_n "(cached) $ac_c" 1>&6
3628 else
3629   lt_cv_ld_reload_flag='-r'
3630 fi
3631
3632 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3633 reload_flag=$lt_cv_ld_reload_flag
3634 test -n "$reload_flag" && reload_flag=" $reload_flag"
3635
3636 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3637 echo "configure:3638: checking for BSD-compatible nm" >&5
3638 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3639   echo $ac_n "(cached) $ac_c" 1>&6
3640 else
3641   if test -n "$NM"; then
3642   # Let the user override the test.
3643   lt_cv_path_NM="$NM"
3644 else
3645   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3646   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3647     test -z "$ac_dir" && ac_dir=.
3648     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3649     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3650       # Check to see if the nm accepts a BSD-compat flag.
3651       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3652       #   nm: unknown option "B" ignored
3653       # Tru64's nm complains that /dev/null is an invalid object file
3654       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3655         lt_cv_path_NM="$tmp_nm -B"
3656         break
3657       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3658         lt_cv_path_NM="$tmp_nm -p"
3659         break
3660       else
3661         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3662         continue # so that we can try to find one that supports BSD flags
3663       fi
3664     fi
3665   done
3666   IFS="$ac_save_ifs"
3667   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3668 fi
3669 fi
3670
3671 NM="$lt_cv_path_NM"
3672 echo "$ac_t""$NM" 1>&6
3673
3674 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3675 echo "configure:3676: checking whether ln -s works" >&5
3676 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3677   echo $ac_n "(cached) $ac_c" 1>&6
3678 else
3679   rm -f conftestdata
3680 if ln -s X conftestdata 2>/dev/null
3681 then
3682   rm -f conftestdata
3683   ac_cv_prog_LN_S="ln -s"
3684 else
3685   ac_cv_prog_LN_S=ln
3686 fi
3687 fi
3688 LN_S="$ac_cv_prog_LN_S"
3689 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3690   echo "$ac_t""yes" 1>&6
3691 else
3692   echo "$ac_t""no" 1>&6
3693 fi
3694
3695 echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
3696 echo "configure:3697: checking how to recognise dependant libraries" >&5
3697 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3698   echo $ac_n "(cached) $ac_c" 1>&6
3699 else
3700   lt_cv_file_magic_cmd='$MAGIC_CMD'
3701 lt_cv_file_magic_test_file=
3702 lt_cv_deplibs_check_method='unknown'
3703 # Need to set the preceding variable on all platforms that support
3704 # interlibrary dependencies.
3705 # 'none' -- dependencies not supported.
3706 # `unknown' -- same as none, but documents that we really don't know.
3707 # 'pass_all' -- all dependencies passed with no checks.
3708 # 'test_compile' -- check by making test program.
3709 # 'file_magic [[regex]]' -- check by looking for files in library path
3710 # which responds to the $file_magic_cmd with a given egrep regex.
3711 # If you have `file' or equivalent on your system and you're not sure
3712 # whether `pass_all' will *always* work, you probably want this one.
3713
3714 case $host_os in
3715 aix4* | aix5*)
3716   lt_cv_deplibs_check_method=pass_all
3717   ;;
3718
3719 beos*)
3720   lt_cv_deplibs_check_method=pass_all
3721   ;;
3722
3723 bsdi4*)
3724   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3725   lt_cv_file_magic_cmd='/usr/bin/file -L'
3726   lt_cv_file_magic_test_file=/shlib/libc.so
3727   ;;
3728
3729 cygwin* | mingw* | pw32*)
3730   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3731   lt_cv_file_magic_cmd='$OBJDUMP -f'
3732   ;;
3733
3734 darwin* | rhapsody*)
3735   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3736   lt_cv_file_magic_cmd='/usr/bin/file -L'
3737   case "$host_os" in
3738   rhapsody* | darwin1.[012])
3739     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3740     ;;
3741   *) # Darwin 1.3 on
3742     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3743     ;;
3744   esac
3745   ;;
3746
3747 freebsd*)
3748   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3749     case $host_cpu in
3750     i*86 )
3751       # Not sure whether the presence of OpenBSD here was a mistake.
3752       # Let's accept both of them until this is cleared up.
3753       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3754       lt_cv_file_magic_cmd=/usr/bin/file
3755       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3756       ;;
3757     esac
3758   else
3759     lt_cv_deplibs_check_method=pass_all
3760   fi
3761   ;;
3762
3763 gnu*)
3764   lt_cv_deplibs_check_method=pass_all
3765   ;;
3766
3767 hpux10.20*|hpux11*)
3768   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3769   lt_cv_file_magic_cmd=/usr/bin/file
3770   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3771   ;;
3772
3773 irix5* | irix6*)
3774   case $host_os in
3775   irix5*)
3776     # this will be overridden with pass_all, but let us keep it just in case
3777     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3778     ;;
3779   *)
3780     case $LD in
3781     *-32|*"-32 ") libmagic=32-bit;;
3782     *-n32|*"-n32 ") libmagic=N32;;
3783     *-64|*"-64 ") libmagic=64-bit;;
3784     *) libmagic=never-match;;
3785     esac
3786     # this will be overridden with pass_all, but let us keep it just in case
3787     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3788     ;;
3789   esac
3790   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3791   lt_cv_deplibs_check_method=pass_all
3792   ;;
3793
3794 # This must be Linux ELF.
3795 linux-gnu*)
3796   case $host_cpu in
3797   alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
3798     lt_cv_deplibs_check_method=pass_all ;;
3799   *)
3800     # glibc up to 2.1.1 does not perform some relocations on ARM
3801     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3802   esac
3803   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3804   ;;
3805
3806 netbsd*)
3807   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3808     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3809   else
3810     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3811   fi
3812   ;;
3813
3814 newos6*)
3815   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3816   lt_cv_file_magic_cmd=/usr/bin/file
3817   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3818   ;;
3819
3820 openbsd*)
3821   lt_cv_file_magic_cmd=/usr/bin/file
3822   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3823   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3824     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3825   else
3826     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3827   fi
3828   ;;
3829
3830 osf3* | osf4* | osf5*)
3831   # this will be overridden with pass_all, but let us keep it just in case
3832   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3833   lt_cv_file_magic_test_file=/shlib/libc.so
3834   lt_cv_deplibs_check_method=pass_all
3835   ;;
3836
3837 sco3.2v5*)
3838   lt_cv_deplibs_check_method=pass_all
3839   ;;
3840
3841 solaris*)
3842   lt_cv_deplibs_check_method=pass_all
3843   lt_cv_file_magic_test_file=/lib/libc.so
3844   ;;
3845
3846 sysv5uw[78]* | sysv4*uw2*)
3847   lt_cv_deplibs_check_method=pass_all
3848   ;;
3849
3850 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3851   case $host_vendor in
3852   motorola)
3853     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]'
3854     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3855     ;;
3856   ncr)
3857     lt_cv_deplibs_check_method=pass_all
3858     ;;
3859   sequent)
3860     lt_cv_file_magic_cmd='/bin/file'
3861     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3862     ;;
3863   sni)
3864     lt_cv_file_magic_cmd='/bin/file'
3865     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3866     lt_cv_file_magic_test_file=/lib/libc.so
3867     ;;
3868   esac
3869   ;;
3870 esac
3871
3872 fi
3873
3874 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3875 file_magic_cmd=$lt_cv_file_magic_cmd
3876 deplibs_check_method=$lt_cv_deplibs_check_method
3877
3878 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3879 echo "configure:3880: checking for object suffix" >&5
3880 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3881   echo $ac_n "(cached) $ac_c" 1>&6
3882 else
3883   rm -f conftest*
3884 echo 'int i = 1;' > conftest.$ac_ext
3885 if { (eval echo configure:3886: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3886   for ac_file in conftest.*; do
3887     case $ac_file in
3888     *.c) ;;
3889     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3890     esac
3891   done
3892 else
3893   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3894 fi
3895 rm -f conftest*
3896 fi
3897
3898 echo "$ac_t""$ac_cv_objext" 1>&6
3899 OBJEXT=$ac_cv_objext
3900 ac_objext=$ac_cv_objext
3901
3902
3903
3904
3905 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3906 echo "configure:3907: checking for executable suffix" >&5
3907 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3908   echo $ac_n "(cached) $ac_c" 1>&6
3909 else
3910   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3911   ac_cv_exeext=.exe
3912 else
3913   rm -f conftest*
3914   echo 'int main () { return 0; }' > conftest.$ac_ext
3915   ac_cv_exeext=
3916   if { (eval echo configure:3917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3917     for file in conftest.*; do
3918       case $file in
3919       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3920       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3921       esac
3922     done
3923   else
3924     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3925   fi
3926   rm -f conftest*
3927   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3928 fi
3929 fi
3930
3931 EXEEXT=""
3932 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3933 echo "$ac_t""${ac_cv_exeext}" 1>&6
3934 ac_exeext=$EXEEXT
3935
3936 if test $host != $build; then
3937   ac_tool_prefix=${host_alias}-
3938 else
3939   ac_tool_prefix=
3940 fi
3941
3942
3943
3944
3945 # Check for command to grab the raw symbol name followed by C symbol from nm.
3946 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
3947 echo "configure:3948: checking command to parse $NM output" >&5
3948 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
3949   echo $ac_n "(cached) $ac_c" 1>&6
3950 else
3951   
3952 # These are sane defaults that work on at least a few old systems.
3953 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3954
3955 # Character class describing NM global symbol codes.
3956 symcode='[BCDEGRST]'
3957
3958 # Regexp to match symbols that can be accessed directly from C.
3959 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
3960
3961 # Transform the above into a raw symbol and a C symbol.
3962 symxfrm='\1 \2\3 \3'
3963
3964 # Transform an extracted symbol line into a proper C declaration
3965 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
3966
3967 # Transform an extracted symbol line into symbol name and symbol address
3968 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'"
3969
3970 # Define system-specific variables.
3971 case $host_os in
3972 aix*)
3973   symcode='[BCDT]'
3974   ;;
3975 cygwin* | mingw* | pw32*)
3976   symcode='[ABCDGISTW]'
3977   ;;
3978 hpux*) # Its linker distinguishes data from code symbols
3979   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3980   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'"
3981   ;;
3982 irix*)
3983   symcode='[BCDEGRST]'
3984   ;;
3985 solaris* | sysv5*)
3986   symcode='[BDT]'
3987   ;;
3988 sysv4)
3989   symcode='[DFNSTU]'
3990   ;;
3991 esac
3992
3993 # Handle CRLF in mingw tool chain
3994 opt_cr=
3995 case $host_os in
3996 mingw*)
3997   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3998   ;;
3999 esac
4000
4001 # If we're using GNU nm, then use its standard symbol codes.
4002 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4003   symcode='[ABCDGISTW]'
4004 fi
4005
4006 # Try without a prefix undercore, then with it.
4007 for ac_symprfx in "" "_"; do
4008
4009   # Write the raw and C identifiers.
4010 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4011
4012   # Check to see that the pipe works correctly.
4013   pipe_works=no
4014   rm -f conftest*
4015   cat > conftest.$ac_ext <<EOF
4016 #ifdef __cplusplus
4017 extern "C" {
4018 #endif
4019 char nm_test_var;
4020 void nm_test_func(){}
4021 #ifdef __cplusplus
4022 }
4023 #endif
4024 int main(){nm_test_var='a';nm_test_func();return(0);}
4025 EOF
4026
4027   if { (eval echo configure:4028: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4028     # Now try to grab the symbols.
4029     nlist=conftest.nm
4030     if { (eval echo configure:4031: \"$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
4031       # Try sorting and uniquifying the output.
4032       if sort "$nlist" | uniq > "$nlist"T; then
4033         mv -f "$nlist"T "$nlist"
4034       else
4035         rm -f "$nlist"T
4036       fi
4037
4038       # Make sure that we snagged all the symbols we need.
4039       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4040         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4041           cat <<EOF > conftest.$ac_ext
4042 #ifdef __cplusplus
4043 extern "C" {
4044 #endif
4045
4046 EOF
4047           # Now generate the symbol file.
4048           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4049
4050           cat <<EOF >> conftest.$ac_ext
4051 #if defined (__STDC__) && __STDC__
4052 # define lt_ptr void *
4053 #else
4054 # define lt_ptr char *
4055 # define const
4056 #endif
4057
4058 /* The mapping between symbol names and symbols. */
4059 const struct {
4060   const char *name;
4061   lt_ptr address;
4062 }
4063 lt_preloaded_symbols[] =
4064 {
4065 EOF
4066           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4067           cat <<\EOF >> conftest.$ac_ext
4068   {0, (lt_ptr) 0}
4069 };
4070
4071 #ifdef __cplusplus
4072 }
4073 #endif
4074 EOF
4075           # Now try linking the two files.
4076           mv conftest.$ac_objext conftstm.$ac_objext
4077           save_LIBS="$LIBS"
4078           save_CFLAGS="$CFLAGS"
4079           LIBS="conftstm.$ac_objext"
4080           CFLAGS="$CFLAGS$no_builtin_flag"
4081           if { (eval echo configure:4082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4082             pipe_works=yes
4083           fi
4084           LIBS="$save_LIBS"
4085           CFLAGS="$save_CFLAGS"
4086         else
4087           echo "cannot find nm_test_func in $nlist" >&5
4088         fi
4089       else
4090         echo "cannot find nm_test_var in $nlist" >&5
4091       fi
4092     else
4093       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4094     fi
4095   else
4096     echo "$progname: failed program was:" >&5
4097     cat conftest.$ac_ext >&5
4098   fi
4099   rm -f conftest* conftst*
4100
4101   # Do not use the global_symbol_pipe unless it works.
4102   if test "$pipe_works" = yes; then
4103     break
4104   else
4105     lt_cv_sys_global_symbol_pipe=
4106   fi
4107 done
4108
4109 fi
4110
4111 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4112 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4113   global_symbol_to_cdecl=
4114   global_symbol_to_c_name_address=
4115 else
4116   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4117   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4118 fi
4119 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4120 then
4121   echo "$ac_t""failed" 1>&6
4122 else
4123   echo "$ac_t""ok" 1>&6
4124 fi
4125
4126 for ac_hdr in dlfcn.h
4127 do
4128 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4129 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4130 echo "configure:4131: checking for $ac_hdr" >&5
4131 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4132   echo $ac_n "(cached) $ac_c" 1>&6
4133 else
4134   cat > conftest.$ac_ext <<EOF
4135 #line 4136 "configure"
4136 #include "confdefs.h"
4137 #include <$ac_hdr>
4138 EOF
4139 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4140 { (eval echo configure:4141: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4141 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4142 if test -z "$ac_err"; then
4143   rm -rf conftest*
4144   eval "ac_cv_header_$ac_safe=yes"
4145 else
4146   echo "$ac_err" >&5
4147   echo "configure: failed program was:" >&5
4148   cat conftest.$ac_ext >&5
4149   rm -rf conftest*
4150   eval "ac_cv_header_$ac_safe=no"
4151 fi
4152 rm -f conftest*
4153 fi
4154 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4155   echo "$ac_t""yes" 1>&6
4156     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4157   cat >> confdefs.h <<EOF
4158 #define $ac_tr_hdr 1
4159 EOF
4160  
4161 else
4162   echo "$ac_t""no" 1>&6
4163 fi
4164 done
4165
4166
4167
4168
4169
4170 # Only perform the check for file, if the check method requires it
4171 case $deplibs_check_method in
4172 file_magic*)
4173   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4174     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4175 echo "configure:4176: checking for ${ac_tool_prefix}file" >&5
4176 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4177   echo $ac_n "(cached) $ac_c" 1>&6
4178 else
4179   case $MAGIC_CMD in
4180   /*)
4181   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4182   ;;
4183   ?:/*)
4184   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4185   ;;
4186   *)
4187   ac_save_MAGIC_CMD="$MAGIC_CMD"
4188   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4189   ac_dummy="/usr/bin:$PATH"
4190   for ac_dir in $ac_dummy; do
4191     test -z "$ac_dir" && ac_dir=.
4192     if test -f $ac_dir/${ac_tool_prefix}file; then
4193       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4194       if test -n "$file_magic_test_file"; then
4195         case $deplibs_check_method in
4196         "file_magic "*)
4197           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4198           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4199           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4200             egrep "$file_magic_regex" > /dev/null; then
4201             :
4202           else
4203             cat <<EOF 1>&2
4204
4205 *** Warning: the command libtool uses to detect shared libraries,
4206 *** $file_magic_cmd, produces output that libtool cannot recognize.
4207 *** The result is that libtool may fail to recognize shared libraries
4208 *** as such.  This will affect the creation of libtool libraries that
4209 *** depend on shared libraries, but programs linked with such libtool
4210 *** libraries will work regardless of this problem.  Nevertheless, you
4211 *** may want to report the problem to your system manager and/or to
4212 *** bug-libtool@gnu.org
4213
4214 EOF
4215           fi ;;
4216         esac
4217       fi
4218       break
4219     fi
4220   done
4221   IFS="$ac_save_ifs"
4222   MAGIC_CMD="$ac_save_MAGIC_CMD"
4223   ;;
4224 esac
4225 fi
4226
4227 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4228 if test -n "$MAGIC_CMD"; then
4229   echo "$ac_t""$MAGIC_CMD" 1>&6
4230 else
4231   echo "$ac_t""no" 1>&6
4232 fi
4233
4234 if test -z "$lt_cv_path_MAGIC_CMD"; then
4235   if test -n "$ac_tool_prefix"; then
4236     echo $ac_n "checking for file""... $ac_c" 1>&6
4237 echo "configure:4238: checking for file" >&5
4238 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4239   echo $ac_n "(cached) $ac_c" 1>&6
4240 else
4241   case $MAGIC_CMD in
4242   /*)
4243   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4244   ;;
4245   ?:/*)
4246   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4247   ;;
4248   *)
4249   ac_save_MAGIC_CMD="$MAGIC_CMD"
4250   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4251   ac_dummy="/usr/bin:$PATH"
4252   for ac_dir in $ac_dummy; do
4253     test -z "$ac_dir" && ac_dir=.
4254     if test -f $ac_dir/file; then
4255       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4256       if test -n "$file_magic_test_file"; then
4257         case $deplibs_check_method in
4258         "file_magic "*)
4259           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4260           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4261           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4262             egrep "$file_magic_regex" > /dev/null; then
4263             :
4264           else
4265             cat <<EOF 1>&2
4266
4267 *** Warning: the command libtool uses to detect shared libraries,
4268 *** $file_magic_cmd, produces output that libtool cannot recognize.
4269 *** The result is that libtool may fail to recognize shared libraries
4270 *** as such.  This will affect the creation of libtool libraries that
4271 *** depend on shared libraries, but programs linked with such libtool
4272 *** libraries will work regardless of this problem.  Nevertheless, you
4273 *** may want to report the problem to your system manager and/or to
4274 *** bug-libtool@gnu.org
4275
4276 EOF
4277           fi ;;
4278         esac
4279       fi
4280       break
4281     fi
4282   done
4283   IFS="$ac_save_ifs"
4284   MAGIC_CMD="$ac_save_MAGIC_CMD"
4285   ;;
4286 esac
4287 fi
4288
4289 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4290 if test -n "$MAGIC_CMD"; then
4291   echo "$ac_t""$MAGIC_CMD" 1>&6
4292 else
4293   echo "$ac_t""no" 1>&6
4294 fi
4295
4296   else
4297     MAGIC_CMD=:
4298   fi
4299 fi
4300
4301   fi
4302   ;;
4303 esac
4304
4305 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4306 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4307 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4308 echo "configure:4309: checking for $ac_word" >&5
4309 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4310   echo $ac_n "(cached) $ac_c" 1>&6
4311 else
4312   if test -n "$RANLIB"; then
4313   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4314 else
4315   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4316   ac_dummy="$PATH"
4317   for ac_dir in $ac_dummy; do
4318     test -z "$ac_dir" && ac_dir=.
4319     if test -f $ac_dir/$ac_word; then
4320       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4321       break
4322     fi
4323   done
4324   IFS="$ac_save_ifs"
4325 fi
4326 fi
4327 RANLIB="$ac_cv_prog_RANLIB"
4328 if test -n "$RANLIB"; then
4329   echo "$ac_t""$RANLIB" 1>&6
4330 else
4331   echo "$ac_t""no" 1>&6
4332 fi
4333
4334
4335 if test -z "$ac_cv_prog_RANLIB"; then
4336 if test -n "$ac_tool_prefix"; then
4337   # Extract the first word of "ranlib", so it can be a program name with args.
4338 set dummy ranlib; ac_word=$2
4339 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4340 echo "configure:4341: checking for $ac_word" >&5
4341 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4342   echo $ac_n "(cached) $ac_c" 1>&6
4343 else
4344   if test -n "$RANLIB"; then
4345   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4346 else
4347   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4348   ac_dummy="$PATH"
4349   for ac_dir in $ac_dummy; do
4350     test -z "$ac_dir" && ac_dir=.
4351     if test -f $ac_dir/$ac_word; then
4352       ac_cv_prog_RANLIB="ranlib"
4353       break
4354     fi
4355   done
4356   IFS="$ac_save_ifs"
4357   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4358 fi
4359 fi
4360 RANLIB="$ac_cv_prog_RANLIB"
4361 if test -n "$RANLIB"; then
4362   echo "$ac_t""$RANLIB" 1>&6
4363 else
4364   echo "$ac_t""no" 1>&6
4365 fi
4366
4367 else
4368   RANLIB=":"
4369 fi
4370 fi
4371
4372 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4373 set dummy ${ac_tool_prefix}strip; ac_word=$2
4374 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4375 echo "configure:4376: checking for $ac_word" >&5
4376 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4377   echo $ac_n "(cached) $ac_c" 1>&6
4378 else
4379   if test -n "$STRIP"; then
4380   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4381 else
4382   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4383   ac_dummy="$PATH"
4384   for ac_dir in $ac_dummy; do
4385     test -z "$ac_dir" && ac_dir=.
4386     if test -f $ac_dir/$ac_word; then
4387       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4388       break
4389     fi
4390   done
4391   IFS="$ac_save_ifs"
4392 fi
4393 fi
4394 STRIP="$ac_cv_prog_STRIP"
4395 if test -n "$STRIP"; then
4396   echo "$ac_t""$STRIP" 1>&6
4397 else
4398   echo "$ac_t""no" 1>&6
4399 fi
4400
4401
4402 if test -z "$ac_cv_prog_STRIP"; then
4403 if test -n "$ac_tool_prefix"; then
4404   # Extract the first word of "strip", so it can be a program name with args.
4405 set dummy strip; ac_word=$2
4406 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4407 echo "configure:4408: checking for $ac_word" >&5
4408 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4409   echo $ac_n "(cached) $ac_c" 1>&6
4410 else
4411   if test -n "$STRIP"; then
4412   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4413 else
4414   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4415   ac_dummy="$PATH"
4416   for ac_dir in $ac_dummy; do
4417     test -z "$ac_dir" && ac_dir=.
4418     if test -f $ac_dir/$ac_word; then
4419       ac_cv_prog_STRIP="strip"
4420       break
4421     fi
4422   done
4423   IFS="$ac_save_ifs"
4424   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4425 fi
4426 fi
4427 STRIP="$ac_cv_prog_STRIP"
4428 if test -n "$STRIP"; then
4429   echo "$ac_t""$STRIP" 1>&6
4430 else
4431   echo "$ac_t""no" 1>&6
4432 fi
4433
4434 else
4435   STRIP=":"
4436 fi
4437 fi
4438
4439
4440 enable_dlopen=yes
4441 enable_win32_dll=yes
4442
4443 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4444 if test "${enable_libtool_lock+set}" = set; then
4445   enableval="$enable_libtool_lock"
4446   :
4447 fi
4448
4449 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4450
4451 # Some flags need to be propagated to the compiler or linker for good
4452 # libtool support.
4453 case $host in
4454 *-*-irix6*)
4455   # Find out which ABI we are using.
4456   echo '#line 4457 "configure"' > conftest.$ac_ext
4457   if { (eval echo configure:4458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4458     case `/usr/bin/file conftest.$ac_objext` in
4459     *32-bit*)
4460       LD="${LD-ld} -32"
4461       ;;
4462     *N32*)
4463       LD="${LD-ld} -n32"
4464       ;;
4465     *64-bit*)
4466       LD="${LD-ld} -64"
4467       ;;
4468     esac
4469   fi
4470   rm -rf conftest*
4471   ;;
4472
4473 *-*-sco3.2v5*)
4474   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4475   SAVE_CFLAGS="$CFLAGS"
4476   CFLAGS="$CFLAGS -belf"
4477   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4478 echo "configure:4479: checking whether the C compiler needs -belf" >&5
4479 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4480   echo $ac_n "(cached) $ac_c" 1>&6
4481 else
4482   
4483      ac_ext=c
4484 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4485 ac_cpp='$CPP $CPPFLAGS'
4486 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4487 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4488 cross_compiling=$ac_cv_prog_cc_cross
4489
4490      cat > conftest.$ac_ext <<EOF
4491 #line 4492 "configure"
4492 #include "confdefs.h"
4493
4494 int main() {
4495
4496 ; return 0; }
4497 EOF
4498 if { (eval echo configure:4499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4499   rm -rf conftest*
4500   lt_cv_cc_needs_belf=yes
4501 else
4502   echo "configure: failed program was:" >&5
4503   cat conftest.$ac_ext >&5
4504   rm -rf conftest*
4505   lt_cv_cc_needs_belf=no
4506 fi
4507 rm -f conftest*
4508      ac_ext=c
4509 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4510 ac_cpp='$CPP $CPPFLAGS'
4511 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4512 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4513 cross_compiling=$ac_cv_prog_cc_cross
4514
4515 fi
4516
4517 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4518   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4519     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4520     CFLAGS="$SAVE_CFLAGS"
4521   fi
4522   ;;
4523
4524 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4525   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4526 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4527 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4528 echo "configure:4529: checking for $ac_word" >&5
4529 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4530   echo $ac_n "(cached) $ac_c" 1>&6
4531 else
4532   if test -n "$DLLTOOL"; then
4533   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4534 else
4535   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4536   ac_dummy="$PATH"
4537   for ac_dir in $ac_dummy; do
4538     test -z "$ac_dir" && ac_dir=.
4539     if test -f $ac_dir/$ac_word; then
4540       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4541       break
4542     fi
4543   done
4544   IFS="$ac_save_ifs"
4545 fi
4546 fi
4547 DLLTOOL="$ac_cv_prog_DLLTOOL"
4548 if test -n "$DLLTOOL"; then
4549   echo "$ac_t""$DLLTOOL" 1>&6
4550 else
4551   echo "$ac_t""no" 1>&6
4552 fi
4553
4554
4555 if test -z "$ac_cv_prog_DLLTOOL"; then
4556 if test -n "$ac_tool_prefix"; then
4557   # Extract the first word of "dlltool", so it can be a program name with args.
4558 set dummy dlltool; ac_word=$2
4559 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4560 echo "configure:4561: checking for $ac_word" >&5
4561 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4562   echo $ac_n "(cached) $ac_c" 1>&6
4563 else
4564   if test -n "$DLLTOOL"; then
4565   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4566 else
4567   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4568   ac_dummy="$PATH"
4569   for ac_dir in $ac_dummy; do
4570     test -z "$ac_dir" && ac_dir=.
4571     if test -f $ac_dir/$ac_word; then
4572       ac_cv_prog_DLLTOOL="dlltool"
4573       break
4574     fi
4575   done
4576   IFS="$ac_save_ifs"
4577   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4578 fi
4579 fi
4580 DLLTOOL="$ac_cv_prog_DLLTOOL"
4581 if test -n "$DLLTOOL"; then
4582   echo "$ac_t""$DLLTOOL" 1>&6
4583 else
4584   echo "$ac_t""no" 1>&6
4585 fi
4586
4587 else
4588   DLLTOOL="false"
4589 fi
4590 fi
4591
4592   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4593 set dummy ${ac_tool_prefix}as; ac_word=$2
4594 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4595 echo "configure:4596: checking for $ac_word" >&5
4596 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4597   echo $ac_n "(cached) $ac_c" 1>&6
4598 else
4599   if test -n "$AS"; then
4600   ac_cv_prog_AS="$AS" # Let the user override the test.
4601 else
4602   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4603   ac_dummy="$PATH"
4604   for ac_dir in $ac_dummy; do
4605     test -z "$ac_dir" && ac_dir=.
4606     if test -f $ac_dir/$ac_word; then
4607       ac_cv_prog_AS="${ac_tool_prefix}as"
4608       break
4609     fi
4610   done
4611   IFS="$ac_save_ifs"
4612 fi
4613 fi
4614 AS="$ac_cv_prog_AS"
4615 if test -n "$AS"; then
4616   echo "$ac_t""$AS" 1>&6
4617 else
4618   echo "$ac_t""no" 1>&6
4619 fi
4620
4621
4622 if test -z "$ac_cv_prog_AS"; then
4623 if test -n "$ac_tool_prefix"; then
4624   # Extract the first word of "as", so it can be a program name with args.
4625 set dummy as; ac_word=$2
4626 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4627 echo "configure:4628: checking for $ac_word" >&5
4628 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4629   echo $ac_n "(cached) $ac_c" 1>&6
4630 else
4631   if test -n "$AS"; then
4632   ac_cv_prog_AS="$AS" # Let the user override the test.
4633 else
4634   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4635   ac_dummy="$PATH"
4636   for ac_dir in $ac_dummy; do
4637     test -z "$ac_dir" && ac_dir=.
4638     if test -f $ac_dir/$ac_word; then
4639       ac_cv_prog_AS="as"
4640       break
4641     fi
4642   done
4643   IFS="$ac_save_ifs"
4644   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4645 fi
4646 fi
4647 AS="$ac_cv_prog_AS"
4648 if test -n "$AS"; then
4649   echo "$ac_t""$AS" 1>&6
4650 else
4651   echo "$ac_t""no" 1>&6
4652 fi
4653
4654 else
4655   AS="false"
4656 fi
4657 fi
4658
4659   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4660 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4661 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4662 echo "configure:4663: checking for $ac_word" >&5
4663 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4664   echo $ac_n "(cached) $ac_c" 1>&6
4665 else
4666   if test -n "$OBJDUMP"; then
4667   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4668 else
4669   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4670   ac_dummy="$PATH"
4671   for ac_dir in $ac_dummy; do
4672     test -z "$ac_dir" && ac_dir=.
4673     if test -f $ac_dir/$ac_word; then
4674       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4675       break
4676     fi
4677   done
4678   IFS="$ac_save_ifs"
4679 fi
4680 fi
4681 OBJDUMP="$ac_cv_prog_OBJDUMP"
4682 if test -n "$OBJDUMP"; then
4683   echo "$ac_t""$OBJDUMP" 1>&6
4684 else
4685   echo "$ac_t""no" 1>&6
4686 fi
4687
4688
4689 if test -z "$ac_cv_prog_OBJDUMP"; then
4690 if test -n "$ac_tool_prefix"; then
4691   # Extract the first word of "objdump", so it can be a program name with args.
4692 set dummy objdump; ac_word=$2
4693 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4694 echo "configure:4695: checking for $ac_word" >&5
4695 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4696   echo $ac_n "(cached) $ac_c" 1>&6
4697 else
4698   if test -n "$OBJDUMP"; then
4699   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4700 else
4701   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4702   ac_dummy="$PATH"
4703   for ac_dir in $ac_dummy; do
4704     test -z "$ac_dir" && ac_dir=.
4705     if test -f $ac_dir/$ac_word; then
4706       ac_cv_prog_OBJDUMP="objdump"
4707       break
4708     fi
4709   done
4710   IFS="$ac_save_ifs"
4711   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4712 fi
4713 fi
4714 OBJDUMP="$ac_cv_prog_OBJDUMP"
4715 if test -n "$OBJDUMP"; then
4716   echo "$ac_t""$OBJDUMP" 1>&6
4717 else
4718   echo "$ac_t""no" 1>&6
4719 fi
4720
4721 else
4722   OBJDUMP="false"
4723 fi
4724 fi
4725
4726
4727   # recent cygwin and mingw systems supply a stub DllMain which the user
4728   # can override, but on older systems we have to supply one
4729   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4730 echo "configure:4731: checking if libtool should supply DllMain function" >&5
4731 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4732   echo $ac_n "(cached) $ac_c" 1>&6
4733 else
4734   cat > conftest.$ac_ext <<EOF
4735 #line 4736 "configure"
4736 #include "confdefs.h"
4737
4738 int main() {
4739 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4740       DllMain (0, 0, 0);
4741 ; return 0; }
4742 EOF
4743 if { (eval echo configure:4744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4744   rm -rf conftest*
4745   lt_cv_need_dllmain=no
4746 else
4747   echo "configure: failed program was:" >&5
4748   cat conftest.$ac_ext >&5
4749   rm -rf conftest*
4750   lt_cv_need_dllmain=yes
4751 fi
4752 rm -f conftest*
4753 fi
4754
4755 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4756
4757   case $host/$CC in
4758   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4759     # old mingw systems require "-dll" to link a DLL, while more recent ones
4760     # require "-mdll"
4761     SAVE_CFLAGS="$CFLAGS"
4762     CFLAGS="$CFLAGS -mdll"
4763     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4764 echo "configure:4765: checking how to link DLLs" >&5
4765 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4766   echo $ac_n "(cached) $ac_c" 1>&6
4767 else
4768   cat > conftest.$ac_ext <<EOF
4769 #line 4770 "configure"
4770 #include "confdefs.h"
4771
4772 int main() {
4773
4774 ; return 0; }
4775 EOF
4776 if { (eval echo configure:4777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4777   rm -rf conftest*
4778   lt_cv_cc_dll_switch=-mdll
4779 else
4780   echo "configure: failed program was:" >&5
4781   cat conftest.$ac_ext >&5
4782   rm -rf conftest*
4783   lt_cv_cc_dll_switch=-dll
4784 fi
4785 rm -f conftest*
4786 fi
4787
4788 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4789     CFLAGS="$SAVE_CFLAGS" ;;
4790   *-*-cygwin* | *-*-pw32*)
4791     # cygwin systems need to pass --dll to the linker, and not link
4792     # crt.o which will require a WinMain@16 definition.
4793     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4794   esac
4795   ;;
4796   
4797 esac
4798
4799 # Sed substitution that helps us do robust quoting.  It backslashifies
4800 # metacharacters that are still active within double-quoted strings.
4801 Xsed='sed -e s/^X//'
4802 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4803
4804 # Same as above, but do not quote variable references.
4805 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4806
4807 # Sed substitution to delay expansion of an escaped shell variable in a
4808 # double_quote_subst'ed string.
4809 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4810
4811 # Constants:
4812 rm="rm -f"
4813
4814 # Global variables:
4815 default_ofile=libtool
4816 can_build_shared=yes
4817
4818 # All known linkers require a `.a' archive for static linking (except M$VC,
4819 # which needs '.lib').
4820 libext=a
4821 ltmain="$ac_aux_dir/ltmain.sh"
4822 ofile="$default_ofile"
4823 with_gnu_ld="$lt_cv_prog_gnu_ld"
4824 need_locks="$enable_libtool_lock"
4825
4826 old_CC="$CC"
4827 old_CFLAGS="$CFLAGS"
4828
4829 # Set sane defaults for various variables
4830 test -z "$AR" && AR=ar
4831 test -z "$AR_FLAGS" && AR_FLAGS=cru
4832 test -z "$AS" && AS=as
4833 test -z "$CC" && CC=cc
4834 test -z "$DLLTOOL" && DLLTOOL=dlltool
4835 test -z "$LD" && LD=ld
4836 test -z "$LN_S" && LN_S="ln -s"
4837 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4838 test -z "$NM" && NM=nm
4839 test -z "$OBJDUMP" && OBJDUMP=objdump
4840 test -z "$RANLIB" && RANLIB=:
4841 test -z "$STRIP" && STRIP=:
4842 test -z "$ac_objext" && ac_objext=o
4843
4844 if test x"$host" != x"$build"; then
4845   ac_tool_prefix=${host_alias}-
4846 else
4847   ac_tool_prefix=
4848 fi
4849
4850 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4851 case $host_os in
4852 linux-gnu*) ;;
4853 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4854 esac
4855
4856 case $host_os in
4857 aix3*)
4858   # AIX sometimes has problems with the GCC collect2 program.  For some
4859   # reason, if we set the COLLECT_NAMES environment variable, the problems
4860   # vanish in a puff of smoke.
4861   if test "X${COLLECT_NAMES+set}" != Xset; then
4862     COLLECT_NAMES=
4863     export COLLECT_NAMES
4864   fi
4865   ;;
4866 esac
4867
4868 # Determine commands to create old-style static archives.
4869 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4870 old_postinstall_cmds='chmod 644 $oldlib'
4871 old_postuninstall_cmds=
4872
4873 if test -n "$RANLIB"; then
4874   case $host_os in
4875   openbsd*)
4876     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4877     ;;
4878   *)
4879     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4880     ;;
4881   esac
4882   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4883 fi
4884
4885 # Allow CC to be a program name with arguments.
4886 set dummy $CC
4887 compiler="$2"
4888
4889 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4890 echo "configure:4891: checking for objdir" >&5
4891 rm -f .libs 2>/dev/null
4892 mkdir .libs 2>/dev/null
4893 if test -d .libs; then
4894   objdir=.libs
4895 else
4896   # MS-DOS does not allow filenames that begin with a dot.
4897   objdir=_libs
4898 fi
4899 rmdir .libs 2>/dev/null
4900 echo "$ac_t""$objdir" 1>&6
4901
4902
4903 # Check whether --with-pic or --without-pic was given.
4904 if test "${with_pic+set}" = set; then
4905   withval="$with_pic"
4906   pic_mode="$withval"
4907 else
4908   pic_mode=default
4909 fi
4910
4911 test -z "$pic_mode" && pic_mode=default
4912
4913 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4914 # in isolation, and that seeing it set (from the cache) indicates that
4915 # the associated values are set (in the cache) correctly too.
4916 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4917 echo "configure:4918: checking for $compiler option to produce PIC" >&5
4918 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4919   echo $ac_n "(cached) $ac_c" 1>&6
4920 else
4921    lt_cv_prog_cc_pic=
4922   lt_cv_prog_cc_shlib=
4923   lt_cv_prog_cc_wl=
4924   lt_cv_prog_cc_static=
4925   lt_cv_prog_cc_no_builtin=
4926   lt_cv_prog_cc_can_build_shared=$can_build_shared
4927
4928   if test "$GCC" = yes; then
4929     lt_cv_prog_cc_wl='-Wl,'
4930     lt_cv_prog_cc_static='-static'
4931
4932     case $host_os in
4933     aix*)
4934       # Below there is a dirty hack to force normal static linking with -ldl
4935       # The problem is because libdl dynamically linked with both libc and
4936       # libC (AIX C++ library), which obviously doesn't included in libraries
4937       # list by gcc. This cause undefined symbols with -static flags.
4938       # This hack allows C programs to be linked with "-static -ldl", but
4939       # not sure about C++ programs.
4940       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
4941       ;;
4942     amigaos*)
4943       # FIXME: we need at least 68020 code to build shared libraries, but
4944       # adding the `-m68020' flag to GCC prevents building anything better,
4945       # like `-m68040'.
4946       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
4947       ;;
4948     beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
4949       # PIC is the default for these OSes.
4950       ;;
4951     darwin* | rhapsody*)
4952       # PIC is the default on this platform
4953       # Common symbols not allowed in MH_DYLIB files
4954       lt_cv_prog_cc_pic='-fno-common'
4955       ;;
4956     cygwin* | mingw* | pw32* | os2*)
4957       # This hack is so that the source file can tell whether it is being
4958       # built for inclusion in a dll (and should export symbols for example).
4959       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4960       ;;
4961     sysv4*MP*)
4962       if test -d /usr/nec; then
4963          lt_cv_prog_cc_pic=-Kconform_pic
4964       fi
4965       ;;
4966     *)
4967       lt_cv_prog_cc_pic='-fPIC'
4968       ;;
4969     esac
4970   else
4971     # PORTME Check for PIC flags for the system compiler.
4972     case $host_os in
4973     aix3* | aix4* | aix5*)
4974       lt_cv_prog_cc_wl='-Wl,'
4975       # All AIX code is PIC.
4976       if test "$host_cpu" = ia64; then
4977         # AIX 5 now supports IA64 processor
4978         lt_cv_prog_cc_static='-Bstatic'
4979       else
4980         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
4981       fi
4982       ;;
4983
4984     hpux9* | hpux10* | hpux11*)
4985       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
4986       lt_cv_prog_cc_wl='-Wl,'
4987       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
4988       lt_cv_prog_cc_pic='+Z'
4989       ;;
4990
4991     irix5* | irix6*)
4992       lt_cv_prog_cc_wl='-Wl,'
4993       lt_cv_prog_cc_static='-non_shared'
4994       # PIC (with -KPIC) is the default.
4995       ;;
4996
4997     cygwin* | mingw* | pw32* | os2*)
4998       # This hack is so that the source file can tell whether it is being
4999       # built for inclusion in a dll (and should export symbols for example).
5000       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5001       ;;
5002
5003     newsos6)
5004       lt_cv_prog_cc_pic='-KPIC'
5005       lt_cv_prog_cc_static='-Bstatic'
5006       ;;
5007
5008     osf3* | osf4* | osf5*)
5009       # All OSF/1 code is PIC.
5010       lt_cv_prog_cc_wl='-Wl,'
5011       lt_cv_prog_cc_static='-non_shared'
5012       ;;
5013
5014     sco3.2v5*)
5015       lt_cv_prog_cc_pic='-Kpic'
5016       lt_cv_prog_cc_static='-dn'
5017       lt_cv_prog_cc_shlib='-belf'
5018       ;;
5019
5020     solaris*)
5021       lt_cv_prog_cc_pic='-KPIC'
5022       lt_cv_prog_cc_static='-Bstatic'
5023       lt_cv_prog_cc_wl='-Wl,'
5024       ;;
5025
5026     sunos4*)
5027       lt_cv_prog_cc_pic='-PIC'
5028       lt_cv_prog_cc_static='-Bstatic'
5029       lt_cv_prog_cc_wl='-Qoption ld '
5030       ;;
5031
5032     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5033       lt_cv_prog_cc_pic='-KPIC'
5034       lt_cv_prog_cc_static='-Bstatic'
5035       if test "x$host_vendor" = xsni; then
5036         lt_cv_prog_cc_wl='-LD'
5037       else
5038         lt_cv_prog_cc_wl='-Wl,'
5039       fi
5040       ;;
5041
5042     uts4*)
5043       lt_cv_prog_cc_pic='-pic'
5044       lt_cv_prog_cc_static='-Bstatic'
5045       ;;
5046
5047     sysv4*MP*)
5048       if test -d /usr/nec ;then
5049         lt_cv_prog_cc_pic='-Kconform_pic'
5050         lt_cv_prog_cc_static='-Bstatic'
5051       fi
5052       ;;
5053
5054     *)
5055       lt_cv_prog_cc_can_build_shared=no
5056       ;;
5057     esac
5058   fi
5059
5060 fi
5061
5062 if test -z "$lt_cv_prog_cc_pic"; then
5063   echo "$ac_t""none" 1>&6
5064 else
5065   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5066
5067   # Check to make sure the pic_flag actually works.
5068   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5069 echo "configure:5070: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5070   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5071   echo $ac_n "(cached) $ac_c" 1>&6
5072 else
5073       save_CFLAGS="$CFLAGS"
5074     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5075     cat > conftest.$ac_ext <<EOF
5076 #line 5077 "configure"
5077 #include "confdefs.h"
5078
5079 int main() {
5080
5081 ; return 0; }
5082 EOF
5083 if { (eval echo configure:5084: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5084   rm -rf conftest*
5085         case $host_os in
5086       hpux9* | hpux10* | hpux11*)
5087         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5088         # they create non-PIC objects.  So, if there were any warnings, we
5089         # assume that PIC is not supported.
5090         if test -s conftest.err; then
5091           lt_cv_prog_cc_pic_works=no
5092         else
5093           lt_cv_prog_cc_pic_works=yes
5094         fi
5095         ;;
5096       *)
5097         lt_cv_prog_cc_pic_works=yes
5098         ;;
5099       esac
5100     
5101 else
5102   echo "configure: failed program was:" >&5
5103   cat conftest.$ac_ext >&5
5104   rm -rf conftest*
5105         lt_cv_prog_cc_pic_works=no
5106     
5107 fi
5108 rm -f conftest*
5109     CFLAGS="$save_CFLAGS"
5110   
5111 fi
5112
5113
5114   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5115     lt_cv_prog_cc_pic=
5116     lt_cv_prog_cc_can_build_shared=no
5117   else
5118     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5119   fi
5120
5121   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5122 fi
5123
5124 # Check for any special shared library compilation flags.
5125 if test -n "$lt_cv_prog_cc_shlib"; then
5126   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5127   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5128   else
5129    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5130     lt_cv_prog_cc_can_build_shared=no
5131   fi
5132 fi
5133
5134 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5135 echo "configure:5136: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5136 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5137   echo $ac_n "(cached) $ac_c" 1>&6
5138 else
5139     lt_cv_prog_cc_static_works=no
5140   save_LDFLAGS="$LDFLAGS"
5141   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5142   cat > conftest.$ac_ext <<EOF
5143 #line 5144 "configure"
5144 #include "confdefs.h"
5145
5146 int main() {
5147
5148 ; return 0; }
5149 EOF
5150 if { (eval echo configure:5151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5151   rm -rf conftest*
5152   lt_cv_prog_cc_static_works=yes
5153 else
5154   echo "configure: failed program was:" >&5
5155   cat conftest.$ac_ext >&5
5156 fi
5157 rm -f conftest*
5158   LDFLAGS="$save_LDFLAGS"
5159
5160 fi
5161
5162
5163 # Belt *and* braces to stop my trousers falling down:
5164 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5165 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5166
5167 pic_flag="$lt_cv_prog_cc_pic"
5168 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5169 wl="$lt_cv_prog_cc_wl"
5170 link_static_flag="$lt_cv_prog_cc_static"
5171 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5172 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5173
5174
5175 # Check to see if options -o and -c are simultaneously supported by compiler
5176 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5177 echo "configure:5178: checking if $compiler supports -c -o file.$ac_objext" >&5
5178 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5179   echo $ac_n "(cached) $ac_c" 1>&6
5180 else
5181   
5182 $rm -r conftest 2>/dev/null
5183 mkdir conftest
5184 cd conftest
5185 echo "int some_variable = 0;" > conftest.$ac_ext
5186 mkdir out
5187 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5188 # that will create temporary files in the current directory regardless of
5189 # the output directory.  Thus, making CWD read-only will cause this test
5190 # to fail, enabling locking or at least warning the user not to do parallel
5191 # builds.
5192 chmod -w .
5193 save_CFLAGS="$CFLAGS"
5194 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5195 compiler_c_o=no
5196 if { (eval echo configure:5197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5197   # The compiler can only warn and ignore the option if not recognized
5198   # So say no if there are warnings
5199   if test -s out/conftest.err; then
5200     lt_cv_compiler_c_o=no
5201   else
5202     lt_cv_compiler_c_o=yes
5203   fi
5204 else
5205   # Append any errors to the config.log.
5206   cat out/conftest.err 1>&5
5207   lt_cv_compiler_c_o=no
5208 fi
5209 CFLAGS="$save_CFLAGS"
5210 chmod u+w .
5211 $rm conftest* out/*
5212 rmdir out
5213 cd ..
5214 rmdir conftest
5215 $rm -r conftest 2>/dev/null
5216
5217 fi
5218
5219 compiler_c_o=$lt_cv_compiler_c_o
5220 echo "$ac_t""$compiler_c_o" 1>&6
5221
5222 if test x"$compiler_c_o" = x"yes"; then
5223   # Check to see if we can write to a .lo
5224   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5225 echo "configure:5226: checking if $compiler supports -c -o file.lo" >&5
5226   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5227   echo $ac_n "(cached) $ac_c" 1>&6
5228 else
5229   
5230   lt_cv_compiler_o_lo=no
5231   save_CFLAGS="$CFLAGS"
5232   CFLAGS="$CFLAGS -c -o conftest.lo"
5233   save_objext="$ac_objext"
5234   ac_objext=lo
5235   cat > conftest.$ac_ext <<EOF
5236 #line 5237 "configure"
5237 #include "confdefs.h"
5238
5239 int main() {
5240 int some_variable = 0;
5241 ; return 0; }
5242 EOF
5243 if { (eval echo configure:5244: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5244   rm -rf conftest*
5245       # The compiler can only warn and ignore the option if not recognized
5246     # So say no if there are warnings
5247     if test -s conftest.err; then
5248       lt_cv_compiler_o_lo=no
5249     else
5250       lt_cv_compiler_o_lo=yes
5251     fi
5252   
5253 else
5254   echo "configure: failed program was:" >&5
5255   cat conftest.$ac_ext >&5
5256 fi
5257 rm -f conftest*
5258   ac_objext="$save_objext"
5259   CFLAGS="$save_CFLAGS"
5260   
5261 fi
5262
5263   compiler_o_lo=$lt_cv_compiler_o_lo
5264   echo "$ac_t""$compiler_o_lo" 1>&6
5265 else
5266   compiler_o_lo=no
5267 fi
5268
5269 # Check to see if we can do hard links to lock some files if needed
5270 hard_links="nottested"
5271 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5272   # do not overwrite the value of need_locks provided by the user
5273   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5274 echo "configure:5275: checking if we can lock with hard links" >&5
5275   hard_links=yes
5276   $rm conftest*
5277   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5278   touch conftest.a
5279   ln conftest.a conftest.b 2>&5 || hard_links=no
5280   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5281   echo "$ac_t""$hard_links" 1>&6
5282   if test "$hard_links" = no; then
5283     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5284     need_locks=warn
5285   fi
5286 else
5287   need_locks=no
5288 fi
5289
5290 if test "$GCC" = yes; then
5291   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5292   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5293 echo "configure:5294: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5294   echo "int some_variable = 0;" > conftest.$ac_ext
5295   save_CFLAGS="$CFLAGS"
5296   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5297   compiler_rtti_exceptions=no
5298   cat > conftest.$ac_ext <<EOF
5299 #line 5300 "configure"
5300 #include "confdefs.h"
5301
5302 int main() {
5303 int some_variable = 0;
5304 ; return 0; }
5305 EOF
5306 if { (eval echo configure:5307: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5307   rm -rf conftest*
5308       # The compiler can only warn and ignore the option if not recognized
5309     # So say no if there are warnings
5310     if test -s conftest.err; then
5311       compiler_rtti_exceptions=no
5312     else
5313       compiler_rtti_exceptions=yes
5314     fi
5315   
5316 else
5317   echo "configure: failed program was:" >&5
5318   cat conftest.$ac_ext >&5
5319 fi
5320 rm -f conftest*
5321   CFLAGS="$save_CFLAGS"
5322   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5323
5324   if test "$compiler_rtti_exceptions" = "yes"; then
5325     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5326   else
5327     no_builtin_flag=' -fno-builtin'
5328   fi
5329 fi
5330
5331 # See if the linker supports building shared libraries.
5332 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5333 echo "configure:5334: checking whether the linker ($LD) supports shared libraries" >&5
5334
5335 allow_undefined_flag=
5336 no_undefined_flag=
5337 need_lib_prefix=unknown
5338 need_version=unknown
5339 # when you set need_version to no, make sure it does not cause -set_version
5340 # flags to be left without arguments
5341 archive_cmds=
5342 archive_expsym_cmds=
5343 old_archive_from_new_cmds=
5344 old_archive_from_expsyms_cmds=
5345 export_dynamic_flag_spec=
5346 whole_archive_flag_spec=
5347 thread_safe_flag_spec=
5348 hardcode_into_libs=no
5349 hardcode_libdir_flag_spec=
5350 hardcode_libdir_separator=
5351 hardcode_direct=no
5352 hardcode_minus_L=no
5353 hardcode_shlibpath_var=unsupported
5354 runpath_var=
5355 link_all_deplibs=unknown
5356 always_export_symbols=no
5357 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5358 # include_expsyms should be a list of space-separated symbols to be *always*
5359 # included in the symbol list
5360 include_expsyms=
5361 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5362 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5363 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5364 # as well as any symbol that contains `d'.
5365 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5366 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5367 # platforms (ab)use it in PIC code, but their linkers get confused if
5368 # the symbol is explicitly referenced.  Since portable code cannot
5369 # rely on this symbol name, it's probably fine to never include it in
5370 # preloaded symbol tables.
5371 extract_expsyms_cmds=
5372
5373 case $host_os in
5374 cygwin* | mingw* | pw32*)
5375   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5376   # When not using gcc, we currently assume that we are using
5377   # Microsoft Visual C++.
5378   if test "$GCC" != yes; then
5379     with_gnu_ld=no
5380   fi
5381   ;;
5382 openbsd*)
5383   with_gnu_ld=no
5384   ;;
5385 esac
5386
5387 ld_shlibs=yes
5388 if test "$with_gnu_ld" = yes; then
5389   # If archive_cmds runs LD, not CC, wlarc should be empty
5390   wlarc='${wl}'
5391
5392   # See if GNU ld supports shared libraries.
5393   case $host_os in
5394   aix3* | aix4* | aix5*)
5395     # On AIX, the GNU linker is very broken
5396     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5397     ld_shlibs=no
5398     cat <<EOF 1>&2
5399
5400 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5401 *** to be unable to reliably create shared libraries on AIX.
5402 *** Therefore, libtool is disabling shared libraries support.  If you
5403 *** really care for shared libraries, you may want to modify your PATH
5404 *** so that a non-GNU linker is found, and then restart.
5405
5406 EOF
5407     ;;
5408
5409   amigaos*)
5410     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)'
5411     hardcode_libdir_flag_spec='-L$libdir'
5412     hardcode_minus_L=yes
5413
5414     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5415     # that the semantics of dynamic libraries on AmigaOS, at least up
5416     # to version 4, is to share data among multiple programs linked
5417     # with the same dynamic library.  Since this doesn't match the
5418     # behavior of shared libraries on other platforms, we can use
5419     # them.
5420     ld_shlibs=no
5421     ;;
5422
5423   beos*)
5424     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5425       allow_undefined_flag=unsupported
5426       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5427       # support --undefined.  This deserves some investigation.  FIXME
5428       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5429     else
5430       ld_shlibs=no
5431     fi
5432     ;;
5433
5434   cygwin* | mingw* | pw32*)
5435     # hardcode_libdir_flag_spec is actually meaningless, as there is
5436     # no search path for DLLs.
5437     hardcode_libdir_flag_spec='-L$libdir'
5438     allow_undefined_flag=unsupported
5439     always_export_symbols=yes
5440
5441     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5442       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5443       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5444       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5445       else $CC -o impgen impgen.c ; fi)~
5446       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5447
5448     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5449
5450     # cygwin and mingw dlls have different entry points and sets of symbols
5451     # to exclude.
5452     # FIXME: what about values for MSVC?
5453     dll_entry=__cygwin_dll_entry@12
5454     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5455     case $host_os in
5456     mingw*)
5457       # mingw values
5458       dll_entry=_DllMainCRTStartup@12
5459       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5460       ;;
5461     esac
5462
5463     # mingw and cygwin differ, and it's simplest to just exclude the union
5464     # of the two symbol sets.
5465     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5466
5467     # recent cygwin and mingw systems supply a stub DllMain which the user
5468     # can override, but on older systems we have to supply one (in ltdll.c)
5469     if test "x$lt_cv_need_dllmain" = "xyes"; then
5470       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5471       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~
5472         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5473     else
5474       ltdll_obj=
5475       ltdll_cmds=
5476     fi
5477
5478     # Extract the symbol export list from an `--export-all' def file,
5479     # then regenerate the def file from the symbol export list, so that
5480     # the compiled dll only exports the symbol export list.
5481     # Be careful not to strip the DATA tag left be newer dlltools.
5482     export_symbols_cmds="$ltdll_cmds"'
5483       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5484       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5485
5486     # If the export-symbols file already is a .def file (1st line
5487     # is EXPORTS), use it as is.
5488     # If DATA tags from a recent dlltool are present, honour them!
5489     archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
5490         cp $export_symbols $output_objdir/$soname-def;
5491       else
5492         echo EXPORTS > $output_objdir/$soname-def;
5493         _lt_hint=1;
5494         cat $export_symbols | while read symbol; do
5495          set dummy \$symbol;
5496          case \$# in
5497            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5498            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5499          esac;
5500          _lt_hint=`expr 1 + \$_lt_hint`;
5501         done;
5502       fi~
5503       '"$ltdll_cmds"'
5504       $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~
5505       $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~
5506       $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~
5507       $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~
5508       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5509     ;;
5510
5511   netbsd*)
5512     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5513       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5514       wlarc=
5515     else
5516       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5517       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5518     fi
5519     ;;
5520
5521   solaris* | sysv5*)
5522     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5523       ld_shlibs=no
5524       cat <<EOF 1>&2
5525
5526 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5527 *** create shared libraries on Solaris systems.  Therefore, libtool
5528 *** is disabling shared libraries support.  We urge you to upgrade GNU
5529 *** binutils to release 2.9.1 or newer.  Another option is to modify
5530 *** your PATH or compiler configuration so that the native linker is
5531 *** used, and then restart.
5532
5533 EOF
5534     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5535       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5536       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5537     else
5538       ld_shlibs=no
5539     fi
5540     ;;
5541
5542   sunos4*)
5543     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5544     wlarc=
5545     hardcode_direct=yes
5546     hardcode_shlibpath_var=no
5547     ;;
5548
5549   *)
5550     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5551       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5552       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5553     else
5554       ld_shlibs=no
5555     fi
5556     ;;
5557   esac
5558
5559   if test "$ld_shlibs" = yes; then
5560     runpath_var=LD_RUN_PATH
5561     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5562     export_dynamic_flag_spec='${wl}--export-dynamic'
5563     case $host_os in
5564     cygwin* | mingw* | pw32*)
5565       # dlltool doesn't understand --whole-archive et. al.
5566       whole_archive_flag_spec=
5567       ;;
5568     *)
5569       # ancient GNU ld didn't support --whole-archive et. al.
5570       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5571         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5572       else
5573         whole_archive_flag_spec=
5574       fi
5575       ;;
5576     esac
5577   fi
5578 else
5579   # PORTME fill in a description of your system's linker (not GNU ld)
5580   case $host_os in
5581   aix3*)
5582     allow_undefined_flag=unsupported
5583     always_export_symbols=yes
5584     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'
5585     # Note: this linker hardcodes the directories in LIBPATH if there
5586     # are no directories specified by -L.
5587     hardcode_minus_L=yes
5588     if test "$GCC" = yes && test -z "$link_static_flag"; then
5589       # Neither direct hardcoding nor static linking is supported with a
5590       # broken collect2.
5591       hardcode_direct=unsupported
5592     fi
5593     ;;
5594
5595   aix4* | aix5*)
5596     if test "$host_cpu" = ia64; then
5597       # On IA64, the linker does run time linking by default, so we don't
5598       # have to do anything special.
5599       aix_use_runtimelinking=no
5600       exp_sym_flag='-Bexport'
5601       no_entry_flag=""
5602     else
5603       aix_use_runtimelinking=no
5604
5605       # Test if we are trying to use run time linking or normal
5606       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5607       # need to do runtime linking.
5608       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5609         for ld_flag in $LDFLAGS; do
5610           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5611             aix_use_runtimelinking=yes
5612             break
5613           fi
5614         done
5615       esac
5616
5617       exp_sym_flag='-bexport'
5618       no_entry_flag='-bnoentry'
5619     fi
5620
5621     # When large executables or shared objects are built, AIX ld can
5622     # have problems creating the table of contents.  If linking a library
5623     # or program results in "error TOC overflow" add -mminimal-toc to
5624     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5625     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5626
5627     hardcode_direct=yes
5628     archive_cmds=''
5629     hardcode_libdir_separator=':'
5630     if test "$GCC" = yes; then
5631       case $host_os in aix4.[012]|aix4.[012].*)
5632         collect2name=`${CC} -print-prog-name=collect2`
5633         if test -f "$collect2name" && \
5634           strings "$collect2name" | grep resolve_lib_name >/dev/null
5635         then
5636           # We have reworked collect2
5637           hardcode_direct=yes
5638         else
5639           # We have old collect2
5640           hardcode_direct=unsupported
5641           # It fails to find uninstalled libraries when the uninstalled
5642           # path is not listed in the libpath.  Setting hardcode_minus_L
5643           # to unsupported forces relinking
5644           hardcode_minus_L=yes
5645           hardcode_libdir_flag_spec='-L$libdir'
5646           hardcode_libdir_separator=
5647         fi
5648       esac
5649
5650       shared_flag='-shared'
5651     else
5652       # not using gcc
5653       if test "$host_cpu" = ia64; then
5654         shared_flag='${wl}-G'
5655       else
5656         if test "$aix_use_runtimelinking" = yes; then
5657           shared_flag='${wl}-G'
5658         else
5659           shared_flag='${wl}-bM:SRE'
5660         fi
5661       fi
5662     fi
5663
5664     # It seems that -bexpall can do strange things, so it is better to
5665     # generate a list of symbols to export.
5666     always_export_symbols=yes
5667     if test "$aix_use_runtimelinking" = yes; then
5668       # Warning - without using the other runtime loading flags (-brtl),
5669       # -berok will link without error, but may produce a broken library.
5670       allow_undefined_flag='-berok'
5671       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5672       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"
5673     else
5674       if test "$host_cpu" = ia64; then
5675         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5676         allow_undefined_flag="-z nodefs"
5677         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"
5678       else
5679         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5680         # Warning - without using the other run time loading flags,
5681         # -berok will link without error, but may produce a broken library.
5682         allow_undefined_flag='${wl}-berok'
5683         # This is a bit strange, but is similar to how AIX traditionally builds
5684         # it's shared libraries.
5685         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'
5686       fi
5687     fi
5688     ;;
5689
5690   amigaos*)
5691     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)'
5692     hardcode_libdir_flag_spec='-L$libdir'
5693     hardcode_minus_L=yes
5694     # see comment about different semantics on the GNU ld section
5695     ld_shlibs=no
5696     ;;
5697
5698   cygwin* | mingw* | pw32*)
5699     # When not using gcc, we currently assume that we are using
5700     # Microsoft Visual C++.
5701     # hardcode_libdir_flag_spec is actually meaningless, as there is
5702     # no search path for DLLs.
5703     hardcode_libdir_flag_spec=' '
5704     allow_undefined_flag=unsupported
5705     # Tell ltmain to make .lib files, not .a files.
5706     libext=lib
5707     # FIXME: Setting linknames here is a bad hack.
5708     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5709     # The linker will automatically build a .lib file if we build a DLL.
5710     old_archive_from_new_cmds='true'
5711     # FIXME: Should let the user specify the lib program.
5712     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5713     fix_srcfile_path='`cygpath -w "$srcfile"`'
5714     ;;
5715
5716   darwin* | rhapsody*)
5717     case "$host_os" in
5718     rhapsody* | darwin1.[012])
5719       allow_undefined_flag='-undefined suppress'
5720       ;;
5721     *) # Darwin 1.3 on
5722       allow_undefined_flag='-flat_namespace -undefined suppress'
5723       ;;
5724     esac
5725     # FIXME: Relying on posixy $() will cause problems for
5726     #        cross-compilation, but unfortunately the echo tests do not
5727     #        yet detect zsh echo's removal of \ escapes.
5728     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'
5729     # We need to add '_' to the symbols in $export_symbols first
5730     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5731     hardcode_direct=yes
5732     hardcode_shlibpath_var=no
5733     whole_archive_flag_spec='-all_load $convenience'
5734     ;;
5735
5736   freebsd1*)
5737     ld_shlibs=no
5738     ;;
5739
5740   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5741   # support.  Future versions do this automatically, but an explicit c++rt0.o
5742   # does not break anything, and helps significantly (at the cost of a little
5743   # extra space).
5744   freebsd2.2*)
5745     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5746     hardcode_libdir_flag_spec='-R$libdir'
5747     hardcode_direct=yes
5748     hardcode_shlibpath_var=no
5749     ;;
5750
5751   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5752   freebsd2*)
5753     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5754     hardcode_direct=yes
5755     hardcode_minus_L=yes
5756     hardcode_shlibpath_var=no
5757     ;;
5758
5759   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5760   freebsd*)
5761     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5762     hardcode_libdir_flag_spec='-R$libdir'
5763     hardcode_direct=yes
5764     hardcode_shlibpath_var=no
5765     ;;
5766
5767   hpux9* | hpux10* | hpux11*)
5768     case $host_os in
5769     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' ;;
5770     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5771     esac
5772     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5773     hardcode_libdir_separator=:
5774     hardcode_direct=yes
5775     hardcode_minus_L=yes # Not in the search PATH, but as the default
5776                          # location of the library.
5777     export_dynamic_flag_spec='${wl}-E'
5778     ;;
5779
5780   irix5* | irix6*)
5781     if test "$GCC" = yes; then
5782       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'
5783     else
5784       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'
5785     fi
5786     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5787     hardcode_libdir_separator=:
5788     link_all_deplibs=yes
5789     ;;
5790
5791   netbsd*)
5792     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5793       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5794     else
5795       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5796     fi
5797     hardcode_libdir_flag_spec='-R$libdir'
5798     hardcode_direct=yes
5799     hardcode_shlibpath_var=no
5800     ;;
5801
5802   newsos6)
5803     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5804     hardcode_direct=yes
5805     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5806     hardcode_libdir_separator=:
5807     hardcode_shlibpath_var=no
5808     ;;
5809
5810   openbsd*)
5811     hardcode_direct=yes
5812     hardcode_shlibpath_var=no
5813     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5814       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
5815       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5816       export_dynamic_flag_spec='${wl}-E'
5817     else
5818       case "$host_os" in
5819       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5820         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5821         hardcode_libdir_flag_spec='-R$libdir'
5822         ;;
5823       *)
5824         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
5825         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5826         ;;
5827       esac
5828     fi
5829     ;;
5830
5831   os2*)
5832     hardcode_libdir_flag_spec='-L$libdir'
5833     hardcode_minus_L=yes
5834     allow_undefined_flag=unsupported
5835     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'
5836     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5837     ;;
5838
5839   osf3*)
5840     if test "$GCC" = yes; then
5841       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5842       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'
5843     else
5844       allow_undefined_flag=' -expect_unresolved \*'
5845       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'
5846     fi
5847     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5848     hardcode_libdir_separator=:
5849     ;;
5850
5851   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5852     if test "$GCC" = yes; then
5853       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5854       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'
5855       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5856     else
5857       allow_undefined_flag=' -expect_unresolved \*'
5858       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'
5859       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5860       $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'
5861
5862       #Both c and cxx compiler support -rpath directly
5863       hardcode_libdir_flag_spec='-rpath $libdir'
5864     fi
5865     hardcode_libdir_separator=:
5866     ;;
5867
5868   sco3.2v5*)
5869     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5870     hardcode_shlibpath_var=no
5871     runpath_var=LD_RUN_PATH
5872     hardcode_runpath_var=yes
5873     export_dynamic_flag_spec='${wl}-Bexport'
5874     ;;
5875
5876   solaris*)
5877     # gcc --version < 3.0 without binutils cannot create self contained
5878     # shared libraries reliably, requiring libgcc.a to resolve some of
5879     # the object symbols generated in some cases.  Libraries that use
5880     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5881     # a copy of libgcc.a into every shared library to guarantee resolving
5882     # such symbols causes other problems:  According to Tim Van Holder
5883     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5884     # (to the application) exception stack for one thing.
5885     no_undefined_flag=' -z defs'
5886     if test "$GCC" = yes; then
5887       case `$CC --version 2>/dev/null` in
5888       [12].*)
5889         cat <<EOF 1>&2
5890
5891 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5892 *** create self contained shared libraries on Solaris systems, without
5893 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5894 *** -no-undefined support, which will at least allow you to build shared
5895 *** libraries.  However, you may find that when you link such libraries
5896 *** into an application without using GCC, you have to manually add
5897 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5898 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5899 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5900
5901 EOF
5902         no_undefined_flag=
5903         ;;
5904       esac
5905     fi
5906     # $CC -shared without GNU ld will not create a library from C++
5907     # object files and a static libstdc++, better avoid it by now
5908     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5909     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5910                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5911     hardcode_libdir_flag_spec='-R$libdir'
5912     hardcode_shlibpath_var=no
5913     case $host_os in
5914     solaris2.[0-5] | solaris2.[0-5].*) ;;
5915     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5916       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5917     esac
5918     link_all_deplibs=yes
5919     ;;
5920
5921   sunos4*)
5922     if test "x$host_vendor" = xsequent; then
5923       # Use $CC to link under sequent, because it throws in some extra .o
5924       # files that make .init and .fini sections work.
5925       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5926     else
5927       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5928     fi
5929     hardcode_libdir_flag_spec='-L$libdir'
5930     hardcode_direct=yes
5931     hardcode_minus_L=yes
5932     hardcode_shlibpath_var=no
5933     ;;
5934
5935   sysv4)
5936     if test "x$host_vendor" = xsno; then
5937       archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
5938       hardcode_direct=yes # is this really true???
5939     else
5940       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5941       hardcode_direct=no #Motorola manual says yes, but my tests say they lie
5942     fi
5943     runpath_var='LD_RUN_PATH'
5944     hardcode_shlibpath_var=no
5945     ;;
5946
5947   sysv4.3*)
5948     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5949     hardcode_shlibpath_var=no
5950     export_dynamic_flag_spec='-Bexport'
5951     ;;
5952
5953   sysv5*)
5954     no_undefined_flag=' -z text'
5955     # $CC -shared without GNU ld will not create a library from C++
5956     # object files and a static libstdc++, better avoid it by now
5957     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5958     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5959                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5960     hardcode_libdir_flag_spec=
5961     hardcode_shlibpath_var=no
5962     runpath_var='LD_RUN_PATH'
5963     ;;
5964
5965   uts4*)
5966     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5967     hardcode_libdir_flag_spec='-L$libdir'
5968     hardcode_shlibpath_var=no
5969     ;;
5970
5971   dgux*)
5972     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5973     hardcode_libdir_flag_spec='-L$libdir'
5974     hardcode_shlibpath_var=no
5975     ;;
5976
5977   sysv4*MP*)
5978     if test -d /usr/nec; then
5979       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5980       hardcode_shlibpath_var=no
5981       runpath_var=LD_RUN_PATH
5982       hardcode_runpath_var=yes
5983       ld_shlibs=yes
5984     fi
5985     ;;
5986
5987   sysv4.2uw2*)
5988     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5989     hardcode_direct=yes
5990     hardcode_minus_L=no
5991     hardcode_shlibpath_var=no
5992     hardcode_runpath_var=yes
5993     runpath_var=LD_RUN_PATH
5994     ;;
5995
5996   sysv5uw7* | unixware7*)
5997     no_undefined_flag='${wl}-z ${wl}text'
5998     if test "$GCC" = yes; then
5999       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6000     else
6001       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6002     fi
6003     runpath_var='LD_RUN_PATH'
6004     hardcode_shlibpath_var=no
6005     ;;
6006
6007   *)
6008     ld_shlibs=no
6009     ;;
6010   esac
6011 fi
6012 echo "$ac_t""$ld_shlibs" 1>&6
6013 test "$ld_shlibs" = no && can_build_shared=no
6014
6015 # Check hardcoding attributes.
6016 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6017 echo "configure:6018: checking how to hardcode library paths into programs" >&5
6018 hardcode_action=
6019 if test -n "$hardcode_libdir_flag_spec" || \
6020    test -n "$runpath_var"; then
6021
6022   # We can hardcode non-existant directories.
6023   if test "$hardcode_direct" != no &&
6024      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6025      # have to relink, otherwise we might link with an installed library
6026      # when we should be linking with a yet-to-be-installed one
6027      ## test "$hardcode_shlibpath_var" != no &&
6028      test "$hardcode_minus_L" != no; then
6029     # Linking always hardcodes the temporary library directory.
6030     hardcode_action=relink
6031   else
6032     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6033     hardcode_action=immediate
6034   fi
6035 else
6036   # We cannot hardcode anything, or else we can only hardcode existing
6037   # directories.
6038   hardcode_action=unsupported
6039 fi
6040 echo "$ac_t""$hardcode_action" 1>&6
6041
6042 striplib=
6043 old_striplib=
6044 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6045 echo "configure:6046: checking whether stripping libraries is possible" >&5
6046 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6047   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6048   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6049   echo "$ac_t""yes" 1>&6
6050 else
6051   echo "$ac_t""no" 1>&6
6052 fi
6053
6054 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6055 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6056
6057 # PORTME Fill in your ld.so characteristics
6058 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6059 echo "configure:6060: checking dynamic linker characteristics" >&5
6060 library_names_spec=
6061 libname_spec='lib$name'
6062 soname_spec=
6063 postinstall_cmds=
6064 postuninstall_cmds=
6065 finish_cmds=
6066 finish_eval=
6067 shlibpath_var=
6068 shlibpath_overrides_runpath=unknown
6069 version_type=none
6070 dynamic_linker="$host_os ld.so"
6071 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6072 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6073
6074 case $host_os in
6075 aix3*)
6076   version_type=linux
6077   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6078   shlibpath_var=LIBPATH
6079
6080   # AIX has no versioning support, so we append a major version to the name.
6081   soname_spec='${libname}${release}.so$major'
6082   ;;
6083
6084 aix4* | aix5*)
6085   version_type=linux
6086   if test "$host_cpu" = ia64; then
6087     # AIX 5 supports IA64
6088     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6089     shlibpath_var=LD_LIBRARY_PATH
6090   else
6091     # With GCC up to 2.95.x, collect2 would create an import file
6092     # for dependence libraries.  The import file would start with
6093     # the line `#! .'.  This would cause the generated library to
6094     # depend on `.', always an invalid library.  This was fixed in
6095     # development snapshots of GCC prior to 3.0.
6096     case $host_os in
6097       aix4 | aix4.[01] | aix4.[01].*)
6098         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6099              echo ' yes '
6100              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6101           :
6102         else
6103           can_build_shared=no
6104         fi
6105         ;;
6106     esac
6107     # AIX (on Power*) has no versioning support, so currently we can
6108     # not hardcode correct soname into executable. Probably we can
6109     # add versioning support to collect2, so additional links can
6110     # be useful in future.
6111     if test "$aix_use_runtimelinking" = yes; then
6112       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6113       # instead of lib<name>.a to let people know that these are not
6114       # typical AIX shared libraries.
6115       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6116     else
6117       # We preserve .a as extension for shared libraries through AIX4.2
6118       # and later when we are not doing run time linking.
6119       library_names_spec='${libname}${release}.a $libname.a'
6120       soname_spec='${libname}${release}.so$major'
6121     fi
6122     shlibpath_var=LIBPATH
6123   fi
6124   ;;
6125
6126 amigaos*)
6127   library_names_spec='$libname.ixlibrary $libname.a'
6128   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6129   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'
6130   ;;
6131
6132 beos*)
6133   library_names_spec='${libname}.so'
6134   dynamic_linker="$host_os ld.so"
6135   shlibpath_var=LIBRARY_PATH
6136   ;;
6137
6138 bsdi4*)
6139   version_type=linux
6140   need_version=no
6141   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6142   soname_spec='${libname}${release}.so$major'
6143   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6144   shlibpath_var=LD_LIBRARY_PATH
6145   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6146   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6147   export_dynamic_flag_spec=-rdynamic
6148   # the default ld.so.conf also contains /usr/contrib/lib and
6149   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6150   # libtool to hard-code these into programs
6151   ;;
6152
6153 cygwin* | mingw* | pw32*)
6154   version_type=windows
6155   need_version=no
6156   need_lib_prefix=no
6157   case $GCC,$host_os in
6158   yes,cygwin*)
6159     library_names_spec='$libname.dll.a'
6160     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6161     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6162       dldir=$destdir/`dirname \$dlpath`~
6163       test -d \$dldir || mkdir -p \$dldir~
6164       $install_prog .libs/$dlname \$dldir/$dlname'
6165     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6166       dlpath=$dir/\$dldll~
6167        $rm \$dlpath'
6168     ;;
6169   yes,mingw*)
6170     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6171     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
6172     ;;
6173   yes,pw32*)
6174     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6175     ;;
6176   *)
6177     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6178     ;;
6179   esac
6180   dynamic_linker='Win32 ld.exe'
6181   # FIXME: first we should search . and the directory the executable is in
6182   shlibpath_var=PATH
6183   ;;
6184
6185 darwin* | rhapsody*)
6186   dynamic_linker="$host_os dyld"
6187   version_type=darwin
6188   need_lib_prefix=no
6189   need_version=no
6190   # FIXME: Relying on posixy $() will cause problems for
6191   #        cross-compilation, but unfortunately the echo tests do not
6192   #        yet detect zsh echo's removal of \ escapes.
6193   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)'
6194   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6195   shlibpath_overrides_runpath=yes
6196   shlibpath_var=DYLD_LIBRARY_PATH
6197   ;;
6198
6199 freebsd1*)
6200   dynamic_linker=no
6201   ;;
6202
6203 freebsd*)
6204   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6205   version_type=freebsd-$objformat
6206   case $version_type in
6207     freebsd-elf*)
6208       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6209       need_version=no
6210       need_lib_prefix=no
6211       ;;
6212     freebsd-*)
6213       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6214       need_version=yes
6215       ;;
6216   esac
6217   shlibpath_var=LD_LIBRARY_PATH
6218   case $host_os in
6219   freebsd2*)
6220     shlibpath_overrides_runpath=yes
6221     ;;
6222   *)
6223     shlibpath_overrides_runpath=no
6224     hardcode_into_libs=yes
6225     ;;
6226   esac
6227   ;;
6228
6229 gnu*)
6230   version_type=linux
6231   need_lib_prefix=no
6232   need_version=no
6233   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6234   soname_spec='${libname}${release}.so$major'
6235   shlibpath_var=LD_LIBRARY_PATH
6236   hardcode_into_libs=yes
6237   ;;
6238
6239 hpux9* | hpux10* | hpux11*)
6240   # Give a soname corresponding to the major version so that dld.sl refuses to
6241   # link against other versions.
6242   dynamic_linker="$host_os dld.sl"
6243   version_type=sunos
6244   need_lib_prefix=no
6245   need_version=no
6246   shlibpath_var=SHLIB_PATH
6247   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6248   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6249   soname_spec='${libname}${release}.sl$major'
6250   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6251   postinstall_cmds='chmod 555 $lib'
6252   ;;
6253
6254 irix5* | irix6*)
6255   version_type=irix
6256   need_lib_prefix=no
6257   need_version=no
6258   soname_spec='${libname}${release}.so$major'
6259   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6260   case $host_os in
6261   irix5*)
6262     libsuff= shlibsuff=
6263     ;;
6264   *)
6265     case $LD in # libtool.m4 will add one of these switches to LD
6266     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6267     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6268     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6269     *) libsuff= shlibsuff= libmagic=never-match;;
6270     esac
6271     ;;
6272   esac
6273   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6274   shlibpath_overrides_runpath=no
6275   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6276   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6277   ;;
6278
6279 # No shared lib support for Linux oldld, aout, or coff.
6280 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6281   dynamic_linker=no
6282   ;;
6283
6284 # This must be Linux ELF.
6285 linux-gnu*)
6286   version_type=linux
6287   need_lib_prefix=no
6288   need_version=no
6289   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6290   soname_spec='${libname}${release}.so$major'
6291   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6292   shlibpath_var=LD_LIBRARY_PATH
6293   shlibpath_overrides_runpath=no
6294   # This implies no fast_install, which is unacceptable.
6295   # Some rework will be needed to allow for fast_install
6296   # before this can be enabled.
6297   hardcode_into_libs=yes
6298
6299   # We used to test for /lib/ld.so.1 and disable shared libraries on
6300   # powerpc, because MkLinux only supported shared libraries with the
6301   # GNU dynamic linker.  Since this was broken with cross compilers,
6302   # most powerpc-linux boxes support dynamic linking these days and
6303   # people can always --disable-shared, the test was removed, and we
6304   # assume the GNU/Linux dynamic linker is in use.
6305   dynamic_linker='GNU/Linux ld.so'
6306   ;;
6307
6308 netbsd*)
6309   version_type=sunos
6310   need_lib_prefix=no
6311   need_version=no
6312   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6313     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6314     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6315     dynamic_linker='NetBSD (a.out) ld.so'
6316   else
6317     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6318     soname_spec='${libname}${release}.so$major'
6319     dynamic_linker='NetBSD ld.elf_so'
6320   fi
6321   shlibpath_var=LD_LIBRARY_PATH
6322   shlibpath_overrides_runpath=yes
6323   hardcode_into_libs=yes
6324   ;;
6325
6326 newsos6)
6327   version_type=linux
6328   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6329   shlibpath_var=LD_LIBRARY_PATH
6330   shlibpath_overrides_runpath=yes
6331   ;;
6332
6333 openbsd*)
6334   version_type=sunos
6335   need_lib_prefix=no
6336   need_version=no
6337   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6338     case "$host_os" in
6339     openbsd2.[89] | openbsd2.[89].*)
6340       shlibpath_overrides_runpath=no
6341       ;;
6342     *)
6343       shlibpath_overrides_runpath=yes
6344       ;;
6345     esac
6346   else
6347     shlibpath_overrides_runpath=yes
6348   fi
6349   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6350   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6351   shlibpath_var=LD_LIBRARY_PATH
6352   ;;
6353
6354 os2*)
6355   libname_spec='$name'
6356   need_lib_prefix=no
6357   library_names_spec='$libname.dll $libname.a'
6358   dynamic_linker='OS/2 ld.exe'
6359   shlibpath_var=LIBPATH
6360   ;;
6361
6362 osf3* | osf4* | osf5*)
6363   version_type=osf
6364   need_version=no
6365   soname_spec='${libname}${release}.so'
6366   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6367   shlibpath_var=LD_LIBRARY_PATH
6368   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6369   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6370   ;;
6371
6372 sco3.2v5*)
6373   version_type=osf
6374   soname_spec='${libname}${release}.so$major'
6375   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6376   shlibpath_var=LD_LIBRARY_PATH
6377   ;;
6378
6379 solaris*)
6380   version_type=linux
6381   need_lib_prefix=no
6382   need_version=no
6383   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6384   soname_spec='${libname}${release}.so$major'
6385   shlibpath_var=LD_LIBRARY_PATH
6386   shlibpath_overrides_runpath=yes
6387   hardcode_into_libs=yes
6388   # ldd complains unless libraries are executable
6389   postinstall_cmds='chmod +x $lib'
6390   ;;
6391
6392 sunos4*)
6393   version_type=sunos
6394   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6395   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6396   shlibpath_var=LD_LIBRARY_PATH
6397   shlibpath_overrides_runpath=yes
6398   if test "$with_gnu_ld" = yes; then
6399     need_lib_prefix=no
6400   fi
6401   need_version=yes
6402   ;;
6403
6404 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6405   version_type=linux
6406   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6407   soname_spec='${libname}${release}.so$major'
6408   shlibpath_var=LD_LIBRARY_PATH
6409   case $host_vendor in
6410     sni)
6411       shlibpath_overrides_runpath=no
6412       ;;
6413     motorola)
6414       need_lib_prefix=no
6415       need_version=no
6416       shlibpath_overrides_runpath=no
6417       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6418       ;;
6419   esac
6420   ;;
6421
6422 uts4*)
6423   version_type=linux
6424   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6425   soname_spec='${libname}${release}.so$major'
6426   shlibpath_var=LD_LIBRARY_PATH
6427   ;;
6428
6429 dgux*)
6430   version_type=linux
6431   need_lib_prefix=no
6432   need_version=no
6433   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6434   soname_spec='${libname}${release}.so$major'
6435   shlibpath_var=LD_LIBRARY_PATH
6436   ;;
6437
6438 sysv4*MP*)
6439   if test -d /usr/nec ;then
6440     version_type=linux
6441     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6442     soname_spec='$libname.so.$major'
6443     shlibpath_var=LD_LIBRARY_PATH
6444   fi
6445   ;;
6446
6447 *)
6448   dynamic_linker=no
6449   ;;
6450 esac
6451 echo "$ac_t""$dynamic_linker" 1>&6
6452 test "$dynamic_linker" = no && can_build_shared=no
6453
6454 # Report the final consequences.
6455 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6456 echo "configure:6457: checking if libtool supports shared libraries" >&5
6457 echo "$ac_t""$can_build_shared" 1>&6
6458
6459 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6460 echo "configure:6461: checking whether to build shared libraries" >&5
6461 test "$can_build_shared" = "no" && enable_shared=no
6462
6463 # On AIX, shared libraries and static libraries use the same namespace, and
6464 # are all built from PIC.
6465 case "$host_os" in
6466 aix3*)
6467   test "$enable_shared" = yes && enable_static=no
6468   if test -n "$RANLIB"; then
6469     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6470     postinstall_cmds='$RANLIB $lib'
6471   fi
6472   ;;
6473
6474 aix4*)
6475   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6476     test "$enable_shared" = yes && enable_static=no
6477   fi
6478   ;;
6479 esac
6480 echo "$ac_t""$enable_shared" 1>&6
6481
6482 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6483 echo "configure:6484: checking whether to build static libraries" >&5
6484 # Make sure either enable_shared or enable_static is yes.
6485 test "$enable_shared" = yes || enable_static=yes
6486 echo "$ac_t""$enable_static" 1>&6
6487
6488 if test "$hardcode_action" = relink; then
6489   # Fast installation is not supported
6490   enable_fast_install=no
6491 elif test "$shlibpath_overrides_runpath" = yes ||
6492      test "$enable_shared" = no; then
6493   # Fast installation is not necessary
6494   enable_fast_install=needless
6495 fi
6496
6497 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6498 if test "$GCC" = yes; then
6499   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6500 fi
6501
6502 if test "x$enable_dlopen" != xyes; then
6503   enable_dlopen=unknown
6504   enable_dlopen_self=unknown
6505   enable_dlopen_self_static=unknown
6506 else
6507   lt_cv_dlopen=no
6508   lt_cv_dlopen_libs=
6509
6510   case $host_os in
6511   beos*)
6512     lt_cv_dlopen="load_add_on"
6513     lt_cv_dlopen_libs=
6514     lt_cv_dlopen_self=yes
6515     ;;
6516
6517   cygwin* | mingw* | pw32*)
6518     lt_cv_dlopen="LoadLibrary"
6519     lt_cv_dlopen_libs=
6520    ;;
6521
6522   *)
6523     echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6524 echo "configure:6525: checking for shl_load" >&5
6525 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6526   echo $ac_n "(cached) $ac_c" 1>&6
6527 else
6528   cat > conftest.$ac_ext <<EOF
6529 #line 6530 "configure"
6530 #include "confdefs.h"
6531 /* System header to define __stub macros and hopefully few prototypes,
6532     which can conflict with char shl_load(); below.  */
6533 #include <assert.h>
6534 /* Override any gcc2 internal prototype to avoid an error.  */
6535 /* We use char because int might match the return type of a gcc2
6536     builtin and then its argument prototype would still apply.  */
6537 char shl_load();
6538 char (*f)();
6539
6540 int main() {
6541
6542 /* The GNU C library defines this for functions which it implements
6543     to always fail with ENOSYS.  Some functions are actually named
6544     something starting with __ and the normal name is an alias.  */
6545 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6546 choke me
6547 #else
6548 f = shl_load;
6549 #endif
6550
6551 ; return 0; }
6552 EOF
6553 if { (eval echo configure:6554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6554   rm -rf conftest*
6555   eval "ac_cv_func_shl_load=yes"
6556 else
6557   echo "configure: failed program was:" >&5
6558   cat conftest.$ac_ext >&5
6559   rm -rf conftest*
6560   eval "ac_cv_func_shl_load=no"
6561 fi
6562 rm -f conftest*
6563 fi
6564
6565 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6566   echo "$ac_t""yes" 1>&6
6567   lt_cv_dlopen="shl_load"
6568 else
6569   echo "$ac_t""no" 1>&6
6570 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6571 echo "configure:6572: checking for shl_load in -ldld" >&5
6572 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6573 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6574   echo $ac_n "(cached) $ac_c" 1>&6
6575 else
6576   ac_save_LIBS="$LIBS"
6577 LIBS="-ldld  $LIBS"
6578 cat > conftest.$ac_ext <<EOF
6579 #line 6580 "configure"
6580 #include "confdefs.h"
6581 /* Override any gcc2 internal prototype to avoid an error.  */
6582 /* We use char because int might match the return type of a gcc2
6583     builtin and then its argument prototype would still apply.  */
6584 char shl_load();
6585
6586 int main() {
6587 shl_load()
6588 ; return 0; }
6589 EOF
6590 if { (eval echo configure:6591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6591   rm -rf conftest*
6592   eval "ac_cv_lib_$ac_lib_var=yes"
6593 else
6594   echo "configure: failed program was:" >&5
6595   cat conftest.$ac_ext >&5
6596   rm -rf conftest*
6597   eval "ac_cv_lib_$ac_lib_var=no"
6598 fi
6599 rm -f conftest*
6600 LIBS="$ac_save_LIBS"
6601
6602 fi
6603 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6604   echo "$ac_t""yes" 1>&6
6605   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6606 else
6607   echo "$ac_t""no" 1>&6
6608 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6609 echo "configure:6610: checking for dlopen" >&5
6610 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6611   echo $ac_n "(cached) $ac_c" 1>&6
6612 else
6613   cat > conftest.$ac_ext <<EOF
6614 #line 6615 "configure"
6615 #include "confdefs.h"
6616 /* System header to define __stub macros and hopefully few prototypes,
6617     which can conflict with char dlopen(); below.  */
6618 #include <assert.h>
6619 /* Override any gcc2 internal prototype to avoid an error.  */
6620 /* We use char because int might match the return type of a gcc2
6621     builtin and then its argument prototype would still apply.  */
6622 char dlopen();
6623 char (*f)();
6624
6625 int main() {
6626
6627 /* The GNU C library defines this for functions which it implements
6628     to always fail with ENOSYS.  Some functions are actually named
6629     something starting with __ and the normal name is an alias.  */
6630 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6631 choke me
6632 #else
6633 f = dlopen;
6634 #endif
6635
6636 ; return 0; }
6637 EOF
6638 if { (eval echo configure:6639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6639   rm -rf conftest*
6640   eval "ac_cv_func_dlopen=yes"
6641 else
6642   echo "configure: failed program was:" >&5
6643   cat conftest.$ac_ext >&5
6644   rm -rf conftest*
6645   eval "ac_cv_func_dlopen=no"
6646 fi
6647 rm -f conftest*
6648 fi
6649
6650 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6651   echo "$ac_t""yes" 1>&6
6652   lt_cv_dlopen="dlopen"
6653 else
6654   echo "$ac_t""no" 1>&6
6655 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6656 echo "configure:6657: checking for dlopen in -ldl" >&5
6657 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6658 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6659   echo $ac_n "(cached) $ac_c" 1>&6
6660 else
6661   ac_save_LIBS="$LIBS"
6662 LIBS="-ldl  $LIBS"
6663 cat > conftest.$ac_ext <<EOF
6664 #line 6665 "configure"
6665 #include "confdefs.h"
6666 /* Override any gcc2 internal prototype to avoid an error.  */
6667 /* We use char because int might match the return type of a gcc2
6668     builtin and then its argument prototype would still apply.  */
6669 char dlopen();
6670
6671 int main() {
6672 dlopen()
6673 ; return 0; }
6674 EOF
6675 if { (eval echo configure:6676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6676   rm -rf conftest*
6677   eval "ac_cv_lib_$ac_lib_var=yes"
6678 else
6679   echo "configure: failed program was:" >&5
6680   cat conftest.$ac_ext >&5
6681   rm -rf conftest*
6682   eval "ac_cv_lib_$ac_lib_var=no"
6683 fi
6684 rm -f conftest*
6685 LIBS="$ac_save_LIBS"
6686
6687 fi
6688 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6689   echo "$ac_t""yes" 1>&6
6690   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6691 else
6692   echo "$ac_t""no" 1>&6
6693 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6694 echo "configure:6695: checking for dlopen in -lsvld" >&5
6695 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6696 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6697   echo $ac_n "(cached) $ac_c" 1>&6
6698 else
6699   ac_save_LIBS="$LIBS"
6700 LIBS="-lsvld  $LIBS"
6701 cat > conftest.$ac_ext <<EOF
6702 #line 6703 "configure"
6703 #include "confdefs.h"
6704 /* Override any gcc2 internal prototype to avoid an error.  */
6705 /* We use char because int might match the return type of a gcc2
6706     builtin and then its argument prototype would still apply.  */
6707 char dlopen();
6708
6709 int main() {
6710 dlopen()
6711 ; return 0; }
6712 EOF
6713 if { (eval echo configure:6714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6714   rm -rf conftest*
6715   eval "ac_cv_lib_$ac_lib_var=yes"
6716 else
6717   echo "configure: failed program was:" >&5
6718   cat conftest.$ac_ext >&5
6719   rm -rf conftest*
6720   eval "ac_cv_lib_$ac_lib_var=no"
6721 fi
6722 rm -f conftest*
6723 LIBS="$ac_save_LIBS"
6724
6725 fi
6726 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6727   echo "$ac_t""yes" 1>&6
6728   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6729 else
6730   echo "$ac_t""no" 1>&6
6731 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6732 echo "configure:6733: checking for dld_link in -ldld" >&5
6733 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6734 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6735   echo $ac_n "(cached) $ac_c" 1>&6
6736 else
6737   ac_save_LIBS="$LIBS"
6738 LIBS="-ldld  $LIBS"
6739 cat > conftest.$ac_ext <<EOF
6740 #line 6741 "configure"
6741 #include "confdefs.h"
6742 /* Override any gcc2 internal prototype to avoid an error.  */
6743 /* We use char because int might match the return type of a gcc2
6744     builtin and then its argument prototype would still apply.  */
6745 char dld_link();
6746
6747 int main() {
6748 dld_link()
6749 ; return 0; }
6750 EOF
6751 if { (eval echo configure:6752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6752   rm -rf conftest*
6753   eval "ac_cv_lib_$ac_lib_var=yes"
6754 else
6755   echo "configure: failed program was:" >&5
6756   cat conftest.$ac_ext >&5
6757   rm -rf conftest*
6758   eval "ac_cv_lib_$ac_lib_var=no"
6759 fi
6760 rm -f conftest*
6761 LIBS="$ac_save_LIBS"
6762
6763 fi
6764 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6765   echo "$ac_t""yes" 1>&6
6766   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6767 else
6768   echo "$ac_t""no" 1>&6
6769 fi
6770
6771               
6772 fi
6773
6774             
6775 fi
6776
6777           
6778 fi
6779
6780         
6781 fi
6782
6783       
6784 fi
6785
6786     ;;
6787   esac
6788
6789   if test "x$lt_cv_dlopen" != xno; then
6790     enable_dlopen=yes
6791   else
6792     enable_dlopen=no
6793   fi
6794
6795   case $lt_cv_dlopen in
6796   dlopen)
6797     save_CPPFLAGS="$CPPFLAGS"
6798         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6799
6800     save_LDFLAGS="$LDFLAGS"
6801     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6802
6803     save_LIBS="$LIBS"
6804     LIBS="$lt_cv_dlopen_libs $LIBS"
6805
6806     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6807 echo "configure:6808: checking whether a program can dlopen itself" >&5
6808 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6809   echo $ac_n "(cached) $ac_c" 1>&6
6810 else
6811           if test "$cross_compiling" = yes; then :
6812   lt_cv_dlopen_self=cross
6813 else
6814     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6815   lt_status=$lt_dlunknown
6816   cat > conftest.$ac_ext <<EOF
6817 #line 6818 "configure"
6818 #include "confdefs.h"
6819
6820 #if HAVE_DLFCN_H
6821 #include <dlfcn.h>
6822 #endif
6823
6824 #include <stdio.h>
6825
6826 #ifdef RTLD_GLOBAL
6827 #  define LT_DLGLOBAL           RTLD_GLOBAL
6828 #else
6829 #  ifdef DL_GLOBAL
6830 #    define LT_DLGLOBAL         DL_GLOBAL
6831 #  else
6832 #    define LT_DLGLOBAL         0
6833 #  endif
6834 #endif
6835
6836 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6837    find out it does not work in some platform. */
6838 #ifndef LT_DLLAZY_OR_NOW
6839 #  ifdef RTLD_LAZY
6840 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6841 #  else
6842 #    ifdef DL_LAZY
6843 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6844 #    else
6845 #      ifdef RTLD_NOW
6846 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6847 #      else
6848 #        ifdef DL_NOW
6849 #          define LT_DLLAZY_OR_NOW      DL_NOW
6850 #        else
6851 #          define LT_DLLAZY_OR_NOW      0
6852 #        endif
6853 #      endif
6854 #    endif
6855 #  endif
6856 #endif
6857
6858 #ifdef __cplusplus
6859 extern "C" void exit (int);
6860 #endif
6861
6862 void fnord() { int i=42;}
6863 int main ()
6864 {
6865   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6866   int status = $lt_dlunknown;
6867
6868   if (self)
6869     {
6870       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6871       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6872       /* dlclose (self); */
6873     }
6874
6875     exit (status);
6876 }
6877 EOF
6878   if { (eval echo configure:6879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6879     (./conftest; exit; ) 2>/dev/null
6880     lt_status=$?
6881     case x$lt_status in
6882       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6883       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
6884       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
6885     esac
6886   else :
6887     # compilation failed
6888     lt_cv_dlopen_self=no
6889   fi
6890 fi
6891 rm -fr conftest*
6892
6893     
6894 fi
6895
6896 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
6897
6898     if test "x$lt_cv_dlopen_self" = xyes; then
6899       LDFLAGS="$LDFLAGS $link_static_flag"
6900       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
6901 echo "configure:6902: checking whether a statically linked program can dlopen itself" >&5
6902 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
6903   echo $ac_n "(cached) $ac_c" 1>&6
6904 else
6905           if test "$cross_compiling" = yes; then :
6906   lt_cv_dlopen_self_static=cross
6907 else
6908     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6909   lt_status=$lt_dlunknown
6910   cat > conftest.$ac_ext <<EOF
6911 #line 6912 "configure"
6912 #include "confdefs.h"
6913
6914 #if HAVE_DLFCN_H
6915 #include <dlfcn.h>
6916 #endif
6917
6918 #include <stdio.h>
6919
6920 #ifdef RTLD_GLOBAL
6921 #  define LT_DLGLOBAL           RTLD_GLOBAL
6922 #else
6923 #  ifdef DL_GLOBAL
6924 #    define LT_DLGLOBAL         DL_GLOBAL
6925 #  else
6926 #    define LT_DLGLOBAL         0
6927 #  endif
6928 #endif
6929
6930 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6931    find out it does not work in some platform. */
6932 #ifndef LT_DLLAZY_OR_NOW
6933 #  ifdef RTLD_LAZY
6934 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6935 #  else
6936 #    ifdef DL_LAZY
6937 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6938 #    else
6939 #      ifdef RTLD_NOW
6940 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6941 #      else
6942 #        ifdef DL_NOW
6943 #          define LT_DLLAZY_OR_NOW      DL_NOW
6944 #        else
6945 #          define LT_DLLAZY_OR_NOW      0
6946 #        endif
6947 #      endif
6948 #    endif
6949 #  endif
6950 #endif
6951
6952 #ifdef __cplusplus
6953 extern "C" void exit (int);
6954 #endif
6955
6956 void fnord() { int i=42;}
6957 int main ()
6958 {
6959   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6960   int status = $lt_dlunknown;
6961
6962   if (self)
6963     {
6964       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6965       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6966       /* dlclose (self); */
6967     }
6968
6969     exit (status);
6970 }
6971 EOF
6972   if { (eval echo configure:6973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6973     (./conftest; exit; ) 2>/dev/null
6974     lt_status=$?
6975     case x$lt_status in
6976       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
6977       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
6978       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
6979     esac
6980   else :
6981     # compilation failed
6982     lt_cv_dlopen_self_static=no
6983   fi
6984 fi
6985 rm -fr conftest*
6986
6987       
6988 fi
6989
6990 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
6991     fi
6992
6993     CPPFLAGS="$save_CPPFLAGS"
6994     LDFLAGS="$save_LDFLAGS"
6995     LIBS="$save_LIBS"
6996     ;;
6997   esac
6998
6999   case $lt_cv_dlopen_self in
7000   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7001   *) enable_dlopen_self=unknown ;;
7002   esac
7003
7004   case $lt_cv_dlopen_self_static in
7005   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7006   *) enable_dlopen_self_static=unknown ;;
7007   esac
7008 fi
7009
7010
7011 if test "$enable_shared" = yes && test "$GCC" = yes; then
7012   case $archive_cmds in
7013   *'~'*)
7014     # FIXME: we may have to deal with multi-command sequences.
7015     ;;
7016   '$CC '*)
7017     # Test whether the compiler implicitly links with -lc since on some
7018     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7019     # to ld, don't add -lc before -lgcc.
7020     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7021 echo "configure:7022: checking whether -lc should be explicitly linked in" >&5
7022     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7023   echo $ac_n "(cached) $ac_c" 1>&6
7024 else
7025   $rm conftest*
7026     echo 'static int dummy;' > conftest.$ac_ext
7027
7028     if { (eval echo configure:7029: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7029       soname=conftest
7030       lib=conftest
7031       libobjs=conftest.$ac_objext
7032       deplibs=
7033       wl=$lt_cv_prog_cc_wl
7034       compiler_flags=-v
7035       linker_flags=-v
7036       verstring=
7037       output_objdir=.
7038       libname=conftest
7039       save_allow_undefined_flag=$allow_undefined_flag
7040       allow_undefined_flag=
7041       if { (eval echo configure:7042: \"$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; }
7042       then
7043         lt_cv_archive_cmds_need_lc=no
7044       else
7045         lt_cv_archive_cmds_need_lc=yes
7046       fi
7047       allow_undefined_flag=$save_allow_undefined_flag
7048     else
7049       cat conftest.err 1>&5
7050     fi
7051 fi
7052
7053     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7054     ;;
7055   esac
7056 fi
7057 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7058
7059 # The second clause should only fire when bootstrapping the
7060 # libtool distribution, otherwise you forgot to ship ltmain.sh
7061 # with your package, and you will get complaints that there are
7062 # no rules to generate ltmain.sh.
7063 if test -f "$ltmain"; then
7064   :
7065 else
7066   # If there is no Makefile yet, we rely on a make rule to execute
7067   # `config.status --recheck' to rerun these tests and create the
7068   # libtool script then.
7069   test -f Makefile && make "$ltmain"
7070 fi
7071
7072 if test -f "$ltmain"; then
7073   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7074   $rm -f "${ofile}T"
7075
7076   echo creating $ofile
7077
7078   # Now quote all the things that may contain metacharacters while being
7079   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7080   # variables and quote the copies for generation of the libtool script.
7081   for var in echo old_CC old_CFLAGS \
7082     AR AR_FLAGS CC LD LN_S NM SHELL \
7083     reload_flag reload_cmds wl \
7084     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7085     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7086     library_names_spec soname_spec \
7087     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7088     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7089     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7090     old_striplib striplib file_magic_cmd export_symbols_cmds \
7091     deplibs_check_method allow_undefined_flag no_undefined_flag \
7092     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7093     global_symbol_to_c_name_address \
7094     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7095     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7096     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7097
7098     case $var in
7099     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7100     old_postinstall_cmds | old_postuninstall_cmds | \
7101     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7102     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7103     postinstall_cmds | postuninstall_cmds | \
7104     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7105       # Double-quote double-evaled strings.
7106       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7107       ;;
7108     *)
7109       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7110       ;;
7111     esac
7112   done
7113
7114   cat <<__EOF__ > "${ofile}T"
7115 #! $SHELL
7116
7117 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7118 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7119 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7120 #
7121 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7122 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7123 #
7124 # This program is free software; you can redistribute it and/or modify
7125 # it under the terms of the GNU General Public License as published by
7126 # the Free Software Foundation; either version 2 of the License, or
7127 # (at your option) any later version.
7128 #
7129 # This program is distributed in the hope that it will be useful, but
7130 # WITHOUT ANY WARRANTY; without even the implied warranty of
7131 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7132 # General Public License for more details.
7133 #
7134 # You should have received a copy of the GNU General Public License
7135 # along with this program; if not, write to the Free Software
7136 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7137 #
7138 # As a special exception to the GNU General Public License, if you
7139 # distribute this file as part of a program that contains a
7140 # configuration script generated by Autoconf, you may include it under
7141 # the same distribution terms that you use for the rest of that program.
7142
7143 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7144 Xsed="sed -e s/^X//"
7145
7146 # The HP-UX ksh and POSIX shell print the target directory to stdout
7147 # if CDPATH is set.
7148 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7149
7150 # ### BEGIN LIBTOOL CONFIG
7151
7152 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7153
7154 # Shell to use when invoking shell scripts.
7155 SHELL=$lt_SHELL
7156
7157 # Whether or not to build shared libraries.
7158 build_libtool_libs=$enable_shared
7159
7160 # Whether or not to build static libraries.
7161 build_old_libs=$enable_static
7162
7163 # Whether or not to add -lc for building shared libraries.
7164 build_libtool_need_lc=$need_lc
7165
7166 # Whether or not to optimize for fast installation.
7167 fast_install=$enable_fast_install
7168
7169 # The host system.
7170 host_alias=$host_alias
7171 host=$host
7172
7173 # An echo program that does not interpret backslashes.
7174 echo=$lt_echo
7175
7176 # The archiver.
7177 AR=$lt_AR
7178 AR_FLAGS=$lt_AR_FLAGS
7179
7180 # The default C compiler.
7181 CC=$lt_CC
7182
7183 # Is the compiler the GNU C compiler?
7184 with_gcc=$GCC
7185
7186 # The linker used to build libraries.
7187 LD=$lt_LD
7188
7189 # Whether we need hard or soft links.
7190 LN_S=$lt_LN_S
7191
7192 # A BSD-compatible nm program.
7193 NM=$lt_NM
7194
7195 # A symbol stripping program
7196 STRIP=$STRIP
7197
7198 # Used to examine libraries when file_magic_cmd begins "file"
7199 MAGIC_CMD=$MAGIC_CMD
7200
7201 # Used on cygwin: DLL creation program.
7202 DLLTOOL="$DLLTOOL"
7203
7204 # Used on cygwin: object dumper.
7205 OBJDUMP="$OBJDUMP"
7206
7207 # Used on cygwin: assembler.
7208 AS="$AS"
7209
7210 # The name of the directory that contains temporary libtool files.
7211 objdir=$objdir
7212
7213 # How to create reloadable object files.
7214 reload_flag=$lt_reload_flag
7215 reload_cmds=$lt_reload_cmds
7216
7217 # How to pass a linker flag through the compiler.
7218 wl=$lt_wl
7219
7220 # Object file suffix (normally "o").
7221 objext="$ac_objext"
7222
7223 # Old archive suffix (normally "a").
7224 libext="$libext"
7225
7226 # Executable file suffix (normally "").
7227 exeext="$exeext"
7228
7229 # Additional compiler flags for building library objects.
7230 pic_flag=$lt_pic_flag
7231 pic_mode=$pic_mode
7232
7233 # Does compiler simultaneously support -c and -o options?
7234 compiler_c_o=$lt_compiler_c_o
7235
7236 # Can we write directly to a .lo ?
7237 compiler_o_lo=$lt_compiler_o_lo
7238
7239 # Must we lock files when doing compilation ?
7240 need_locks=$lt_need_locks
7241
7242 # Do we need the lib prefix for modules?
7243 need_lib_prefix=$need_lib_prefix
7244
7245 # Do we need a version for libraries?
7246 need_version=$need_version
7247
7248 # Whether dlopen is supported.
7249 dlopen_support=$enable_dlopen
7250
7251 # Whether dlopen of programs is supported.
7252 dlopen_self=$enable_dlopen_self
7253
7254 # Whether dlopen of statically linked programs is supported.
7255 dlopen_self_static=$enable_dlopen_self_static
7256
7257 # Compiler flag to prevent dynamic linking.
7258 link_static_flag=$lt_link_static_flag
7259
7260 # Compiler flag to turn off builtin functions.
7261 no_builtin_flag=$lt_no_builtin_flag
7262
7263 # Compiler flag to allow reflexive dlopens.
7264 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7265
7266 # Compiler flag to generate shared objects directly from archives.
7267 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7268
7269 # Compiler flag to generate thread-safe objects.
7270 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7271
7272 # Library versioning type.
7273 version_type=$version_type
7274
7275 # Format of library name prefix.
7276 libname_spec=$lt_libname_spec
7277
7278 # List of archive names.  First name is the real one, the rest are links.
7279 # The last name is the one that the linker finds with -lNAME.
7280 library_names_spec=$lt_library_names_spec
7281
7282 # The coded name of the library, if different from the real name.
7283 soname_spec=$lt_soname_spec
7284
7285 # Commands used to build and install an old-style archive.
7286 RANLIB=$lt_RANLIB
7287 old_archive_cmds=$lt_old_archive_cmds
7288 old_postinstall_cmds=$lt_old_postinstall_cmds
7289 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7290
7291 # Create an old-style archive from a shared archive.
7292 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7293
7294 # Create a temporary old-style archive to link instead of a shared archive.
7295 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7296
7297 # Commands used to build and install a shared archive.
7298 archive_cmds=$lt_archive_cmds
7299 archive_expsym_cmds=$lt_archive_expsym_cmds
7300 postinstall_cmds=$lt_postinstall_cmds
7301 postuninstall_cmds=$lt_postuninstall_cmds
7302
7303 # Commands to strip libraries.
7304 old_striplib=$lt_old_striplib
7305 striplib=$lt_striplib
7306
7307 # Method to check whether dependent libraries are shared objects.
7308 deplibs_check_method=$lt_deplibs_check_method
7309
7310 # Command to use when deplibs_check_method == file_magic.
7311 file_magic_cmd=$lt_file_magic_cmd
7312
7313 # Flag that allows shared libraries with undefined symbols to be built.
7314 allow_undefined_flag=$lt_allow_undefined_flag
7315
7316 # Flag that forces no undefined symbols.
7317 no_undefined_flag=$lt_no_undefined_flag
7318
7319 # Commands used to finish a libtool library installation in a directory.
7320 finish_cmds=$lt_finish_cmds
7321
7322 # Same as above, but a single script fragment to be evaled but not shown.
7323 finish_eval=$lt_finish_eval
7324
7325 # Take the output of nm and produce a listing of raw symbols and C names.
7326 global_symbol_pipe=$lt_global_symbol_pipe
7327
7328 # Transform the output of nm in a proper C declaration
7329 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7330
7331 # Transform the output of nm in a C name address pair
7332 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7333
7334 # This is the shared library runtime path variable.
7335 runpath_var=$runpath_var
7336
7337 # This is the shared library path variable.
7338 shlibpath_var=$shlibpath_var
7339
7340 # Is shlibpath searched before the hard-coded library search path?
7341 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7342
7343 # How to hardcode a shared library path into an executable.
7344 hardcode_action=$hardcode_action
7345
7346 # Whether we should hardcode library paths into libraries.
7347 hardcode_into_libs=$hardcode_into_libs
7348
7349 # Flag to hardcode \$libdir into a binary during linking.
7350 # This must work even if \$libdir does not exist.
7351 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7352
7353 # Whether we need a single -rpath flag with a separated argument.
7354 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7355
7356 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7357 # resulting binary.
7358 hardcode_direct=$hardcode_direct
7359
7360 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7361 # resulting binary.
7362 hardcode_minus_L=$hardcode_minus_L
7363
7364 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7365 # the resulting binary.
7366 hardcode_shlibpath_var=$hardcode_shlibpath_var
7367
7368 # Variables whose values should be saved in libtool wrapper scripts and
7369 # restored at relink time.
7370 variables_saved_for_relink="$variables_saved_for_relink"
7371
7372 # Whether libtool must link a program against all its dependency libraries.
7373 link_all_deplibs=$link_all_deplibs
7374
7375 # Compile-time system search path for libraries
7376 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7377
7378 # Run-time system search path for libraries
7379 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7380
7381 # Fix the shell variable \$srcfile for the compiler.
7382 fix_srcfile_path="$fix_srcfile_path"
7383
7384 # Set to yes if exported symbols are required.
7385 always_export_symbols=$always_export_symbols
7386
7387 # The commands to list exported symbols.
7388 export_symbols_cmds=$lt_export_symbols_cmds
7389
7390 # The commands to extract the exported symbol list from a shared archive.
7391 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7392
7393 # Symbols that should not be listed in the preloaded symbols.
7394 exclude_expsyms=$lt_exclude_expsyms
7395
7396 # Symbols that must always be exported.
7397 include_expsyms=$lt_include_expsyms
7398
7399 # ### END LIBTOOL CONFIG
7400
7401 __EOF__
7402
7403   case $host_os in
7404   aix3*)
7405     cat <<\EOF >> "${ofile}T"
7406
7407 # AIX sometimes has problems with the GCC collect2 program.  For some
7408 # reason, if we set the COLLECT_NAMES environment variable, the problems
7409 # vanish in a puff of smoke.
7410 if test "X${COLLECT_NAMES+set}" != Xset; then
7411   COLLECT_NAMES=
7412   export COLLECT_NAMES
7413 fi
7414 EOF
7415     ;;
7416   esac
7417
7418   case $host_os in
7419   cygwin* | mingw* | pw32* | os2*)
7420     cat <<'EOF' >> "${ofile}T"
7421       # This is a source program that is used to create dlls on Windows
7422       # Don't remove nor modify the starting and closing comments
7423 # /* ltdll.c starts here */
7424 # #define WIN32_LEAN_AND_MEAN
7425 # #include <windows.h>
7426 # #undef WIN32_LEAN_AND_MEAN
7427 # #include <stdio.h>
7428 #
7429 # #ifndef __CYGWIN__
7430 # #  ifdef __CYGWIN32__
7431 # #    define __CYGWIN__ __CYGWIN32__
7432 # #  endif
7433 # #endif
7434 #
7435 # #ifdef __cplusplus
7436 # extern "C" {
7437 # #endif
7438 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7439 # #ifdef __cplusplus
7440 # }
7441 # #endif
7442 #
7443 # #ifdef __CYGWIN__
7444 # #include <cygwin/cygwin_dll.h>
7445 # DECLARE_CYGWIN_DLL( DllMain );
7446 # #endif
7447 # HINSTANCE __hDllInstance_base;
7448 #
7449 # BOOL APIENTRY
7450 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7451 # {
7452 #   __hDllInstance_base = hInst;
7453 #   return TRUE;
7454 # }
7455 # /* ltdll.c ends here */
7456         # This is a source program that is used to create import libraries
7457         # on Windows for dlls which lack them. Don't remove nor modify the
7458         # starting and closing comments
7459 # /* impgen.c starts here */
7460 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7461 #
7462 #  This file is part of GNU libtool.
7463 #
7464 #  This program is free software; you can redistribute it and/or modify
7465 #  it under the terms of the GNU General Public License as published by
7466 #  the Free Software Foundation; either version 2 of the License, or
7467 #  (at your option) any later version.
7468 #
7469 #  This program is distributed in the hope that it will be useful,
7470 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7471 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7472 #  GNU General Public License for more details.
7473 #
7474 #  You should have received a copy of the GNU General Public License
7475 #  along with this program; if not, write to the Free Software
7476 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7477 #  */
7478 #
7479 # #include <stdio.h>            /* for printf() */
7480 # #include <unistd.h>           /* for open(), lseek(), read() */
7481 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7482 # #include <string.h>           /* for strdup() */
7483 #
7484 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7485 # #ifndef O_BINARY
7486 # #define O_BINARY 0
7487 # #endif
7488 #
7489 # static unsigned int
7490 # pe_get16 (fd, offset)
7491 #      int fd;
7492 #      int offset;
7493 # {
7494 #   unsigned char b[2];
7495 #   lseek (fd, offset, SEEK_SET);
7496 #   read (fd, b, 2);
7497 #   return b[0] + (b[1]<<8);
7498 # }
7499 #
7500 # static unsigned int
7501 # pe_get32 (fd, offset)
7502 #     int fd;
7503 #     int offset;
7504 # {
7505 #   unsigned char b[4];
7506 #   lseek (fd, offset, SEEK_SET);
7507 #   read (fd, b, 4);
7508 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7509 # }
7510 #
7511 # static unsigned int
7512 # pe_as32 (ptr)
7513 #      void *ptr;
7514 # {
7515 #   unsigned char *b = ptr;
7516 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7517 # }
7518 #
7519 # int
7520 # main (argc, argv)
7521 #     int argc;
7522 #     char *argv[];
7523 # {
7524 #     int dll;
7525 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7526 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7527 #     unsigned long name_rvas, nexp;
7528 #     unsigned char *expdata, *erva;
7529 #     char *filename, *dll_name;
7530 #
7531 #     filename = argv[1];
7532 #
7533 #     dll = open(filename, O_RDONLY|O_BINARY);
7534 #     if (dll < 1)
7535 #       return 1;
7536 #
7537 #     dll_name = filename;
7538 #
7539 #     for (i=0; filename[i]; i++)
7540 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7541 #           dll_name = filename + i +1;
7542 #
7543 #     pe_header_offset = pe_get32 (dll, 0x3c);
7544 #     opthdr_ofs = pe_header_offset + 4 + 20;
7545 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7546 #
7547 #     if (num_entries < 1) /* no exports */
7548 #       return 1;
7549 #
7550 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7551 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7552 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7553 #     secptr = (pe_header_offset + 4 + 20 +
7554 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7555 #
7556 #     expptr = 0;
7557 #     for (i = 0; i < nsections; i++)
7558 #     {
7559 #       char sname[8];
7560 #       unsigned long secptr1 = secptr + 40 * i;
7561 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7562 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7563 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7564 #       lseek(dll, secptr1, SEEK_SET);
7565 #       read(dll, sname, 8);
7566 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7567 #       {
7568 #           expptr = fptr + (export_rva - vaddr);
7569 #           if (export_rva + export_size > vaddr + vsize)
7570 #               export_size = vsize - (export_rva - vaddr);
7571 #           break;
7572 #       }
7573 #     }
7574 #
7575 #     expdata = (unsigned char*)malloc(export_size);
7576 #     lseek (dll, expptr, SEEK_SET);
7577 #     read (dll, expdata, export_size);
7578 #     erva = expdata - export_rva;
7579 #
7580 #     nexp = pe_as32 (expdata+24);
7581 #     name_rvas = pe_as32 (expdata+32);
7582 #
7583 #     printf ("EXPORTS\n");
7584 #     for (i = 0; i<nexp; i++)
7585 #     {
7586 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7587 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7588 #     }
7589 #
7590 #     return 0;
7591 # }
7592 # /* impgen.c ends here */
7593
7594 EOF
7595     ;;
7596   esac
7597
7598   # We use sed instead of cat because bash on DJGPP gets confused if
7599   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7600   # text mode, it properly converts lines to CR/LF.  This bash problem
7601   # is reportedly fixed, but why not run on old versions too?
7602   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7603
7604   mv -f "${ofile}T" "$ofile" || \
7605     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7606   chmod +x "$ofile"
7607 fi
7608
7609
7610
7611
7612
7613 # This can be used to rebuild libtool when needed
7614 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7615
7616 # Always use our own libtool.
7617 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7618
7619 # Prevent multiple expansion
7620
7621
7622
7623 for ac_prog in mawk gawk nawk awk
7624 do
7625 # Extract the first word of "$ac_prog", so it can be a program name with args.
7626 set dummy $ac_prog; ac_word=$2
7627 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7628 echo "configure:7629: checking for $ac_word" >&5
7629 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
7630   echo $ac_n "(cached) $ac_c" 1>&6
7631 else
7632   if test -n "$AWK"; then
7633   ac_cv_prog_AWK="$AWK" # Let the user override the test.
7634 else
7635   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7636   ac_dummy="$PATH"
7637   for ac_dir in $ac_dummy; do
7638     test -z "$ac_dir" && ac_dir=.
7639     if test -f $ac_dir/$ac_word; then
7640       ac_cv_prog_AWK="$ac_prog"
7641       break
7642     fi
7643   done
7644   IFS="$ac_save_ifs"
7645 fi
7646 fi
7647 AWK="$ac_cv_prog_AWK"
7648 if test -n "$AWK"; then
7649   echo "$ac_t""$AWK" 1>&6
7650 else
7651   echo "$ac_t""no" 1>&6
7652 fi
7653
7654 test -n "$AWK" && break
7655 done
7656
7657
7658 # Extract the first word of "sendmail", so it can be a program name with args.
7659 set dummy sendmail; ac_word=$2
7660 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7661 echo "configure:7662: checking for $ac_word" >&5
7662 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
7663   echo $ac_n "(cached) $ac_c" 1>&6
7664 else
7665   case "$SENDMAIL" in
7666   /*)
7667   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
7668   ;;
7669   ?:/*)
7670   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
7671   ;;
7672   *)
7673   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7674   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
7675   for ac_dir in $ac_dummy; do 
7676     test -z "$ac_dir" && ac_dir=.
7677     if test -f $ac_dir/$ac_word; then
7678       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
7679       break
7680     fi
7681   done
7682   IFS="$ac_save_ifs"
7683   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
7684   ;;
7685 esac
7686 fi
7687 SENDMAIL="$ac_cv_path_SENDMAIL"
7688 if test -n "$SENDMAIL"; then
7689   echo "$ac_t""$SENDMAIL" 1>&6
7690 else
7691   echo "$ac_t""no" 1>&6
7692 fi
7693
7694 # Extract the first word of "vi", so it can be a program name with args.
7695 set dummy vi; ac_word=$2
7696 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7697 echo "configure:7698: checking for $ac_word" >&5
7698 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
7699   echo $ac_n "(cached) $ac_c" 1>&6
7700 else
7701   case "$EDITOR" in
7702   /*)
7703   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
7704   ;;
7705   ?:/*)
7706   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
7707   ;;
7708   *)
7709   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7710   ac_dummy="$PATH:/usr/ucb"
7711   for ac_dir in $ac_dummy; do 
7712     test -z "$ac_dir" && ac_dir=.
7713     if test -f $ac_dir/$ac_word; then
7714       ac_cv_path_EDITOR="$ac_dir/$ac_word"
7715       break
7716     fi
7717   done
7718   IFS="$ac_save_ifs"
7719   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
7720   ;;
7721 esac
7722 fi
7723 EDITOR="$ac_cv_path_EDITOR"
7724 if test -n "$EDITOR"; then
7725   echo "$ac_t""$EDITOR" 1>&6
7726 else
7727   echo "$ac_t""no" 1>&6
7728 fi
7729
7730 # Extract the first word of "finger", so it can be a program name with args.
7731 set dummy finger; ac_word=$2
7732 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7733 echo "configure:7734: checking for $ac_word" >&5
7734 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
7735   echo $ac_n "(cached) $ac_c" 1>&6
7736 else
7737   case "$FINGER" in
7738   /*)
7739   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
7740   ;;
7741   ?:/*)
7742   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
7743   ;;
7744   *)
7745   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7746   ac_dummy="$PATH:/usr/ucb"
7747   for ac_dir in $ac_dummy; do 
7748     test -z "$ac_dir" && ac_dir=.
7749     if test -f $ac_dir/$ac_word; then
7750       ac_cv_path_FINGER="$ac_dir/$ac_word"
7751       break
7752     fi
7753   done
7754   IFS="$ac_save_ifs"
7755   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
7756   ;;
7757 esac
7758 fi
7759 FINGER="$ac_cv_path_FINGER"
7760 if test -n "$FINGER"; then
7761   echo "$ac_t""$FINGER" 1>&6
7762 else
7763   echo "$ac_t""no" 1>&6
7764 fi
7765
7766
7767 ol_link_perl=no
7768 if test $ol_enable_perl != no ; then
7769         # Extract the first word of "perl", so it can be a program name with args.
7770 set dummy perl; ac_word=$2
7771 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7772 echo "configure:7773: checking for $ac_word" >&5
7773 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7774   echo $ac_n "(cached) $ac_c" 1>&6
7775 else
7776   case "$PERLBIN" in
7777   /*)
7778   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7779   ;;
7780   ?:/*)
7781   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7782   ;;
7783   *)
7784   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7785   ac_dummy="$PATH"
7786   for ac_dir in $ac_dummy; do 
7787     test -z "$ac_dir" && ac_dir=.
7788     if test -f $ac_dir/$ac_word; then
7789       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7790       break
7791     fi
7792   done
7793   IFS="$ac_save_ifs"
7794   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7795   ;;
7796 esac
7797 fi
7798 PERLBIN="$ac_cv_path_PERLBIN"
7799 if test -n "$PERLBIN"; then
7800   echo "$ac_t""$PERLBIN" 1>&6
7801 else
7802   echo "$ac_t""no" 1>&6
7803 fi
7804
7805
7806         if test "no$PERLBIN" = "no" ; then
7807                 if test $ol_enable_perl = yes ; then
7808                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7809                 fi
7810
7811         else
7812                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7813                 if test x"$ol_with_perl_module" = "xstatic" ; then
7814                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7815                 else
7816                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7817                 fi
7818                                 ol_link_perl=yes
7819         fi
7820 fi
7821
7822 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7823 echo "configure:7824: checking how to run the C preprocessor" >&5
7824 # On Suns, sometimes $CPP names a directory.
7825 if test -n "$CPP" && test -d "$CPP"; then
7826   CPP=
7827 fi
7828 if test -z "$CPP"; then
7829 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7830   echo $ac_n "(cached) $ac_c" 1>&6
7831 else
7832     # This must be in double quotes, not single quotes, because CPP may get
7833   # substituted into the Makefile and "${CC-cc}" will confuse make.
7834   CPP="${CC-cc} -E"
7835   # On the NeXT, cc -E runs the code through the compiler's parser,
7836   # not just through cpp.
7837   cat > conftest.$ac_ext <<EOF
7838 #line 7839 "configure"
7839 #include "confdefs.h"
7840 #include <assert.h>
7841 Syntax Error
7842 EOF
7843 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7844 { (eval echo configure:7845: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7845 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7846 if test -z "$ac_err"; then
7847   :
7848 else
7849   echo "$ac_err" >&5
7850   echo "configure: failed program was:" >&5
7851   cat conftest.$ac_ext >&5
7852   rm -rf conftest*
7853   CPP="${CC-cc} -E -traditional-cpp"
7854   cat > conftest.$ac_ext <<EOF
7855 #line 7856 "configure"
7856 #include "confdefs.h"
7857 #include <assert.h>
7858 Syntax Error
7859 EOF
7860 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7861 { (eval echo configure:7862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7862 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7863 if test -z "$ac_err"; then
7864   :
7865 else
7866   echo "$ac_err" >&5
7867   echo "configure: failed program was:" >&5
7868   cat conftest.$ac_ext >&5
7869   rm -rf conftest*
7870   CPP="${CC-cc} -nologo -E"
7871   cat > conftest.$ac_ext <<EOF
7872 #line 7873 "configure"
7873 #include "confdefs.h"
7874 #include <assert.h>
7875 Syntax Error
7876 EOF
7877 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7878 { (eval echo configure:7879: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7879 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7880 if test -z "$ac_err"; then
7881   :
7882 else
7883   echo "$ac_err" >&5
7884   echo "configure: failed program was:" >&5
7885   cat conftest.$ac_ext >&5
7886   rm -rf conftest*
7887   CPP=/lib/cpp
7888 fi
7889 rm -f conftest*
7890 fi
7891 rm -f conftest*
7892 fi
7893 rm -f conftest*
7894   ac_cv_prog_CPP="$CPP"
7895 fi
7896   CPP="$ac_cv_prog_CPP"
7897 else
7898   ac_cv_prog_CPP="$CPP"
7899 fi
7900 echo "$ac_t""$CPP" 1>&6
7901
7902
7903 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
7904         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
7905
7906 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
7907         echo "configure: warning: programs compiled here do run here..." 1>&2
7908         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
7909
7910 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
7911         echo "configure: warning: programs compiled here do not run here..." 1>&2
7912         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
7913 fi
7914
7915
7916 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7917 echo "configure:7918: checking for Cygwin environment" >&5
7918 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7919   echo $ac_n "(cached) $ac_c" 1>&6
7920 else
7921   cat > conftest.$ac_ext <<EOF
7922 #line 7923 "configure"
7923 #include "confdefs.h"
7924
7925 int main() {
7926
7927 #ifndef __CYGWIN__
7928 #define __CYGWIN__ __CYGWIN32__
7929 #endif
7930 return __CYGWIN__;
7931 ; return 0; }
7932 EOF
7933 if { (eval echo configure:7934: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7934   rm -rf conftest*
7935   ac_cv_cygwin=yes
7936 else
7937   echo "configure: failed program was:" >&5
7938   cat conftest.$ac_ext >&5
7939   rm -rf conftest*
7940   ac_cv_cygwin=no
7941 fi
7942 rm -f conftest*
7943 fi
7944
7945 echo "$ac_t""$ac_cv_cygwin" 1>&6
7946 CYGWIN=
7947 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7948 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7949 echo "configure:7950: checking for mingw32 environment" >&5
7950 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7951   echo $ac_n "(cached) $ac_c" 1>&6
7952 else
7953   cat > conftest.$ac_ext <<EOF
7954 #line 7955 "configure"
7955 #include "confdefs.h"
7956
7957 int main() {
7958 return __MINGW32__;
7959 ; return 0; }
7960 EOF
7961 if { (eval echo configure:7962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7962   rm -rf conftest*
7963   ac_cv_mingw32=yes
7964 else
7965   echo "configure: failed program was:" >&5
7966   cat conftest.$ac_ext >&5
7967   rm -rf conftest*
7968   ac_cv_mingw32=no
7969 fi
7970 rm -f conftest*
7971 fi
7972
7973 echo "$ac_t""$ac_cv_mingw32" 1>&6
7974 MINGW32=
7975 test "$ac_cv_mingw32" = yes && MINGW32=yes
7976
7977
7978
7979 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
7980 echo "configure:7981: checking for executable suffix" >&5
7981 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
7982   echo $ac_n "(cached) $ac_c" 1>&6
7983 else
7984   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
7985   ac_cv_exeext=.exe
7986 else
7987   rm -f conftest*
7988   echo 'int main () { return 0; }' > conftest.$ac_ext
7989   ac_cv_exeext=
7990   if { (eval echo configure:7991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
7991     for file in conftest.*; do
7992       case $file in
7993       *.c | *.C | *.o | *.obj | *.xcoff) ;;
7994       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
7995       esac
7996     done
7997   else
7998     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
7999   fi
8000   rm -f conftest*
8001   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8002 fi
8003 fi
8004
8005 EXEEXT=""
8006 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8007 echo "$ac_t""${ac_cv_exeext}" 1>&6
8008 ac_exeext=$EXEEXT
8009
8010 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8011 echo "configure:8012: checking for object suffix" >&5
8012 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8013   echo $ac_n "(cached) $ac_c" 1>&6
8014 else
8015   rm -f conftest*
8016 echo 'int i = 1;' > conftest.$ac_ext
8017 if { (eval echo configure:8018: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8018   for ac_file in conftest.*; do
8019     case $ac_file in
8020     *.c) ;;
8021     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8022     esac
8023   done
8024 else
8025   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8026 fi
8027 rm -f conftest*
8028 fi
8029
8030 echo "$ac_t""$ac_cv_objext" 1>&6
8031 OBJEXT=$ac_cv_objext
8032 ac_objext=$ac_cv_objext
8033
8034
8035 cat >> confdefs.h <<EOF
8036 #define EXEEXT "${EXEEXT}"
8037 EOF
8038
8039
8040 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8041 echo "configure:8042: checking for be_app in -lbe" >&5
8042 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8043 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8044   echo $ac_n "(cached) $ac_c" 1>&6
8045 else
8046   ac_save_LIBS="$LIBS"
8047 LIBS="-lbe -lroot -lnet $LIBS"
8048 cat > conftest.$ac_ext <<EOF
8049 #line 8050 "configure"
8050 #include "confdefs.h"
8051 /* Override any gcc2 internal prototype to avoid an error.  */
8052 /* We use char because int might match the return type of a gcc2
8053     builtin and then its argument prototype would still apply.  */
8054 char be_app();
8055
8056 int main() {
8057 be_app()
8058 ; return 0; }
8059 EOF
8060 if { (eval echo configure:8061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8061   rm -rf conftest*
8062   eval "ac_cv_lib_$ac_lib_var=yes"
8063 else
8064   echo "configure: failed program was:" >&5
8065   cat conftest.$ac_ext >&5
8066   rm -rf conftest*
8067   eval "ac_cv_lib_$ac_lib_var=no"
8068 fi
8069 rm -f conftest*
8070 LIBS="$ac_save_LIBS"
8071
8072 fi
8073 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8074   echo "$ac_t""yes" 1>&6
8075   LIBS="$LIBS -lbe -lroot -lnet"
8076 else
8077   echo "$ac_t""no" 1>&6
8078 :
8079 fi
8080
8081
8082
8083
8084
8085 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8086 echo "configure:8087: checking for ${CC-cc} option to accept ANSI C" >&5
8087 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8088   echo $ac_n "(cached) $ac_c" 1>&6
8089 else
8090   am_cv_prog_cc_stdc=no
8091 ac_save_CC="$CC"
8092 # Don't try gcc -ansi; that turns off useful extensions and
8093 # breaks some systems' header files.
8094 # AIX                   -qlanglvl=ansi
8095 # Ultrix and OSF/1      -std1
8096 # HP-UX 10.20 and later -Ae
8097 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8098 # SVR4                  -Xc -D__EXTENSIONS__
8099 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8100 do
8101   CC="$ac_save_CC $ac_arg"
8102   cat > conftest.$ac_ext <<EOF
8103 #line 8104 "configure"
8104 #include "confdefs.h"
8105 #include <stdarg.h>
8106 #include <stdio.h>
8107 #include <sys/types.h>
8108 #include <sys/stat.h>
8109 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8110 struct buf { int x; };
8111 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8112 static char *e (p, i)
8113      char **p;
8114      int i;
8115 {
8116   return p[i];
8117 }
8118 static char *f (char * (*g) (char **, int), char **p, ...)
8119 {
8120   char *s;
8121   va_list v;
8122   va_start (v,p);
8123   s = g (p, va_arg (v,int));
8124   va_end (v);
8125   return s;
8126 }
8127 int test (int i, double x);
8128 struct s1 {int (*f) (int a);};
8129 struct s2 {int (*f) (double a);};
8130 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8131 int argc;
8132 char **argv;
8133
8134 int main() {
8135
8136 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8137
8138 ; return 0; }
8139 EOF
8140 if { (eval echo configure:8141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8141   rm -rf conftest*
8142   am_cv_prog_cc_stdc="$ac_arg"; break
8143 else
8144   echo "configure: failed program was:" >&5
8145   cat conftest.$ac_ext >&5
8146 fi
8147 rm -f conftest*
8148 done
8149 CC="$ac_save_CC"
8150
8151 fi
8152
8153 if test -z "$am_cv_prog_cc_stdc"; then
8154   echo "$ac_t""none needed" 1>&6
8155 else
8156   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8157 fi
8158 case "x$am_cv_prog_cc_stdc" in
8159   x|xno) ;;
8160   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8161 esac
8162
8163 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8164         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8165 fi
8166
8167 # test for make depend flag
8168 OL_MKDEP=
8169 OL_MKDEP_FLAGS=
8170 if test -z "${MKDEP}"; then
8171         OL_MKDEP="${CC-cc}"
8172         if test -z "${MKDEP_FLAGS}"; then
8173                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8174 echo "configure:8175: checking for ${OL_MKDEP} depend flag" >&5
8175 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8176   echo $ac_n "(cached) $ac_c" 1>&6
8177 else
8178   
8179                         ol_cv_mkdep=no
8180                         for flag in "-M" "-xM"; do
8181                                 cat > conftest.c <<EOF
8182  noCode;
8183 EOF
8184                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8185: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8185                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8186                                 then
8187                                         if test ! -f conftest."${ac_object}" ; then
8188                                                 ol_cv_mkdep=$flag
8189                                                 OL_MKDEP_FLAGS="$flag"
8190                                                 break
8191                                         fi
8192                                 fi
8193                         done
8194                         rm -f conftest*
8195                 
8196 fi
8197
8198 echo "$ac_t""$ol_cv_mkdep" 1>&6
8199         else
8200                 cc_cv_mkdep=yes
8201                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8202         fi
8203 else
8204         cc_cv_mkdep=yes
8205         OL_MKDEP="${MKDEP}"
8206         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8207 fi
8208
8209
8210
8211 if test "${ol_cv_mkdep}" = no ; then
8212         # this will soon become an error
8213         echo "configure: warning: do not know how to generate dependencies" 1>&2
8214 fi
8215
8216 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8217 echo "configure:8218: checking for afopen in -ls" >&5
8218 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8219 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8220   echo $ac_n "(cached) $ac_c" 1>&6
8221 else
8222   ac_save_LIBS="$LIBS"
8223 LIBS="-ls  $LIBS"
8224 cat > conftest.$ac_ext <<EOF
8225 #line 8226 "configure"
8226 #include "confdefs.h"
8227 /* Override any gcc2 internal prototype to avoid an error.  */
8228 /* We use char because int might match the return type of a gcc2
8229     builtin and then its argument prototype would still apply.  */
8230 char afopen();
8231
8232 int main() {
8233 afopen()
8234 ; return 0; }
8235 EOF
8236 if { (eval echo configure:8237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8237   rm -rf conftest*
8238   eval "ac_cv_lib_$ac_lib_var=yes"
8239 else
8240   echo "configure: failed program was:" >&5
8241   cat conftest.$ac_ext >&5
8242   rm -rf conftest*
8243   eval "ac_cv_lib_$ac_lib_var=no"
8244 fi
8245 rm -f conftest*
8246 LIBS="$ac_save_LIBS"
8247
8248 fi
8249 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8250   echo "$ac_t""yes" 1>&6
8251   
8252         AUTH_LIBS=-ls
8253         cat >> confdefs.h <<\EOF
8254 #define HAVE_AIX_SECURITY 1
8255 EOF
8256
8257
8258 else
8259   echo "$ac_t""no" 1>&6
8260 fi
8261
8262
8263
8264 ol_link_modules=no
8265 if test $ol_enable_modules != no ; then
8266         for ac_hdr in ltdl.h
8267 do
8268 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8269 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8270 echo "configure:8271: checking for $ac_hdr" >&5
8271 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8272   echo $ac_n "(cached) $ac_c" 1>&6
8273 else
8274   cat > conftest.$ac_ext <<EOF
8275 #line 8276 "configure"
8276 #include "confdefs.h"
8277 #include <$ac_hdr>
8278 EOF
8279 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8280 { (eval echo configure:8281: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8281 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8282 if test -z "$ac_err"; then
8283   rm -rf conftest*
8284   eval "ac_cv_header_$ac_safe=yes"
8285 else
8286   echo "$ac_err" >&5
8287   echo "configure: failed program was:" >&5
8288   cat conftest.$ac_ext >&5
8289   rm -rf conftest*
8290   eval "ac_cv_header_$ac_safe=no"
8291 fi
8292 rm -f conftest*
8293 fi
8294 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8295   echo "$ac_t""yes" 1>&6
8296     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8297   cat >> confdefs.h <<EOF
8298 #define $ac_tr_hdr 1
8299 EOF
8300  
8301 else
8302   echo "$ac_t""no" 1>&6
8303 fi
8304 done
8305
8306
8307         if test $ac_cv_header_ltdl_h = no ; then
8308                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8309         fi
8310
8311         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8312 echo "configure:8313: checking for lt_dlinit in -lltdl" >&5
8313 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8314 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8315   echo $ac_n "(cached) $ac_c" 1>&6
8316 else
8317   ac_save_LIBS="$LIBS"
8318 LIBS="-lltdl  $LIBS"
8319 cat > conftest.$ac_ext <<EOF
8320 #line 8321 "configure"
8321 #include "confdefs.h"
8322 /* Override any gcc2 internal prototype to avoid an error.  */
8323 /* We use char because int might match the return type of a gcc2
8324     builtin and then its argument prototype would still apply.  */
8325 char lt_dlinit();
8326
8327 int main() {
8328 lt_dlinit()
8329 ; return 0; }
8330 EOF
8331 if { (eval echo configure:8332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8332   rm -rf conftest*
8333   eval "ac_cv_lib_$ac_lib_var=yes"
8334 else
8335   echo "configure: failed program was:" >&5
8336   cat conftest.$ac_ext >&5
8337   rm -rf conftest*
8338   eval "ac_cv_lib_$ac_lib_var=no"
8339 fi
8340 rm -f conftest*
8341 LIBS="$ac_save_LIBS"
8342
8343 fi
8344 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8345   echo "$ac_t""yes" 1>&6
8346   
8347                 MODULES_LIBS=-lltdl
8348                 cat >> confdefs.h <<\EOF
8349 #define HAVE_LIBLTDL 1
8350 EOF
8351
8352         
8353 else
8354   echo "$ac_t""no" 1>&6
8355 fi
8356
8357
8358         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8359                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8360         fi
8361         ol_link_modules=yes
8362 else
8363         ol_with_bdb_module=static
8364         ol_with_dnssrv_module=static
8365         ol_with_ldap_module=static
8366         ol_with_ldbm_module=static
8367         ol_with_meta_module=static
8368         ol_with_monitor_module=static
8369         ol_with_passwd_module=static
8370         ol_with_perl_module=static
8371         ol_with_shell_module=static
8372         ol_with_tcl_module=static
8373         ol_with_sql_module=static
8374 fi
8375
8376 # test for EBCDIC
8377 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8378 echo "configure:8379: checking for EBCDIC" >&5
8379 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8380   echo $ac_n "(cached) $ac_c" 1>&6
8381 else
8382   
8383         cat > conftest.$ac_ext <<EOF
8384 #line 8385 "configure"
8385 #include "confdefs.h"
8386
8387 #if !('M' == 0xd4)
8388 #include <__ASCII__/generate_error.h>
8389 #endif
8390
8391 EOF
8392 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8393 { (eval echo configure:8394: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8394 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8395 if test -z "$ac_err"; then
8396   rm -rf conftest*
8397   ol_cv_cpp_ebcdic=yes
8398 else
8399   echo "$ac_err" >&5
8400   echo "configure: failed program was:" >&5
8401   cat conftest.$ac_ext >&5
8402   rm -rf conftest*
8403   ol_cv_cpp_ebcdic=no
8404 fi
8405 rm -f conftest*
8406 fi
8407
8408 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8409 if test $ol_cv_cpp_ebcdic = yes ; then
8410         cat >> confdefs.h <<\EOF
8411 #define HAVE_EBCDIC 1
8412 EOF
8413
8414 fi
8415
8416 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8417 echo "configure:8418: checking for ANSI C header files" >&5
8418 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8419   echo $ac_n "(cached) $ac_c" 1>&6
8420 else
8421   cat > conftest.$ac_ext <<EOF
8422 #line 8423 "configure"
8423 #include "confdefs.h"
8424 #include <stdlib.h>
8425 #include <stdarg.h>
8426 #include <string.h>
8427 #include <float.h>
8428 EOF
8429 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8430 { (eval echo configure:8431: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8431 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8432 if test -z "$ac_err"; then
8433   rm -rf conftest*
8434   ol_cv_header_stdc=yes
8435 else
8436   echo "$ac_err" >&5
8437   echo "configure: failed program was:" >&5
8438   cat conftest.$ac_ext >&5
8439   rm -rf conftest*
8440   ol_cv_header_stdc=no
8441 fi
8442 rm -f conftest*
8443
8444 if test $ol_cv_header_stdc = yes; then
8445   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8446 cat > conftest.$ac_ext <<EOF
8447 #line 8448 "configure"
8448 #include "confdefs.h"
8449 #include <string.h>
8450 EOF
8451 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8452   egrep "memchr" >/dev/null 2>&1; then
8453   :
8454 else
8455   rm -rf conftest*
8456   ol_cv_header_stdc=no
8457 fi
8458 rm -f conftest*
8459
8460 fi
8461
8462 if test $ol_cv_header_stdc = yes; then
8463   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8464 cat > conftest.$ac_ext <<EOF
8465 #line 8466 "configure"
8466 #include "confdefs.h"
8467 #include <stdlib.h>
8468 EOF
8469 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8470   egrep "free" >/dev/null 2>&1; then
8471   :
8472 else
8473   rm -rf conftest*
8474   ol_cv_header_stdc=no
8475 fi
8476 rm -f conftest*
8477
8478 fi
8479
8480 if test $ol_cv_header_stdc = yes; then
8481   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8482 if test "$cross_compiling" = yes; then
8483   :
8484 else
8485   cat > conftest.$ac_ext <<EOF
8486 #line 8487 "configure"
8487 #include "confdefs.h"
8488 #include <ctype.h>
8489 #ifndef HAVE_EBCDIC
8490 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8491 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8492 #else
8493 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8494                 || ('j' <= (c) && (c) <= 'r') \
8495                 || ('s' <= (c) && (c) <= 'z'))
8496 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8497 #endif
8498 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8499 int main () { int i; for (i = 0; i < 256; i++)
8500 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8501 exit (0); }
8502
8503 EOF
8504 if { (eval echo configure:8505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8505 then
8506   :
8507 else
8508   echo "configure: failed program was:" >&5
8509   cat conftest.$ac_ext >&5
8510   rm -fr conftest*
8511   ol_cv_header_stdc=no
8512 fi
8513 rm -fr conftest*
8514 fi
8515
8516 fi
8517 fi
8518
8519 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8520 if test $ol_cv_header_stdc = yes; then
8521   cat >> confdefs.h <<\EOF
8522 #define STDC_HEADERS 1
8523 EOF
8524
8525 fi
8526 ac_cv_header_stdc=disable
8527
8528
8529 if test $ol_cv_header_stdc != yes; then
8530         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8531 fi
8532
8533 ac_header_dirent=no
8534 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8535 do
8536 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8537 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8538 echo "configure:8539: checking for $ac_hdr that defines DIR" >&5
8539 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8540   echo $ac_n "(cached) $ac_c" 1>&6
8541 else
8542   cat > conftest.$ac_ext <<EOF
8543 #line 8544 "configure"
8544 #include "confdefs.h"
8545 #include <sys/types.h>
8546 #include <$ac_hdr>
8547 int main() {
8548 DIR *dirp = 0;
8549 ; return 0; }
8550 EOF
8551 if { (eval echo configure:8552: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8552   rm -rf conftest*
8553   eval "ac_cv_header_dirent_$ac_safe=yes"
8554 else
8555   echo "configure: failed program was:" >&5
8556   cat conftest.$ac_ext >&5
8557   rm -rf conftest*
8558   eval "ac_cv_header_dirent_$ac_safe=no"
8559 fi
8560 rm -f conftest*
8561 fi
8562 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8563   echo "$ac_t""yes" 1>&6
8564     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8565   cat >> confdefs.h <<EOF
8566 #define $ac_tr_hdr 1
8567 EOF
8568  ac_header_dirent=$ac_hdr; break
8569 else
8570   echo "$ac_t""no" 1>&6
8571 fi
8572 done
8573 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8574 if test $ac_header_dirent = dirent.h; then
8575 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8576 echo "configure:8577: checking for opendir in -ldir" >&5
8577 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8578 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8579   echo $ac_n "(cached) $ac_c" 1>&6
8580 else
8581   ac_save_LIBS="$LIBS"
8582 LIBS="-ldir  $LIBS"
8583 cat > conftest.$ac_ext <<EOF
8584 #line 8585 "configure"
8585 #include "confdefs.h"
8586 /* Override any gcc2 internal prototype to avoid an error.  */
8587 /* We use char because int might match the return type of a gcc2
8588     builtin and then its argument prototype would still apply.  */
8589 char opendir();
8590
8591 int main() {
8592 opendir()
8593 ; return 0; }
8594 EOF
8595 if { (eval echo configure:8596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8596   rm -rf conftest*
8597   eval "ac_cv_lib_$ac_lib_var=yes"
8598 else
8599   echo "configure: failed program was:" >&5
8600   cat conftest.$ac_ext >&5
8601   rm -rf conftest*
8602   eval "ac_cv_lib_$ac_lib_var=no"
8603 fi
8604 rm -f conftest*
8605 LIBS="$ac_save_LIBS"
8606
8607 fi
8608 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8609   echo "$ac_t""yes" 1>&6
8610   LIBS="$LIBS -ldir"
8611 else
8612   echo "$ac_t""no" 1>&6
8613 fi
8614
8615 else
8616 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8617 echo "configure:8618: checking for opendir in -lx" >&5
8618 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8619 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8620   echo $ac_n "(cached) $ac_c" 1>&6
8621 else
8622   ac_save_LIBS="$LIBS"
8623 LIBS="-lx  $LIBS"
8624 cat > conftest.$ac_ext <<EOF
8625 #line 8626 "configure"
8626 #include "confdefs.h"
8627 /* Override any gcc2 internal prototype to avoid an error.  */
8628 /* We use char because int might match the return type of a gcc2
8629     builtin and then its argument prototype would still apply.  */
8630 char opendir();
8631
8632 int main() {
8633 opendir()
8634 ; return 0; }
8635 EOF
8636 if { (eval echo configure:8637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8637   rm -rf conftest*
8638   eval "ac_cv_lib_$ac_lib_var=yes"
8639 else
8640   echo "configure: failed program was:" >&5
8641   cat conftest.$ac_ext >&5
8642   rm -rf conftest*
8643   eval "ac_cv_lib_$ac_lib_var=no"
8644 fi
8645 rm -f conftest*
8646 LIBS="$ac_save_LIBS"
8647
8648 fi
8649 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8650   echo "$ac_t""yes" 1>&6
8651   LIBS="$LIBS -lx"
8652 else
8653   echo "$ac_t""no" 1>&6
8654 fi
8655
8656 fi
8657
8658 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8659 echo "configure:8660: checking for sys/wait.h that is POSIX.1 compatible" >&5
8660 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8661   echo $ac_n "(cached) $ac_c" 1>&6
8662 else
8663   cat > conftest.$ac_ext <<EOF
8664 #line 8665 "configure"
8665 #include "confdefs.h"
8666 #include <sys/types.h>
8667 #include <sys/wait.h>
8668 #ifndef WEXITSTATUS
8669 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8670 #endif
8671 #ifndef WIFEXITED
8672 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8673 #endif
8674 int main() {
8675 int s;
8676 wait (&s);
8677 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8678 ; return 0; }
8679 EOF
8680 if { (eval echo configure:8681: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8681   rm -rf conftest*
8682   ac_cv_header_sys_wait_h=yes
8683 else
8684   echo "configure: failed program was:" >&5
8685   cat conftest.$ac_ext >&5
8686   rm -rf conftest*
8687   ac_cv_header_sys_wait_h=no
8688 fi
8689 rm -f conftest*
8690 fi
8691
8692 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8693 if test $ac_cv_header_sys_wait_h = yes; then
8694   cat >> confdefs.h <<\EOF
8695 #define HAVE_SYS_WAIT_H 1
8696 EOF
8697
8698 fi
8699
8700 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8701 echo "configure:8702: checking POSIX termios" >&5
8702 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8703   echo $ac_n "(cached) $ac_c" 1>&6
8704 else
8705   cat > conftest.$ac_ext <<EOF
8706 #line 8707 "configure"
8707 #include "confdefs.h"
8708 #include <sys/types.h>
8709 #include <unistd.h>
8710 #include <termios.h>
8711 int main() {
8712 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8713    tcgetattr(0, 0);
8714 ; return 0; }
8715 EOF
8716 if { (eval echo configure:8717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8717   rm -rf conftest*
8718   am_cv_sys_posix_termios=yes
8719 else
8720   echo "configure: failed program was:" >&5
8721   cat conftest.$ac_ext >&5
8722   rm -rf conftest*
8723   am_cv_sys_posix_termios=no
8724 fi
8725 rm -f conftest*
8726 fi
8727
8728 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8729
8730
8731  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8732 echo "configure:8733: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8733 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8734   echo $ac_n "(cached) $ac_c" 1>&6
8735 else
8736   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8737
8738   gwinsz_in_termios_h=no
8739   if test $am_cv_sys_posix_termios = yes; then
8740     cat > conftest.$ac_ext <<EOF
8741 #line 8742 "configure"
8742 #include "confdefs.h"
8743 #include <sys/types.h>
8744 #     include <termios.h>
8745 #     ifdef TIOCGWINSZ
8746         yes
8747 #     endif
8748     
8749 EOF
8750 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8751   egrep "yes" >/dev/null 2>&1; then
8752   rm -rf conftest*
8753   gwinsz_in_termios_h=yes
8754 fi
8755 rm -f conftest*
8756
8757   fi
8758
8759   if test $gwinsz_in_termios_h = no; then
8760     cat > conftest.$ac_ext <<EOF
8761 #line 8762 "configure"
8762 #include "confdefs.h"
8763 #include <sys/types.h>
8764 #     include <sys/ioctl.h>
8765 #     ifdef TIOCGWINSZ
8766         yes
8767 #     endif
8768     
8769 EOF
8770 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8771   egrep "yes" >/dev/null 2>&1; then
8772   rm -rf conftest*
8773   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8774 fi
8775 rm -f conftest*
8776
8777   fi
8778   
8779 fi
8780
8781 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8782   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8783     cat >> confdefs.h <<\EOF
8784 #define GWINSZ_IN_SYS_IOCTL 1
8785 EOF
8786
8787   fi
8788
8789 if test $am_cv_sys_posix_termios = yes ; then
8790         cat >> confdefs.h <<\EOF
8791 #define HAVE_POSIX_TERMIOS 1
8792 EOF
8793
8794 fi
8795
8796 for ac_hdr in \
8797         arpa/inet.h             \
8798         arpa/nameser.h  \
8799         assert.h                \
8800         conio.h                 \
8801         crypt.h                 \
8802         direct.h                \
8803         errno.h                 \
8804         fcntl.h                 \
8805         filio.h                 \
8806         getopt.h                \
8807         grp.h                   \
8808         io.h                    \
8809         libutil.h               \
8810         limits.h                \
8811         locale.h                \
8812         netinet/tcp.h   \
8813         malloc.h                \
8814         memory.h                \
8815         psap.h                  \
8816         pwd.h                   \
8817         process.h               \
8818         resolv.h                \
8819         sgtty.h                 \
8820         shadow.h                \
8821         stddef.h                \
8822         string.h                \
8823         strings.h               \
8824         sysexits.h              \
8825         sys/file.h              \
8826         sys/filio.h             \
8827         sys/errno.h             \
8828         sys/ioctl.h             \
8829         sys/param.h             \
8830         sys/resource.h  \
8831         sys/select.h    \
8832         sys/socket.h    \
8833         sys/syslog.h    \
8834         sys/time.h              \
8835         sys/types.h             \
8836         syslog.h                \
8837         termios.h               \
8838         unistd.h                \
8839         winsock.h               \
8840         winsock2.h              \
8841
8842 do
8843 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8844 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8845 echo "configure:8846: checking for $ac_hdr" >&5
8846 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8847   echo $ac_n "(cached) $ac_c" 1>&6
8848 else
8849   cat > conftest.$ac_ext <<EOF
8850 #line 8851 "configure"
8851 #include "confdefs.h"
8852 #include <$ac_hdr>
8853 EOF
8854 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8855 { (eval echo configure:8856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8856 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8857 if test -z "$ac_err"; then
8858   rm -rf conftest*
8859   eval "ac_cv_header_$ac_safe=yes"
8860 else
8861   echo "$ac_err" >&5
8862   echo "configure: failed program was:" >&5
8863   cat conftest.$ac_ext >&5
8864   rm -rf conftest*
8865   eval "ac_cv_header_$ac_safe=no"
8866 fi
8867 rm -f conftest*
8868 fi
8869 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8870   echo "$ac_t""yes" 1>&6
8871     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8872   cat >> confdefs.h <<EOF
8873 #define $ac_tr_hdr 1
8874 EOF
8875  
8876 else
8877   echo "$ac_t""no" 1>&6
8878 fi
8879 done
8880
8881
8882
8883
8884 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
8885 echo "configure:8886: checking for dlopen" >&5
8886 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
8887   echo $ac_n "(cached) $ac_c" 1>&6
8888 else
8889   cat > conftest.$ac_ext <<EOF
8890 #line 8891 "configure"
8891 #include "confdefs.h"
8892 /* System header to define __stub macros and hopefully few prototypes,
8893     which can conflict with char dlopen(); below.  */
8894 #include <assert.h>
8895 /* Override any gcc2 internal prototype to avoid an error.  */
8896 /* We use char because int might match the return type of a gcc2
8897     builtin and then its argument prototype would still apply.  */
8898 char dlopen();
8899 char (*f)();
8900
8901 int main() {
8902
8903 /* The GNU C library defines this for functions which it implements
8904     to always fail with ENOSYS.  Some functions are actually named
8905     something starting with __ and the normal name is an alias.  */
8906 #if defined (__stub_dlopen) || defined (__stub___dlopen)
8907 choke me
8908 #else
8909 f = dlopen;
8910 #endif
8911
8912 ; return 0; }
8913 EOF
8914 if { (eval echo configure:8915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8915   rm -rf conftest*
8916   eval "ac_cv_func_dlopen=yes"
8917 else
8918   echo "configure: failed program was:" >&5
8919   cat conftest.$ac_ext >&5
8920   rm -rf conftest*
8921   eval "ac_cv_func_dlopen=no"
8922 fi
8923 rm -f conftest*
8924 fi
8925
8926 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
8927   echo "$ac_t""yes" 1>&6
8928   :
8929 else
8930   echo "$ac_t""no" 1>&6
8931 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
8932 echo "configure:8933: checking for dlopen in -ldl" >&5
8933 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
8934 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8935   echo $ac_n "(cached) $ac_c" 1>&6
8936 else
8937   ac_save_LIBS="$LIBS"
8938 LIBS="-ldl  $LIBS"
8939 cat > conftest.$ac_ext <<EOF
8940 #line 8941 "configure"
8941 #include "confdefs.h"
8942 /* Override any gcc2 internal prototype to avoid an error.  */
8943 /* We use char because int might match the return type of a gcc2
8944     builtin and then its argument prototype would still apply.  */
8945 char dlopen();
8946
8947 int main() {
8948 dlopen()
8949 ; return 0; }
8950 EOF
8951 if { (eval echo configure:8952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8952   rm -rf conftest*
8953   eval "ac_cv_lib_$ac_lib_var=yes"
8954 else
8955   echo "configure: failed program was:" >&5
8956   cat conftest.$ac_ext >&5
8957   rm -rf conftest*
8958   eval "ac_cv_lib_$ac_lib_var=no"
8959 fi
8960 rm -f conftest*
8961 LIBS="$ac_save_LIBS"
8962
8963 fi
8964 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8965   echo "$ac_t""yes" 1>&6
8966     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8967     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8968   cat >> confdefs.h <<EOF
8969 #define $ac_tr_lib 1
8970 EOF
8971
8972   LIBS="-ldl $LIBS"
8973
8974 else
8975   echo "$ac_t""no" 1>&6
8976 fi
8977
8978 fi
8979
8980
8981 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
8982 echo "configure:8983: checking for sigset in -lV3" >&5
8983 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
8984 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8985   echo $ac_n "(cached) $ac_c" 1>&6
8986 else
8987   ac_save_LIBS="$LIBS"
8988 LIBS="-lV3  $LIBS"
8989 cat > conftest.$ac_ext <<EOF
8990 #line 8991 "configure"
8991 #include "confdefs.h"
8992 /* Override any gcc2 internal prototype to avoid an error.  */
8993 /* We use char because int might match the return type of a gcc2
8994     builtin and then its argument prototype would still apply.  */
8995 char sigset();
8996
8997 int main() {
8998 sigset()
8999 ; return 0; }
9000 EOF
9001 if { (eval echo configure:9002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9002   rm -rf conftest*
9003   eval "ac_cv_lib_$ac_lib_var=yes"
9004 else
9005   echo "configure: failed program was:" >&5
9006   cat conftest.$ac_ext >&5
9007   rm -rf conftest*
9008   eval "ac_cv_lib_$ac_lib_var=no"
9009 fi
9010 rm -f conftest*
9011 LIBS="$ac_save_LIBS"
9012
9013 fi
9014 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9015   echo "$ac_t""yes" 1>&6
9016     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9017     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9018   cat >> confdefs.h <<EOF
9019 #define $ac_tr_lib 1
9020 EOF
9021
9022   LIBS="-lV3 $LIBS"
9023
9024 else
9025   echo "$ac_t""no" 1>&6
9026 fi
9027
9028
9029 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9030 echo "configure:9031: checking for winsock" >&5
9031 save_LIBS="$LIBS"
9032 for curlib in ws2_32 wsock32; do
9033         LIBS="$LIBS -l$curlib"
9034         cat > conftest.$ac_ext <<EOF
9035 #line 9036 "configure"
9036 #include "confdefs.h"
9037
9038                         char socket@12();
9039                         char select@20();
9040                         char closesocket@4();
9041                         char gethostname@8();
9042                         
9043 int main() {
9044
9045                         socket@12();
9046                         select@20();
9047                         closesocket@4();
9048                         gethostname@8();
9049                         
9050 ; return 0; }
9051 EOF
9052 if { (eval echo configure:9053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9053   rm -rf conftest*
9054   have_winsock=yes
9055 else
9056   echo "configure: failed program was:" >&5
9057   cat conftest.$ac_ext >&5
9058   rm -rf conftest*
9059   have_winsock=no
9060 fi
9061 rm -f conftest*
9062
9063         if test $have_winsock = yes; then
9064                 cat >> confdefs.h <<\EOF
9065 #define HAVE_WINSOCK 1
9066 EOF
9067
9068                 ac_cv_func_socket=yes
9069                 ac_cv_func_select=yes
9070                 ac_cv_func_closesocket=yes
9071                 ac_cv_func_gethostname=yes
9072                 if test $curlib = ws2_32; then
9073                         have_winsock=winsock2
9074                         cat >> confdefs.h <<\EOF
9075 #define HAVE_WINSOCK2 1
9076 EOF
9077
9078                 fi
9079                 break
9080         fi
9081         LIBS="$save_LIBS"
9082 done
9083 echo "$ac_t""$have_winsock" 1>&6
9084
9085
9086 echo $ac_n "checking for socket""... $ac_c" 1>&6
9087 echo "configure:9088: checking for socket" >&5
9088 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9089   echo $ac_n "(cached) $ac_c" 1>&6
9090 else
9091   cat > conftest.$ac_ext <<EOF
9092 #line 9093 "configure"
9093 #include "confdefs.h"
9094 /* System header to define __stub macros and hopefully few prototypes,
9095     which can conflict with char socket(); below.  */
9096 #include <assert.h>
9097 /* Override any gcc2 internal prototype to avoid an error.  */
9098 /* We use char because int might match the return type of a gcc2
9099     builtin and then its argument prototype would still apply.  */
9100 char socket();
9101 char (*f)();
9102
9103 int main() {
9104
9105 /* The GNU C library defines this for functions which it implements
9106     to always fail with ENOSYS.  Some functions are actually named
9107     something starting with __ and the normal name is an alias.  */
9108 #if defined (__stub_socket) || defined (__stub___socket)
9109 choke me
9110 #else
9111 f = socket;
9112 #endif
9113
9114 ; return 0; }
9115 EOF
9116 if { (eval echo configure:9117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9117   rm -rf conftest*
9118   eval "ac_cv_func_socket=yes"
9119 else
9120   echo "configure: failed program was:" >&5
9121   cat conftest.$ac_ext >&5
9122   rm -rf conftest*
9123   eval "ac_cv_func_socket=no"
9124 fi
9125 rm -f conftest*
9126 fi
9127
9128 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9129   echo "$ac_t""yes" 1>&6
9130   :
9131 else
9132   echo "$ac_t""no" 1>&6
9133         
9134         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9135 echo "configure:9136: checking for main in -lsocket" >&5
9136 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9137 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9138   echo $ac_n "(cached) $ac_c" 1>&6
9139 else
9140   ac_save_LIBS="$LIBS"
9141 LIBS="-lsocket  $LIBS"
9142 cat > conftest.$ac_ext <<EOF
9143 #line 9144 "configure"
9144 #include "confdefs.h"
9145
9146 int main() {
9147 main()
9148 ; return 0; }
9149 EOF
9150 if { (eval echo configure:9151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9151   rm -rf conftest*
9152   eval "ac_cv_lib_$ac_lib_var=yes"
9153 else
9154   echo "configure: failed program was:" >&5
9155   cat conftest.$ac_ext >&5
9156   rm -rf conftest*
9157   eval "ac_cv_lib_$ac_lib_var=no"
9158 fi
9159 rm -f conftest*
9160 LIBS="$ac_save_LIBS"
9161
9162 fi
9163 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9164   echo "$ac_t""yes" 1>&6
9165     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9166     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9167   cat >> confdefs.h <<EOF
9168 #define $ac_tr_lib 1
9169 EOF
9170
9171   LIBS="-lsocket $LIBS"
9172
9173 else
9174   echo "$ac_t""no" 1>&6
9175 fi
9176
9177         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9178 echo "configure:9179: checking for main in -lnet" >&5
9179 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9180 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9181   echo $ac_n "(cached) $ac_c" 1>&6
9182 else
9183   ac_save_LIBS="$LIBS"
9184 LIBS="-lnet  $LIBS"
9185 cat > conftest.$ac_ext <<EOF
9186 #line 9187 "configure"
9187 #include "confdefs.h"
9188
9189 int main() {
9190 main()
9191 ; return 0; }
9192 EOF
9193 if { (eval echo configure:9194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9194   rm -rf conftest*
9195   eval "ac_cv_lib_$ac_lib_var=yes"
9196 else
9197   echo "configure: failed program was:" >&5
9198   cat conftest.$ac_ext >&5
9199   rm -rf conftest*
9200   eval "ac_cv_lib_$ac_lib_var=no"
9201 fi
9202 rm -f conftest*
9203 LIBS="$ac_save_LIBS"
9204
9205 fi
9206 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9207   echo "$ac_t""yes" 1>&6
9208     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9209     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9210   cat >> confdefs.h <<EOF
9211 #define $ac_tr_lib 1
9212 EOF
9213
9214   LIBS="-lnet $LIBS"
9215
9216 else
9217   echo "$ac_t""no" 1>&6
9218 fi
9219
9220         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9221 echo "configure:9222: checking for main in -lnsl_s" >&5
9222 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9223 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9224   echo $ac_n "(cached) $ac_c" 1>&6
9225 else
9226   ac_save_LIBS="$LIBS"
9227 LIBS="-lnsl_s  $LIBS"
9228 cat > conftest.$ac_ext <<EOF
9229 #line 9230 "configure"
9230 #include "confdefs.h"
9231
9232 int main() {
9233 main()
9234 ; return 0; }
9235 EOF
9236 if { (eval echo configure:9237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9237   rm -rf conftest*
9238   eval "ac_cv_lib_$ac_lib_var=yes"
9239 else
9240   echo "configure: failed program was:" >&5
9241   cat conftest.$ac_ext >&5
9242   rm -rf conftest*
9243   eval "ac_cv_lib_$ac_lib_var=no"
9244 fi
9245 rm -f conftest*
9246 LIBS="$ac_save_LIBS"
9247
9248 fi
9249 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9250   echo "$ac_t""yes" 1>&6
9251     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9252     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9253   cat >> confdefs.h <<EOF
9254 #define $ac_tr_lib 1
9255 EOF
9256
9257   LIBS="-lnsl_s $LIBS"
9258
9259 else
9260   echo "$ac_t""no" 1>&6
9261 fi
9262
9263         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9264 echo "configure:9265: checking for main in -lnsl" >&5
9265 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9266 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9267   echo $ac_n "(cached) $ac_c" 1>&6
9268 else
9269   ac_save_LIBS="$LIBS"
9270 LIBS="-lnsl  $LIBS"
9271 cat > conftest.$ac_ext <<EOF
9272 #line 9273 "configure"
9273 #include "confdefs.h"
9274
9275 int main() {
9276 main()
9277 ; return 0; }
9278 EOF
9279 if { (eval echo configure:9280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9280   rm -rf conftest*
9281   eval "ac_cv_lib_$ac_lib_var=yes"
9282 else
9283   echo "configure: failed program was:" >&5
9284   cat conftest.$ac_ext >&5
9285   rm -rf conftest*
9286   eval "ac_cv_lib_$ac_lib_var=no"
9287 fi
9288 rm -f conftest*
9289 LIBS="$ac_save_LIBS"
9290
9291 fi
9292 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9293   echo "$ac_t""yes" 1>&6
9294     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9295     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9296   cat >> confdefs.h <<EOF
9297 #define $ac_tr_lib 1
9298 EOF
9299
9300   LIBS="-lnsl $LIBS"
9301
9302 else
9303   echo "$ac_t""no" 1>&6
9304 fi
9305
9306         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9307 echo "configure:9308: checking for socket in -linet" >&5
9308 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9309 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9310   echo $ac_n "(cached) $ac_c" 1>&6
9311 else
9312   ac_save_LIBS="$LIBS"
9313 LIBS="-linet  $LIBS"
9314 cat > conftest.$ac_ext <<EOF
9315 #line 9316 "configure"
9316 #include "confdefs.h"
9317 /* Override any gcc2 internal prototype to avoid an error.  */
9318 /* We use char because int might match the return type of a gcc2
9319     builtin and then its argument prototype would still apply.  */
9320 char socket();
9321
9322 int main() {
9323 socket()
9324 ; return 0; }
9325 EOF
9326 if { (eval echo configure:9327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9327   rm -rf conftest*
9328   eval "ac_cv_lib_$ac_lib_var=yes"
9329 else
9330   echo "configure: failed program was:" >&5
9331   cat conftest.$ac_ext >&5
9332   rm -rf conftest*
9333   eval "ac_cv_lib_$ac_lib_var=no"
9334 fi
9335 rm -f conftest*
9336 LIBS="$ac_save_LIBS"
9337
9338 fi
9339 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9340   echo "$ac_t""yes" 1>&6
9341     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9342     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9343   cat >> confdefs.h <<EOF
9344 #define $ac_tr_lib 1
9345 EOF
9346
9347   LIBS="-linet $LIBS"
9348
9349 else
9350   echo "$ac_t""no" 1>&6
9351 fi
9352
9353         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9354 echo "configure:9355: checking for main in -lgen" >&5
9355 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9356 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9357   echo $ac_n "(cached) $ac_c" 1>&6
9358 else
9359   ac_save_LIBS="$LIBS"
9360 LIBS="-lgen  $LIBS"
9361 cat > conftest.$ac_ext <<EOF
9362 #line 9363 "configure"
9363 #include "confdefs.h"
9364
9365 int main() {
9366 main()
9367 ; return 0; }
9368 EOF
9369 if { (eval echo configure:9370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9370   rm -rf conftest*
9371   eval "ac_cv_lib_$ac_lib_var=yes"
9372 else
9373   echo "configure: failed program was:" >&5
9374   cat conftest.$ac_ext >&5
9375   rm -rf conftest*
9376   eval "ac_cv_lib_$ac_lib_var=no"
9377 fi
9378 rm -f conftest*
9379 LIBS="$ac_save_LIBS"
9380
9381 fi
9382 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9383   echo "$ac_t""yes" 1>&6
9384     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9385     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9386   cat >> confdefs.h <<EOF
9387 #define $ac_tr_lib 1
9388 EOF
9389
9390   LIBS="-lgen $LIBS"
9391
9392 else
9393   echo "$ac_t""no" 1>&6
9394 fi
9395
9396
9397 fi
9398
9399
9400 echo $ac_n "checking for select""... $ac_c" 1>&6
9401 echo "configure:9402: checking for select" >&5
9402 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9403   echo $ac_n "(cached) $ac_c" 1>&6
9404 else
9405   cat > conftest.$ac_ext <<EOF
9406 #line 9407 "configure"
9407 #include "confdefs.h"
9408 /* System header to define __stub macros and hopefully few prototypes,
9409     which can conflict with char select(); below.  */
9410 #include <assert.h>
9411 /* Override any gcc2 internal prototype to avoid an error.  */
9412 /* We use char because int might match the return type of a gcc2
9413     builtin and then its argument prototype would still apply.  */
9414 char select();
9415 char (*f)();
9416
9417 int main() {
9418
9419 /* The GNU C library defines this for functions which it implements
9420     to always fail with ENOSYS.  Some functions are actually named
9421     something starting with __ and the normal name is an alias.  */
9422 #if defined (__stub_select) || defined (__stub___select)
9423 choke me
9424 #else
9425 f = select;
9426 #endif
9427
9428 ; return 0; }
9429 EOF
9430 if { (eval echo configure:9431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9431   rm -rf conftest*
9432   eval "ac_cv_func_select=yes"
9433 else
9434   echo "configure: failed program was:" >&5
9435   cat conftest.$ac_ext >&5
9436   rm -rf conftest*
9437   eval "ac_cv_func_select=no"
9438 fi
9439 rm -f conftest*
9440 fi
9441
9442 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9443   echo "$ac_t""yes" 1>&6
9444   :
9445 else
9446   echo "$ac_t""no" 1>&6
9447 { echo "configure: error: select() required." 1>&2; exit 1; }
9448 fi
9449
9450
9451 if test "${ac_cv_header_winsock_h}" != yes; then
9452                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9453 echo "configure:9454: checking types of arguments for select()" >&5
9454  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9455   echo $ac_n "(cached) $ac_c" 1>&6
9456 else
9457    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9458   echo $ac_n "(cached) $ac_c" 1>&6
9459 else
9460     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9461   echo $ac_n "(cached) $ac_c" 1>&6
9462 else
9463      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9464      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9465       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9466        cat > conftest.$ac_ext <<EOF
9467 #line 9468 "configure"
9468 #include "confdefs.h"
9469 #ifdef HAVE_SYS_TYPES_H
9470 #include <sys/types.h>
9471 #endif
9472 #ifdef HAVE_SYS_TIME_H
9473 #include <sys/time.h>
9474 #endif
9475 #ifdef HAVE_SYS_SELECT_H
9476 #include <sys/select.h>
9477 #endif
9478 #ifdef HAVE_SYS_SOCKET_H
9479 #include <sys/socket.h>
9480 #endif
9481 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);
9482 int main() {
9483
9484 ; return 0; }
9485 EOF
9486 if { (eval echo configure:9487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9487   rm -rf conftest*
9488           ac_not_found=no ; break 3
9489 else
9490   echo "configure: failed program was:" >&5
9491   cat conftest.$ac_ext >&5
9492   rm -rf conftest*
9493   ac_not_found=yes
9494 fi
9495 rm -f conftest*
9496       done
9497      done
9498     done
9499    
9500 fi
9501   
9502 fi
9503  
9504 fi
9505  if test "$ac_not_found" = yes; then
9506   ac_cv_func_select_arg1=int 
9507   ac_cv_func_select_arg234='int *' 
9508   ac_cv_func_select_arg5='struct timeval *'
9509  fi
9510  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9511  cat >> confdefs.h <<EOF
9512 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9513 EOF
9514
9515  cat >> confdefs.h <<EOF
9516 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9517 EOF
9518
9519  cat >> confdefs.h <<EOF
9520 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9521 EOF
9522
9523
9524 fi
9525
9526
9527 for ac_hdr in regex.h 
9528 do
9529 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9530 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9531 echo "configure:9532: checking for $ac_hdr" >&5
9532 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9533   echo $ac_n "(cached) $ac_c" 1>&6
9534 else
9535   cat > conftest.$ac_ext <<EOF
9536 #line 9537 "configure"
9537 #include "confdefs.h"
9538 #include <$ac_hdr>
9539 EOF
9540 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9541 { (eval echo configure:9542: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9542 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9543 if test -z "$ac_err"; then
9544   rm -rf conftest*
9545   eval "ac_cv_header_$ac_safe=yes"
9546 else
9547   echo "$ac_err" >&5
9548   echo "configure: failed program was:" >&5
9549   cat conftest.$ac_ext >&5
9550   rm -rf conftest*
9551   eval "ac_cv_header_$ac_safe=no"
9552 fi
9553 rm -f conftest*
9554 fi
9555 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9556   echo "$ac_t""yes" 1>&6
9557     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9558   cat >> confdefs.h <<EOF
9559 #define $ac_tr_hdr 1
9560 EOF
9561  
9562 else
9563   echo "$ac_t""no" 1>&6
9564 fi
9565 done
9566
9567 if test "$ac_cv_header_regex_h" != yes ; then
9568         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9569 fi
9570
9571 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9572 echo "configure:9573: checking for library containing regfree" >&5
9573 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9574   echo $ac_n "(cached) $ac_c" 1>&6
9575 else
9576   ac_func_search_save_LIBS="$LIBS"
9577 ac_cv_search_regfree="no"
9578 cat > conftest.$ac_ext <<EOF
9579 #line 9580 "configure"
9580 #include "confdefs.h"
9581 /* Override any gcc2 internal prototype to avoid an error.  */
9582 /* We use char because int might match the return type of a gcc2
9583     builtin and then its argument prototype would still apply.  */
9584 char regfree();
9585
9586 int main() {
9587 regfree()
9588 ; return 0; }
9589 EOF
9590 if { (eval echo configure:9591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9591   rm -rf conftest*
9592   ac_cv_search_regfree="none required"
9593 else
9594   echo "configure: failed program was:" >&5
9595   cat conftest.$ac_ext >&5
9596 fi
9597 rm -f conftest*
9598 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9599 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9600 cat > conftest.$ac_ext <<EOF
9601 #line 9602 "configure"
9602 #include "confdefs.h"
9603 /* Override any gcc2 internal prototype to avoid an error.  */
9604 /* We use char because int might match the return type of a gcc2
9605     builtin and then its argument prototype would still apply.  */
9606 char regfree();
9607
9608 int main() {
9609 regfree()
9610 ; return 0; }
9611 EOF
9612 if { (eval echo configure:9613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9613   rm -rf conftest*
9614   ac_cv_search_regfree="-l$ac_lib"
9615 break
9616 else
9617   echo "configure: failed program was:" >&5
9618   cat conftest.$ac_ext >&5
9619 fi
9620 rm -f conftest*
9621 done
9622 LIBS="$ac_func_search_save_LIBS"
9623 fi
9624
9625 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9626 if test "$ac_cv_search_regfree" != "no"; then
9627   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9628   :
9629 else :
9630   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9631 fi
9632
9633
9634 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9635 echo "configure:9636: checking for compatible POSIX regex" >&5
9636 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9637   echo $ac_n "(cached) $ac_c" 1>&6
9638 else
9639   
9640         if test "$cross_compiling" = yes; then
9641   ol_cv_c_posix_regex=cross
9642 else
9643   cat > conftest.$ac_ext <<EOF
9644 #line 9645 "configure"
9645 #include "confdefs.h"
9646
9647 #include <sys/types.h>
9648 #include <regex.h>
9649 static char *pattern, *string;
9650 main()
9651 {
9652         int rc;
9653         regex_t re;
9654
9655         pattern = "^A";
9656
9657         if(regcomp(&re, pattern, 0)) {
9658                 return -1;
9659         }
9660         
9661         string = "ALL MATCH";
9662         
9663         rc = regexec(&re, string, 0, (void*)0, 0);
9664
9665         regfree(&re);
9666
9667         return rc;
9668 }
9669 EOF
9670 if { (eval echo configure:9671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9671 then
9672   ol_cv_c_posix_regex=yes
9673 else
9674   echo "configure: failed program was:" >&5
9675   cat conftest.$ac_ext >&5
9676   rm -fr conftest*
9677   ol_cv_c_posix_regex=no
9678 fi
9679 rm -fr conftest*
9680 fi
9681
9682 fi
9683
9684 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9685
9686 if test "$ol_cv_c_posix_regex" = no ; then
9687         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9688 fi
9689
9690 echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9691 echo "configure:9692: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9692 save_LIBS="$LIBS"
9693 LIBS="$LIBS -lrpcrt4"
9694 cat > conftest.$ac_ext <<EOF
9695 #line 9696 "configure"
9696 #include "confdefs.h"
9697
9698                 char UuidCreate@4();
9699                 char UuidToStringA@8();
9700                 
9701 int main() {
9702
9703                 UuidCreate@4();
9704                 UuidToStringA@8();
9705                 
9706 ; return 0; }
9707 EOF
9708 if { (eval echo configure:9709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9709   rm -rf conftest*
9710   need_rpcrt=yes
9711 else
9712   echo "configure: failed program was:" >&5
9713   cat conftest.$ac_ext >&5
9714   rm -rf conftest*
9715   need_rpcrt=no
9716 fi
9717 rm -f conftest*
9718 if test $need_rpcrt = yes; then
9719         SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9720 fi
9721 LIBS="$save_LIBS"
9722 echo "$ac_t""$need_rpcrt" 1>&6
9723
9724 ol_link_dnssrv=no
9725 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9726 echo "configure:9727: checking for res_query" >&5
9727 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9728   echo $ac_n "(cached) $ac_c" 1>&6
9729 else
9730   cat > conftest.$ac_ext <<EOF
9731 #line 9732 "configure"
9732 #include "confdefs.h"
9733 /* System header to define __stub macros and hopefully few prototypes,
9734     which can conflict with char res_query(); below.  */
9735 #include <assert.h>
9736 /* Override any gcc2 internal prototype to avoid an error.  */
9737 /* We use char because int might match the return type of a gcc2
9738     builtin and then its argument prototype would still apply.  */
9739 char res_query();
9740 char (*f)();
9741
9742 int main() {
9743
9744 /* The GNU C library defines this for functions which it implements
9745     to always fail with ENOSYS.  Some functions are actually named
9746     something starting with __ and the normal name is an alias.  */
9747 #if defined (__stub_res_query) || defined (__stub___res_query)
9748 choke me
9749 #else
9750 f = res_query;
9751 #endif
9752
9753 ; return 0; }
9754 EOF
9755 if { (eval echo configure:9756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9756   rm -rf conftest*
9757   eval "ac_cv_func_res_query=yes"
9758 else
9759   echo "configure: failed program was:" >&5
9760   cat conftest.$ac_ext >&5
9761   rm -rf conftest*
9762   eval "ac_cv_func_res_query=no"
9763 fi
9764 rm -f conftest*
9765 fi
9766
9767 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9768   echo "$ac_t""yes" 1>&6
9769   :
9770 else
9771   echo "$ac_t""no" 1>&6
9772 fi
9773
9774 if test $ac_cv_func_res_query = no ; then 
9775         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9776 echo "configure:9777: checking for __res_query" >&5
9777 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9778   echo $ac_n "(cached) $ac_c" 1>&6
9779 else
9780   cat > conftest.$ac_ext <<EOF
9781 #line 9782 "configure"
9782 #include "confdefs.h"
9783 /* System header to define __stub macros and hopefully few prototypes,
9784     which can conflict with char __res_query(); below.  */
9785 #include <assert.h>
9786 /* Override any gcc2 internal prototype to avoid an error.  */
9787 /* We use char because int might match the return type of a gcc2
9788     builtin and then its argument prototype would still apply.  */
9789 char __res_query();
9790 char (*f)();
9791
9792 int main() {
9793
9794 /* The GNU C library defines this for functions which it implements
9795     to always fail with ENOSYS.  Some functions are actually named
9796     something starting with __ and the normal name is an alias.  */
9797 #if defined (__stub___res_query) || defined (__stub_____res_query)
9798 choke me
9799 #else
9800 f = __res_query;
9801 #endif
9802
9803 ; return 0; }
9804 EOF
9805 if { (eval echo configure:9806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9806   rm -rf conftest*
9807   eval "ac_cv_func___res_query=yes"
9808 else
9809   echo "configure: failed program was:" >&5
9810   cat conftest.$ac_ext >&5
9811   rm -rf conftest*
9812   eval "ac_cv_func___res_query=no"
9813 fi
9814 rm -f conftest*
9815 fi
9816
9817 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
9818   echo "$ac_t""yes" 1>&6
9819   :
9820 else
9821   echo "$ac_t""no" 1>&6
9822 fi
9823
9824         ac_cv_func_res_query=$ac_cv_func___res_query
9825 fi
9826
9827 if test $ac_cv_func_res_query = no ; then 
9828         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
9829 echo "configure:9830: checking for res_query in -lbind" >&5
9830 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
9831 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9832   echo $ac_n "(cached) $ac_c" 1>&6
9833 else
9834   ac_save_LIBS="$LIBS"
9835 LIBS="-lbind  $LIBS"
9836 cat > conftest.$ac_ext <<EOF
9837 #line 9838 "configure"
9838 #include "confdefs.h"
9839 /* Override any gcc2 internal prototype to avoid an error.  */
9840 /* We use char because int might match the return type of a gcc2
9841     builtin and then its argument prototype would still apply.  */
9842 char res_query();
9843
9844 int main() {
9845 res_query()
9846 ; return 0; }
9847 EOF
9848 if { (eval echo configure:9849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9849   rm -rf conftest*
9850   eval "ac_cv_lib_$ac_lib_var=yes"
9851 else
9852   echo "configure: failed program was:" >&5
9853   cat conftest.$ac_ext >&5
9854   rm -rf conftest*
9855   eval "ac_cv_lib_$ac_lib_var=no"
9856 fi
9857 rm -f conftest*
9858 LIBS="$ac_save_LIBS"
9859
9860 fi
9861 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9862   echo "$ac_t""yes" 1>&6
9863     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9864     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9865   cat >> confdefs.h <<EOF
9866 #define $ac_tr_lib 1
9867 EOF
9868
9869   LIBS="-lbind $LIBS"
9870
9871 else
9872   echo "$ac_t""no" 1>&6
9873 fi
9874
9875         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
9876 fi
9877
9878 if test $ac_cv_func_res_query = no ; then 
9879         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
9880 echo "configure:9881: checking for __res_query in -lbind" >&5
9881 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
9882 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9883   echo $ac_n "(cached) $ac_c" 1>&6
9884 else
9885   ac_save_LIBS="$LIBS"
9886 LIBS="-lbind  $LIBS"
9887 cat > conftest.$ac_ext <<EOF
9888 #line 9889 "configure"
9889 #include "confdefs.h"
9890 /* Override any gcc2 internal prototype to avoid an error.  */
9891 /* We use char because int might match the return type of a gcc2
9892     builtin and then its argument prototype would still apply.  */
9893 char __res_query();
9894
9895 int main() {
9896 __res_query()
9897 ; return 0; }
9898 EOF
9899 if { (eval echo configure:9900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9900   rm -rf conftest*
9901   eval "ac_cv_lib_$ac_lib_var=yes"
9902 else
9903   echo "configure: failed program was:" >&5
9904   cat conftest.$ac_ext >&5
9905   rm -rf conftest*
9906   eval "ac_cv_lib_$ac_lib_var=no"
9907 fi
9908 rm -f conftest*
9909 LIBS="$ac_save_LIBS"
9910
9911 fi
9912 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9913   echo "$ac_t""yes" 1>&6
9914     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9915     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9916   cat >> confdefs.h <<EOF
9917 #define $ac_tr_lib 1
9918 EOF
9919
9920   LIBS="-lbind $LIBS"
9921
9922 else
9923   echo "$ac_t""no" 1>&6
9924 fi
9925
9926         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
9927 fi
9928
9929 if test $ac_cv_func_res_query = no ; then 
9930         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
9931 echo "configure:9932: checking for res_query in -lresolv" >&5
9932 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
9933 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9934   echo $ac_n "(cached) $ac_c" 1>&6
9935 else
9936   ac_save_LIBS="$LIBS"
9937 LIBS="-lresolv  $LIBS"
9938 cat > conftest.$ac_ext <<EOF
9939 #line 9940 "configure"
9940 #include "confdefs.h"
9941 /* Override any gcc2 internal prototype to avoid an error.  */
9942 /* We use char because int might match the return type of a gcc2
9943     builtin and then its argument prototype would still apply.  */
9944 char res_query();
9945
9946 int main() {
9947 res_query()
9948 ; return 0; }
9949 EOF
9950 if { (eval echo configure:9951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9951   rm -rf conftest*
9952   eval "ac_cv_lib_$ac_lib_var=yes"
9953 else
9954   echo "configure: failed program was:" >&5
9955   cat conftest.$ac_ext >&5
9956   rm -rf conftest*
9957   eval "ac_cv_lib_$ac_lib_var=no"
9958 fi
9959 rm -f conftest*
9960 LIBS="$ac_save_LIBS"
9961
9962 fi
9963 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9964   echo "$ac_t""yes" 1>&6
9965     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9966     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9967   cat >> confdefs.h <<EOF
9968 #define $ac_tr_lib 1
9969 EOF
9970
9971   LIBS="-lresolv $LIBS"
9972
9973 else
9974   echo "$ac_t""no" 1>&6
9975 fi
9976
9977         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
9978 fi
9979
9980 if test $ac_cv_func_res_query = no ; then 
9981         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
9982 echo "configure:9983: checking for __res_query in -lresolv" >&5
9983 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
9984 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9985   echo $ac_n "(cached) $ac_c" 1>&6
9986 else
9987   ac_save_LIBS="$LIBS"
9988 LIBS="-lresolv  $LIBS"
9989 cat > conftest.$ac_ext <<EOF
9990 #line 9991 "configure"
9991 #include "confdefs.h"
9992 /* Override any gcc2 internal prototype to avoid an error.  */
9993 /* We use char because int might match the return type of a gcc2
9994     builtin and then its argument prototype would still apply.  */
9995 char __res_query();
9996
9997 int main() {
9998 __res_query()
9999 ; return 0; }
10000 EOF
10001 if { (eval echo configure:10002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10002   rm -rf conftest*
10003   eval "ac_cv_lib_$ac_lib_var=yes"
10004 else
10005   echo "configure: failed program was:" >&5
10006   cat conftest.$ac_ext >&5
10007   rm -rf conftest*
10008   eval "ac_cv_lib_$ac_lib_var=no"
10009 fi
10010 rm -f conftest*
10011 LIBS="$ac_save_LIBS"
10012
10013 fi
10014 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10015   echo "$ac_t""yes" 1>&6
10016     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10017     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10018   cat >> confdefs.h <<EOF
10019 #define $ac_tr_lib 1
10020 EOF
10021
10022   LIBS="-lresolv $LIBS"
10023
10024 else
10025   echo "$ac_t""no" 1>&6
10026 fi
10027
10028         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10029 fi
10030
10031 if test "$ac_cv_func_res_query" = yes ; then
10032         cat >> confdefs.h <<\EOF
10033 #define HAVE_RES_QUERY 1
10034 EOF
10035
10036
10037         if test $ol_enable_dnssrv != no ; then
10038                 ol_link_dnssrv=yes
10039         fi
10040 fi
10041
10042 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10043         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10044 fi
10045
10046 for ac_func in getaddrinfo gai_strerror inet_ntop 
10047 do
10048 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10049 echo "configure:10050: checking for $ac_func" >&5
10050 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10051   echo $ac_n "(cached) $ac_c" 1>&6
10052 else
10053   cat > conftest.$ac_ext <<EOF
10054 #line 10055 "configure"
10055 #include "confdefs.h"
10056 /* System header to define __stub macros and hopefully few prototypes,
10057     which can conflict with char $ac_func(); below.  */
10058 #include <assert.h>
10059 /* Override any gcc2 internal prototype to avoid an error.  */
10060 /* We use char because int might match the return type of a gcc2
10061     builtin and then its argument prototype would still apply.  */
10062 char $ac_func();
10063 char (*f)();
10064
10065 int main() {
10066
10067 /* The GNU C library defines this for functions which it implements
10068     to always fail with ENOSYS.  Some functions are actually named
10069     something starting with __ and the normal name is an alias.  */
10070 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10071 choke me
10072 #else
10073 f = $ac_func;
10074 #endif
10075
10076 ; return 0; }
10077 EOF
10078 if { (eval echo configure:10079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10079   rm -rf conftest*
10080   eval "ac_cv_func_$ac_func=yes"
10081 else
10082   echo "configure: failed program was:" >&5
10083   cat conftest.$ac_ext >&5
10084   rm -rf conftest*
10085   eval "ac_cv_func_$ac_func=no"
10086 fi
10087 rm -f conftest*
10088 fi
10089
10090 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10091   echo "$ac_t""yes" 1>&6
10092     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10093   cat >> confdefs.h <<EOF
10094 #define $ac_tr_func 1
10095 EOF
10096  
10097 else
10098   echo "$ac_t""no" 1>&6
10099 fi
10100 done
10101
10102
10103 ol_link_ipv6=no
10104 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10105         if test $ol_enable_ipv6 = yes ; then
10106                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10107         fi
10108 elif test $ol_enable_ipv6 != no ; then
10109         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10110 echo "configure:10111: checking INET6_ADDRSTRLEN" >&5
10111 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10112   echo $ac_n "(cached) $ac_c" 1>&6
10113 else
10114   
10115                 cat > conftest.$ac_ext <<EOF
10116 #line 10117 "configure"
10117 #include "confdefs.h"
10118
10119 #                       include <netinet/in.h>
10120 #                       ifdef INET6_ADDRSTRLEN
10121                                 __has_inet6_addrstrlen__;
10122 #                       endif
10123                 
10124 EOF
10125 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10126   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10127   rm -rf conftest*
10128   ol_cv_inet6_addrstrlen=yes
10129 else
10130   rm -rf conftest*
10131   ol_cv_inet6_addrstrlen=no
10132 fi
10133 rm -f conftest*
10134
10135 fi
10136
10137 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10138
10139         if test $ol_cv_inet6_addrstrlen = yes ; then
10140                 ol_link_ipv6=yes
10141         elif test $ol_enable_ipv6 = yes ; then
10142                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10143         fi
10144 fi
10145
10146 if test $ol_enable_local != no ; then
10147         for ac_hdr in sys/un.h 
10148 do
10149 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10150 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10151 echo "configure:10152: checking for $ac_hdr" >&5
10152 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10153   echo $ac_n "(cached) $ac_c" 1>&6
10154 else
10155   cat > conftest.$ac_ext <<EOF
10156 #line 10157 "configure"
10157 #include "confdefs.h"
10158 #include <$ac_hdr>
10159 EOF
10160 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10161 { (eval echo configure:10162: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10162 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10163 if test -z "$ac_err"; then
10164   rm -rf conftest*
10165   eval "ac_cv_header_$ac_safe=yes"
10166 else
10167   echo "$ac_err" >&5
10168   echo "configure: failed program was:" >&5
10169   cat conftest.$ac_ext >&5
10170   rm -rf conftest*
10171   eval "ac_cv_header_$ac_safe=no"
10172 fi
10173 rm -f conftest*
10174 fi
10175 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10176   echo "$ac_t""yes" 1>&6
10177     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10178   cat >> confdefs.h <<EOF
10179 #define $ac_tr_hdr 1
10180 EOF
10181  
10182 else
10183   echo "$ac_t""no" 1>&6
10184 fi
10185 done
10186
10187
10188         if test $ol_enable_local = auto ; then
10189                 ol_enable_local=$ac_cv_header_sys_un_h
10190         elif test $ac_cv_header_sys_un_h = no ; then
10191                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10192         fi
10193 fi
10194
10195 ol_link_kbind=no
10196 ol_link_kpasswd=no
10197 ol_link_krb5=no
10198 ol_link_krb4=no
10199
10200 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10201         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10202         -o $ol_with_kerberos = k425 ; then
10203
10204         for ac_hdr in krb5.h
10205 do
10206 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10207 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10208 echo "configure:10209: checking for $ac_hdr" >&5
10209 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10210   echo $ac_n "(cached) $ac_c" 1>&6
10211 else
10212   cat > conftest.$ac_ext <<EOF
10213 #line 10214 "configure"
10214 #include "confdefs.h"
10215 #include <$ac_hdr>
10216 EOF
10217 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10218 { (eval echo configure:10219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10219 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10220 if test -z "$ac_err"; then
10221   rm -rf conftest*
10222   eval "ac_cv_header_$ac_safe=yes"
10223 else
10224   echo "$ac_err" >&5
10225   echo "configure: failed program was:" >&5
10226   cat conftest.$ac_ext >&5
10227   rm -rf conftest*
10228   eval "ac_cv_header_$ac_safe=no"
10229 fi
10230 rm -f conftest*
10231 fi
10232 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10233   echo "$ac_t""yes" 1>&6
10234     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10235   cat >> confdefs.h <<EOF
10236 #define $ac_tr_hdr 1
10237 EOF
10238  
10239 else
10240   echo "$ac_t""no" 1>&6
10241 fi
10242 done
10243
10244
10245         if test $ac_cv_header_krb5_h = yes ; then
10246                                 for ac_hdr in heim_err.h
10247 do
10248 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10249 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10250 echo "configure:10251: checking for $ac_hdr" >&5
10251 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10252   echo $ac_n "(cached) $ac_c" 1>&6
10253 else
10254   cat > conftest.$ac_ext <<EOF
10255 #line 10256 "configure"
10256 #include "confdefs.h"
10257 #include <$ac_hdr>
10258 EOF
10259 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10260 { (eval echo configure:10261: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10261 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10262 if test -z "$ac_err"; then
10263   rm -rf conftest*
10264   eval "ac_cv_header_$ac_safe=yes"
10265 else
10266   echo "$ac_err" >&5
10267   echo "configure: failed program was:" >&5
10268   cat conftest.$ac_ext >&5
10269   rm -rf conftest*
10270   eval "ac_cv_header_$ac_safe=no"
10271 fi
10272 rm -f conftest*
10273 fi
10274 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10275   echo "$ac_t""yes" 1>&6
10276     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10277   cat >> confdefs.h <<EOF
10278 #define $ac_tr_hdr 1
10279 EOF
10280  
10281 else
10282   echo "$ac_t""no" 1>&6
10283 fi
10284 done
10285
10286                 if test $ac_cv_header_heim_err_h = yes ; then
10287                         krb5_impl=heimdal
10288                 else
10289                         krb5_impl=mit
10290                 fi
10291
10292                 if test $krb5_impl = mit; then
10293                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10294 echo "configure:10295: checking for main in -lk5crypto" >&5
10295 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10296 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10297   echo $ac_n "(cached) $ac_c" 1>&6
10298 else
10299   ac_save_LIBS="$LIBS"
10300 LIBS="-lk5crypto  $LIBS"
10301 cat > conftest.$ac_ext <<EOF
10302 #line 10303 "configure"
10303 #include "confdefs.h"
10304
10305 int main() {
10306 main()
10307 ; return 0; }
10308 EOF
10309 if { (eval echo configure:10310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10310   rm -rf conftest*
10311   eval "ac_cv_lib_$ac_lib_var=yes"
10312 else
10313   echo "configure: failed program was:" >&5
10314   cat conftest.$ac_ext >&5
10315   rm -rf conftest*
10316   eval "ac_cv_lib_$ac_lib_var=no"
10317 fi
10318 rm -f conftest*
10319 LIBS="$ac_save_LIBS"
10320
10321 fi
10322 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10323   echo "$ac_t""yes" 1>&6
10324   krb5crypto=k5crypto
10325 else
10326   echo "$ac_t""no" 1>&6
10327 krb5crypto=crypto
10328 fi
10329
10330
10331                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10332 echo "configure:10333: checking for main in -lkrb5" >&5
10333 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10334 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10335   echo $ac_n "(cached) $ac_c" 1>&6
10336 else
10337   ac_save_LIBS="$LIBS"
10338 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10339 cat > conftest.$ac_ext <<EOF
10340 #line 10341 "configure"
10341 #include "confdefs.h"
10342
10343 int main() {
10344 main()
10345 ; return 0; }
10346 EOF
10347 if { (eval echo configure:10348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10348   rm -rf conftest*
10349   eval "ac_cv_lib_$ac_lib_var=yes"
10350 else
10351   echo "configure: failed program was:" >&5
10352   cat conftest.$ac_ext >&5
10353   rm -rf conftest*
10354   eval "ac_cv_lib_$ac_lib_var=no"
10355 fi
10356 rm -f conftest*
10357 LIBS="$ac_save_LIBS"
10358
10359 fi
10360 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10361   echo "$ac_t""yes" 1>&6
10362   have_krb5=yes
10363                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10364 else
10365   echo "$ac_t""no" 1>&6
10366 have_krb5=no
10367 fi
10368
10369
10370                 elif test $krb5_impl = heimdal; then
10371                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10372 echo "configure:10373: checking for main in -lkrb5" >&5
10373 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10374 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10375   echo $ac_n "(cached) $ac_c" 1>&6
10376 else
10377   ac_save_LIBS="$LIBS"
10378 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
10379 cat > conftest.$ac_ext <<EOF
10380 #line 10381 "configure"
10381 #include "confdefs.h"
10382
10383 int main() {
10384 main()
10385 ; return 0; }
10386 EOF
10387 if { (eval echo configure:10388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10388   rm -rf conftest*
10389   eval "ac_cv_lib_$ac_lib_var=yes"
10390 else
10391   echo "configure: failed program was:" >&5
10392   cat conftest.$ac_ext >&5
10393   rm -rf conftest*
10394   eval "ac_cv_lib_$ac_lib_var=no"
10395 fi
10396 rm -f conftest*
10397 LIBS="$ac_save_LIBS"
10398
10399 fi
10400 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10401   echo "$ac_t""yes" 1>&6
10402   have_krb5=yes
10403                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
10404 else
10405   echo "$ac_t""no" 1>&6
10406 have_krb5=no
10407 fi
10408
10409
10410                         cat >> confdefs.h <<\EOF
10411 #define HAVE_HEIMDAL_KERBEROS 1
10412 EOF
10413
10414
10415                 else
10416                         have_krb5=no
10417                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
10418                 fi
10419
10420                 if test $have_krb5 = yes ; then
10421                         ol_link_krb5=yes
10422
10423                         cat >> confdefs.h <<\EOF
10424 #define HAVE_KRB5 1
10425 EOF
10426
10427
10428                         if test $ol_enable_kpasswd != no ; then
10429                                 ol_link_kpasswd=yes;
10430                         fi
10431
10432                         if test $ol_with_kerberos = k5only ; then
10433                                 ol_with_kerberos=found
10434                         fi
10435
10436                 elif test $ol_with_kerberos != auto ; then
10437                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10438                 fi
10439
10440         fi
10441 fi
10442
10443 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10444         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10445
10446         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10447 do
10448 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10449 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10450 echo "configure:10451: checking for $ac_hdr" >&5
10451 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10452   echo $ac_n "(cached) $ac_c" 1>&6
10453 else
10454   cat > conftest.$ac_ext <<EOF
10455 #line 10456 "configure"
10456 #include "confdefs.h"
10457 #include <$ac_hdr>
10458 EOF
10459 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10460 { (eval echo configure:10461: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10461 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10462 if test -z "$ac_err"; then
10463   rm -rf conftest*
10464   eval "ac_cv_header_$ac_safe=yes"
10465 else
10466   echo "$ac_err" >&5
10467   echo "configure: failed program was:" >&5
10468   cat conftest.$ac_ext >&5
10469   rm -rf conftest*
10470   eval "ac_cv_header_$ac_safe=no"
10471 fi
10472 rm -f conftest*
10473 fi
10474 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10475   echo "$ac_t""yes" 1>&6
10476     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10477   cat >> confdefs.h <<EOF
10478 #define $ac_tr_hdr 1
10479 EOF
10480  
10481 else
10482   echo "$ac_t""no" 1>&6
10483 fi
10484 done
10485
10486
10487         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10488                 if test $krb5_impl = mit; then
10489                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10490 echo "configure:10491: checking for main in -lkrb4" >&5
10491 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10492 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10493   echo $ac_n "(cached) $ac_c" 1>&6
10494 else
10495   ac_save_LIBS="$LIBS"
10496 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10497 cat > conftest.$ac_ext <<EOF
10498 #line 10499 "configure"
10499 #include "confdefs.h"
10500
10501 int main() {
10502 main()
10503 ; return 0; }
10504 EOF
10505 if { (eval echo configure:10506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10506   rm -rf conftest*
10507   eval "ac_cv_lib_$ac_lib_var=yes"
10508 else
10509   echo "configure: failed program was:" >&5
10510   cat conftest.$ac_ext >&5
10511   rm -rf conftest*
10512   eval "ac_cv_lib_$ac_lib_var=no"
10513 fi
10514 rm -f conftest*
10515 LIBS="$ac_save_LIBS"
10516
10517 fi
10518 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10519   echo "$ac_t""yes" 1>&6
10520   have_k425=yes
10521                                 KRB4_LIBS="-lkrb4 -ldes425"
10522 else
10523   echo "$ac_t""no" 1>&6
10524 have_k425=no
10525 fi
10526
10527
10528                 elif test $krb5_impl = heimdal; then
10529                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10530 echo "configure:10531: checking for main in -lkrb4" >&5
10531 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10532 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10533   echo $ac_n "(cached) $ac_c" 1>&6
10534 else
10535   ac_save_LIBS="$LIBS"
10536 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
10537 cat > conftest.$ac_ext <<EOF
10538 #line 10539 "configure"
10539 #include "confdefs.h"
10540
10541 int main() {
10542 main()
10543 ; return 0; }
10544 EOF
10545 if { (eval echo configure:10546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10546   rm -rf conftest*
10547   eval "ac_cv_lib_$ac_lib_var=yes"
10548 else
10549   echo "configure: failed program was:" >&5
10550   cat conftest.$ac_ext >&5
10551   rm -rf conftest*
10552   eval "ac_cv_lib_$ac_lib_var=no"
10553 fi
10554 rm -f conftest*
10555 LIBS="$ac_save_LIBS"
10556
10557 fi
10558 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10559   echo "$ac_t""yes" 1>&6
10560   have_k425=yes
10561                                 KRB4_LIBS="-lkrb4"
10562 else
10563   echo "$ac_t""no" 1>&6
10564 have_k425=no
10565 fi
10566
10567
10568                 else
10569                         have_425=no
10570                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10571                 fi
10572
10573                 if test $have_k425 = yes ; then
10574                         ol_with_kerberos=found
10575                         ol_link_krb4=yes
10576
10577                         cat >> confdefs.h <<\EOF
10578 #define HAVE_KRB425 1
10579 EOF
10580
10581                         cat >> confdefs.h <<\EOF
10582 #define HAVE_KRB4 1
10583 EOF
10584
10585
10586                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10587 echo "configure:10588: checking for des_debug in Kerberos libraries" >&5
10588 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10589   echo $ac_n "(cached) $ac_c" 1>&6
10590 else
10591   
10592                                                                 save_LIBS="$LIBS"
10593                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10594                                 cat > conftest.$ac_ext <<EOF
10595 #line 10596 "configure"
10596 #include "confdefs.h"
10597
10598 #include <kerberosIV/krb.h>
10599 #include <kerberosIV/des.h>
10600 extern int des_debug;
10601
10602 int main() {
10603
10604 des_debug = 1;
10605
10606 ; return 0; }
10607 EOF
10608 if { (eval echo configure:10609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10609   rm -rf conftest*
10610   ol_cv_var_des_debug=yes
10611 else
10612   echo "configure: failed program was:" >&5
10613   cat conftest.$ac_ext >&5
10614   rm -rf conftest*
10615   ol_cv_var_des_debug=no
10616 fi
10617 rm -f conftest*
10618                                                                 LIBS="$save_LIBS"
10619                         
10620 fi
10621
10622 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10623
10624                         if test $ol_cv_var_des_debug = yes ; then
10625                                 cat >> confdefs.h <<\EOF
10626 #define HAVE_DES_DEBUG 1
10627 EOF
10628
10629                         fi
10630
10631                         LIBS="$save_LIBS"
10632                 fi
10633         fi
10634 fi
10635
10636 if test $ol_link_krb5 = yes ; then
10637         ol_with_kerberos=found
10638 fi
10639
10640 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10641         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10642
10643         for ac_hdr in krb.h des.h krb-archaeology.h 
10644 do
10645 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10646 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10647 echo "configure:10648: checking for $ac_hdr" >&5
10648 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10649   echo $ac_n "(cached) $ac_c" 1>&6
10650 else
10651   cat > conftest.$ac_ext <<EOF
10652 #line 10653 "configure"
10653 #include "confdefs.h"
10654 #include <$ac_hdr>
10655 EOF
10656 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10657 { (eval echo configure:10658: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10658 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10659 if test -z "$ac_err"; then
10660   rm -rf conftest*
10661   eval "ac_cv_header_$ac_safe=yes"
10662 else
10663   echo "$ac_err" >&5
10664   echo "configure: failed program was:" >&5
10665   cat conftest.$ac_ext >&5
10666   rm -rf conftest*
10667   eval "ac_cv_header_$ac_safe=no"
10668 fi
10669 rm -f conftest*
10670 fi
10671 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10672   echo "$ac_t""yes" 1>&6
10673     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10674   cat >> confdefs.h <<EOF
10675 #define $ac_tr_hdr 1
10676 EOF
10677  
10678 else
10679   echo "$ac_t""no" 1>&6
10680 fi
10681 done
10682
10683
10684         if test $ac_cv_header_krb_h = yes ; then
10685                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10686 echo "configure:10687: checking for main in -lkrb" >&5
10687 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10688 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10689   echo $ac_n "(cached) $ac_c" 1>&6
10690 else
10691   ac_save_LIBS="$LIBS"
10692 LIBS="-lkrb -ldes $LIBS"
10693 cat > conftest.$ac_ext <<EOF
10694 #line 10695 "configure"
10695 #include "confdefs.h"
10696
10697 int main() {
10698 main()
10699 ; return 0; }
10700 EOF
10701 if { (eval echo configure:10702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10702   rm -rf conftest*
10703   eval "ac_cv_lib_$ac_lib_var=yes"
10704 else
10705   echo "configure: failed program was:" >&5
10706   cat conftest.$ac_ext >&5
10707   rm -rf conftest*
10708   eval "ac_cv_lib_$ac_lib_var=no"
10709 fi
10710 rm -f conftest*
10711 LIBS="$ac_save_LIBS"
10712
10713 fi
10714 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10715   echo "$ac_t""yes" 1>&6
10716   have_k4=yes
10717 else
10718   echo "$ac_t""no" 1>&6
10719 have_k4=no
10720 fi
10721
10722
10723                 if test $have_k4 = yes ; then
10724                         ol_with_kerberos=found
10725                         ol_link_krb4=yes
10726
10727                         cat >> confdefs.h <<\EOF
10728 #define HAVE_KRB4 1
10729 EOF
10730
10731
10732                         KRB4_LIBS="-lkrb -ldes"
10733
10734                         if test $ac_cv_header_krb_archaeology_h = yes ; then
10735                                 cat >> confdefs.h <<\EOF
10736 #define HAVE_KTH_KERBEROS 1
10737 EOF
10738
10739                         fi
10740                 fi
10741         fi
10742 fi
10743
10744 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
10745         ol_link_kpasswd=yes
10746 fi
10747
10748 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
10749         ol_link_kbind=yes
10750
10751 elif test $ol_enable_kbind = yes ; then
10752         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
10753 fi
10754
10755 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
10756         cat >> confdefs.h <<\EOF
10757 #define HAVE_KERBEROS 1
10758 EOF
10759
10760
10761 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
10762         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
10763 fi
10764
10765 ol_link_tls=no
10766 if test $ol_with_tls != no ; then
10767         for ac_hdr in openssl/ssl.h ssl.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_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
10809                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
10810 echo "configure:10811: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
10811 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | 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="-lssl -lcrypto $LIBS"
10817 cat > conftest.$ac_ext <<EOF
10818 #line 10819 "configure"
10819 #include "confdefs.h"
10820 /* Override any gcc2 internal prototype to avoid an error.  */
10821 /* We use char because int might match the return type of a gcc2
10822     builtin and then its argument prototype would still apply.  */
10823 char SSLeay_add_ssl_algorithms();
10824
10825 int main() {
10826 SSLeay_add_ssl_algorithms()
10827 ; return 0; }
10828 EOF
10829 if { (eval echo configure:10830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10830   rm -rf conftest*
10831   eval "ac_cv_lib_$ac_lib_var=yes"
10832 else
10833   echo "configure: failed program was:" >&5
10834   cat conftest.$ac_ext >&5
10835   rm -rf conftest*
10836   eval "ac_cv_lib_$ac_lib_var=no"
10837 fi
10838 rm -f conftest*
10839 LIBS="$ac_save_LIBS"
10840
10841 fi
10842 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10843   echo "$ac_t""yes" 1>&6
10844   have_ssleay=yes
10845                         need_rsaref=no
10846 else
10847   echo "$ac_t""no" 1>&6
10848 have_ssleay=no
10849 fi
10850
10851                         
10852                 if test $have_ssleay = no ; then
10853                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
10854 echo "configure:10855: checking for SSL_library_init in -lssl" >&5
10855 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
10856 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10857   echo $ac_n "(cached) $ac_c" 1>&6
10858 else
10859   ac_save_LIBS="$LIBS"
10860 LIBS="-lssl -lcrypto $LIBS"
10861 cat > conftest.$ac_ext <<EOF
10862 #line 10863 "configure"
10863 #include "confdefs.h"
10864 /* Override any gcc2 internal prototype to avoid an error.  */
10865 /* We use char because int might match the return type of a gcc2
10866     builtin and then its argument prototype would still apply.  */
10867 char SSL_library_init();
10868
10869 int main() {
10870 SSL_library_init()
10871 ; return 0; }
10872 EOF
10873 if { (eval echo configure:10874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10874   rm -rf conftest*
10875   eval "ac_cv_lib_$ac_lib_var=yes"
10876 else
10877   echo "configure: failed program was:" >&5
10878   cat conftest.$ac_ext >&5
10879   rm -rf conftest*
10880   eval "ac_cv_lib_$ac_lib_var=no"
10881 fi
10882 rm -f conftest*
10883 LIBS="$ac_save_LIBS"
10884
10885 fi
10886 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10887   echo "$ac_t""yes" 1>&6
10888   have_ssleay=yes
10889                                 need_rsaref=no
10890 else
10891   echo "$ac_t""no" 1>&6
10892 have_ssleay=no
10893 fi
10894
10895                 fi
10896
10897                 if test $have_ssleay = no ; then
10898                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
10899 echo "configure:10900: checking for ssl3_accept in -lssl" >&5
10900 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
10901 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10902   echo $ac_n "(cached) $ac_c" 1>&6
10903 else
10904   ac_save_LIBS="$LIBS"
10905 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
10906 cat > conftest.$ac_ext <<EOF
10907 #line 10908 "configure"
10908 #include "confdefs.h"
10909 /* Override any gcc2 internal prototype to avoid an error.  */
10910 /* We use char because int might match the return type of a gcc2
10911     builtin and then its argument prototype would still apply.  */
10912 char ssl3_accept();
10913
10914 int main() {
10915 ssl3_accept()
10916 ; return 0; }
10917 EOF
10918 if { (eval echo configure:10919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10919   rm -rf conftest*
10920   eval "ac_cv_lib_$ac_lib_var=yes"
10921 else
10922   echo "configure: failed program was:" >&5
10923   cat conftest.$ac_ext >&5
10924   rm -rf conftest*
10925   eval "ac_cv_lib_$ac_lib_var=no"
10926 fi
10927 rm -f conftest*
10928 LIBS="$ac_save_LIBS"
10929
10930 fi
10931 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10932   echo "$ac_t""yes" 1>&6
10933   have_ssleay=yes
10934                                 need_rsaref=yes
10935 else
10936   echo "$ac_t""no" 1>&6
10937 have_ssleay=no
10938 fi
10939
10940                 fi
10941
10942                 if test $have_ssleay = yes ; then
10943                         ol_with_tls=found
10944                         ol_link_tls=yes
10945
10946                         cat >> confdefs.h <<\EOF
10947 #define HAVE_SSLEAY 1
10948 EOF
10949
10950
10951                         if test $need_rsaref = yes; then
10952                                 cat >> confdefs.h <<\EOF
10953 #define HAVE_RSAREF 1
10954 EOF
10955
10956
10957                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
10958                         else
10959                                 TLS_LIBS="-lssl -lcrypto"
10960                         fi
10961                 fi
10962         fi
10963
10964 else
10965         echo "configure: warning: TLS privacy protection not supported!" 1>&2
10966 fi
10967
10968 if test $ol_link_tls = yes ; then
10969         cat >> confdefs.h <<\EOF
10970 #define HAVE_TLS 1
10971 EOF
10972
10973
10974 elif test $ol_with_tls = auto ; then
10975         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
10976         echo "configure: warning: TLS privacy protection not supported!" 1>&2
10977
10978 elif test $ol_with_tls != no ; then
10979         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
10980 fi
10981
10982 if test $ol_enable_lmpasswd != no; then
10983         if test $ol_link_tls != yes ; then
10984                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
10985         fi
10986
10987         cat >> confdefs.h <<\EOF
10988 #define SLAPD_LMHASH 1
10989 EOF
10990
10991 fi
10992
10993 for ac_func in \
10994         ctime_r                 \
10995         gethostbyname_r gethostbyaddr_r \
10996
10997 do
10998 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10999 echo "configure:11000: checking for $ac_func" >&5
11000 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11001   echo $ac_n "(cached) $ac_c" 1>&6
11002 else
11003   cat > conftest.$ac_ext <<EOF
11004 #line 11005 "configure"
11005 #include "confdefs.h"
11006 /* System header to define __stub macros and hopefully few prototypes,
11007     which can conflict with char $ac_func(); below.  */
11008 #include <assert.h>
11009 /* Override any gcc2 internal prototype to avoid an error.  */
11010 /* We use char because int might match the return type of a gcc2
11011     builtin and then its argument prototype would still apply.  */
11012 char $ac_func();
11013 char (*f)();
11014
11015 int main() {
11016
11017 /* The GNU C library defines this for functions which it implements
11018     to always fail with ENOSYS.  Some functions are actually named
11019     something starting with __ and the normal name is an alias.  */
11020 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11021 choke me
11022 #else
11023 f = $ac_func;
11024 #endif
11025
11026 ; return 0; }
11027 EOF
11028 if { (eval echo configure:11029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11029   rm -rf conftest*
11030   eval "ac_cv_func_$ac_func=yes"
11031 else
11032   echo "configure: failed program was:" >&5
11033   cat conftest.$ac_ext >&5
11034   rm -rf conftest*
11035   eval "ac_cv_func_$ac_func=no"
11036 fi
11037 rm -f conftest*
11038 fi
11039
11040 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11041   echo "$ac_t""yes" 1>&6
11042     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11043   cat >> confdefs.h <<EOF
11044 #define $ac_tr_func 1
11045 EOF
11046  
11047 else
11048   echo "$ac_t""no" 1>&6
11049 fi
11050 done
11051
11052
11053 if test "$ac_cv_func_ctime_r" = no ; then
11054         ol_cv_func_ctime_r_nargs=0
11055 else
11056         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
11057 echo "configure:11058: checking number of arguments of ctime_r" >&5
11058 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
11059   echo $ac_n "(cached) $ac_c" 1>&6
11060 else
11061   cat > conftest.$ac_ext <<EOF
11062 #line 11063 "configure"
11063 #include "confdefs.h"
11064 #include <time.h>
11065 int main() {
11066 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
11067 ; return 0; }
11068 EOF
11069 if { (eval echo configure:11070: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11070   rm -rf conftest*
11071   ol_cv_func_ctime_r_nargs3=yes
11072 else
11073   echo "configure: failed program was:" >&5
11074   cat conftest.$ac_ext >&5
11075   rm -rf conftest*
11076   ol_cv_func_ctime_r_nargs3=no
11077 fi
11078 rm -f conftest*
11079
11080         cat > conftest.$ac_ext <<EOF
11081 #line 11082 "configure"
11082 #include "confdefs.h"
11083 #include <time.h>
11084 int main() {
11085 time_t ti; char *buffer; ctime_r(&ti,buffer);
11086 ; return 0; }
11087 EOF
11088 if { (eval echo configure:11089: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11089   rm -rf conftest*
11090   ol_cv_func_ctime_r_nargs2=yes
11091 else
11092   echo "configure: failed program was:" >&5
11093   cat conftest.$ac_ext >&5
11094   rm -rf conftest*
11095   ol_cv_func_ctime_r_nargs2=no
11096 fi
11097 rm -f conftest*
11098
11099         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
11100                 $ol_cv_func_ctime_r_nargs2 = no ; then
11101
11102                 ol_cv_func_ctime_r_nargs=3
11103
11104         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
11105                 $ol_cv_func_ctime_r_nargs2 = yes ; then
11106
11107                 ol_cv_func_ctime_r_nargs=2
11108
11109         else
11110                 ol_cv_func_ctime_r_nargs=0
11111         fi
11112   
11113 fi
11114
11115 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
11116
11117   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
11118         cat >> confdefs.h <<EOF
11119 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
11120 EOF
11121
11122   fi
11123
11124 fi
11125
11126 if test "$ac_cv_func_gethostbyname_r" = yes ; then
11127         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
11128 echo "configure:11129: checking number of arguments of gethostbyname_r" >&5
11129 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
11130   echo $ac_n "(cached) $ac_c" 1>&6
11131 else
11132   cat > conftest.$ac_ext <<EOF
11133 #line 11134 "configure"
11134 #include "confdefs.h"
11135 #include <sys/types.h>
11136 #include <sys/socket.h>
11137 #include <netinet/in.h>
11138 #include <netdb.h>
11139 #define BUFSIZE (sizeof(struct hostent)+10)
11140 int main() {
11141 struct hostent hent; char buffer[BUFSIZE];
11142                 int bufsize=BUFSIZE;int h_errno;
11143                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
11144                         buffer, bufsize, &h_errno);
11145 ; return 0; }
11146 EOF
11147 if { (eval echo configure:11148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11148   rm -rf conftest*
11149   ol_cv_func_gethostbyname_r_nargs5=yes
11150 else
11151   echo "configure: failed program was:" >&5
11152   cat conftest.$ac_ext >&5
11153   rm -rf conftest*
11154   ol_cv_func_gethostbyname_r_nargs5=no
11155 fi
11156 rm -f conftest*
11157
11158         cat > conftest.$ac_ext <<EOF
11159 #line 11160 "configure"
11160 #include "confdefs.h"
11161 #include <sys/types.h>
11162 #include <sys/socket.h>
11163 #include <netinet/in.h>
11164 #include <netdb.h>
11165 #define BUFSIZE (sizeof(struct hostent)+10)
11166 int main() {
11167 struct hostent hent;struct hostent *rhent;
11168                 char buffer[BUFSIZE];
11169                 int bufsize=BUFSIZE;int h_errno;
11170                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
11171                         &rhent, &h_errno);
11172 ; return 0; }
11173 EOF
11174 if { (eval echo configure:11175: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11175   rm -rf conftest*
11176   ol_cv_func_gethostbyname_r_nargs6=yes
11177 else
11178   echo "configure: failed program was:" >&5
11179   cat conftest.$ac_ext >&5
11180   rm -rf conftest*
11181   ol_cv_func_gethostbyname_r_nargs6=no
11182 fi
11183 rm -f conftest*
11184
11185         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
11186                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
11187
11188                 ol_cv_func_gethostbyname_r_nargs=5
11189
11190         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
11191                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
11192
11193                 ol_cv_func_gethostbyname_r_nargs=6
11194
11195         else
11196                 ol_cv_func_gethostbyname_r_nargs=0
11197         fi
11198   
11199 fi
11200
11201 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
11202   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
11203         cat >> confdefs.h <<EOF
11204 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
11205 EOF
11206
11207   fi
11208
11209 else
11210         ol_cv_func_gethostbyname_r_nargs=0
11211 fi
11212  
11213 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
11214         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
11215 echo "configure:11216: checking number of arguments of gethostbyaddr_r" >&5
11216 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
11217   echo $ac_n "(cached) $ac_c" 1>&6
11218 else
11219   cat > conftest.$ac_ext <<EOF
11220 #line 11221 "configure"
11221 #include "confdefs.h"
11222 #include <sys/types.h>
11223 #include <sys/socket.h>
11224 #include <netinet/in.h>
11225 #include <netdb.h>
11226 #define BUFSIZE (sizeof(struct hostent)+10)
11227 int main() {
11228 struct hostent hent; char buffer[BUFSIZE]; 
11229             struct in_addr add;
11230             size_t alen=sizeof(struct in_addr);
11231             int bufsize=BUFSIZE;int h_errno;
11232                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
11233                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
11234 ; return 0; }
11235 EOF
11236 if { (eval echo configure:11237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11237   rm -rf conftest*
11238   ol_cv_func_gethostbyaddr_r_nargs7=yes
11239 else
11240   echo "configure: failed program was:" >&5
11241   cat conftest.$ac_ext >&5
11242   rm -rf conftest*
11243   ol_cv_func_gethostbyaddr_r_nargs7=no
11244 fi
11245 rm -f conftest*
11246
11247         cat > conftest.$ac_ext <<EOF
11248 #line 11249 "configure"
11249 #include "confdefs.h"
11250 #include <sys/types.h>
11251 #include <sys/socket.h>
11252 #include <netinet/in.h>
11253 #include <netdb.h>
11254 #define BUFSIZE (sizeof(struct hostent)+10)
11255 int main() {
11256 struct hostent hent;
11257                 struct hostent *rhent; char buffer[BUFSIZE]; 
11258                 struct in_addr add;
11259                 size_t alen=sizeof(struct in_addr);
11260                 int bufsize=BUFSIZE;int h_errno;
11261                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
11262                         alen, AF_INET, &hent, buffer, bufsize, 
11263                         &rhent, &h_errno);
11264 ; return 0; }
11265 EOF
11266 if { (eval echo configure:11267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11267   rm -rf conftest*
11268   ol_cv_func_gethostbyaddr_r_nargs8=yes
11269 else
11270   echo "configure: failed program was:" >&5
11271   cat conftest.$ac_ext >&5
11272   rm -rf conftest*
11273   ol_cv_func_gethostbyaddr_r_nargs8=no
11274 fi
11275 rm -f conftest*
11276
11277         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
11278                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
11279
11280                 ol_cv_func_gethostbyaddr_r_nargs=7
11281
11282         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
11283                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
11284
11285                 ol_cv_func_gethostbyaddr_r_nargs=8
11286
11287         else
11288                 ol_cv_func_gethostbyaddr_r_nargs=0
11289         fi
11290   
11291 fi
11292
11293 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
11294   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
11295     cat >> confdefs.h <<EOF
11296 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
11297 EOF
11298
11299   fi
11300
11301 else
11302         ol_cv_func_gethostbyaddr_r_nargs=0
11303 fi
11304
11305 if test "$ac_cv_func_ctime_r" = yes \
11306         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
11307         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
11308         -a "$ac_cv_func_gethostbyname_r" = yes \
11309         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
11310         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
11311         -a "$ac_cv_func_gethostbyaddr_r" = yes \
11312         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
11313         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
11314         ; then
11315  
11316         cat >> confdefs.h <<\EOF
11317 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
11318 EOF
11319
11320 fi
11321
11322 ol_link_threads=no
11323
11324 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11325         -o $ol_with_threads = nt ; then
11326
11327         
11328         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11329 echo "configure:11330: checking for _beginthread" >&5
11330 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11331   echo $ac_n "(cached) $ac_c" 1>&6
11332 else
11333   cat > conftest.$ac_ext <<EOF
11334 #line 11335 "configure"
11335 #include "confdefs.h"
11336 /* System header to define __stub macros and hopefully few prototypes,
11337     which can conflict with char _beginthread(); below.  */
11338 #include <assert.h>
11339 /* Override any gcc2 internal prototype to avoid an error.  */
11340 /* We use char because int might match the return type of a gcc2
11341     builtin and then its argument prototype would still apply.  */
11342 char _beginthread();
11343 char (*f)();
11344
11345 int main() {
11346
11347 /* The GNU C library defines this for functions which it implements
11348     to always fail with ENOSYS.  Some functions are actually named
11349     something starting with __ and the normal name is an alias.  */
11350 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11351 choke me
11352 #else
11353 f = _beginthread;
11354 #endif
11355
11356 ; return 0; }
11357 EOF
11358 if { (eval echo configure:11359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11359   rm -rf conftest*
11360   eval "ac_cv_func__beginthread=yes"
11361 else
11362   echo "configure: failed program was:" >&5
11363   cat conftest.$ac_ext >&5
11364   rm -rf conftest*
11365   eval "ac_cv_func__beginthread=no"
11366 fi
11367 rm -f conftest*
11368 fi
11369
11370 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11371   echo "$ac_t""yes" 1>&6
11372   :
11373 else
11374   echo "$ac_t""no" 1>&6
11375 fi
11376
11377
11378         if test $ac_cv_func__beginthread = yes ; then
11379                 cat >> confdefs.h <<\EOF
11380 #define HAVE_NT_THREADS 1
11381 EOF
11382
11383                 ol_cv_nt_threads=yes
11384         fi
11385
11386
11387         if test "$ol_cv_nt_threads" = yes ; then
11388                 ol_link_threads=nt
11389                 ol_with_threads=found
11390                 ol_with_yielding_select=yes
11391
11392                 cat >> confdefs.h <<\EOF
11393 #define HAVE_NT_SERVICE_MANAGER 1
11394 EOF
11395
11396                 cat >> confdefs.h <<\EOF
11397 #define HAVE_NT_EVENT_LOG 1
11398 EOF
11399
11400         fi
11401
11402         if test $ol_with_threads = nt ; then
11403                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11404         fi
11405 fi
11406
11407 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11408         -o $ol_with_threads = posix ; then
11409
11410         for ac_hdr in pthread.h
11411 do
11412 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11413 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11414 echo "configure:11415: checking for $ac_hdr" >&5
11415 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11416   echo $ac_n "(cached) $ac_c" 1>&6
11417 else
11418   cat > conftest.$ac_ext <<EOF
11419 #line 11420 "configure"
11420 #include "confdefs.h"
11421 #include <$ac_hdr>
11422 EOF
11423 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11424 { (eval echo configure:11425: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11425 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11426 if test -z "$ac_err"; then
11427   rm -rf conftest*
11428   eval "ac_cv_header_$ac_safe=yes"
11429 else
11430   echo "$ac_err" >&5
11431   echo "configure: failed program was:" >&5
11432   cat conftest.$ac_ext >&5
11433   rm -rf conftest*
11434   eval "ac_cv_header_$ac_safe=no"
11435 fi
11436 rm -f conftest*
11437 fi
11438 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11439   echo "$ac_t""yes" 1>&6
11440     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11441   cat >> confdefs.h <<EOF
11442 #define $ac_tr_hdr 1
11443 EOF
11444  
11445 else
11446   echo "$ac_t""no" 1>&6
11447 fi
11448 done
11449
11450
11451         if test $ac_cv_header_pthread_h = yes ; then
11452                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11453 echo "configure:11454: checking POSIX thread version" >&5
11454 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11455   echo $ac_n "(cached) $ac_c" 1>&6
11456 else
11457   
11458         cat > conftest.$ac_ext <<EOF
11459 #line 11460 "configure"
11460 #include "confdefs.h"
11461
11462 #               include <pthread.h>
11463                 /* this check could be improved */
11464 #               ifdef PTHREAD_ONCE_INIT
11465                         pthread_version_final;
11466 #               endif
11467         
11468 EOF
11469 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11470   egrep "pthread_version_final" >/dev/null 2>&1; then
11471   rm -rf conftest*
11472   ol_pthread_final=yes
11473 else
11474   rm -rf conftest*
11475   ol_pthread_final=no
11476 fi
11477 rm -f conftest*
11478
11479
11480         cat > conftest.$ac_ext <<EOF
11481 #line 11482 "configure"
11482 #include "confdefs.h"
11483
11484 #               include <pthread.h>
11485                 /* this check could be improved */
11486 #               ifdef pthread_once_init
11487                         pthread_version_draft4;
11488 #               endif
11489         
11490 EOF
11491 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11492   egrep "pthread_version_draft4" >/dev/null 2>&1; then
11493   rm -rf conftest*
11494   ol_pthread_draft4=yes
11495 else
11496   rm -rf conftest*
11497   ol_pthread_draft4=no
11498 fi
11499 rm -f conftest*
11500
11501
11502         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
11503                 ol_cv_pthread_version=final
11504         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
11505                 ol_cv_pthread_version=draft4
11506         else
11507                 ol_cv_pthread_version=unknown
11508         fi
11509
11510 fi
11511
11512 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11513
11514
11515                 if test $ol_cv_pthread_version = final ; then
11516                         cat >> confdefs.h <<\EOF
11517 #define HAVE_PTHREADS_FINAL 1
11518 EOF
11519
11520                 elif test $ol_cv_pthread_version = draft4 ; then
11521                         cat >> confdefs.h <<\EOF
11522 #define HAVE_PTHREADS_D4 1
11523 EOF
11524
11525                 else
11526                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11527                 fi
11528
11529                 # consider threads found
11530                 ol_with_threads=found
11531
11532                 
11533         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11534 echo "configure:11535: checking for LinuxThreads pthread.h" >&5
11535 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11536   echo $ac_n "(cached) $ac_c" 1>&6
11537 else
11538   cat > conftest.$ac_ext <<EOF
11539 #line 11540 "configure"
11540 #include "confdefs.h"
11541 #include <pthread.h>
11542 EOF
11543 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11544   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11545   rm -rf conftest*
11546   ol_cv_header_linux_threads=yes
11547 else
11548   rm -rf conftest*
11549   ol_cv_header_linux_threads=no
11550 fi
11551 rm -f conftest*
11552
11553                 
11554 fi
11555
11556 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11557         if test $ol_cv_header_linux_threads = yes; then
11558                 cat >> confdefs.h <<\EOF
11559 #define HAVE_LINUX_THREADS 1
11560 EOF
11561
11562         fi
11563
11564                 
11565         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11566 echo "configure:11567: checking for GNU Pth pthread.h" >&5
11567 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11568   echo $ac_n "(cached) $ac_c" 1>&6
11569 else
11570   cat > conftest.$ac_ext <<EOF
11571 #line 11572 "configure"
11572 #include "confdefs.h"
11573 #include <pthread.h>
11574 #ifdef _POSIX_THREAD_IS_GNU_PTH
11575         __gnu_pth__;
11576 #endif
11577
11578 EOF
11579 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11580   egrep "__gnu_pth__" >/dev/null 2>&1; then
11581   rm -rf conftest*
11582   ol_cv_header_gnu_pth_pthread_h=yes
11583 else
11584   rm -rf conftest*
11585   ol_cv_header_gnu_pth_pthread_h=no
11586 fi
11587 rm -f conftest*
11588
11589                 
11590 fi
11591
11592 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11593
11594
11595                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11596                         for ac_hdr in sched.h
11597 do
11598 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11599 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11600 echo "configure:11601: checking for $ac_hdr" >&5
11601 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11602   echo $ac_n "(cached) $ac_c" 1>&6
11603 else
11604   cat > conftest.$ac_ext <<EOF
11605 #line 11606 "configure"
11606 #include "confdefs.h"
11607 #include <$ac_hdr>
11608 EOF
11609 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11610 { (eval echo configure:11611: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11611 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11612 if test -z "$ac_err"; then
11613   rm -rf conftest*
11614   eval "ac_cv_header_$ac_safe=yes"
11615 else
11616   echo "$ac_err" >&5
11617   echo "configure: failed program was:" >&5
11618   cat conftest.$ac_ext >&5
11619   rm -rf conftest*
11620   eval "ac_cv_header_$ac_safe=no"
11621 fi
11622 rm -f conftest*
11623 fi
11624 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11625   echo "$ac_t""yes" 1>&6
11626     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11627   cat >> confdefs.h <<EOF
11628 #define $ac_tr_hdr 1
11629 EOF
11630  
11631 else
11632   echo "$ac_t""no" 1>&6
11633 fi
11634 done
11635
11636                 fi
11637
11638                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11639                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11640 echo "configure:11641: checking for pthread_create in default libraries" >&5
11641 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11642   echo $ac_n "(cached) $ac_c" 1>&6
11643 else
11644   
11645                 if test "$cross_compiling" = yes; then
11646   cat > conftest.$ac_ext <<EOF
11647 #line 11648 "configure"
11648 #include "confdefs.h"
11649 /* pthread test headers */
11650 #include <pthread.h>
11651 #ifndef NULL
11652 #define NULL (void*)0
11653 #endif
11654
11655 static void *task(p)
11656         void *p;
11657 {
11658         return (void *) (p == NULL);
11659 }
11660
11661 int main() {
11662
11663         /* pthread test function */
11664         pthread_t t;
11665         int status;
11666         int detach = 1;
11667
11668 #ifdef HAVE_PTHREADS_FINAL
11669         /* Final pthreads */
11670         pthread_attr_t attr;
11671
11672         status = pthread_attr_init(&attr);
11673         if( status ) return status;
11674
11675 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11676         if( !detach ) {
11677 #if defined( PTHREAD_CREATE_JOINABLE )
11678                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11679 #else
11680                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11681 #endif
11682
11683 #ifdef PTHREAD_CREATE_DETACHED
11684         } else {
11685                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11686 #endif
11687         }
11688         if( status ) return status;
11689 #endif
11690
11691         status = pthread_create( &t, &attr, task, NULL );
11692         if( status ) return status;
11693
11694 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11695         if( detach ) {
11696                 /* give thread a chance to complete */
11697                 /* it should remain joinable and hence detachable */
11698                 sleep( 1 );
11699
11700                 status = pthread_detach( t );
11701                 if( status ) return status;
11702         }
11703 #endif
11704
11705 #else
11706         /* Draft 4 pthreads */
11707         status = pthread_create( &t, pthread_attr_default, task, NULL );
11708         if( status ) return status;
11709
11710         if( detach ) {
11711                 /* give thread a chance to complete */
11712                 /* it should remain joinable and hence detachable */
11713                 sleep( 1 );
11714
11715                 status = pthread_detach( &t );
11716                 if( status ) return status;
11717         }
11718 #endif
11719
11720 #ifdef HAVE_LINUX_THREADS
11721         pthread_kill_other_threads_np();
11722 #endif
11723
11724         return 0;
11725
11726 ; return 0; }
11727 EOF
11728 if { (eval echo configure:11729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11729   rm -rf conftest*
11730   ol_cv_pthread_create=yes
11731 else
11732   echo "configure: failed program was:" >&5
11733   cat conftest.$ac_ext >&5
11734   rm -rf conftest*
11735   ol_cv_pthread_create=no
11736 fi
11737 rm -f conftest*
11738 else
11739   cat > conftest.$ac_ext <<EOF
11740 #line 11741 "configure"
11741 #include "confdefs.h"
11742 /* pthread test headers */
11743 #include <pthread.h>
11744 #ifndef NULL
11745 #define NULL (void*)0
11746 #endif
11747
11748 static void *task(p)
11749         void *p;
11750 {
11751         return (void *) (p == NULL);
11752 }
11753
11754
11755 int main(argc, argv)
11756         int argc;
11757         char **argv;
11758 {
11759
11760         /* pthread test function */
11761         pthread_t t;
11762         int status;
11763         int detach = 1;
11764
11765 #ifdef HAVE_PTHREADS_FINAL
11766         /* Final pthreads */
11767         pthread_attr_t attr;
11768
11769         status = pthread_attr_init(&attr);
11770         if( status ) return status;
11771
11772 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11773         if( !detach ) {
11774 #if defined( PTHREAD_CREATE_JOINABLE )
11775                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11776 #else
11777                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11778 #endif
11779
11780 #ifdef PTHREAD_CREATE_DETACHED
11781         } else {
11782                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11783 #endif
11784         }
11785         if( status ) return status;
11786 #endif
11787
11788         status = pthread_create( &t, &attr, task, NULL );
11789         if( status ) return status;
11790
11791 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11792         if( detach ) {
11793                 /* give thread a chance to complete */
11794                 /* it should remain joinable and hence detachable */
11795                 sleep( 1 );
11796
11797                 status = pthread_detach( t );
11798                 if( status ) return status;
11799         }
11800 #endif
11801
11802 #else
11803         /* Draft 4 pthreads */
11804         status = pthread_create( &t, pthread_attr_default, task, NULL );
11805         if( status ) return status;
11806
11807         if( detach ) {
11808                 /* give thread a chance to complete */
11809                 /* it should remain joinable and hence detachable */
11810                 sleep( 1 );
11811
11812                 status = pthread_detach( &t );
11813                 if( status ) return status;
11814         }
11815 #endif
11816
11817 #ifdef HAVE_LINUX_THREADS
11818         pthread_kill_other_threads_np();
11819 #endif
11820
11821         return 0;
11822
11823 }
11824
11825 EOF
11826 if { (eval echo configure:11827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11827 then
11828   ol_cv_pthread_create=yes
11829 else
11830   echo "configure: failed program was:" >&5
11831   cat conftest.$ac_ext >&5
11832   rm -fr conftest*
11833   ol_cv_pthread_create=no
11834 fi
11835 rm -fr conftest*
11836 fi
11837
11838 fi
11839
11840 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11841
11842                 if test $ol_cv_pthread_create != no ; then
11843                         ol_link_threads=posix
11844                         ol_link_pthreads=""
11845                 fi
11846                 
11847                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11848 if test "$ol_link_threads" = no ; then
11849         # try -kthread
11850         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11851 echo "configure:11852: checking for pthread link with -kthread" >&5
11852 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11853   echo $ac_n "(cached) $ac_c" 1>&6
11854 else
11855   
11856                 # save the flags
11857                 ol_LIBS="$LIBS"
11858                 LIBS="-kthread $LIBS"
11859
11860                 if test "$cross_compiling" = yes; then
11861   cat > conftest.$ac_ext <<EOF
11862 #line 11863 "configure"
11863 #include "confdefs.h"
11864 /* pthread test headers */
11865 #include <pthread.h>
11866 #ifndef NULL
11867 #define NULL (void*)0
11868 #endif
11869
11870 static void *task(p)
11871         void *p;
11872 {
11873         return (void *) (p == NULL);
11874 }
11875
11876 int main() {
11877
11878         /* pthread test function */
11879         pthread_t t;
11880         int status;
11881         int detach = 1;
11882
11883 #ifdef HAVE_PTHREADS_FINAL
11884         /* Final pthreads */
11885         pthread_attr_t attr;
11886
11887         status = pthread_attr_init(&attr);
11888         if( status ) return status;
11889
11890 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11891         if( !detach ) {
11892 #if defined( PTHREAD_CREATE_JOINABLE )
11893                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11894 #else
11895                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11896 #endif
11897
11898 #ifdef PTHREAD_CREATE_DETACHED
11899         } else {
11900                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11901 #endif
11902         }
11903         if( status ) return status;
11904 #endif
11905
11906         status = pthread_create( &t, &attr, task, NULL );
11907         if( status ) return status;
11908
11909 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11910         if( detach ) {
11911                 /* give thread a chance to complete */
11912                 /* it should remain joinable and hence detachable */
11913                 sleep( 1 );
11914
11915                 status = pthread_detach( t );
11916                 if( status ) return status;
11917         }
11918 #endif
11919
11920 #else
11921         /* Draft 4 pthreads */
11922         status = pthread_create( &t, pthread_attr_default, task, NULL );
11923         if( status ) return status;
11924
11925         if( detach ) {
11926                 /* give thread a chance to complete */
11927                 /* it should remain joinable and hence detachable */
11928                 sleep( 1 );
11929
11930                 status = pthread_detach( &t );
11931                 if( status ) return status;
11932         }
11933 #endif
11934
11935 #ifdef HAVE_LINUX_THREADS
11936         pthread_kill_other_threads_np();
11937 #endif
11938
11939         return 0;
11940
11941 ; return 0; }
11942 EOF
11943 if { (eval echo configure:11944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11944   rm -rf conftest*
11945   ol_cv_pthread_kthread=yes
11946 else
11947   echo "configure: failed program was:" >&5
11948   cat conftest.$ac_ext >&5
11949   rm -rf conftest*
11950   ol_cv_pthread_kthread=no
11951 fi
11952 rm -f conftest*
11953 else
11954   cat > conftest.$ac_ext <<EOF
11955 #line 11956 "configure"
11956 #include "confdefs.h"
11957 /* pthread test headers */
11958 #include <pthread.h>
11959 #ifndef NULL
11960 #define NULL (void*)0
11961 #endif
11962
11963 static void *task(p)
11964         void *p;
11965 {
11966         return (void *) (p == NULL);
11967 }
11968
11969
11970 int main(argc, argv)
11971         int argc;
11972         char **argv;
11973 {
11974
11975         /* pthread test function */
11976         pthread_t t;
11977         int status;
11978         int detach = 1;
11979
11980 #ifdef HAVE_PTHREADS_FINAL
11981         /* Final pthreads */
11982         pthread_attr_t attr;
11983
11984         status = pthread_attr_init(&attr);
11985         if( status ) return status;
11986
11987 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11988         if( !detach ) {
11989 #if defined( PTHREAD_CREATE_JOINABLE )
11990                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11991 #else
11992                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11993 #endif
11994
11995 #ifdef PTHREAD_CREATE_DETACHED
11996         } else {
11997                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11998 #endif
11999         }
12000         if( status ) return status;
12001 #endif
12002
12003         status = pthread_create( &t, &attr, task, NULL );
12004         if( status ) return status;
12005
12006 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12007         if( detach ) {
12008                 /* give thread a chance to complete */
12009                 /* it should remain joinable and hence detachable */
12010                 sleep( 1 );
12011
12012                 status = pthread_detach( t );
12013                 if( status ) return status;
12014         }
12015 #endif
12016
12017 #else
12018         /* Draft 4 pthreads */
12019         status = pthread_create( &t, pthread_attr_default, task, NULL );
12020         if( status ) return status;
12021
12022         if( detach ) {
12023                 /* give thread a chance to complete */
12024                 /* it should remain joinable and hence detachable */
12025                 sleep( 1 );
12026
12027                 status = pthread_detach( &t );
12028                 if( status ) return status;
12029         }
12030 #endif
12031
12032 #ifdef HAVE_LINUX_THREADS
12033         pthread_kill_other_threads_np();
12034 #endif
12035
12036         return 0;
12037
12038 }
12039
12040 EOF
12041 if { (eval echo configure:12042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12042 then
12043   ol_cv_pthread_kthread=yes
12044 else
12045   echo "configure: failed program was:" >&5
12046   cat conftest.$ac_ext >&5
12047   rm -fr conftest*
12048   ol_cv_pthread_kthread=no
12049 fi
12050 rm -fr conftest*
12051 fi
12052
12053
12054                 # restore the LIBS
12055                 LIBS="$ol_LIBS"
12056         
12057 fi
12058
12059 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12060
12061         if test $ol_cv_pthread_kthread = yes ; then
12062                 ol_link_pthreads="-kthread"
12063                 ol_link_threads=posix
12064         fi
12065 fi
12066
12067                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12068 if test "$ol_link_threads" = no ; then
12069         # try -pthread
12070         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12071 echo "configure:12072: checking for pthread link with -pthread" >&5
12072 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12073   echo $ac_n "(cached) $ac_c" 1>&6
12074 else
12075   
12076                 # save the flags
12077                 ol_LIBS="$LIBS"
12078                 LIBS="-pthread $LIBS"
12079
12080                 if test "$cross_compiling" = yes; then
12081   cat > conftest.$ac_ext <<EOF
12082 #line 12083 "configure"
12083 #include "confdefs.h"
12084 /* pthread test headers */
12085 #include <pthread.h>
12086 #ifndef NULL
12087 #define NULL (void*)0
12088 #endif
12089
12090 static void *task(p)
12091         void *p;
12092 {
12093         return (void *) (p == NULL);
12094 }
12095
12096 int main() {
12097
12098         /* pthread test function */
12099         pthread_t t;
12100         int status;
12101         int detach = 1;
12102
12103 #ifdef HAVE_PTHREADS_FINAL
12104         /* Final pthreads */
12105         pthread_attr_t attr;
12106
12107         status = pthread_attr_init(&attr);
12108         if( status ) return status;
12109
12110 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12111         if( !detach ) {
12112 #if defined( PTHREAD_CREATE_JOINABLE )
12113                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12114 #else
12115                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12116 #endif
12117
12118 #ifdef PTHREAD_CREATE_DETACHED
12119         } else {
12120                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12121 #endif
12122         }
12123         if( status ) return status;
12124 #endif
12125
12126         status = pthread_create( &t, &attr, task, NULL );
12127         if( status ) return status;
12128
12129 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12130         if( detach ) {
12131                 /* give thread a chance to complete */
12132                 /* it should remain joinable and hence detachable */
12133                 sleep( 1 );
12134
12135                 status = pthread_detach( t );
12136                 if( status ) return status;
12137         }
12138 #endif
12139
12140 #else
12141         /* Draft 4 pthreads */
12142         status = pthread_create( &t, pthread_attr_default, task, NULL );
12143         if( status ) return status;
12144
12145         if( detach ) {
12146                 /* give thread a chance to complete */
12147                 /* it should remain joinable and hence detachable */
12148                 sleep( 1 );
12149
12150                 status = pthread_detach( &t );
12151                 if( status ) return status;
12152         }
12153 #endif
12154
12155 #ifdef HAVE_LINUX_THREADS
12156         pthread_kill_other_threads_np();
12157 #endif
12158
12159         return 0;
12160
12161 ; return 0; }
12162 EOF
12163 if { (eval echo configure:12164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12164   rm -rf conftest*
12165   ol_cv_pthread_pthread=yes
12166 else
12167   echo "configure: failed program was:" >&5
12168   cat conftest.$ac_ext >&5
12169   rm -rf conftest*
12170   ol_cv_pthread_pthread=no
12171 fi
12172 rm -f conftest*
12173 else
12174   cat > conftest.$ac_ext <<EOF
12175 #line 12176 "configure"
12176 #include "confdefs.h"
12177 /* pthread test headers */
12178 #include <pthread.h>
12179 #ifndef NULL
12180 #define NULL (void*)0
12181 #endif
12182
12183 static void *task(p)
12184         void *p;
12185 {
12186         return (void *) (p == NULL);
12187 }
12188
12189
12190 int main(argc, argv)
12191         int argc;
12192         char **argv;
12193 {
12194
12195         /* pthread test function */
12196         pthread_t t;
12197         int status;
12198         int detach = 1;
12199
12200 #ifdef HAVE_PTHREADS_FINAL
12201         /* Final pthreads */
12202         pthread_attr_t attr;
12203
12204         status = pthread_attr_init(&attr);
12205         if( status ) return status;
12206
12207 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12208         if( !detach ) {
12209 #if defined( PTHREAD_CREATE_JOINABLE )
12210                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12211 #else
12212                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12213 #endif
12214
12215 #ifdef PTHREAD_CREATE_DETACHED
12216         } else {
12217                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12218 #endif
12219         }
12220         if( status ) return status;
12221 #endif
12222
12223         status = pthread_create( &t, &attr, task, NULL );
12224         if( status ) return status;
12225
12226 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12227         if( detach ) {
12228                 /* give thread a chance to complete */
12229                 /* it should remain joinable and hence detachable */
12230                 sleep( 1 );
12231
12232                 status = pthread_detach( t );
12233                 if( status ) return status;
12234         }
12235 #endif
12236
12237 #else
12238         /* Draft 4 pthreads */
12239         status = pthread_create( &t, pthread_attr_default, task, NULL );
12240         if( status ) return status;
12241
12242         if( detach ) {
12243                 /* give thread a chance to complete */
12244                 /* it should remain joinable and hence detachable */
12245                 sleep( 1 );
12246
12247                 status = pthread_detach( &t );
12248                 if( status ) return status;
12249         }
12250 #endif
12251
12252 #ifdef HAVE_LINUX_THREADS
12253         pthread_kill_other_threads_np();
12254 #endif
12255
12256         return 0;
12257
12258 }
12259
12260 EOF
12261 if { (eval echo configure:12262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12262 then
12263   ol_cv_pthread_pthread=yes
12264 else
12265   echo "configure: failed program was:" >&5
12266   cat conftest.$ac_ext >&5
12267   rm -fr conftest*
12268   ol_cv_pthread_pthread=no
12269 fi
12270 rm -fr conftest*
12271 fi
12272
12273
12274                 # restore the LIBS
12275                 LIBS="$ol_LIBS"
12276         
12277 fi
12278
12279 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12280
12281         if test $ol_cv_pthread_pthread = yes ; then
12282                 ol_link_pthreads="-pthread"
12283                 ol_link_threads=posix
12284         fi
12285 fi
12286
12287                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12288 if test "$ol_link_threads" = no ; then
12289         # try -pthreads
12290         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12291 echo "configure:12292: checking for pthread link with -pthreads" >&5
12292 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12293   echo $ac_n "(cached) $ac_c" 1>&6
12294 else
12295   
12296                 # save the flags
12297                 ol_LIBS="$LIBS"
12298                 LIBS="-pthreads $LIBS"
12299
12300                 if test "$cross_compiling" = yes; then
12301   cat > conftest.$ac_ext <<EOF
12302 #line 12303 "configure"
12303 #include "confdefs.h"
12304 /* pthread test headers */
12305 #include <pthread.h>
12306 #ifndef NULL
12307 #define NULL (void*)0
12308 #endif
12309
12310 static void *task(p)
12311         void *p;
12312 {
12313         return (void *) (p == NULL);
12314 }
12315
12316 int main() {
12317
12318         /* pthread test function */
12319         pthread_t t;
12320         int status;
12321         int detach = 1;
12322
12323 #ifdef HAVE_PTHREADS_FINAL
12324         /* Final pthreads */
12325         pthread_attr_t attr;
12326
12327         status = pthread_attr_init(&attr);
12328         if( status ) return status;
12329
12330 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12331         if( !detach ) {
12332 #if defined( PTHREAD_CREATE_JOINABLE )
12333                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12334 #else
12335                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12336 #endif
12337
12338 #ifdef PTHREAD_CREATE_DETACHED
12339         } else {
12340                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12341 #endif
12342         }
12343         if( status ) return status;
12344 #endif
12345
12346         status = pthread_create( &t, &attr, task, NULL );
12347         if( status ) return status;
12348
12349 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12350         if( detach ) {
12351                 /* give thread a chance to complete */
12352                 /* it should remain joinable and hence detachable */
12353                 sleep( 1 );
12354
12355                 status = pthread_detach( t );
12356                 if( status ) return status;
12357         }
12358 #endif
12359
12360 #else
12361         /* Draft 4 pthreads */
12362         status = pthread_create( &t, pthread_attr_default, task, NULL );
12363         if( status ) return status;
12364
12365         if( detach ) {
12366                 /* give thread a chance to complete */
12367                 /* it should remain joinable and hence detachable */
12368                 sleep( 1 );
12369
12370                 status = pthread_detach( &t );
12371                 if( status ) return status;
12372         }
12373 #endif
12374
12375 #ifdef HAVE_LINUX_THREADS
12376         pthread_kill_other_threads_np();
12377 #endif
12378
12379         return 0;
12380
12381 ; return 0; }
12382 EOF
12383 if { (eval echo configure:12384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12384   rm -rf conftest*
12385   ol_cv_pthread_pthreads=yes
12386 else
12387   echo "configure: failed program was:" >&5
12388   cat conftest.$ac_ext >&5
12389   rm -rf conftest*
12390   ol_cv_pthread_pthreads=no
12391 fi
12392 rm -f conftest*
12393 else
12394   cat > conftest.$ac_ext <<EOF
12395 #line 12396 "configure"
12396 #include "confdefs.h"
12397 /* pthread test headers */
12398 #include <pthread.h>
12399 #ifndef NULL
12400 #define NULL (void*)0
12401 #endif
12402
12403 static void *task(p)
12404         void *p;
12405 {
12406         return (void *) (p == NULL);
12407 }
12408
12409
12410 int main(argc, argv)
12411         int argc;
12412         char **argv;
12413 {
12414
12415         /* pthread test function */
12416         pthread_t t;
12417         int status;
12418         int detach = 1;
12419
12420 #ifdef HAVE_PTHREADS_FINAL
12421         /* Final pthreads */
12422         pthread_attr_t attr;
12423
12424         status = pthread_attr_init(&attr);
12425         if( status ) return status;
12426
12427 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12428         if( !detach ) {
12429 #if defined( PTHREAD_CREATE_JOINABLE )
12430                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12431 #else
12432                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12433 #endif
12434
12435 #ifdef PTHREAD_CREATE_DETACHED
12436         } else {
12437                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12438 #endif
12439         }
12440         if( status ) return status;
12441 #endif
12442
12443         status = pthread_create( &t, &attr, task, NULL );
12444         if( status ) return status;
12445
12446 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12447         if( detach ) {
12448                 /* give thread a chance to complete */
12449                 /* it should remain joinable and hence detachable */
12450                 sleep( 1 );
12451
12452                 status = pthread_detach( t );
12453                 if( status ) return status;
12454         }
12455 #endif
12456
12457 #else
12458         /* Draft 4 pthreads */
12459         status = pthread_create( &t, pthread_attr_default, task, NULL );
12460         if( status ) return status;
12461
12462         if( detach ) {
12463                 /* give thread a chance to complete */
12464                 /* it should remain joinable and hence detachable */
12465                 sleep( 1 );
12466
12467                 status = pthread_detach( &t );
12468                 if( status ) return status;
12469         }
12470 #endif
12471
12472 #ifdef HAVE_LINUX_THREADS
12473         pthread_kill_other_threads_np();
12474 #endif
12475
12476         return 0;
12477
12478 }
12479
12480 EOF
12481 if { (eval echo configure:12482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12482 then
12483   ol_cv_pthread_pthreads=yes
12484 else
12485   echo "configure: failed program was:" >&5
12486   cat conftest.$ac_ext >&5
12487   rm -fr conftest*
12488   ol_cv_pthread_pthreads=no
12489 fi
12490 rm -fr conftest*
12491 fi
12492
12493
12494                 # restore the LIBS
12495                 LIBS="$ol_LIBS"
12496         
12497 fi
12498
12499 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12500
12501         if test $ol_cv_pthread_pthreads = yes ; then
12502                 ol_link_pthreads="-pthreads"
12503                 ol_link_threads=posix
12504         fi
12505 fi
12506
12507                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12508 if test "$ol_link_threads" = no ; then
12509         # try -mthreads
12510         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12511 echo "configure:12512: checking for pthread link with -mthreads" >&5
12512 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12513   echo $ac_n "(cached) $ac_c" 1>&6
12514 else
12515   
12516                 # save the flags
12517                 ol_LIBS="$LIBS"
12518                 LIBS="-mthreads $LIBS"
12519
12520                 if test "$cross_compiling" = yes; then
12521   cat > conftest.$ac_ext <<EOF
12522 #line 12523 "configure"
12523 #include "confdefs.h"
12524 /* pthread test headers */
12525 #include <pthread.h>
12526 #ifndef NULL
12527 #define NULL (void*)0
12528 #endif
12529
12530 static void *task(p)
12531         void *p;
12532 {
12533         return (void *) (p == NULL);
12534 }
12535
12536 int main() {
12537
12538         /* pthread test function */
12539         pthread_t t;
12540         int status;
12541         int detach = 1;
12542
12543 #ifdef HAVE_PTHREADS_FINAL
12544         /* Final pthreads */
12545         pthread_attr_t attr;
12546
12547         status = pthread_attr_init(&attr);
12548         if( status ) return status;
12549
12550 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12551         if( !detach ) {
12552 #if defined( PTHREAD_CREATE_JOINABLE )
12553                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12554 #else
12555                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12556 #endif
12557
12558 #ifdef PTHREAD_CREATE_DETACHED
12559         } else {
12560                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12561 #endif
12562         }
12563         if( status ) return status;
12564 #endif
12565
12566         status = pthread_create( &t, &attr, task, NULL );
12567         if( status ) return status;
12568
12569 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12570         if( detach ) {
12571                 /* give thread a chance to complete */
12572                 /* it should remain joinable and hence detachable */
12573                 sleep( 1 );
12574
12575                 status = pthread_detach( t );
12576                 if( status ) return status;
12577         }
12578 #endif
12579
12580 #else
12581         /* Draft 4 pthreads */
12582         status = pthread_create( &t, pthread_attr_default, task, NULL );
12583         if( status ) return status;
12584
12585         if( detach ) {
12586                 /* give thread a chance to complete */
12587                 /* it should remain joinable and hence detachable */
12588                 sleep( 1 );
12589
12590                 status = pthread_detach( &t );
12591                 if( status ) return status;
12592         }
12593 #endif
12594
12595 #ifdef HAVE_LINUX_THREADS
12596         pthread_kill_other_threads_np();
12597 #endif
12598
12599         return 0;
12600
12601 ; return 0; }
12602 EOF
12603 if { (eval echo configure:12604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12604   rm -rf conftest*
12605   ol_cv_pthread_mthreads=yes
12606 else
12607   echo "configure: failed program was:" >&5
12608   cat conftest.$ac_ext >&5
12609   rm -rf conftest*
12610   ol_cv_pthread_mthreads=no
12611 fi
12612 rm -f conftest*
12613 else
12614   cat > conftest.$ac_ext <<EOF
12615 #line 12616 "configure"
12616 #include "confdefs.h"
12617 /* pthread test headers */
12618 #include <pthread.h>
12619 #ifndef NULL
12620 #define NULL (void*)0
12621 #endif
12622
12623 static void *task(p)
12624         void *p;
12625 {
12626         return (void *) (p == NULL);
12627 }
12628
12629
12630 int main(argc, argv)
12631         int argc;
12632         char **argv;
12633 {
12634
12635         /* pthread test function */
12636         pthread_t t;
12637         int status;
12638         int detach = 1;
12639
12640 #ifdef HAVE_PTHREADS_FINAL
12641         /* Final pthreads */
12642         pthread_attr_t attr;
12643
12644         status = pthread_attr_init(&attr);
12645         if( status ) return status;
12646
12647 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12648         if( !detach ) {
12649 #if defined( PTHREAD_CREATE_JOINABLE )
12650                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12651 #else
12652                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12653 #endif
12654
12655 #ifdef PTHREAD_CREATE_DETACHED
12656         } else {
12657                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12658 #endif
12659         }
12660         if( status ) return status;
12661 #endif
12662
12663         status = pthread_create( &t, &attr, task, NULL );
12664         if( status ) return status;
12665
12666 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12667         if( detach ) {
12668                 /* give thread a chance to complete */
12669                 /* it should remain joinable and hence detachable */
12670                 sleep( 1 );
12671
12672                 status = pthread_detach( t );
12673                 if( status ) return status;
12674         }
12675 #endif
12676
12677 #else
12678         /* Draft 4 pthreads */
12679         status = pthread_create( &t, pthread_attr_default, task, NULL );
12680         if( status ) return status;
12681
12682         if( detach ) {
12683                 /* give thread a chance to complete */
12684                 /* it should remain joinable and hence detachable */
12685                 sleep( 1 );
12686
12687                 status = pthread_detach( &t );
12688                 if( status ) return status;
12689         }
12690 #endif
12691
12692 #ifdef HAVE_LINUX_THREADS
12693         pthread_kill_other_threads_np();
12694 #endif
12695
12696         return 0;
12697
12698 }
12699
12700 EOF
12701 if { (eval echo configure:12702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12702 then
12703   ol_cv_pthread_mthreads=yes
12704 else
12705   echo "configure: failed program was:" >&5
12706   cat conftest.$ac_ext >&5
12707   rm -fr conftest*
12708   ol_cv_pthread_mthreads=no
12709 fi
12710 rm -fr conftest*
12711 fi
12712
12713
12714                 # restore the LIBS
12715                 LIBS="$ol_LIBS"
12716         
12717 fi
12718
12719 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12720
12721         if test $ol_cv_pthread_mthreads = yes ; then
12722                 ol_link_pthreads="-mthreads"
12723                 ol_link_threads=posix
12724         fi
12725 fi
12726
12727                 # Pthread try link: -thread (ol_cv_pthread_thread)
12728 if test "$ol_link_threads" = no ; then
12729         # try -thread
12730         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12731 echo "configure:12732: checking for pthread link with -thread" >&5
12732 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12733   echo $ac_n "(cached) $ac_c" 1>&6
12734 else
12735   
12736                 # save the flags
12737                 ol_LIBS="$LIBS"
12738                 LIBS="-thread $LIBS"
12739
12740                 if test "$cross_compiling" = yes; then
12741   cat > conftest.$ac_ext <<EOF
12742 #line 12743 "configure"
12743 #include "confdefs.h"
12744 /* pthread test headers */
12745 #include <pthread.h>
12746 #ifndef NULL
12747 #define NULL (void*)0
12748 #endif
12749
12750 static void *task(p)
12751         void *p;
12752 {
12753         return (void *) (p == NULL);
12754 }
12755
12756 int main() {
12757
12758         /* pthread test function */
12759         pthread_t t;
12760         int status;
12761         int detach = 1;
12762
12763 #ifdef HAVE_PTHREADS_FINAL
12764         /* Final pthreads */
12765         pthread_attr_t attr;
12766
12767         status = pthread_attr_init(&attr);
12768         if( status ) return status;
12769
12770 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12771         if( !detach ) {
12772 #if defined( PTHREAD_CREATE_JOINABLE )
12773                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12774 #else
12775                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12776 #endif
12777
12778 #ifdef PTHREAD_CREATE_DETACHED
12779         } else {
12780                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12781 #endif
12782         }
12783         if( status ) return status;
12784 #endif
12785
12786         status = pthread_create( &t, &attr, task, NULL );
12787         if( status ) return status;
12788
12789 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12790         if( detach ) {
12791                 /* give thread a chance to complete */
12792                 /* it should remain joinable and hence detachable */
12793                 sleep( 1 );
12794
12795                 status = pthread_detach( t );
12796                 if( status ) return status;
12797         }
12798 #endif
12799
12800 #else
12801         /* Draft 4 pthreads */
12802         status = pthread_create( &t, pthread_attr_default, task, NULL );
12803         if( status ) return status;
12804
12805         if( detach ) {
12806                 /* give thread a chance to complete */
12807                 /* it should remain joinable and hence detachable */
12808                 sleep( 1 );
12809
12810                 status = pthread_detach( &t );
12811                 if( status ) return status;
12812         }
12813 #endif
12814
12815 #ifdef HAVE_LINUX_THREADS
12816         pthread_kill_other_threads_np();
12817 #endif
12818
12819         return 0;
12820
12821 ; return 0; }
12822 EOF
12823 if { (eval echo configure:12824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12824   rm -rf conftest*
12825   ol_cv_pthread_thread=yes
12826 else
12827   echo "configure: failed program was:" >&5
12828   cat conftest.$ac_ext >&5
12829   rm -rf conftest*
12830   ol_cv_pthread_thread=no
12831 fi
12832 rm -f conftest*
12833 else
12834   cat > conftest.$ac_ext <<EOF
12835 #line 12836 "configure"
12836 #include "confdefs.h"
12837 /* pthread test headers */
12838 #include <pthread.h>
12839 #ifndef NULL
12840 #define NULL (void*)0
12841 #endif
12842
12843 static void *task(p)
12844         void *p;
12845 {
12846         return (void *) (p == NULL);
12847 }
12848
12849
12850 int main(argc, argv)
12851         int argc;
12852         char **argv;
12853 {
12854
12855         /* pthread test function */
12856         pthread_t t;
12857         int status;
12858         int detach = 1;
12859
12860 #ifdef HAVE_PTHREADS_FINAL
12861         /* Final pthreads */
12862         pthread_attr_t attr;
12863
12864         status = pthread_attr_init(&attr);
12865         if( status ) return status;
12866
12867 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12868         if( !detach ) {
12869 #if defined( PTHREAD_CREATE_JOINABLE )
12870                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12871 #else
12872                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12873 #endif
12874
12875 #ifdef PTHREAD_CREATE_DETACHED
12876         } else {
12877                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12878 #endif
12879         }
12880         if( status ) return status;
12881 #endif
12882
12883         status = pthread_create( &t, &attr, task, NULL );
12884         if( status ) return status;
12885
12886 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12887         if( detach ) {
12888                 /* give thread a chance to complete */
12889                 /* it should remain joinable and hence detachable */
12890                 sleep( 1 );
12891
12892                 status = pthread_detach( t );
12893                 if( status ) return status;
12894         }
12895 #endif
12896
12897 #else
12898         /* Draft 4 pthreads */
12899         status = pthread_create( &t, pthread_attr_default, task, NULL );
12900         if( status ) return status;
12901
12902         if( detach ) {
12903                 /* give thread a chance to complete */
12904                 /* it should remain joinable and hence detachable */
12905                 sleep( 1 );
12906
12907                 status = pthread_detach( &t );
12908                 if( status ) return status;
12909         }
12910 #endif
12911
12912 #ifdef HAVE_LINUX_THREADS
12913         pthread_kill_other_threads_np();
12914 #endif
12915
12916         return 0;
12917
12918 }
12919
12920 EOF
12921 if { (eval echo configure:12922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12922 then
12923   ol_cv_pthread_thread=yes
12924 else
12925   echo "configure: failed program was:" >&5
12926   cat conftest.$ac_ext >&5
12927   rm -fr conftest*
12928   ol_cv_pthread_thread=no
12929 fi
12930 rm -fr conftest*
12931 fi
12932
12933
12934                 # restore the LIBS
12935                 LIBS="$ol_LIBS"
12936         
12937 fi
12938
12939 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12940
12941         if test $ol_cv_pthread_thread = yes ; then
12942                 ol_link_pthreads="-thread"
12943                 ol_link_threads=posix
12944         fi
12945 fi
12946
12947
12948                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12949 if test "$ol_link_threads" = no ; then
12950         # try -lpthread -lmach -lexc -lc_r
12951         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12952 echo "configure:12953: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12953 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12954   echo $ac_n "(cached) $ac_c" 1>&6
12955 else
12956   
12957                 # save the flags
12958                 ol_LIBS="$LIBS"
12959                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12960
12961                 if test "$cross_compiling" = yes; then
12962   cat > conftest.$ac_ext <<EOF
12963 #line 12964 "configure"
12964 #include "confdefs.h"
12965 /* pthread test headers */
12966 #include <pthread.h>
12967 #ifndef NULL
12968 #define NULL (void*)0
12969 #endif
12970
12971 static void *task(p)
12972         void *p;
12973 {
12974         return (void *) (p == NULL);
12975 }
12976
12977 int main() {
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 ; return 0; }
13043 EOF
13044 if { (eval echo configure:13045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13045   rm -rf conftest*
13046   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13047 else
13048   echo "configure: failed program was:" >&5
13049   cat conftest.$ac_ext >&5
13050   rm -rf conftest*
13051   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13052 fi
13053 rm -f conftest*
13054 else
13055   cat > conftest.$ac_ext <<EOF
13056 #line 13057 "configure"
13057 #include "confdefs.h"
13058 /* pthread test headers */
13059 #include <pthread.h>
13060 #ifndef NULL
13061 #define NULL (void*)0
13062 #endif
13063
13064 static void *task(p)
13065         void *p;
13066 {
13067         return (void *) (p == NULL);
13068 }
13069
13070
13071 int main(argc, argv)
13072         int argc;
13073         char **argv;
13074 {
13075
13076         /* pthread test function */
13077         pthread_t t;
13078         int status;
13079         int detach = 1;
13080
13081 #ifdef HAVE_PTHREADS_FINAL
13082         /* Final pthreads */
13083         pthread_attr_t attr;
13084
13085         status = pthread_attr_init(&attr);
13086         if( status ) return status;
13087
13088 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13089         if( !detach ) {
13090 #if defined( PTHREAD_CREATE_JOINABLE )
13091                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13092 #else
13093                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13094 #endif
13095
13096 #ifdef PTHREAD_CREATE_DETACHED
13097         } else {
13098                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13099 #endif
13100         }
13101         if( status ) return status;
13102 #endif
13103
13104         status = pthread_create( &t, &attr, task, NULL );
13105         if( status ) return status;
13106
13107 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13108         if( detach ) {
13109                 /* give thread a chance to complete */
13110                 /* it should remain joinable and hence detachable */
13111                 sleep( 1 );
13112
13113                 status = pthread_detach( t );
13114                 if( status ) return status;
13115         }
13116 #endif
13117
13118 #else
13119         /* Draft 4 pthreads */
13120         status = pthread_create( &t, pthread_attr_default, task, NULL );
13121         if( status ) return status;
13122
13123         if( detach ) {
13124                 /* give thread a chance to complete */
13125                 /* it should remain joinable and hence detachable */
13126                 sleep( 1 );
13127
13128                 status = pthread_detach( &t );
13129                 if( status ) return status;
13130         }
13131 #endif
13132
13133 #ifdef HAVE_LINUX_THREADS
13134         pthread_kill_other_threads_np();
13135 #endif
13136
13137         return 0;
13138
13139 }
13140
13141 EOF
13142 if { (eval echo configure:13143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13143 then
13144   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13145 else
13146   echo "configure: failed program was:" >&5
13147   cat conftest.$ac_ext >&5
13148   rm -fr conftest*
13149   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13150 fi
13151 rm -fr conftest*
13152 fi
13153
13154
13155                 # restore the LIBS
13156                 LIBS="$ol_LIBS"
13157         
13158 fi
13159
13160 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13161
13162         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13163                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13164                 ol_link_threads=posix
13165         fi
13166 fi
13167
13168                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13169 if test "$ol_link_threads" = no ; then
13170         # try -lpthread -lmach -lexc
13171         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13172 echo "configure:13173: checking for pthread link with -lpthread -lmach -lexc" >&5
13173 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13174   echo $ac_n "(cached) $ac_c" 1>&6
13175 else
13176   
13177                 # save the flags
13178                 ol_LIBS="$LIBS"
13179                 LIBS="-lpthread -lmach -lexc $LIBS"
13180
13181                 if test "$cross_compiling" = yes; then
13182   cat > conftest.$ac_ext <<EOF
13183 #line 13184 "configure"
13184 #include "confdefs.h"
13185 /* pthread test headers */
13186 #include <pthread.h>
13187 #ifndef NULL
13188 #define NULL (void*)0
13189 #endif
13190
13191 static void *task(p)
13192         void *p;
13193 {
13194         return (void *) (p == NULL);
13195 }
13196
13197 int main() {
13198
13199         /* pthread test function */
13200         pthread_t t;
13201         int status;
13202         int detach = 1;
13203
13204 #ifdef HAVE_PTHREADS_FINAL
13205         /* Final pthreads */
13206         pthread_attr_t attr;
13207
13208         status = pthread_attr_init(&attr);
13209         if( status ) return status;
13210
13211 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13212         if( !detach ) {
13213 #if defined( PTHREAD_CREATE_JOINABLE )
13214                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13215 #else
13216                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13217 #endif
13218
13219 #ifdef PTHREAD_CREATE_DETACHED
13220         } else {
13221                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13222 #endif
13223         }
13224         if( status ) return status;
13225 #endif
13226
13227         status = pthread_create( &t, &attr, task, NULL );
13228         if( status ) return status;
13229
13230 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13231         if( detach ) {
13232                 /* give thread a chance to complete */
13233                 /* it should remain joinable and hence detachable */
13234                 sleep( 1 );
13235
13236                 status = pthread_detach( t );
13237                 if( status ) return status;
13238         }
13239 #endif
13240
13241 #else
13242         /* Draft 4 pthreads */
13243         status = pthread_create( &t, pthread_attr_default, task, NULL );
13244         if( status ) return status;
13245
13246         if( detach ) {
13247                 /* give thread a chance to complete */
13248                 /* it should remain joinable and hence detachable */
13249                 sleep( 1 );
13250
13251                 status = pthread_detach( &t );
13252                 if( status ) return status;
13253         }
13254 #endif
13255
13256 #ifdef HAVE_LINUX_THREADS
13257         pthread_kill_other_threads_np();
13258 #endif
13259
13260         return 0;
13261
13262 ; return 0; }
13263 EOF
13264 if { (eval echo configure:13265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13265   rm -rf conftest*
13266   ol_cv_pthread_lpthread_lmach_lexc=yes
13267 else
13268   echo "configure: failed program was:" >&5
13269   cat conftest.$ac_ext >&5
13270   rm -rf conftest*
13271   ol_cv_pthread_lpthread_lmach_lexc=no
13272 fi
13273 rm -f conftest*
13274 else
13275   cat > conftest.$ac_ext <<EOF
13276 #line 13277 "configure"
13277 #include "confdefs.h"
13278 /* pthread test headers */
13279 #include <pthread.h>
13280 #ifndef NULL
13281 #define NULL (void*)0
13282 #endif
13283
13284 static void *task(p)
13285         void *p;
13286 {
13287         return (void *) (p == NULL);
13288 }
13289
13290
13291 int main(argc, argv)
13292         int argc;
13293         char **argv;
13294 {
13295
13296         /* pthread test function */
13297         pthread_t t;
13298         int status;
13299         int detach = 1;
13300
13301 #ifdef HAVE_PTHREADS_FINAL
13302         /* Final pthreads */
13303         pthread_attr_t attr;
13304
13305         status = pthread_attr_init(&attr);
13306         if( status ) return status;
13307
13308 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13309         if( !detach ) {
13310 #if defined( PTHREAD_CREATE_JOINABLE )
13311                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13312 #else
13313                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13314 #endif
13315
13316 #ifdef PTHREAD_CREATE_DETACHED
13317         } else {
13318                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13319 #endif
13320         }
13321         if( status ) return status;
13322 #endif
13323
13324         status = pthread_create( &t, &attr, task, NULL );
13325         if( status ) return status;
13326
13327 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13328         if( detach ) {
13329                 /* give thread a chance to complete */
13330                 /* it should remain joinable and hence detachable */
13331                 sleep( 1 );
13332
13333                 status = pthread_detach( t );
13334                 if( status ) return status;
13335         }
13336 #endif
13337
13338 #else
13339         /* Draft 4 pthreads */
13340         status = pthread_create( &t, pthread_attr_default, task, NULL );
13341         if( status ) return status;
13342
13343         if( detach ) {
13344                 /* give thread a chance to complete */
13345                 /* it should remain joinable and hence detachable */
13346                 sleep( 1 );
13347
13348                 status = pthread_detach( &t );
13349                 if( status ) return status;
13350         }
13351 #endif
13352
13353 #ifdef HAVE_LINUX_THREADS
13354         pthread_kill_other_threads_np();
13355 #endif
13356
13357         return 0;
13358
13359 }
13360
13361 EOF
13362 if { (eval echo configure:13363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13363 then
13364   ol_cv_pthread_lpthread_lmach_lexc=yes
13365 else
13366   echo "configure: failed program was:" >&5
13367   cat conftest.$ac_ext >&5
13368   rm -fr conftest*
13369   ol_cv_pthread_lpthread_lmach_lexc=no
13370 fi
13371 rm -fr conftest*
13372 fi
13373
13374
13375                 # restore the LIBS
13376                 LIBS="$ol_LIBS"
13377         
13378 fi
13379
13380 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13381
13382         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13383                 ol_link_pthreads="-lpthread -lmach -lexc"
13384                 ol_link_threads=posix
13385         fi
13386 fi
13387
13388
13389                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13390 if test "$ol_link_threads" = no ; then
13391         # try -lpthread -Wl,-woff,85
13392         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13393 echo "configure:13394: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13394 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13395   echo $ac_n "(cached) $ac_c" 1>&6
13396 else
13397   
13398                 # save the flags
13399                 ol_LIBS="$LIBS"
13400                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13401
13402                 if test "$cross_compiling" = yes; then
13403   cat > conftest.$ac_ext <<EOF
13404 #line 13405 "configure"
13405 #include "confdefs.h"
13406 /* pthread test headers */
13407 #include <pthread.h>
13408 #ifndef NULL
13409 #define NULL (void*)0
13410 #endif
13411
13412 static void *task(p)
13413         void *p;
13414 {
13415         return (void *) (p == NULL);
13416 }
13417
13418 int main() {
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 ; return 0; }
13484 EOF
13485 if { (eval echo configure:13486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13486   rm -rf conftest*
13487   ol_cv_pthread_lib_lpthread_woff=yes
13488 else
13489   echo "configure: failed program was:" >&5
13490   cat conftest.$ac_ext >&5
13491   rm -rf conftest*
13492   ol_cv_pthread_lib_lpthread_woff=no
13493 fi
13494 rm -f conftest*
13495 else
13496   cat > conftest.$ac_ext <<EOF
13497 #line 13498 "configure"
13498 #include "confdefs.h"
13499 /* pthread test headers */
13500 #include <pthread.h>
13501 #ifndef NULL
13502 #define NULL (void*)0
13503 #endif
13504
13505 static void *task(p)
13506         void *p;
13507 {
13508         return (void *) (p == NULL);
13509 }
13510
13511
13512 int main(argc, argv)
13513         int argc;
13514         char **argv;
13515 {
13516
13517         /* pthread test function */
13518         pthread_t t;
13519         int status;
13520         int detach = 1;
13521
13522 #ifdef HAVE_PTHREADS_FINAL
13523         /* Final pthreads */
13524         pthread_attr_t attr;
13525
13526         status = pthread_attr_init(&attr);
13527         if( status ) return status;
13528
13529 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13530         if( !detach ) {
13531 #if defined( PTHREAD_CREATE_JOINABLE )
13532                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13533 #else
13534                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13535 #endif
13536
13537 #ifdef PTHREAD_CREATE_DETACHED
13538         } else {
13539                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13540 #endif
13541         }
13542         if( status ) return status;
13543 #endif
13544
13545         status = pthread_create( &t, &attr, task, NULL );
13546         if( status ) return status;
13547
13548 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13549         if( detach ) {
13550                 /* give thread a chance to complete */
13551                 /* it should remain joinable and hence detachable */
13552                 sleep( 1 );
13553
13554                 status = pthread_detach( t );
13555                 if( status ) return status;
13556         }
13557 #endif
13558
13559 #else
13560         /* Draft 4 pthreads */
13561         status = pthread_create( &t, pthread_attr_default, task, NULL );
13562         if( status ) return status;
13563
13564         if( detach ) {
13565                 /* give thread a chance to complete */
13566                 /* it should remain joinable and hence detachable */
13567                 sleep( 1 );
13568
13569                 status = pthread_detach( &t );
13570                 if( status ) return status;
13571         }
13572 #endif
13573
13574 #ifdef HAVE_LINUX_THREADS
13575         pthread_kill_other_threads_np();
13576 #endif
13577
13578         return 0;
13579
13580 }
13581
13582 EOF
13583 if { (eval echo configure:13584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13584 then
13585   ol_cv_pthread_lib_lpthread_woff=yes
13586 else
13587   echo "configure: failed program was:" >&5
13588   cat conftest.$ac_ext >&5
13589   rm -fr conftest*
13590   ol_cv_pthread_lib_lpthread_woff=no
13591 fi
13592 rm -fr conftest*
13593 fi
13594
13595
13596                 # restore the LIBS
13597                 LIBS="$ol_LIBS"
13598         
13599 fi
13600
13601 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13602
13603         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13604                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13605                 ol_link_threads=posix
13606         fi
13607 fi
13608
13609
13610                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13611 if test "$ol_link_threads" = no ; then
13612         # try -lpthread
13613         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13614 echo "configure:13615: checking for pthread link with -lpthread" >&5
13615 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13616   echo $ac_n "(cached) $ac_c" 1>&6
13617 else
13618   
13619                 # save the flags
13620                 ol_LIBS="$LIBS"
13621                 LIBS="-lpthread $LIBS"
13622
13623                 if test "$cross_compiling" = yes; then
13624   cat > conftest.$ac_ext <<EOF
13625 #line 13626 "configure"
13626 #include "confdefs.h"
13627 /* pthread test headers */
13628 #include <pthread.h>
13629 #ifndef NULL
13630 #define NULL (void*)0
13631 #endif
13632
13633 static void *task(p)
13634         void *p;
13635 {
13636         return (void *) (p == NULL);
13637 }
13638
13639 int main() {
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 ; return 0; }
13705 EOF
13706 if { (eval echo configure:13707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13707   rm -rf conftest*
13708   ol_cv_pthread_lpthread=yes
13709 else
13710   echo "configure: failed program was:" >&5
13711   cat conftest.$ac_ext >&5
13712   rm -rf conftest*
13713   ol_cv_pthread_lpthread=no
13714 fi
13715 rm -f conftest*
13716 else
13717   cat > conftest.$ac_ext <<EOF
13718 #line 13719 "configure"
13719 #include "confdefs.h"
13720 /* pthread test headers */
13721 #include <pthread.h>
13722 #ifndef NULL
13723 #define NULL (void*)0
13724 #endif
13725
13726 static void *task(p)
13727         void *p;
13728 {
13729         return (void *) (p == NULL);
13730 }
13731
13732
13733 int main(argc, argv)
13734         int argc;
13735         char **argv;
13736 {
13737
13738         /* pthread test function */
13739         pthread_t t;
13740         int status;
13741         int detach = 1;
13742
13743 #ifdef HAVE_PTHREADS_FINAL
13744         /* Final pthreads */
13745         pthread_attr_t attr;
13746
13747         status = pthread_attr_init(&attr);
13748         if( status ) return status;
13749
13750 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13751         if( !detach ) {
13752 #if defined( PTHREAD_CREATE_JOINABLE )
13753                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13754 #else
13755                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13756 #endif
13757
13758 #ifdef PTHREAD_CREATE_DETACHED
13759         } else {
13760                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13761 #endif
13762         }
13763         if( status ) return status;
13764 #endif
13765
13766         status = pthread_create( &t, &attr, task, NULL );
13767         if( status ) return status;
13768
13769 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13770         if( detach ) {
13771                 /* give thread a chance to complete */
13772                 /* it should remain joinable and hence detachable */
13773                 sleep( 1 );
13774
13775                 status = pthread_detach( t );
13776                 if( status ) return status;
13777         }
13778 #endif
13779
13780 #else
13781         /* Draft 4 pthreads */
13782         status = pthread_create( &t, pthread_attr_default, task, NULL );
13783         if( status ) return status;
13784
13785         if( detach ) {
13786                 /* give thread a chance to complete */
13787                 /* it should remain joinable and hence detachable */
13788                 sleep( 1 );
13789
13790                 status = pthread_detach( &t );
13791                 if( status ) return status;
13792         }
13793 #endif
13794
13795 #ifdef HAVE_LINUX_THREADS
13796         pthread_kill_other_threads_np();
13797 #endif
13798
13799         return 0;
13800
13801 }
13802
13803 EOF
13804 if { (eval echo configure:13805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13805 then
13806   ol_cv_pthread_lpthread=yes
13807 else
13808   echo "configure: failed program was:" >&5
13809   cat conftest.$ac_ext >&5
13810   rm -fr conftest*
13811   ol_cv_pthread_lpthread=no
13812 fi
13813 rm -fr conftest*
13814 fi
13815
13816
13817                 # restore the LIBS
13818                 LIBS="$ol_LIBS"
13819         
13820 fi
13821
13822 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13823
13824         if test $ol_cv_pthread_lpthread = yes ; then
13825                 ol_link_pthreads="-lpthread"
13826                 ol_link_threads=posix
13827         fi
13828 fi
13829
13830                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13831 if test "$ol_link_threads" = no ; then
13832         # try -lc_r
13833         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13834 echo "configure:13835: checking for pthread link with -lc_r" >&5
13835 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13836   echo $ac_n "(cached) $ac_c" 1>&6
13837 else
13838   
13839                 # save the flags
13840                 ol_LIBS="$LIBS"
13841                 LIBS="-lc_r $LIBS"
13842
13843                 if test "$cross_compiling" = yes; then
13844   cat > conftest.$ac_ext <<EOF
13845 #line 13846 "configure"
13846 #include "confdefs.h"
13847 /* pthread test headers */
13848 #include <pthread.h>
13849 #ifndef NULL
13850 #define NULL (void*)0
13851 #endif
13852
13853 static void *task(p)
13854         void *p;
13855 {
13856         return (void *) (p == NULL);
13857 }
13858
13859 int main() {
13860
13861         /* pthread test function */
13862         pthread_t t;
13863         int status;
13864         int detach = 1;
13865
13866 #ifdef HAVE_PTHREADS_FINAL
13867         /* Final pthreads */
13868         pthread_attr_t attr;
13869
13870         status = pthread_attr_init(&attr);
13871         if( status ) return status;
13872
13873 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13874         if( !detach ) {
13875 #if defined( PTHREAD_CREATE_JOINABLE )
13876                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13877 #else
13878                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13879 #endif
13880
13881 #ifdef PTHREAD_CREATE_DETACHED
13882         } else {
13883                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13884 #endif
13885         }
13886         if( status ) return status;
13887 #endif
13888
13889         status = pthread_create( &t, &attr, task, NULL );
13890         if( status ) return status;
13891
13892 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13893         if( detach ) {
13894                 /* give thread a chance to complete */
13895                 /* it should remain joinable and hence detachable */
13896                 sleep( 1 );
13897
13898                 status = pthread_detach( t );
13899                 if( status ) return status;
13900         }
13901 #endif
13902
13903 #else
13904         /* Draft 4 pthreads */
13905         status = pthread_create( &t, pthread_attr_default, task, NULL );
13906         if( status ) return status;
13907
13908         if( detach ) {
13909                 /* give thread a chance to complete */
13910                 /* it should remain joinable and hence detachable */
13911                 sleep( 1 );
13912
13913                 status = pthread_detach( &t );
13914                 if( status ) return status;
13915         }
13916 #endif
13917
13918 #ifdef HAVE_LINUX_THREADS
13919         pthread_kill_other_threads_np();
13920 #endif
13921
13922         return 0;
13923
13924 ; return 0; }
13925 EOF
13926 if { (eval echo configure:13927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13927   rm -rf conftest*
13928   ol_cv_pthread_lc_r=yes
13929 else
13930   echo "configure: failed program was:" >&5
13931   cat conftest.$ac_ext >&5
13932   rm -rf conftest*
13933   ol_cv_pthread_lc_r=no
13934 fi
13935 rm -f conftest*
13936 else
13937   cat > conftest.$ac_ext <<EOF
13938 #line 13939 "configure"
13939 #include "confdefs.h"
13940 /* pthread test headers */
13941 #include <pthread.h>
13942 #ifndef NULL
13943 #define NULL (void*)0
13944 #endif
13945
13946 static void *task(p)
13947         void *p;
13948 {
13949         return (void *) (p == NULL);
13950 }
13951
13952
13953 int main(argc, argv)
13954         int argc;
13955         char **argv;
13956 {
13957
13958         /* pthread test function */
13959         pthread_t t;
13960         int status;
13961         int detach = 1;
13962
13963 #ifdef HAVE_PTHREADS_FINAL
13964         /* Final pthreads */
13965         pthread_attr_t attr;
13966
13967         status = pthread_attr_init(&attr);
13968         if( status ) return status;
13969
13970 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13971         if( !detach ) {
13972 #if defined( PTHREAD_CREATE_JOINABLE )
13973                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13974 #else
13975                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13976 #endif
13977
13978 #ifdef PTHREAD_CREATE_DETACHED
13979         } else {
13980                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13981 #endif
13982         }
13983         if( status ) return status;
13984 #endif
13985
13986         status = pthread_create( &t, &attr, task, NULL );
13987         if( status ) return status;
13988
13989 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13990         if( detach ) {
13991                 /* give thread a chance to complete */
13992                 /* it should remain joinable and hence detachable */
13993                 sleep( 1 );
13994
13995                 status = pthread_detach( t );
13996                 if( status ) return status;
13997         }
13998 #endif
13999
14000 #else
14001         /* Draft 4 pthreads */
14002         status = pthread_create( &t, pthread_attr_default, task, NULL );
14003         if( status ) return status;
14004
14005         if( detach ) {
14006                 /* give thread a chance to complete */
14007                 /* it should remain joinable and hence detachable */
14008                 sleep( 1 );
14009
14010                 status = pthread_detach( &t );
14011                 if( status ) return status;
14012         }
14013 #endif
14014
14015 #ifdef HAVE_LINUX_THREADS
14016         pthread_kill_other_threads_np();
14017 #endif
14018
14019         return 0;
14020
14021 }
14022
14023 EOF
14024 if { (eval echo configure:14025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14025 then
14026   ol_cv_pthread_lc_r=yes
14027 else
14028   echo "configure: failed program was:" >&5
14029   cat conftest.$ac_ext >&5
14030   rm -fr conftest*
14031   ol_cv_pthread_lc_r=no
14032 fi
14033 rm -fr conftest*
14034 fi
14035
14036
14037                 # restore the LIBS
14038                 LIBS="$ol_LIBS"
14039         
14040 fi
14041
14042 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
14043
14044         if test $ol_cv_pthread_lc_r = yes ; then
14045                 ol_link_pthreads="-lc_r"
14046                 ol_link_threads=posix
14047         fi
14048 fi
14049
14050
14051                 # Pthread try link: -threads (ol_cv_pthread_threads)
14052 if test "$ol_link_threads" = no ; then
14053         # try -threads
14054         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
14055 echo "configure:14056: checking for pthread link with -threads" >&5
14056 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
14057   echo $ac_n "(cached) $ac_c" 1>&6
14058 else
14059   
14060                 # save the flags
14061                 ol_LIBS="$LIBS"
14062                 LIBS="-threads $LIBS"
14063
14064                 if test "$cross_compiling" = yes; then
14065   cat > conftest.$ac_ext <<EOF
14066 #line 14067 "configure"
14067 #include "confdefs.h"
14068 /* pthread test headers */
14069 #include <pthread.h>
14070 #ifndef NULL
14071 #define NULL (void*)0
14072 #endif
14073
14074 static void *task(p)
14075         void *p;
14076 {
14077         return (void *) (p == NULL);
14078 }
14079
14080 int main() {
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 ; return 0; }
14146 EOF
14147 if { (eval echo configure:14148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14148   rm -rf conftest*
14149   ol_cv_pthread_threads=yes
14150 else
14151   echo "configure: failed program was:" >&5
14152   cat conftest.$ac_ext >&5
14153   rm -rf conftest*
14154   ol_cv_pthread_threads=no
14155 fi
14156 rm -f conftest*
14157 else
14158   cat > conftest.$ac_ext <<EOF
14159 #line 14160 "configure"
14160 #include "confdefs.h"
14161 /* pthread test headers */
14162 #include <pthread.h>
14163 #ifndef NULL
14164 #define NULL (void*)0
14165 #endif
14166
14167 static void *task(p)
14168         void *p;
14169 {
14170         return (void *) (p == NULL);
14171 }
14172
14173
14174 int main(argc, argv)
14175         int argc;
14176         char **argv;
14177 {
14178
14179         /* pthread test function */
14180         pthread_t t;
14181         int status;
14182         int detach = 1;
14183
14184 #ifdef HAVE_PTHREADS_FINAL
14185         /* Final pthreads */
14186         pthread_attr_t attr;
14187
14188         status = pthread_attr_init(&attr);
14189         if( status ) return status;
14190
14191 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14192         if( !detach ) {
14193 #if defined( PTHREAD_CREATE_JOINABLE )
14194                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14195 #else
14196                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14197 #endif
14198
14199 #ifdef PTHREAD_CREATE_DETACHED
14200         } else {
14201                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14202 #endif
14203         }
14204         if( status ) return status;
14205 #endif
14206
14207         status = pthread_create( &t, &attr, task, NULL );
14208         if( status ) return status;
14209
14210 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14211         if( detach ) {
14212                 /* give thread a chance to complete */
14213                 /* it should remain joinable and hence detachable */
14214                 sleep( 1 );
14215
14216                 status = pthread_detach( t );
14217                 if( status ) return status;
14218         }
14219 #endif
14220
14221 #else
14222         /* Draft 4 pthreads */
14223         status = pthread_create( &t, pthread_attr_default, task, NULL );
14224         if( status ) return status;
14225
14226         if( detach ) {
14227                 /* give thread a chance to complete */
14228                 /* it should remain joinable and hence detachable */
14229                 sleep( 1 );
14230
14231                 status = pthread_detach( &t );
14232                 if( status ) return status;
14233         }
14234 #endif
14235
14236 #ifdef HAVE_LINUX_THREADS
14237         pthread_kill_other_threads_np();
14238 #endif
14239
14240         return 0;
14241
14242 }
14243
14244 EOF
14245 if { (eval echo configure:14246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14246 then
14247   ol_cv_pthread_threads=yes
14248 else
14249   echo "configure: failed program was:" >&5
14250   cat conftest.$ac_ext >&5
14251   rm -fr conftest*
14252   ol_cv_pthread_threads=no
14253 fi
14254 rm -fr conftest*
14255 fi
14256
14257
14258                 # restore the LIBS
14259                 LIBS="$ol_LIBS"
14260         
14261 fi
14262
14263 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14264
14265         if test $ol_cv_pthread_threads = yes ; then
14266                 ol_link_pthreads="-threads"
14267                 ol_link_threads=posix
14268         fi
14269 fi
14270
14271
14272                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14273 if test "$ol_link_threads" = no ; then
14274         # try -lpthreads -lmach -lexc -lc_r
14275         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14276 echo "configure:14277: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14277 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14278   echo $ac_n "(cached) $ac_c" 1>&6
14279 else
14280   
14281                 # save the flags
14282                 ol_LIBS="$LIBS"
14283                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14284
14285                 if test "$cross_compiling" = yes; then
14286   cat > conftest.$ac_ext <<EOF
14287 #line 14288 "configure"
14288 #include "confdefs.h"
14289 /* pthread test headers */
14290 #include <pthread.h>
14291 #ifndef NULL
14292 #define NULL (void*)0
14293 #endif
14294
14295 static void *task(p)
14296         void *p;
14297 {
14298         return (void *) (p == NULL);
14299 }
14300
14301 int main() {
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 ; return 0; }
14367 EOF
14368 if { (eval echo configure:14369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14369   rm -rf conftest*
14370   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14371 else
14372   echo "configure: failed program was:" >&5
14373   cat conftest.$ac_ext >&5
14374   rm -rf conftest*
14375   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14376 fi
14377 rm -f conftest*
14378 else
14379   cat > conftest.$ac_ext <<EOF
14380 #line 14381 "configure"
14381 #include "confdefs.h"
14382 /* pthread test headers */
14383 #include <pthread.h>
14384 #ifndef NULL
14385 #define NULL (void*)0
14386 #endif
14387
14388 static void *task(p)
14389         void *p;
14390 {
14391         return (void *) (p == NULL);
14392 }
14393
14394
14395 int main(argc, argv)
14396         int argc;
14397         char **argv;
14398 {
14399
14400         /* pthread test function */
14401         pthread_t t;
14402         int status;
14403         int detach = 1;
14404
14405 #ifdef HAVE_PTHREADS_FINAL
14406         /* Final pthreads */
14407         pthread_attr_t attr;
14408
14409         status = pthread_attr_init(&attr);
14410         if( status ) return status;
14411
14412 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14413         if( !detach ) {
14414 #if defined( PTHREAD_CREATE_JOINABLE )
14415                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14416 #else
14417                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14418 #endif
14419
14420 #ifdef PTHREAD_CREATE_DETACHED
14421         } else {
14422                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14423 #endif
14424         }
14425         if( status ) return status;
14426 #endif
14427
14428         status = pthread_create( &t, &attr, task, NULL );
14429         if( status ) return status;
14430
14431 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14432         if( detach ) {
14433                 /* give thread a chance to complete */
14434                 /* it should remain joinable and hence detachable */
14435                 sleep( 1 );
14436
14437                 status = pthread_detach( t );
14438                 if( status ) return status;
14439         }
14440 #endif
14441
14442 #else
14443         /* Draft 4 pthreads */
14444         status = pthread_create( &t, pthread_attr_default, task, NULL );
14445         if( status ) return status;
14446
14447         if( detach ) {
14448                 /* give thread a chance to complete */
14449                 /* it should remain joinable and hence detachable */
14450                 sleep( 1 );
14451
14452                 status = pthread_detach( &t );
14453                 if( status ) return status;
14454         }
14455 #endif
14456
14457 #ifdef HAVE_LINUX_THREADS
14458         pthread_kill_other_threads_np();
14459 #endif
14460
14461         return 0;
14462
14463 }
14464
14465 EOF
14466 if { (eval echo configure:14467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14467 then
14468   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14469 else
14470   echo "configure: failed program was:" >&5
14471   cat conftest.$ac_ext >&5
14472   rm -fr conftest*
14473   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14474 fi
14475 rm -fr conftest*
14476 fi
14477
14478
14479                 # restore the LIBS
14480                 LIBS="$ol_LIBS"
14481         
14482 fi
14483
14484 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14485
14486         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14487                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14488                 ol_link_threads=posix
14489         fi
14490 fi
14491
14492                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14493 if test "$ol_link_threads" = no ; then
14494         # try -lpthreads -lmach -lexc
14495         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14496 echo "configure:14497: checking for pthread link with -lpthreads -lmach -lexc" >&5
14497 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14498   echo $ac_n "(cached) $ac_c" 1>&6
14499 else
14500   
14501                 # save the flags
14502                 ol_LIBS="$LIBS"
14503                 LIBS="-lpthreads -lmach -lexc $LIBS"
14504
14505                 if test "$cross_compiling" = yes; then
14506   cat > conftest.$ac_ext <<EOF
14507 #line 14508 "configure"
14508 #include "confdefs.h"
14509 /* pthread test headers */
14510 #include <pthread.h>
14511 #ifndef NULL
14512 #define NULL (void*)0
14513 #endif
14514
14515 static void *task(p)
14516         void *p;
14517 {
14518         return (void *) (p == NULL);
14519 }
14520
14521 int main() {
14522
14523         /* pthread test function */
14524         pthread_t t;
14525         int status;
14526         int detach = 1;
14527
14528 #ifdef HAVE_PTHREADS_FINAL
14529         /* Final pthreads */
14530         pthread_attr_t attr;
14531
14532         status = pthread_attr_init(&attr);
14533         if( status ) return status;
14534
14535 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14536         if( !detach ) {
14537 #if defined( PTHREAD_CREATE_JOINABLE )
14538                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14539 #else
14540                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14541 #endif
14542
14543 #ifdef PTHREAD_CREATE_DETACHED
14544         } else {
14545                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14546 #endif
14547         }
14548         if( status ) return status;
14549 #endif
14550
14551         status = pthread_create( &t, &attr, task, NULL );
14552         if( status ) return status;
14553
14554 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14555         if( detach ) {
14556                 /* give thread a chance to complete */
14557                 /* it should remain joinable and hence detachable */
14558                 sleep( 1 );
14559
14560                 status = pthread_detach( t );
14561                 if( status ) return status;
14562         }
14563 #endif
14564
14565 #else
14566         /* Draft 4 pthreads */
14567         status = pthread_create( &t, pthread_attr_default, task, NULL );
14568         if( status ) return status;
14569
14570         if( detach ) {
14571                 /* give thread a chance to complete */
14572                 /* it should remain joinable and hence detachable */
14573                 sleep( 1 );
14574
14575                 status = pthread_detach( &t );
14576                 if( status ) return status;
14577         }
14578 #endif
14579
14580 #ifdef HAVE_LINUX_THREADS
14581         pthread_kill_other_threads_np();
14582 #endif
14583
14584         return 0;
14585
14586 ; return 0; }
14587 EOF
14588 if { (eval echo configure:14589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14589   rm -rf conftest*
14590   ol_cv_pthread_lpthreads_lmach_lexc=yes
14591 else
14592   echo "configure: failed program was:" >&5
14593   cat conftest.$ac_ext >&5
14594   rm -rf conftest*
14595   ol_cv_pthread_lpthreads_lmach_lexc=no
14596 fi
14597 rm -f conftest*
14598 else
14599   cat > conftest.$ac_ext <<EOF
14600 #line 14601 "configure"
14601 #include "confdefs.h"
14602 /* pthread test headers */
14603 #include <pthread.h>
14604 #ifndef NULL
14605 #define NULL (void*)0
14606 #endif
14607
14608 static void *task(p)
14609         void *p;
14610 {
14611         return (void *) (p == NULL);
14612 }
14613
14614
14615 int main(argc, argv)
14616         int argc;
14617         char **argv;
14618 {
14619
14620         /* pthread test function */
14621         pthread_t t;
14622         int status;
14623         int detach = 1;
14624
14625 #ifdef HAVE_PTHREADS_FINAL
14626         /* Final pthreads */
14627         pthread_attr_t attr;
14628
14629         status = pthread_attr_init(&attr);
14630         if( status ) return status;
14631
14632 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14633         if( !detach ) {
14634 #if defined( PTHREAD_CREATE_JOINABLE )
14635                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14636 #else
14637                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14638 #endif
14639
14640 #ifdef PTHREAD_CREATE_DETACHED
14641         } else {
14642                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14643 #endif
14644         }
14645         if( status ) return status;
14646 #endif
14647
14648         status = pthread_create( &t, &attr, task, NULL );
14649         if( status ) return status;
14650
14651 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14652         if( detach ) {
14653                 /* give thread a chance to complete */
14654                 /* it should remain joinable and hence detachable */
14655                 sleep( 1 );
14656
14657                 status = pthread_detach( t );
14658                 if( status ) return status;
14659         }
14660 #endif
14661
14662 #else
14663         /* Draft 4 pthreads */
14664         status = pthread_create( &t, pthread_attr_default, task, NULL );
14665         if( status ) return status;
14666
14667         if( detach ) {
14668                 /* give thread a chance to complete */
14669                 /* it should remain joinable and hence detachable */
14670                 sleep( 1 );
14671
14672                 status = pthread_detach( &t );
14673                 if( status ) return status;
14674         }
14675 #endif
14676
14677 #ifdef HAVE_LINUX_THREADS
14678         pthread_kill_other_threads_np();
14679 #endif
14680
14681         return 0;
14682
14683 }
14684
14685 EOF
14686 if { (eval echo configure:14687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14687 then
14688   ol_cv_pthread_lpthreads_lmach_lexc=yes
14689 else
14690   echo "configure: failed program was:" >&5
14691   cat conftest.$ac_ext >&5
14692   rm -fr conftest*
14693   ol_cv_pthread_lpthreads_lmach_lexc=no
14694 fi
14695 rm -fr conftest*
14696 fi
14697
14698
14699                 # restore the LIBS
14700                 LIBS="$ol_LIBS"
14701         
14702 fi
14703
14704 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14705
14706         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14707                 ol_link_pthreads="-lpthreads -lmach -lexc"
14708                 ol_link_threads=posix
14709         fi
14710 fi
14711
14712                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14713 if test "$ol_link_threads" = no ; then
14714         # try -lpthreads -lexc
14715         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14716 echo "configure:14717: checking for pthread link with -lpthreads -lexc" >&5
14717 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14718   echo $ac_n "(cached) $ac_c" 1>&6
14719 else
14720   
14721                 # save the flags
14722                 ol_LIBS="$LIBS"
14723                 LIBS="-lpthreads -lexc $LIBS"
14724
14725                 if test "$cross_compiling" = yes; then
14726   cat > conftest.$ac_ext <<EOF
14727 #line 14728 "configure"
14728 #include "confdefs.h"
14729 /* pthread test headers */
14730 #include <pthread.h>
14731 #ifndef NULL
14732 #define NULL (void*)0
14733 #endif
14734
14735 static void *task(p)
14736         void *p;
14737 {
14738         return (void *) (p == NULL);
14739 }
14740
14741 int main() {
14742
14743         /* pthread test function */
14744         pthread_t t;
14745         int status;
14746         int detach = 1;
14747
14748 #ifdef HAVE_PTHREADS_FINAL
14749         /* Final pthreads */
14750         pthread_attr_t attr;
14751
14752         status = pthread_attr_init(&attr);
14753         if( status ) return status;
14754
14755 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14756         if( !detach ) {
14757 #if defined( PTHREAD_CREATE_JOINABLE )
14758                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14759 #else
14760                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14761 #endif
14762
14763 #ifdef PTHREAD_CREATE_DETACHED
14764         } else {
14765                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14766 #endif
14767         }
14768         if( status ) return status;
14769 #endif
14770
14771         status = pthread_create( &t, &attr, task, NULL );
14772         if( status ) return status;
14773
14774 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14775         if( detach ) {
14776                 /* give thread a chance to complete */
14777                 /* it should remain joinable and hence detachable */
14778                 sleep( 1 );
14779
14780                 status = pthread_detach( t );
14781                 if( status ) return status;
14782         }
14783 #endif
14784
14785 #else
14786         /* Draft 4 pthreads */
14787         status = pthread_create( &t, pthread_attr_default, task, NULL );
14788         if( status ) return status;
14789
14790         if( detach ) {
14791                 /* give thread a chance to complete */
14792                 /* it should remain joinable and hence detachable */
14793                 sleep( 1 );
14794
14795                 status = pthread_detach( &t );
14796                 if( status ) return status;
14797         }
14798 #endif
14799
14800 #ifdef HAVE_LINUX_THREADS
14801         pthread_kill_other_threads_np();
14802 #endif
14803
14804         return 0;
14805
14806 ; return 0; }
14807 EOF
14808 if { (eval echo configure:14809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14809   rm -rf conftest*
14810   ol_cv_pthread_lpthreads_lexc=yes
14811 else
14812   echo "configure: failed program was:" >&5
14813   cat conftest.$ac_ext >&5
14814   rm -rf conftest*
14815   ol_cv_pthread_lpthreads_lexc=no
14816 fi
14817 rm -f conftest*
14818 else
14819   cat > conftest.$ac_ext <<EOF
14820 #line 14821 "configure"
14821 #include "confdefs.h"
14822 /* pthread test headers */
14823 #include <pthread.h>
14824 #ifndef NULL
14825 #define NULL (void*)0
14826 #endif
14827
14828 static void *task(p)
14829         void *p;
14830 {
14831         return (void *) (p == NULL);
14832 }
14833
14834
14835 int main(argc, argv)
14836         int argc;
14837         char **argv;
14838 {
14839
14840         /* pthread test function */
14841         pthread_t t;
14842         int status;
14843         int detach = 1;
14844
14845 #ifdef HAVE_PTHREADS_FINAL
14846         /* Final pthreads */
14847         pthread_attr_t attr;
14848
14849         status = pthread_attr_init(&attr);
14850         if( status ) return status;
14851
14852 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14853         if( !detach ) {
14854 #if defined( PTHREAD_CREATE_JOINABLE )
14855                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14856 #else
14857                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14858 #endif
14859
14860 #ifdef PTHREAD_CREATE_DETACHED
14861         } else {
14862                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14863 #endif
14864         }
14865         if( status ) return status;
14866 #endif
14867
14868         status = pthread_create( &t, &attr, task, NULL );
14869         if( status ) return status;
14870
14871 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14872         if( detach ) {
14873                 /* give thread a chance to complete */
14874                 /* it should remain joinable and hence detachable */
14875                 sleep( 1 );
14876
14877                 status = pthread_detach( t );
14878                 if( status ) return status;
14879         }
14880 #endif
14881
14882 #else
14883         /* Draft 4 pthreads */
14884         status = pthread_create( &t, pthread_attr_default, task, NULL );
14885         if( status ) return status;
14886
14887         if( detach ) {
14888                 /* give thread a chance to complete */
14889                 /* it should remain joinable and hence detachable */
14890                 sleep( 1 );
14891
14892                 status = pthread_detach( &t );
14893                 if( status ) return status;
14894         }
14895 #endif
14896
14897 #ifdef HAVE_LINUX_THREADS
14898         pthread_kill_other_threads_np();
14899 #endif
14900
14901         return 0;
14902
14903 }
14904
14905 EOF
14906 if { (eval echo configure:14907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14907 then
14908   ol_cv_pthread_lpthreads_lexc=yes
14909 else
14910   echo "configure: failed program was:" >&5
14911   cat conftest.$ac_ext >&5
14912   rm -fr conftest*
14913   ol_cv_pthread_lpthreads_lexc=no
14914 fi
14915 rm -fr conftest*
14916 fi
14917
14918
14919                 # restore the LIBS
14920                 LIBS="$ol_LIBS"
14921         
14922 fi
14923
14924 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14925
14926         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14927                 ol_link_pthreads="-lpthreads -lexc"
14928                 ol_link_threads=posix
14929         fi
14930 fi
14931
14932
14933                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14934 if test "$ol_link_threads" = no ; then
14935         # try -lpthreads
14936         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14937 echo "configure:14938: checking for pthread link with -lpthreads" >&5
14938 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14939   echo $ac_n "(cached) $ac_c" 1>&6
14940 else
14941   
14942                 # save the flags
14943                 ol_LIBS="$LIBS"
14944                 LIBS="-lpthreads $LIBS"
14945
14946                 if test "$cross_compiling" = yes; then
14947   cat > conftest.$ac_ext <<EOF
14948 #line 14949 "configure"
14949 #include "confdefs.h"
14950 /* pthread test headers */
14951 #include <pthread.h>
14952 #ifndef NULL
14953 #define NULL (void*)0
14954 #endif
14955
14956 static void *task(p)
14957         void *p;
14958 {
14959         return (void *) (p == NULL);
14960 }
14961
14962 int main() {
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 ; return 0; }
15028 EOF
15029 if { (eval echo configure:15030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15030   rm -rf conftest*
15031   ol_cv_pthread_lib_lpthreads=yes
15032 else
15033   echo "configure: failed program was:" >&5
15034   cat conftest.$ac_ext >&5
15035   rm -rf conftest*
15036   ol_cv_pthread_lib_lpthreads=no
15037 fi
15038 rm -f conftest*
15039 else
15040   cat > conftest.$ac_ext <<EOF
15041 #line 15042 "configure"
15042 #include "confdefs.h"
15043 /* pthread test headers */
15044 #include <pthread.h>
15045 #ifndef NULL
15046 #define NULL (void*)0
15047 #endif
15048
15049 static void *task(p)
15050         void *p;
15051 {
15052         return (void *) (p == NULL);
15053 }
15054
15055
15056 int main(argc, argv)
15057         int argc;
15058         char **argv;
15059 {
15060
15061         /* pthread test function */
15062         pthread_t t;
15063         int status;
15064         int detach = 1;
15065
15066 #ifdef HAVE_PTHREADS_FINAL
15067         /* Final pthreads */
15068         pthread_attr_t attr;
15069
15070         status = pthread_attr_init(&attr);
15071         if( status ) return status;
15072
15073 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15074         if( !detach ) {
15075 #if defined( PTHREAD_CREATE_JOINABLE )
15076                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15077 #else
15078                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15079 #endif
15080
15081 #ifdef PTHREAD_CREATE_DETACHED
15082         } else {
15083                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15084 #endif
15085         }
15086         if( status ) return status;
15087 #endif
15088
15089         status = pthread_create( &t, &attr, task, NULL );
15090         if( status ) return status;
15091
15092 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15093         if( detach ) {
15094                 /* give thread a chance to complete */
15095                 /* it should remain joinable and hence detachable */
15096                 sleep( 1 );
15097
15098                 status = pthread_detach( t );
15099                 if( status ) return status;
15100         }
15101 #endif
15102
15103 #else
15104         /* Draft 4 pthreads */
15105         status = pthread_create( &t, pthread_attr_default, task, NULL );
15106         if( status ) return status;
15107
15108         if( detach ) {
15109                 /* give thread a chance to complete */
15110                 /* it should remain joinable and hence detachable */
15111                 sleep( 1 );
15112
15113                 status = pthread_detach( &t );
15114                 if( status ) return status;
15115         }
15116 #endif
15117
15118 #ifdef HAVE_LINUX_THREADS
15119         pthread_kill_other_threads_np();
15120 #endif
15121
15122         return 0;
15123
15124 }
15125
15126 EOF
15127 if { (eval echo configure:15128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15128 then
15129   ol_cv_pthread_lib_lpthreads=yes
15130 else
15131   echo "configure: failed program was:" >&5
15132   cat conftest.$ac_ext >&5
15133   rm -fr conftest*
15134   ol_cv_pthread_lib_lpthreads=no
15135 fi
15136 rm -fr conftest*
15137 fi
15138
15139
15140                 # restore the LIBS
15141                 LIBS="$ol_LIBS"
15142         
15143 fi
15144
15145 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
15146
15147         if test $ol_cv_pthread_lib_lpthreads = yes ; then
15148                 ol_link_pthreads="-lpthreads"
15149                 ol_link_threads=posix
15150         fi
15151 fi
15152
15153
15154                 if test $ol_link_threads != no ; then
15155                         cat >> confdefs.h <<\EOF
15156 #define HAVE_PTHREADS 1
15157 EOF
15158
15159
15160                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
15161
15162                                                 save_CPPFLAGS="$CPPFLAGS"
15163                         save_LIBS="$LIBS"
15164                         LIBS="$LTHREAD_LIBS $LIBS"
15165
15166                                                                                                 for ac_func in sched_yield pthread_yield
15167 do
15168 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15169 echo "configure:15170: checking for $ac_func" >&5
15170 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15171   echo $ac_n "(cached) $ac_c" 1>&6
15172 else
15173   cat > conftest.$ac_ext <<EOF
15174 #line 15175 "configure"
15175 #include "confdefs.h"
15176 /* System header to define __stub macros and hopefully few prototypes,
15177     which can conflict with char $ac_func(); below.  */
15178 #include <assert.h>
15179 /* Override any gcc2 internal prototype to avoid an error.  */
15180 /* We use char because int might match the return type of a gcc2
15181     builtin and then its argument prototype would still apply.  */
15182 char $ac_func();
15183 char (*f)();
15184
15185 int main() {
15186
15187 /* The GNU C library defines this for functions which it implements
15188     to always fail with ENOSYS.  Some functions are actually named
15189     something starting with __ and the normal name is an alias.  */
15190 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15191 choke me
15192 #else
15193 f = $ac_func;
15194 #endif
15195
15196 ; return 0; }
15197 EOF
15198 if { (eval echo configure:15199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15199   rm -rf conftest*
15200   eval "ac_cv_func_$ac_func=yes"
15201 else
15202   echo "configure: failed program was:" >&5
15203   cat conftest.$ac_ext >&5
15204   rm -rf conftest*
15205   eval "ac_cv_func_$ac_func=no"
15206 fi
15207 rm -f conftest*
15208 fi
15209
15210 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15211   echo "$ac_t""yes" 1>&6
15212     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15213   cat >> confdefs.h <<EOF
15214 #define $ac_tr_func 1
15215 EOF
15216  
15217 else
15218   echo "$ac_t""no" 1>&6
15219 fi
15220 done
15221
15222
15223                         if test $ac_cv_func_sched_yield = no -a \
15224                                 $ac_cv_func_pthread_yield = no ; then
15225                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
15226 echo "configure:15227: checking for sched_yield in -lrt" >&5
15227 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
15228 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15229   echo $ac_n "(cached) $ac_c" 1>&6
15230 else
15231   ac_save_LIBS="$LIBS"
15232 LIBS="-lrt  $LIBS"
15233 cat > conftest.$ac_ext <<EOF
15234 #line 15235 "configure"
15235 #include "confdefs.h"
15236 /* Override any gcc2 internal prototype to avoid an error.  */
15237 /* We use char because int might match the return type of a gcc2
15238     builtin and then its argument prototype would still apply.  */
15239 char sched_yield();
15240
15241 int main() {
15242 sched_yield()
15243 ; return 0; }
15244 EOF
15245 if { (eval echo configure:15246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15246   rm -rf conftest*
15247   eval "ac_cv_lib_$ac_lib_var=yes"
15248 else
15249   echo "configure: failed program was:" >&5
15250   cat conftest.$ac_ext >&5
15251   rm -rf conftest*
15252   eval "ac_cv_lib_$ac_lib_var=no"
15253 fi
15254 rm -f conftest*
15255 LIBS="$ac_save_LIBS"
15256
15257 fi
15258 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15259   echo "$ac_t""yes" 1>&6
15260   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
15261                                         cat >> confdefs.h <<\EOF
15262 #define HAVE_SCHED_YIELD 1
15263 EOF
15264
15265                                         ac_cv_func_sched_yield=yes
15266 else
15267   echo "$ac_t""no" 1>&6
15268 ac_cv_func_sched_yield=no
15269 fi
15270
15271                         fi
15272                         if test $ac_cv_func_sched_yield = no -a \
15273                                 $ac_cv_func_pthread_yield = no ; then
15274                                                                                                 for ac_func in thr_yield
15275 do
15276 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15277 echo "configure:15278: checking for $ac_func" >&5
15278 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15279   echo $ac_n "(cached) $ac_c" 1>&6
15280 else
15281   cat > conftest.$ac_ext <<EOF
15282 #line 15283 "configure"
15283 #include "confdefs.h"
15284 /* System header to define __stub macros and hopefully few prototypes,
15285     which can conflict with char $ac_func(); below.  */
15286 #include <assert.h>
15287 /* Override any gcc2 internal prototype to avoid an error.  */
15288 /* We use char because int might match the return type of a gcc2
15289     builtin and then its argument prototype would still apply.  */
15290 char $ac_func();
15291 char (*f)();
15292
15293 int main() {
15294
15295 /* The GNU C library defines this for functions which it implements
15296     to always fail with ENOSYS.  Some functions are actually named
15297     something starting with __ and the normal name is an alias.  */
15298 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15299 choke me
15300 #else
15301 f = $ac_func;
15302 #endif
15303
15304 ; return 0; }
15305 EOF
15306 if { (eval echo configure:15307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15307   rm -rf conftest*
15308   eval "ac_cv_func_$ac_func=yes"
15309 else
15310   echo "configure: failed program was:" >&5
15311   cat conftest.$ac_ext >&5
15312   rm -rf conftest*
15313   eval "ac_cv_func_$ac_func=no"
15314 fi
15315 rm -f conftest*
15316 fi
15317
15318 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15319   echo "$ac_t""yes" 1>&6
15320     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15321   cat >> confdefs.h <<EOF
15322 #define $ac_tr_func 1
15323 EOF
15324  
15325 else
15326   echo "$ac_t""no" 1>&6
15327 fi
15328 done
15329
15330                         fi
15331                         if test $ac_cv_func_sched_yield = no -a \
15332                                 $ac_cv_func_pthread_yield = no -a \
15333                                 "$ac_cv_func_thr_yield" = no ; then
15334                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
15335                         fi
15336
15337                                                 for ac_func in pthread_kill pthread_rwlock_destroy
15338 do
15339 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15340 echo "configure:15341: checking for $ac_func" >&5
15341 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15342   echo $ac_n "(cached) $ac_c" 1>&6
15343 else
15344   cat > conftest.$ac_ext <<EOF
15345 #line 15346 "configure"
15346 #include "confdefs.h"
15347 /* System header to define __stub macros and hopefully few prototypes,
15348     which can conflict with char $ac_func(); below.  */
15349 #include <assert.h>
15350 /* Override any gcc2 internal prototype to avoid an error.  */
15351 /* We use char because int might match the return type of a gcc2
15352     builtin and then its argument prototype would still apply.  */
15353 char $ac_func();
15354 char (*f)();
15355
15356 int main() {
15357
15358 /* The GNU C library defines this for functions which it implements
15359     to always fail with ENOSYS.  Some functions are actually named
15360     something starting with __ and the normal name is an alias.  */
15361 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15362 choke me
15363 #else
15364 f = $ac_func;
15365 #endif
15366
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_func_$ac_func=yes"
15372 else
15373   echo "configure: failed program was:" >&5
15374   cat conftest.$ac_ext >&5
15375   rm -rf conftest*
15376   eval "ac_cv_func_$ac_func=no"
15377 fi
15378 rm -f conftest*
15379 fi
15380
15381 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15382   echo "$ac_t""yes" 1>&6
15383     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15384   cat >> confdefs.h <<EOF
15385 #define $ac_tr_func 1
15386 EOF
15387  
15388 else
15389   echo "$ac_t""no" 1>&6
15390 fi
15391 done
15392
15393
15394                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
15395 echo "configure:15396: checking for pthread_detach with <pthread.h>" >&5
15396 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
15397   echo $ac_n "(cached) $ac_c" 1>&6
15398 else
15399   
15400                                                                 cat > conftest.$ac_ext <<EOF
15401 #line 15402 "configure"
15402 #include "confdefs.h"
15403
15404 #include <pthread.h>
15405 #ifndef NULL
15406 #define NULL (void*)0
15407 #endif
15408
15409 int main() {
15410 pthread_detach(NULL);
15411 ; return 0; }
15412 EOF
15413 if { (eval echo configure:15414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15414   rm -rf conftest*
15415   ol_cv_func_pthread_detach=yes
15416 else
15417   echo "configure: failed program was:" >&5
15418   cat conftest.$ac_ext >&5
15419   rm -rf conftest*
15420   ol_cv_func_pthread_detach=no
15421 fi
15422 rm -f conftest*
15423                         
15424 fi
15425
15426 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15427
15428                         if test $ol_cv_func_pthread_detach = no ; then
15429                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15430                         fi
15431
15432                         cat >> confdefs.h <<\EOF
15433 #define HAVE_PTHREAD_DETACH 1
15434 EOF
15435
15436
15437                                                 for ac_func in \
15438                                 pthread_setconcurrency \
15439                                 pthread_getconcurrency \
15440                                 thr_setconcurrency \
15441                                 thr_getconcurrency \
15442                         
15443 do
15444 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15445 echo "configure:15446: checking for $ac_func" >&5
15446 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15447   echo $ac_n "(cached) $ac_c" 1>&6
15448 else
15449   cat > conftest.$ac_ext <<EOF
15450 #line 15451 "configure"
15451 #include "confdefs.h"
15452 /* System header to define __stub macros and hopefully few prototypes,
15453     which can conflict with char $ac_func(); below.  */
15454 #include <assert.h>
15455 /* Override any gcc2 internal prototype to avoid an error.  */
15456 /* We use char because int might match the return type of a gcc2
15457     builtin and then its argument prototype would still apply.  */
15458 char $ac_func();
15459 char (*f)();
15460
15461 int main() {
15462
15463 /* The GNU C library defines this for functions which it implements
15464     to always fail with ENOSYS.  Some functions are actually named
15465     something starting with __ and the normal name is an alias.  */
15466 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15467 choke me
15468 #else
15469 f = $ac_func;
15470 #endif
15471
15472 ; return 0; }
15473 EOF
15474 if { (eval echo configure:15475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15475   rm -rf conftest*
15476   eval "ac_cv_func_$ac_func=yes"
15477 else
15478   echo "configure: failed program was:" >&5
15479   cat conftest.$ac_ext >&5
15480   rm -rf conftest*
15481   eval "ac_cv_func_$ac_func=no"
15482 fi
15483 rm -f conftest*
15484 fi
15485
15486 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15487   echo "$ac_t""yes" 1>&6
15488     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15489   cat >> confdefs.h <<EOF
15490 #define $ac_tr_func 1
15491 EOF
15492  
15493 else
15494   echo "$ac_t""no" 1>&6
15495 fi
15496 done
15497
15498
15499                         
15500         for ac_func in pthread_kill_other_threads_np
15501 do
15502 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15503 echo "configure:15504: checking for $ac_func" >&5
15504 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15505   echo $ac_n "(cached) $ac_c" 1>&6
15506 else
15507   cat > conftest.$ac_ext <<EOF
15508 #line 15509 "configure"
15509 #include "confdefs.h"
15510 /* System header to define __stub macros and hopefully few prototypes,
15511     which can conflict with char $ac_func(); below.  */
15512 #include <assert.h>
15513 /* Override any gcc2 internal prototype to avoid an error.  */
15514 /* We use char because int might match the return type of a gcc2
15515     builtin and then its argument prototype would still apply.  */
15516 char $ac_func();
15517 char (*f)();
15518
15519 int main() {
15520
15521 /* The GNU C library defines this for functions which it implements
15522     to always fail with ENOSYS.  Some functions are actually named
15523     something starting with __ and the normal name is an alias.  */
15524 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15525 choke me
15526 #else
15527 f = $ac_func;
15528 #endif
15529
15530 ; return 0; }
15531 EOF
15532 if { (eval echo configure:15533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15533   rm -rf conftest*
15534   eval "ac_cv_func_$ac_func=yes"
15535 else
15536   echo "configure: failed program was:" >&5
15537   cat conftest.$ac_ext >&5
15538   rm -rf conftest*
15539   eval "ac_cv_func_$ac_func=no"
15540 fi
15541 rm -f conftest*
15542 fi
15543
15544 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15545   echo "$ac_t""yes" 1>&6
15546     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15547   cat >> confdefs.h <<EOF
15548 #define $ac_tr_func 1
15549 EOF
15550  
15551 else
15552   echo "$ac_t""no" 1>&6
15553 fi
15554 done
15555
15556         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15557 echo "configure:15558: checking for LinuxThreads implementation" >&5
15558 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15559   echo $ac_n "(cached) $ac_c" 1>&6
15560 else
15561   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15562 fi
15563
15564 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15565
15566                         
15567         
15568         
15569         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15570 echo "configure:15571: checking for LinuxThreads consistency" >&5
15571 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15572   echo $ac_n "(cached) $ac_c" 1>&6
15573 else
15574   
15575                 if test $ol_cv_header_linux_threads = yes -a \
15576                         $ol_cv_sys_linux_threads = yes; then
15577                         ol_cv_linux_threads=yes
15578                 elif test $ol_cv_header_linux_threads = no -a \
15579                         $ol_cv_sys_linux_threads = no; then
15580                         ol_cv_linux_threads=no
15581                 else
15582                         ol_cv_linux_threads=error
15583                 fi
15584         
15585 fi
15586
15587 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15588
15589
15590                         if test $ol_cv_linux_threads = error; then
15591                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15592                         fi
15593
15594                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15595 echo "configure:15596: checking if pthread_create() works" >&5
15596 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15597   echo $ac_n "(cached) $ac_c" 1>&6
15598 else
15599   
15600                         if test "$cross_compiling" = yes; then
15601                                 ol_cv_pthread_create_works=yes
15602 else
15603   cat > conftest.$ac_ext <<EOF
15604 #line 15605 "configure"
15605 #include "confdefs.h"
15606 /* pthread test headers */
15607 #include <pthread.h>
15608 #ifndef NULL
15609 #define NULL (void*)0
15610 #endif
15611
15612 static void *task(p)
15613         void *p;
15614 {
15615         return (void *) (p == NULL);
15616 }
15617
15618
15619 int main(argc, argv)
15620         int argc;
15621         char **argv;
15622 {
15623
15624         /* pthread test function */
15625         pthread_t t;
15626         int status;
15627         int detach = 1;
15628
15629 #ifdef HAVE_PTHREADS_FINAL
15630         /* Final pthreads */
15631         pthread_attr_t attr;
15632
15633         status = pthread_attr_init(&attr);
15634         if( status ) return status;
15635
15636 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15637         if( !detach ) {
15638 #if defined( PTHREAD_CREATE_JOINABLE )
15639                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15640 #else
15641                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15642 #endif
15643
15644 #ifdef PTHREAD_CREATE_DETACHED
15645         } else {
15646                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15647 #endif
15648         }
15649         if( status ) return status;
15650 #endif
15651
15652         status = pthread_create( &t, &attr, task, NULL );
15653         if( status ) return status;
15654
15655 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15656         if( detach ) {
15657                 /* give thread a chance to complete */
15658                 /* it should remain joinable and hence detachable */
15659                 sleep( 1 );
15660
15661                 status = pthread_detach( t );
15662                 if( status ) return status;
15663         }
15664 #endif
15665
15666 #else
15667         /* Draft 4 pthreads */
15668         status = pthread_create( &t, pthread_attr_default, task, NULL );
15669         if( status ) return status;
15670
15671         if( detach ) {
15672                 /* give thread a chance to complete */
15673                 /* it should remain joinable and hence detachable */
15674                 sleep( 1 );
15675
15676                 status = pthread_detach( &t );
15677                 if( status ) return status;
15678         }
15679 #endif
15680
15681 #ifdef HAVE_LINUX_THREADS
15682         pthread_kill_other_threads_np();
15683 #endif
15684
15685         return 0;
15686
15687 }
15688
15689 EOF
15690 if { (eval echo configure:15691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15691 then
15692   ol_cv_pthread_create_works=yes
15693 else
15694   echo "configure: failed program was:" >&5
15695   cat conftest.$ac_ext >&5
15696   rm -fr conftest*
15697   ol_cv_pthread_create_works=no
15698 fi
15699 rm -fr conftest*
15700 fi
15701
15702 fi
15703
15704 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15705
15706                         if test $ol_cv_pthread_create_works = no ; then
15707                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15708                         fi
15709
15710                                                 if test $ol_with_yielding_select = auto ; then
15711                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15712 echo "configure:15713: checking if select yields when using pthreads" >&5
15713 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15714   echo $ac_n "(cached) $ac_c" 1>&6
15715 else
15716   
15717                                 if test "$cross_compiling" = yes; then
15718   ol_cv_pthread_select_yields=cross
15719 else
15720   cat > conftest.$ac_ext <<EOF
15721 #line 15722 "configure"
15722 #include "confdefs.h"
15723
15724 #include <sys/types.h>
15725 #include <sys/time.h>
15726 #include <unistd.h>
15727 #include <pthread.h>
15728 #ifndef NULL
15729 #define NULL (void*) 0
15730 #endif
15731
15732 static int fildes[2];
15733
15734 static void *task(p)
15735         void *p;
15736 {
15737         int i;
15738         struct timeval tv;
15739
15740         fd_set rfds;
15741
15742         tv.tv_sec=10;
15743         tv.tv_usec=0;
15744
15745         FD_ZERO(&rfds);
15746         FD_SET(fildes[0], &rfds);
15747
15748         /* we're not interested in any fds */
15749         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15750
15751         if(i < 0) {
15752                 perror("select");
15753                 exit(10);
15754         }
15755
15756         exit(0); /* if we exit here, the select blocked the whole process */
15757 }
15758
15759 int main(argc, argv)
15760         int argc;
15761         char **argv;
15762 {
15763         pthread_t t;
15764
15765         /* create a pipe to select */
15766         if(pipe(&fildes[0])) {
15767                 perror("select");
15768                 exit(1);
15769         }
15770
15771 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15772         (void) pthread_setconcurrency(2);
15773 #else
15774 #ifdef HAVE_THR_SETCONCURRENCY
15775         /* Set Solaris LWP concurrency to 2 */
15776         thr_setconcurrency(2);
15777 #endif
15778 #endif
15779
15780 #if HAVE_PTHREADS_D4
15781         pthread_create(&t, pthread_attr_default, task, NULL);
15782 #else
15783         pthread_create(&t, NULL, task, NULL);
15784 #endif
15785
15786 #if HAVE_SCHED_YIELD
15787         sched_yield();  /* make sure task runs first */
15788 #else
15789 #ifdef HAVE_PTHREAD_YIELD
15790         pthread_yield();        /* make sure task runs first */
15791 #endif
15792 #endif
15793
15794         exit(2);
15795 }
15796 EOF
15797 if { (eval echo configure:15798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15798 then
15799   ol_cv_pthread_select_yields=no
15800 else
15801   echo "configure: failed program was:" >&5
15802   cat conftest.$ac_ext >&5
15803   rm -fr conftest*
15804   ol_cv_pthread_select_yields=yes
15805 fi
15806 rm -fr conftest*
15807 fi
15808
15809 fi
15810
15811 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15812
15813                                 if test $ol_cv_pthread_select_yields = cross ; then
15814                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15815                                 fi
15816
15817                                 if test $ol_cv_pthread_select_yields = yes ; then
15818                                         ol_with_yielding_select=yes
15819                                 fi
15820                         fi
15821
15822                                                 CPPFLAGS="$save_CPPFLAGS"
15823                         LIBS="$save_LIBS"
15824                 else
15825                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15826                 fi
15827         fi
15828
15829         if test $ol_with_threads = posix ; then
15830                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15831         fi
15832 fi
15833
15834 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15835         -o $ol_with_threads = mach ; then
15836
15837                 for ac_hdr in mach/cthreads.h cthreads.h
15838 do
15839 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15840 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15841 echo "configure:15842: checking for $ac_hdr" >&5
15842 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15843   echo $ac_n "(cached) $ac_c" 1>&6
15844 else
15845   cat > conftest.$ac_ext <<EOF
15846 #line 15847 "configure"
15847 #include "confdefs.h"
15848 #include <$ac_hdr>
15849 EOF
15850 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15851 { (eval echo configure:15852: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15852 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15853 if test -z "$ac_err"; then
15854   rm -rf conftest*
15855   eval "ac_cv_header_$ac_safe=yes"
15856 else
15857   echo "$ac_err" >&5
15858   echo "configure: failed program was:" >&5
15859   cat conftest.$ac_ext >&5
15860   rm -rf conftest*
15861   eval "ac_cv_header_$ac_safe=no"
15862 fi
15863 rm -f conftest*
15864 fi
15865 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15866   echo "$ac_t""yes" 1>&6
15867     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15868   cat >> confdefs.h <<EOF
15869 #define $ac_tr_hdr 1
15870 EOF
15871  
15872 else
15873   echo "$ac_t""no" 1>&6
15874 fi
15875 done
15876
15877         if test $ac_cv_header_mach_cthreads_h = yes ; then
15878                 ol_with_threads=found
15879
15880                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15881 echo "configure:15882: checking for cthread_fork" >&5
15882 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15883   echo $ac_n "(cached) $ac_c" 1>&6
15884 else
15885   cat > conftest.$ac_ext <<EOF
15886 #line 15887 "configure"
15887 #include "confdefs.h"
15888 /* System header to define __stub macros and hopefully few prototypes,
15889     which can conflict with char cthread_fork(); below.  */
15890 #include <assert.h>
15891 /* Override any gcc2 internal prototype to avoid an error.  */
15892 /* We use char because int might match the return type of a gcc2
15893     builtin and then its argument prototype would still apply.  */
15894 char cthread_fork();
15895 char (*f)();
15896
15897 int main() {
15898
15899 /* The GNU C library defines this for functions which it implements
15900     to always fail with ENOSYS.  Some functions are actually named
15901     something starting with __ and the normal name is an alias.  */
15902 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15903 choke me
15904 #else
15905 f = cthread_fork;
15906 #endif
15907
15908 ; return 0; }
15909 EOF
15910 if { (eval echo configure:15911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15911   rm -rf conftest*
15912   eval "ac_cv_func_cthread_fork=yes"
15913 else
15914   echo "configure: failed program was:" >&5
15915   cat conftest.$ac_ext >&5
15916   rm -rf conftest*
15917   eval "ac_cv_func_cthread_fork=no"
15918 fi
15919 rm -f conftest*
15920 fi
15921
15922 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15923   echo "$ac_t""yes" 1>&6
15924   ol_link_threads=yes
15925 else
15926   echo "$ac_t""no" 1>&6
15927 fi
15928
15929
15930                 if test $ol_link_threads = no ; then
15931                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15932 echo "configure:15933: checking for cthread_fork with -all_load" >&5
15933 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15934   echo $ac_n "(cached) $ac_c" 1>&6
15935 else
15936   
15937                                                                 save_LIBS="$LIBS"
15938                                 LIBS="-all_load $LIBS"
15939                                 cat > conftest.$ac_ext <<EOF
15940 #line 15941 "configure"
15941 #include "confdefs.h"
15942 #include <mach/cthreads.h>
15943 int main() {
15944
15945                                         cthread_fork((void *)0, (void *)0);
15946                                         
15947 ; return 0; }
15948 EOF
15949 if { (eval echo configure:15950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15950   rm -rf conftest*
15951   ol_cv_cthread_all_load=yes
15952 else
15953   echo "configure: failed program was:" >&5
15954   cat conftest.$ac_ext >&5
15955   rm -rf conftest*
15956   ol_cv_cthread_all_load=no
15957 fi
15958 rm -f conftest*
15959                                                                 LIBS="$save_LIBS"
15960                         
15961 fi
15962
15963 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15964
15965                         if test $ol_cv_cthread_all_load = yes ; then
15966                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15967                                 ol_link_threads=mach
15968                                 ol_with_threads=found
15969                         fi
15970                 fi
15971
15972         elif test $ac_cv_header_cthreads_h = yes ; then
15973                                 
15974                 ol_with_threads=found
15975  
15976                                 save_LIBS="$LIBS"
15977                 LIBS="$LIBS -lthreads"
15978                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15979 echo "configure:15980: checking for cthread_fork" >&5
15980 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15981   echo $ac_n "(cached) $ac_c" 1>&6
15982 else
15983   cat > conftest.$ac_ext <<EOF
15984 #line 15985 "configure"
15985 #include "confdefs.h"
15986 /* System header to define __stub macros and hopefully few prototypes,
15987     which can conflict with char cthread_fork(); below.  */
15988 #include <assert.h>
15989 /* Override any gcc2 internal prototype to avoid an error.  */
15990 /* We use char because int might match the return type of a gcc2
15991     builtin and then its argument prototype would still apply.  */
15992 char cthread_fork();
15993 char (*f)();
15994
15995 int main() {
15996
15997 /* The GNU C library defines this for functions which it implements
15998     to always fail with ENOSYS.  Some functions are actually named
15999     something starting with __ and the normal name is an alias.  */
16000 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
16001 choke me
16002 #else
16003 f = cthread_fork;
16004 #endif
16005
16006 ; return 0; }
16007 EOF
16008 if { (eval echo configure:16009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16009   rm -rf conftest*
16010   eval "ac_cv_func_cthread_fork=yes"
16011 else
16012   echo "configure: failed program was:" >&5
16013   cat conftest.$ac_ext >&5
16014   rm -rf conftest*
16015   eval "ac_cv_func_cthread_fork=no"
16016 fi
16017 rm -f conftest*
16018 fi
16019
16020 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
16021   echo "$ac_t""yes" 1>&6
16022   ol_link_threads=yes
16023 else
16024   echo "$ac_t""no" 1>&6
16025 fi
16026
16027                 LIBS="$save_LIBS"
16028
16029                 if test $ol_link_threads = yes ; then
16030                         LTHREAD_LIBS="-lthreads"
16031                         ol_link_threads=mach
16032                         ol_with_threads=found
16033                 else
16034                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
16035                 fi
16036
16037         elif test $ol_with_threads = mach ; then
16038                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
16039         fi
16040
16041         if test $ol_link_threads = mach ; then
16042                 cat >> confdefs.h <<\EOF
16043 #define HAVE_MACH_CTHREADS 1
16044 EOF
16045
16046         elif test $ol_with_threads = found ; then
16047                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
16048         fi
16049 fi
16050
16051 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16052         -o $ol_with_threads = pth ; then
16053
16054         for ac_hdr in pth.h
16055 do
16056 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16057 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16058 echo "configure:16059: checking for $ac_hdr" >&5
16059 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16060   echo $ac_n "(cached) $ac_c" 1>&6
16061 else
16062   cat > conftest.$ac_ext <<EOF
16063 #line 16064 "configure"
16064 #include "confdefs.h"
16065 #include <$ac_hdr>
16066 EOF
16067 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16068 { (eval echo configure:16069: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16069 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16070 if test -z "$ac_err"; then
16071   rm -rf conftest*
16072   eval "ac_cv_header_$ac_safe=yes"
16073 else
16074   echo "$ac_err" >&5
16075   echo "configure: failed program was:" >&5
16076   cat conftest.$ac_ext >&5
16077   rm -rf conftest*
16078   eval "ac_cv_header_$ac_safe=no"
16079 fi
16080 rm -f conftest*
16081 fi
16082 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16083   echo "$ac_t""yes" 1>&6
16084     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16085   cat >> confdefs.h <<EOF
16086 #define $ac_tr_hdr 1
16087 EOF
16088  
16089 else
16090   echo "$ac_t""no" 1>&6
16091 fi
16092 done
16093
16094
16095         if test $ac_cv_header_pth_h = yes ; then
16096                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
16097 echo "configure:16098: checking for pth_version in -lpth" >&5
16098 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
16099 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16100   echo $ac_n "(cached) $ac_c" 1>&6
16101 else
16102   ac_save_LIBS="$LIBS"
16103 LIBS="-lpth  $LIBS"
16104 cat > conftest.$ac_ext <<EOF
16105 #line 16106 "configure"
16106 #include "confdefs.h"
16107 /* Override any gcc2 internal prototype to avoid an error.  */
16108 /* We use char because int might match the return type of a gcc2
16109     builtin and then its argument prototype would still apply.  */
16110 char pth_version();
16111
16112 int main() {
16113 pth_version()
16114 ; return 0; }
16115 EOF
16116 if { (eval echo configure:16117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16117   rm -rf conftest*
16118   eval "ac_cv_lib_$ac_lib_var=yes"
16119 else
16120   echo "configure: failed program was:" >&5
16121   cat conftest.$ac_ext >&5
16122   rm -rf conftest*
16123   eval "ac_cv_lib_$ac_lib_var=no"
16124 fi
16125 rm -f conftest*
16126 LIBS="$ac_save_LIBS"
16127
16128 fi
16129 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16130   echo "$ac_t""yes" 1>&6
16131   have_pth=yes
16132 else
16133   echo "$ac_t""no" 1>&6
16134 have_pth=no
16135 fi
16136
16137
16138                 if test $have_pth = yes ; then
16139                         cat >> confdefs.h <<\EOF
16140 #define HAVE_GNU_PTH 1
16141 EOF
16142
16143                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
16144                         ol_link_threads=pth
16145                         ol_with_threads=found
16146
16147                         if test $ol_with_yielding_select = auto ; then
16148                                 ol_with_yielding_select=yes
16149                         fi
16150                 fi
16151         fi
16152 fi
16153
16154 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16155         -o $ol_with_threads = lwp ; then
16156
16157                 for ac_hdr in thread.h synch.h
16158 do
16159 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16160 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16161 echo "configure:16162: checking for $ac_hdr" >&5
16162 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16163   echo $ac_n "(cached) $ac_c" 1>&6
16164 else
16165   cat > conftest.$ac_ext <<EOF
16166 #line 16167 "configure"
16167 #include "confdefs.h"
16168 #include <$ac_hdr>
16169 EOF
16170 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16171 { (eval echo configure:16172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16172 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16173 if test -z "$ac_err"; then
16174   rm -rf conftest*
16175   eval "ac_cv_header_$ac_safe=yes"
16176 else
16177   echo "$ac_err" >&5
16178   echo "configure: failed program was:" >&5
16179   cat conftest.$ac_ext >&5
16180   rm -rf conftest*
16181   eval "ac_cv_header_$ac_safe=no"
16182 fi
16183 rm -f conftest*
16184 fi
16185 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16186   echo "$ac_t""yes" 1>&6
16187     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16188   cat >> confdefs.h <<EOF
16189 #define $ac_tr_hdr 1
16190 EOF
16191  
16192 else
16193   echo "$ac_t""no" 1>&6
16194 fi
16195 done
16196
16197         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
16198                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
16199 echo "configure:16200: checking for thr_create in -lthread" >&5
16200 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
16201 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16202   echo $ac_n "(cached) $ac_c" 1>&6
16203 else
16204   ac_save_LIBS="$LIBS"
16205 LIBS="-lthread  $LIBS"
16206 cat > conftest.$ac_ext <<EOF
16207 #line 16208 "configure"
16208 #include "confdefs.h"
16209 /* Override any gcc2 internal prototype to avoid an error.  */
16210 /* We use char because int might match the return type of a gcc2
16211     builtin and then its argument prototype would still apply.  */
16212 char thr_create();
16213
16214 int main() {
16215 thr_create()
16216 ; return 0; }
16217 EOF
16218 if { (eval echo configure:16219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16219   rm -rf conftest*
16220   eval "ac_cv_lib_$ac_lib_var=yes"
16221 else
16222   echo "configure: failed program was:" >&5
16223   cat conftest.$ac_ext >&5
16224   rm -rf conftest*
16225   eval "ac_cv_lib_$ac_lib_var=no"
16226 fi
16227 rm -f conftest*
16228 LIBS="$ac_save_LIBS"
16229
16230 fi
16231 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16232   echo "$ac_t""yes" 1>&6
16233   have_thr=yes
16234 else
16235   echo "$ac_t""no" 1>&6
16236 have_thr=no
16237 fi
16238
16239
16240                 if test $have_thr = yes ; then
16241                         cat >> confdefs.h <<\EOF
16242 #define HAVE_THR 1
16243 EOF
16244
16245                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
16246                         ol_link_threads=thr
16247
16248                         if test $ol_with_yielding_select = auto ; then
16249                                 ol_with_yielding_select=yes
16250                         fi
16251
16252                                                 for ac_func in \
16253                                 thr_setconcurrency \
16254                                 thr_getconcurrency \
16255                         
16256 do
16257 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16258 echo "configure:16259: checking for $ac_func" >&5
16259 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16260   echo $ac_n "(cached) $ac_c" 1>&6
16261 else
16262   cat > conftest.$ac_ext <<EOF
16263 #line 16264 "configure"
16264 #include "confdefs.h"
16265 /* System header to define __stub macros and hopefully few prototypes,
16266     which can conflict with char $ac_func(); below.  */
16267 #include <assert.h>
16268 /* Override any gcc2 internal prototype to avoid an error.  */
16269 /* We use char because int might match the return type of a gcc2
16270     builtin and then its argument prototype would still apply.  */
16271 char $ac_func();
16272 char (*f)();
16273
16274 int main() {
16275
16276 /* The GNU C library defines this for functions which it implements
16277     to always fail with ENOSYS.  Some functions are actually named
16278     something starting with __ and the normal name is an alias.  */
16279 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16280 choke me
16281 #else
16282 f = $ac_func;
16283 #endif
16284
16285 ; return 0; }
16286 EOF
16287 if { (eval echo configure:16288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16288   rm -rf conftest*
16289   eval "ac_cv_func_$ac_func=yes"
16290 else
16291   echo "configure: failed program was:" >&5
16292   cat conftest.$ac_ext >&5
16293   rm -rf conftest*
16294   eval "ac_cv_func_$ac_func=no"
16295 fi
16296 rm -f conftest*
16297 fi
16298
16299 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16300   echo "$ac_t""yes" 1>&6
16301     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16302   cat >> confdefs.h <<EOF
16303 #define $ac_tr_func 1
16304 EOF
16305  
16306 else
16307   echo "$ac_t""no" 1>&6
16308 fi
16309 done
16310
16311                 fi
16312         fi
16313
16314                 for ac_hdr in lwp/lwp.h
16315 do
16316 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16317 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16318 echo "configure:16319: checking for $ac_hdr" >&5
16319 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16320   echo $ac_n "(cached) $ac_c" 1>&6
16321 else
16322   cat > conftest.$ac_ext <<EOF
16323 #line 16324 "configure"
16324 #include "confdefs.h"
16325 #include <$ac_hdr>
16326 EOF
16327 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16328 { (eval echo configure:16329: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16329 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16330 if test -z "$ac_err"; then
16331   rm -rf conftest*
16332   eval "ac_cv_header_$ac_safe=yes"
16333 else
16334   echo "$ac_err" >&5
16335   echo "configure: failed program was:" >&5
16336   cat conftest.$ac_ext >&5
16337   rm -rf conftest*
16338   eval "ac_cv_header_$ac_safe=no"
16339 fi
16340 rm -f conftest*
16341 fi
16342 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16343   echo "$ac_t""yes" 1>&6
16344     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16345   cat >> confdefs.h <<EOF
16346 #define $ac_tr_hdr 1
16347 EOF
16348  
16349 else
16350   echo "$ac_t""no" 1>&6
16351 fi
16352 done
16353
16354         if test $ac_cv_header_lwp_lwp_h = yes ; then
16355                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
16356 echo "configure:16357: checking for lwp_create in -llwp" >&5
16357 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
16358 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16359   echo $ac_n "(cached) $ac_c" 1>&6
16360 else
16361   ac_save_LIBS="$LIBS"
16362 LIBS="-llwp  $LIBS"
16363 cat > conftest.$ac_ext <<EOF
16364 #line 16365 "configure"
16365 #include "confdefs.h"
16366 /* Override any gcc2 internal prototype to avoid an error.  */
16367 /* We use char because int might match the return type of a gcc2
16368     builtin and then its argument prototype would still apply.  */
16369 char lwp_create();
16370
16371 int main() {
16372 lwp_create()
16373 ; return 0; }
16374 EOF
16375 if { (eval echo configure:16376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16376   rm -rf conftest*
16377   eval "ac_cv_lib_$ac_lib_var=yes"
16378 else
16379   echo "configure: failed program was:" >&5
16380   cat conftest.$ac_ext >&5
16381   rm -rf conftest*
16382   eval "ac_cv_lib_$ac_lib_var=no"
16383 fi
16384 rm -f conftest*
16385 LIBS="$ac_save_LIBS"
16386
16387 fi
16388 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16389   echo "$ac_t""yes" 1>&6
16390   have_lwp=yes
16391 else
16392   echo "$ac_t""no" 1>&6
16393 have_lwp=no
16394 fi
16395
16396
16397                 if test $have_lwp = yes ; then
16398                         cat >> confdefs.h <<\EOF
16399 #define HAVE_LWP 1
16400 EOF
16401
16402                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
16403                         ol_link_threads=lwp
16404
16405                         if test $ol_with_yielding_select = auto ; then
16406                                 ol_with_yielding_select=no
16407                         fi
16408                 fi
16409         fi
16410 fi
16411
16412 if test $ol_with_yielding_select = yes ; then
16413         cat >> confdefs.h <<\EOF
16414 #define HAVE_YIELDING_SELECT 1
16415 EOF
16416
16417 fi
16418
16419 if test $ol_with_threads = manual ; then
16420                 ol_link_threads=yes
16421
16422         echo "configure: warning: thread defines and link options must be set manually" 1>&2
16423
16424         for ac_hdr in pthread.h sched.h
16425 do
16426 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16427 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16428 echo "configure:16429: checking for $ac_hdr" >&5
16429 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16430   echo $ac_n "(cached) $ac_c" 1>&6
16431 else
16432   cat > conftest.$ac_ext <<EOF
16433 #line 16434 "configure"
16434 #include "confdefs.h"
16435 #include <$ac_hdr>
16436 EOF
16437 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16438 { (eval echo configure:16439: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16439 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16440 if test -z "$ac_err"; then
16441   rm -rf conftest*
16442   eval "ac_cv_header_$ac_safe=yes"
16443 else
16444   echo "$ac_err" >&5
16445   echo "configure: failed program was:" >&5
16446   cat conftest.$ac_ext >&5
16447   rm -rf conftest*
16448   eval "ac_cv_header_$ac_safe=no"
16449 fi
16450 rm -f conftest*
16451 fi
16452 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16453   echo "$ac_t""yes" 1>&6
16454     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16455   cat >> confdefs.h <<EOF
16456 #define $ac_tr_hdr 1
16457 EOF
16458  
16459 else
16460   echo "$ac_t""no" 1>&6
16461 fi
16462 done
16463
16464         for ac_func in sched_yield pthread_yield
16465 do
16466 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16467 echo "configure:16468: checking for $ac_func" >&5
16468 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16469   echo $ac_n "(cached) $ac_c" 1>&6
16470 else
16471   cat > conftest.$ac_ext <<EOF
16472 #line 16473 "configure"
16473 #include "confdefs.h"
16474 /* System header to define __stub macros and hopefully few prototypes,
16475     which can conflict with char $ac_func(); below.  */
16476 #include <assert.h>
16477 /* Override any gcc2 internal prototype to avoid an error.  */
16478 /* We use char because int might match the return type of a gcc2
16479     builtin and then its argument prototype would still apply.  */
16480 char $ac_func();
16481 char (*f)();
16482
16483 int main() {
16484
16485 /* The GNU C library defines this for functions which it implements
16486     to always fail with ENOSYS.  Some functions are actually named
16487     something starting with __ and the normal name is an alias.  */
16488 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16489 choke me
16490 #else
16491 f = $ac_func;
16492 #endif
16493
16494 ; return 0; }
16495 EOF
16496 if { (eval echo configure:16497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16497   rm -rf conftest*
16498   eval "ac_cv_func_$ac_func=yes"
16499 else
16500   echo "configure: failed program was:" >&5
16501   cat conftest.$ac_ext >&5
16502   rm -rf conftest*
16503   eval "ac_cv_func_$ac_func=no"
16504 fi
16505 rm -f conftest*
16506 fi
16507
16508 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16509   echo "$ac_t""yes" 1>&6
16510     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16511   cat >> confdefs.h <<EOF
16512 #define $ac_tr_func 1
16513 EOF
16514  
16515 else
16516   echo "$ac_t""no" 1>&6
16517 fi
16518 done
16519
16520         
16521         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16522 echo "configure:16523: checking for LinuxThreads pthread.h" >&5
16523 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16524   echo $ac_n "(cached) $ac_c" 1>&6
16525 else
16526   cat > conftest.$ac_ext <<EOF
16527 #line 16528 "configure"
16528 #include "confdefs.h"
16529 #include <pthread.h>
16530 EOF
16531 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16532   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16533   rm -rf conftest*
16534   ol_cv_header_linux_threads=yes
16535 else
16536   rm -rf conftest*
16537   ol_cv_header_linux_threads=no
16538 fi
16539 rm -f conftest*
16540
16541                 
16542 fi
16543
16544 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16545         if test $ol_cv_header_linux_threads = yes; then
16546                 cat >> confdefs.h <<\EOF
16547 #define HAVE_LINUX_THREADS 1
16548 EOF
16549
16550         fi
16551
16552
16553         for ac_hdr in mach/cthreads.h
16554 do
16555 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16556 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16557 echo "configure:16558: checking for $ac_hdr" >&5
16558 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16559   echo $ac_n "(cached) $ac_c" 1>&6
16560 else
16561   cat > conftest.$ac_ext <<EOF
16562 #line 16563 "configure"
16563 #include "confdefs.h"
16564 #include <$ac_hdr>
16565 EOF
16566 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16567 { (eval echo configure:16568: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16568 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16569 if test -z "$ac_err"; then
16570   rm -rf conftest*
16571   eval "ac_cv_header_$ac_safe=yes"
16572 else
16573   echo "$ac_err" >&5
16574   echo "configure: failed program was:" >&5
16575   cat conftest.$ac_ext >&5
16576   rm -rf conftest*
16577   eval "ac_cv_header_$ac_safe=no"
16578 fi
16579 rm -f conftest*
16580 fi
16581 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16582   echo "$ac_t""yes" 1>&6
16583     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16584   cat >> confdefs.h <<EOF
16585 #define $ac_tr_hdr 1
16586 EOF
16587  
16588 else
16589   echo "$ac_t""no" 1>&6
16590 fi
16591 done
16592
16593         for ac_hdr in lwp/lwp.h
16594 do
16595 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16596 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16597 echo "configure:16598: checking for $ac_hdr" >&5
16598 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16599   echo $ac_n "(cached) $ac_c" 1>&6
16600 else
16601   cat > conftest.$ac_ext <<EOF
16602 #line 16603 "configure"
16603 #include "confdefs.h"
16604 #include <$ac_hdr>
16605 EOF
16606 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16607 { (eval echo configure:16608: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16608 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16609 if test -z "$ac_err"; then
16610   rm -rf conftest*
16611   eval "ac_cv_header_$ac_safe=yes"
16612 else
16613   echo "$ac_err" >&5
16614   echo "configure: failed program was:" >&5
16615   cat conftest.$ac_ext >&5
16616   rm -rf conftest*
16617   eval "ac_cv_header_$ac_safe=no"
16618 fi
16619 rm -f conftest*
16620 fi
16621 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16622   echo "$ac_t""yes" 1>&6
16623     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16624   cat >> confdefs.h <<EOF
16625 #define $ac_tr_hdr 1
16626 EOF
16627  
16628 else
16629   echo "$ac_t""no" 1>&6
16630 fi
16631 done
16632
16633         for ac_hdr in thread.h synch.h
16634 do
16635 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16636 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16637 echo "configure:16638: checking for $ac_hdr" >&5
16638 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16639   echo $ac_n "(cached) $ac_c" 1>&6
16640 else
16641   cat > conftest.$ac_ext <<EOF
16642 #line 16643 "configure"
16643 #include "confdefs.h"
16644 #include <$ac_hdr>
16645 EOF
16646 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16647 { (eval echo configure:16648: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16648 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16649 if test -z "$ac_err"; then
16650   rm -rf conftest*
16651   eval "ac_cv_header_$ac_safe=yes"
16652 else
16653   echo "$ac_err" >&5
16654   echo "configure: failed program was:" >&5
16655   cat conftest.$ac_ext >&5
16656   rm -rf conftest*
16657   eval "ac_cv_header_$ac_safe=no"
16658 fi
16659 rm -f conftest*
16660 fi
16661 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16662   echo "$ac_t""yes" 1>&6
16663     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16664   cat >> confdefs.h <<EOF
16665 #define $ac_tr_hdr 1
16666 EOF
16667  
16668 else
16669   echo "$ac_t""no" 1>&6
16670 fi
16671 done
16672
16673 fi
16674
16675 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16676                         cat >> confdefs.h <<\EOF
16677 #define REENTRANT 1
16678 EOF
16679
16680         cat >> confdefs.h <<\EOF
16681 #define _REENTRANT 1
16682 EOF
16683
16684         cat >> confdefs.h <<\EOF
16685 #define THREAD_SAFE 1
16686 EOF
16687
16688         cat >> confdefs.h <<\EOF
16689 #define _THREAD_SAFE 1
16690 EOF
16691
16692         cat >> confdefs.h <<\EOF
16693 #define THREADSAFE 1
16694 EOF
16695
16696         cat >> confdefs.h <<\EOF
16697 #define _THREADSAFE 1
16698 EOF
16699
16700         cat >> confdefs.h <<\EOF
16701 #define _SGI_MP_SOURCE 1
16702 EOF
16703
16704
16705                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16706 echo "configure:16707: checking for thread specific errno" >&5
16707 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16708   echo $ac_n "(cached) $ac_c" 1>&6
16709 else
16710   
16711                 cat > conftest.$ac_ext <<EOF
16712 #line 16713 "configure"
16713 #include "confdefs.h"
16714 #include <errno.h>
16715 int main() {
16716 errno = 0;
16717 ; return 0; }
16718 EOF
16719 if { (eval echo configure:16720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16720   rm -rf conftest*
16721   ol_cv_errno_thread_specific=yes
16722 else
16723   echo "configure: failed program was:" >&5
16724   cat conftest.$ac_ext >&5
16725   rm -rf conftest*
16726   ol_cv_errno_thread_specific=no
16727 fi
16728 rm -f conftest*
16729         
16730 fi
16731
16732 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16733
16734                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16735 echo "configure:16736: checking for thread specific h_errno" >&5
16736 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16737   echo $ac_n "(cached) $ac_c" 1>&6
16738 else
16739   
16740                 cat > conftest.$ac_ext <<EOF
16741 #line 16742 "configure"
16742 #include "confdefs.h"
16743 #include <netdb.h>
16744 int main() {
16745 h_errno = 0;
16746 ; return 0; }
16747 EOF
16748 if { (eval echo configure:16749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16749   rm -rf conftest*
16750   ol_cv_h_errno_thread_specific=yes
16751 else
16752   echo "configure: failed program was:" >&5
16753   cat conftest.$ac_ext >&5
16754   rm -rf conftest*
16755   ol_cv_h_errno_thread_specific=no
16756 fi
16757 rm -f conftest*
16758         
16759 fi
16760
16761 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16762
16763         if test $ol_cv_errno_thread_specific != yes \
16764                 -o $ol_cv_h_errno_thread_specific != yes ; then
16765                 LIBS="$LTHREAD_LIBS $LIBS"
16766                 LTHREAD_LIBS=""
16767         fi
16768
16769 fi  
16770
16771 if test $ol_link_threads = no ; then
16772         if test $ol_with_threads = yes ; then
16773                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16774         fi
16775
16776         if test $ol_with_threads = auto ; then
16777                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16778                 ol_with_threads=no
16779         fi
16780
16781         cat >> confdefs.h <<\EOF
16782 #define NO_THREADS 1
16783 EOF
16784
16785         LTHREAD_LIBS=""
16786 fi
16787
16788 if test $ol_link_threads != no ; then
16789         cat >> confdefs.h <<\EOF
16790 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16791 EOF
16792
16793 fi
16794
16795 ol_link_ldbm=no 
16796
16797 if test $ol_with_ldbm_api = auto \
16798         -o $ol_with_ldbm_api = berkeley \
16799         -o $ol_with_ldbm_api = bcompat ; then
16800
16801         if test $ol_with_ldbm_api = bcompat; then \
16802                 for ac_hdr in db_185.h db.h
16803 do
16804 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16805 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16806 echo "configure:16807: checking for $ac_hdr" >&5
16807 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16808   echo $ac_n "(cached) $ac_c" 1>&6
16809 else
16810   cat > conftest.$ac_ext <<EOF
16811 #line 16812 "configure"
16812 #include "confdefs.h"
16813 #include <$ac_hdr>
16814 EOF
16815 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16816 { (eval echo configure:16817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16817 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16818 if test -z "$ac_err"; then
16819   rm -rf conftest*
16820   eval "ac_cv_header_$ac_safe=yes"
16821 else
16822   echo "$ac_err" >&5
16823   echo "configure: failed program was:" >&5
16824   cat conftest.$ac_ext >&5
16825   rm -rf conftest*
16826   eval "ac_cv_header_$ac_safe=no"
16827 fi
16828 rm -f conftest*
16829 fi
16830 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16831   echo "$ac_t""yes" 1>&6
16832     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16833   cat >> confdefs.h <<EOF
16834 #define $ac_tr_hdr 1
16835 EOF
16836  
16837 else
16838   echo "$ac_t""no" 1>&6
16839 fi
16840 done
16841
16842 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16843         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16844 echo "configure:16845: checking if Berkeley DB header compatibility" >&5
16845 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16846   echo $ac_n "(cached) $ac_c" 1>&6
16847 else
16848   
16849                 cat > conftest.$ac_ext <<EOF
16850 #line 16851 "configure"
16851 #include "confdefs.h"
16852
16853 #if HAVE_DB_185_H
16854 #       include <db_185.h>
16855 #else
16856 #       include <db.h>
16857 #endif
16858
16859  /* this check could be improved */
16860 #ifndef DB_VERSION_MAJOR
16861 #       define DB_VERSION_MAJOR 1
16862 #endif
16863
16864 #if DB_VERSION_MAJOR == 1 
16865         __db_version_1
16866 #endif
16867
16868 EOF
16869 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16870   egrep "__db_version_1" >/dev/null 2>&1; then
16871   rm -rf conftest*
16872   ol_cv_header_db1=yes
16873 else
16874   rm -rf conftest*
16875   ol_cv_header_db1=no
16876 fi
16877 rm -f conftest*
16878
16879 fi
16880
16881 echo "$ac_t""$ol_cv_header_db1" 1>&6
16882
16883         if test $ol_cv_header_db1 = yes ; then
16884                 ol_cv_lib_db=no
16885 if test $ol_cv_lib_db = no ; then
16886         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16887 echo "configure:16888: checking for Berkeley DB link (default)" >&5
16888 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16889   echo $ac_n "(cached) $ac_c" 1>&6
16890 else
16891   
16892         ol_DB_LIB=
16893         ol_LIBS=$LIBS
16894         LIBS="$ol_DB_LIB $LIBS"
16895
16896         cat > conftest.$ac_ext <<EOF
16897 #line 16898 "configure"
16898 #include "confdefs.h"
16899
16900 #ifdef HAVE_DB_185_H
16901 # include <db_185.h>
16902 #else
16903 # include <db.h>
16904 #endif
16905
16906 #ifndef DB_VERSION_MAJOR
16907 # define DB_VERSION_MAJOR 1
16908 #endif
16909
16910 #ifndef NULL
16911 #define NULL ((void*)0)
16912 #endif
16913
16914 int main() {
16915
16916 #if DB_VERSION_MAJOR > 1
16917         {
16918                 char *version;
16919                 int major, minor, patch;
16920
16921                 version = db_version( &major, &minor, &patch );
16922
16923                 if( major != DB_VERSION_MAJOR ||
16924                         minor < DB_VERSION_MINOR )
16925                 {
16926                         printf("Berkeley DB version mismatch\n"
16927                                 "\texpected: %s\n\tgot: %s\n",
16928                                 DB_VERSION_STRING, version);
16929                         return 1;
16930                 }
16931         }
16932 #endif
16933
16934 #if DB_VERSION_MAJOR > 2
16935         db_env_create( NULL, 0 );
16936 #elif DB_VERSION_MAJOR > 1
16937         db_appexit( NULL );
16938 #else
16939         (void) dbopen( NULL, 0, 0, 0, NULL);
16940 #endif
16941
16942 ; return 0; }
16943 EOF
16944 if { (eval echo configure:16945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16945   rm -rf conftest*
16946   ol_cv_db_none=yes
16947 else
16948   echo "configure: failed program was:" >&5
16949   cat conftest.$ac_ext >&5
16950   rm -rf conftest*
16951   ol_cv_db_none=no
16952 fi
16953 rm -f conftest*
16954
16955         LIBS="$ol_LIBS"
16956
16957 fi
16958
16959 echo "$ac_t""$ol_cv_db_none" 1>&6
16960
16961         if test $ol_cv_db_none = yes ; then
16962                 ol_cv_lib_db=yes
16963         fi
16964 fi
16965
16966 if test $ol_cv_lib_db = no ; then
16967         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
16968 echo "configure:16969: checking for Berkeley DB link (-ldb)" >&5
16969 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
16970   echo $ac_n "(cached) $ac_c" 1>&6
16971 else
16972   
16973         ol_DB_LIB=-ldb
16974         ol_LIBS=$LIBS
16975         LIBS="$ol_DB_LIB $LIBS"
16976
16977         cat > conftest.$ac_ext <<EOF
16978 #line 16979 "configure"
16979 #include "confdefs.h"
16980
16981 #ifdef HAVE_DB_185_H
16982 # include <db_185.h>
16983 #else
16984 # include <db.h>
16985 #endif
16986
16987 #ifndef DB_VERSION_MAJOR
16988 # define DB_VERSION_MAJOR 1
16989 #endif
16990
16991 #ifndef NULL
16992 #define NULL ((void*)0)
16993 #endif
16994
16995 int main() {
16996
16997 #if DB_VERSION_MAJOR > 1
16998         {
16999                 char *version;
17000                 int major, minor, patch;
17001
17002                 version = db_version( &major, &minor, &patch );
17003
17004                 if( major != DB_VERSION_MAJOR ||
17005                         minor < DB_VERSION_MINOR )
17006                 {
17007                         printf("Berkeley DB version mismatch\n"
17008                                 "\texpected: %s\n\tgot: %s\n",
17009                                 DB_VERSION_STRING, version);
17010                         return 1;
17011                 }
17012         }
17013 #endif
17014
17015 #if DB_VERSION_MAJOR > 2
17016         db_env_create( NULL, 0 );
17017 #elif DB_VERSION_MAJOR > 1
17018         db_appexit( NULL );
17019 #else
17020         (void) dbopen( NULL, 0, 0, 0, NULL);
17021 #endif
17022
17023 ; return 0; }
17024 EOF
17025 if { (eval echo configure:17026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17026   rm -rf conftest*
17027   ol_cv_db_db=yes
17028 else
17029   echo "configure: failed program was:" >&5
17030   cat conftest.$ac_ext >&5
17031   rm -rf conftest*
17032   ol_cv_db_db=no
17033 fi
17034 rm -f conftest*
17035
17036         LIBS="$ol_LIBS"
17037
17038 fi
17039
17040 echo "$ac_t""$ol_cv_db_db" 1>&6
17041
17042         if test $ol_cv_db_db = yes ; then
17043                 ol_cv_lib_db=-ldb
17044         fi
17045 fi
17046
17047 if test $ol_cv_lib_db = no ; then
17048         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17049 echo "configure:17050: checking for Berkeley DB link (-ldb4)" >&5
17050 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17051   echo $ac_n "(cached) $ac_c" 1>&6
17052 else
17053   
17054         ol_DB_LIB=-ldb4
17055         ol_LIBS=$LIBS
17056         LIBS="$ol_DB_LIB $LIBS"
17057
17058         cat > conftest.$ac_ext <<EOF
17059 #line 17060 "configure"
17060 #include "confdefs.h"
17061
17062 #ifdef HAVE_DB_185_H
17063 # include <db_185.h>
17064 #else
17065 # include <db.h>
17066 #endif
17067
17068 #ifndef DB_VERSION_MAJOR
17069 # define DB_VERSION_MAJOR 1
17070 #endif
17071
17072 #ifndef NULL
17073 #define NULL ((void*)0)
17074 #endif
17075
17076 int main() {
17077
17078 #if DB_VERSION_MAJOR > 1
17079         {
17080                 char *version;
17081                 int major, minor, patch;
17082
17083                 version = db_version( &major, &minor, &patch );
17084
17085                 if( major != DB_VERSION_MAJOR ||
17086                         minor < DB_VERSION_MINOR )
17087                 {
17088                         printf("Berkeley DB version mismatch\n"
17089                                 "\texpected: %s\n\tgot: %s\n",
17090                                 DB_VERSION_STRING, version);
17091                         return 1;
17092                 }
17093         }
17094 #endif
17095
17096 #if DB_VERSION_MAJOR > 2
17097         db_env_create( NULL, 0 );
17098 #elif DB_VERSION_MAJOR > 1
17099         db_appexit( NULL );
17100 #else
17101         (void) dbopen( NULL, 0, 0, 0, NULL);
17102 #endif
17103
17104 ; return 0; }
17105 EOF
17106 if { (eval echo configure:17107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17107   rm -rf conftest*
17108   ol_cv_db_db4=yes
17109 else
17110   echo "configure: failed program was:" >&5
17111   cat conftest.$ac_ext >&5
17112   rm -rf conftest*
17113   ol_cv_db_db4=no
17114 fi
17115 rm -f conftest*
17116
17117         LIBS="$ol_LIBS"
17118
17119 fi
17120
17121 echo "$ac_t""$ol_cv_db_db4" 1>&6
17122
17123         if test $ol_cv_db_db4 = yes ; then
17124                 ol_cv_lib_db=-ldb4
17125         fi
17126 fi
17127
17128 if test $ol_cv_lib_db = no ; then
17129         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17130 echo "configure:17131: checking for Berkeley DB link (-ldb3)" >&5
17131 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17132   echo $ac_n "(cached) $ac_c" 1>&6
17133 else
17134   
17135         ol_DB_LIB=-ldb3
17136         ol_LIBS=$LIBS
17137         LIBS="$ol_DB_LIB $LIBS"
17138
17139         cat > conftest.$ac_ext <<EOF
17140 #line 17141 "configure"
17141 #include "confdefs.h"
17142
17143 #ifdef HAVE_DB_185_H
17144 # include <db_185.h>
17145 #else
17146 # include <db.h>
17147 #endif
17148
17149 #ifndef DB_VERSION_MAJOR
17150 # define DB_VERSION_MAJOR 1
17151 #endif
17152
17153 #ifndef NULL
17154 #define NULL ((void*)0)
17155 #endif
17156
17157 int main() {
17158
17159 #if DB_VERSION_MAJOR > 1
17160         {
17161                 char *version;
17162                 int major, minor, patch;
17163
17164                 version = db_version( &major, &minor, &patch );
17165
17166                 if( major != DB_VERSION_MAJOR ||
17167                         minor < DB_VERSION_MINOR )
17168                 {
17169                         printf("Berkeley DB version mismatch\n"
17170                                 "\texpected: %s\n\tgot: %s\n",
17171                                 DB_VERSION_STRING, version);
17172                         return 1;
17173                 }
17174         }
17175 #endif
17176
17177 #if DB_VERSION_MAJOR > 2
17178         db_env_create( NULL, 0 );
17179 #elif DB_VERSION_MAJOR > 1
17180         db_appexit( NULL );
17181 #else
17182         (void) dbopen( NULL, 0, 0, 0, NULL);
17183 #endif
17184
17185 ; return 0; }
17186 EOF
17187 if { (eval echo configure:17188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17188   rm -rf conftest*
17189   ol_cv_db_db3=yes
17190 else
17191   echo "configure: failed program was:" >&5
17192   cat conftest.$ac_ext >&5
17193   rm -rf conftest*
17194   ol_cv_db_db3=no
17195 fi
17196 rm -f conftest*
17197
17198         LIBS="$ol_LIBS"
17199
17200 fi
17201
17202 echo "$ac_t""$ol_cv_db_db3" 1>&6
17203
17204         if test $ol_cv_db_db3 = yes ; then
17205                 ol_cv_lib_db=-ldb3
17206         fi
17207 fi
17208
17209 if test $ol_cv_lib_db = no ; then
17210         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17211 echo "configure:17212: checking for Berkeley DB link (-ldb2)" >&5
17212 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17213   echo $ac_n "(cached) $ac_c" 1>&6
17214 else
17215   
17216         ol_DB_LIB=-ldb2
17217         ol_LIBS=$LIBS
17218         LIBS="$ol_DB_LIB $LIBS"
17219
17220         cat > conftest.$ac_ext <<EOF
17221 #line 17222 "configure"
17222 #include "confdefs.h"
17223
17224 #ifdef HAVE_DB_185_H
17225 # include <db_185.h>
17226 #else
17227 # include <db.h>
17228 #endif
17229
17230 #ifndef DB_VERSION_MAJOR
17231 # define DB_VERSION_MAJOR 1
17232 #endif
17233
17234 #ifndef NULL
17235 #define NULL ((void*)0)
17236 #endif
17237
17238 int main() {
17239
17240 #if DB_VERSION_MAJOR > 1
17241         {
17242                 char *version;
17243                 int major, minor, patch;
17244
17245                 version = db_version( &major, &minor, &patch );
17246
17247                 if( major != DB_VERSION_MAJOR ||
17248                         minor < DB_VERSION_MINOR )
17249                 {
17250                         printf("Berkeley DB version mismatch\n"
17251                                 "\texpected: %s\n\tgot: %s\n",
17252                                 DB_VERSION_STRING, version);
17253                         return 1;
17254                 }
17255         }
17256 #endif
17257
17258 #if DB_VERSION_MAJOR > 2
17259         db_env_create( NULL, 0 );
17260 #elif DB_VERSION_MAJOR > 1
17261         db_appexit( NULL );
17262 #else
17263         (void) dbopen( NULL, 0, 0, 0, NULL);
17264 #endif
17265
17266 ; return 0; }
17267 EOF
17268 if { (eval echo configure:17269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17269   rm -rf conftest*
17270   ol_cv_db_db2=yes
17271 else
17272   echo "configure: failed program was:" >&5
17273   cat conftest.$ac_ext >&5
17274   rm -rf conftest*
17275   ol_cv_db_db2=no
17276 fi
17277 rm -f conftest*
17278
17279         LIBS="$ol_LIBS"
17280
17281 fi
17282
17283 echo "$ac_t""$ol_cv_db_db2" 1>&6
17284
17285         if test $ol_cv_db_db2 = yes ; then
17286                 ol_cv_lib_db=-ldb2
17287         fi
17288 fi
17289
17290 if test $ol_cv_lib_db = no ; then
17291         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17292 echo "configure:17293: checking for Berkeley DB link (-ldb1)" >&5
17293 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17294   echo $ac_n "(cached) $ac_c" 1>&6
17295 else
17296   
17297         ol_DB_LIB=-ldb1
17298         ol_LIBS=$LIBS
17299         LIBS="$ol_DB_LIB $LIBS"
17300
17301         cat > conftest.$ac_ext <<EOF
17302 #line 17303 "configure"
17303 #include "confdefs.h"
17304
17305 #ifdef HAVE_DB_185_H
17306 # include <db_185.h>
17307 #else
17308 # include <db.h>
17309 #endif
17310
17311 #ifndef DB_VERSION_MAJOR
17312 # define DB_VERSION_MAJOR 1
17313 #endif
17314
17315 #ifndef NULL
17316 #define NULL ((void*)0)
17317 #endif
17318
17319 int main() {
17320
17321 #if DB_VERSION_MAJOR > 1
17322         {
17323                 char *version;
17324                 int major, minor, patch;
17325
17326                 version = db_version( &major, &minor, &patch );
17327
17328                 if( major != DB_VERSION_MAJOR ||
17329                         minor < DB_VERSION_MINOR )
17330                 {
17331                         printf("Berkeley DB version mismatch\n"
17332                                 "\texpected: %s\n\tgot: %s\n",
17333                                 DB_VERSION_STRING, version);
17334                         return 1;
17335                 }
17336         }
17337 #endif
17338
17339 #if DB_VERSION_MAJOR > 2
17340         db_env_create( NULL, 0 );
17341 #elif DB_VERSION_MAJOR > 1
17342         db_appexit( NULL );
17343 #else
17344         (void) dbopen( NULL, 0, 0, 0, NULL);
17345 #endif
17346
17347 ; return 0; }
17348 EOF
17349 if { (eval echo configure:17350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17350   rm -rf conftest*
17351   ol_cv_db_db1=yes
17352 else
17353   echo "configure: failed program was:" >&5
17354   cat conftest.$ac_ext >&5
17355   rm -rf conftest*
17356   ol_cv_db_db1=no
17357 fi
17358 rm -f conftest*
17359
17360         LIBS="$ol_LIBS"
17361
17362 fi
17363
17364 echo "$ac_t""$ol_cv_db_db1" 1>&6
17365
17366         if test $ol_cv_db_db1 = yes ; then
17367                 ol_cv_lib_db=-ldb1
17368         fi
17369 fi
17370
17371
17372                 if test "$ol_cv_lib_db" != no ; then
17373                         ol_cv_berkeley_db=yes
17374                 fi
17375         fi
17376 fi
17377
17378         else
17379                 ol_cv_berkeley_db=no
17380 for ac_hdr in db.h
17381 do
17382 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17383 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17384 echo "configure:17385: checking for $ac_hdr" >&5
17385 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17386   echo $ac_n "(cached) $ac_c" 1>&6
17387 else
17388   cat > conftest.$ac_ext <<EOF
17389 #line 17390 "configure"
17390 #include "confdefs.h"
17391 #include <$ac_hdr>
17392 EOF
17393 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17394 { (eval echo configure:17395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17395 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17396 if test -z "$ac_err"; then
17397   rm -rf conftest*
17398   eval "ac_cv_header_$ac_safe=yes"
17399 else
17400   echo "$ac_err" >&5
17401   echo "configure: failed program was:" >&5
17402   cat conftest.$ac_ext >&5
17403   rm -rf conftest*
17404   eval "ac_cv_header_$ac_safe=no"
17405 fi
17406 rm -f conftest*
17407 fi
17408 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17409   echo "$ac_t""yes" 1>&6
17410     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17411   cat >> confdefs.h <<EOF
17412 #define $ac_tr_hdr 1
17413 EOF
17414  
17415 else
17416   echo "$ac_t""no" 1>&6
17417 fi
17418 done
17419
17420 if test $ac_cv_header_db_h = yes; then
17421         ol_cv_lib_db=no
17422 if test $ol_cv_lib_db = no ; then
17423         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17424 echo "configure:17425: checking for Berkeley DB link (default)" >&5
17425 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17426   echo $ac_n "(cached) $ac_c" 1>&6
17427 else
17428   
17429         ol_DB_LIB=
17430         ol_LIBS=$LIBS
17431         LIBS="$ol_DB_LIB $LIBS"
17432
17433         cat > conftest.$ac_ext <<EOF
17434 #line 17435 "configure"
17435 #include "confdefs.h"
17436
17437 #ifdef HAVE_DB_185_H
17438 # include <db_185.h>
17439 #else
17440 # include <db.h>
17441 #endif
17442
17443 #ifndef DB_VERSION_MAJOR
17444 # define DB_VERSION_MAJOR 1
17445 #endif
17446
17447 #ifndef NULL
17448 #define NULL ((void*)0)
17449 #endif
17450
17451 int main() {
17452
17453 #if DB_VERSION_MAJOR > 1
17454         {
17455                 char *version;
17456                 int major, minor, patch;
17457
17458                 version = db_version( &major, &minor, &patch );
17459
17460                 if( major != DB_VERSION_MAJOR ||
17461                         minor < DB_VERSION_MINOR )
17462                 {
17463                         printf("Berkeley DB version mismatch\n"
17464                                 "\texpected: %s\n\tgot: %s\n",
17465                                 DB_VERSION_STRING, version);
17466                         return 1;
17467                 }
17468         }
17469 #endif
17470
17471 #if DB_VERSION_MAJOR > 2
17472         db_env_create( NULL, 0 );
17473 #elif DB_VERSION_MAJOR > 1
17474         db_appexit( NULL );
17475 #else
17476         (void) dbopen( NULL, 0, 0, 0, NULL);
17477 #endif
17478
17479 ; return 0; }
17480 EOF
17481 if { (eval echo configure:17482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17482   rm -rf conftest*
17483   ol_cv_db_none=yes
17484 else
17485   echo "configure: failed program was:" >&5
17486   cat conftest.$ac_ext >&5
17487   rm -rf conftest*
17488   ol_cv_db_none=no
17489 fi
17490 rm -f conftest*
17491
17492         LIBS="$ol_LIBS"
17493
17494 fi
17495
17496 echo "$ac_t""$ol_cv_db_none" 1>&6
17497
17498         if test $ol_cv_db_none = yes ; then
17499                 ol_cv_lib_db=yes
17500         fi
17501 fi
17502
17503 if test $ol_cv_lib_db = no ; then
17504         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17505 echo "configure:17506: checking for Berkeley DB link (-ldb)" >&5
17506 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17507   echo $ac_n "(cached) $ac_c" 1>&6
17508 else
17509   
17510         ol_DB_LIB=-ldb
17511         ol_LIBS=$LIBS
17512         LIBS="$ol_DB_LIB $LIBS"
17513
17514         cat > conftest.$ac_ext <<EOF
17515 #line 17516 "configure"
17516 #include "confdefs.h"
17517
17518 #ifdef HAVE_DB_185_H
17519 # include <db_185.h>
17520 #else
17521 # include <db.h>
17522 #endif
17523
17524 #ifndef DB_VERSION_MAJOR
17525 # define DB_VERSION_MAJOR 1
17526 #endif
17527
17528 #ifndef NULL
17529 #define NULL ((void*)0)
17530 #endif
17531
17532 int main() {
17533
17534 #if DB_VERSION_MAJOR > 1
17535         {
17536                 char *version;
17537                 int major, minor, patch;
17538
17539                 version = db_version( &major, &minor, &patch );
17540
17541                 if( major != DB_VERSION_MAJOR ||
17542                         minor < DB_VERSION_MINOR )
17543                 {
17544                         printf("Berkeley DB version mismatch\n"
17545                                 "\texpected: %s\n\tgot: %s\n",
17546                                 DB_VERSION_STRING, version);
17547                         return 1;
17548                 }
17549         }
17550 #endif
17551
17552 #if DB_VERSION_MAJOR > 2
17553         db_env_create( NULL, 0 );
17554 #elif DB_VERSION_MAJOR > 1
17555         db_appexit( NULL );
17556 #else
17557         (void) dbopen( NULL, 0, 0, 0, NULL);
17558 #endif
17559
17560 ; return 0; }
17561 EOF
17562 if { (eval echo configure:17563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17563   rm -rf conftest*
17564   ol_cv_db_db=yes
17565 else
17566   echo "configure: failed program was:" >&5
17567   cat conftest.$ac_ext >&5
17568   rm -rf conftest*
17569   ol_cv_db_db=no
17570 fi
17571 rm -f conftest*
17572
17573         LIBS="$ol_LIBS"
17574
17575 fi
17576
17577 echo "$ac_t""$ol_cv_db_db" 1>&6
17578
17579         if test $ol_cv_db_db = yes ; then
17580                 ol_cv_lib_db=-ldb
17581         fi
17582 fi
17583
17584 if test $ol_cv_lib_db = no ; then
17585         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17586 echo "configure:17587: checking for Berkeley DB link (-ldb4)" >&5
17587 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17588   echo $ac_n "(cached) $ac_c" 1>&6
17589 else
17590   
17591         ol_DB_LIB=-ldb4
17592         ol_LIBS=$LIBS
17593         LIBS="$ol_DB_LIB $LIBS"
17594
17595         cat > conftest.$ac_ext <<EOF
17596 #line 17597 "configure"
17597 #include "confdefs.h"
17598
17599 #ifdef HAVE_DB_185_H
17600 # include <db_185.h>
17601 #else
17602 # include <db.h>
17603 #endif
17604
17605 #ifndef DB_VERSION_MAJOR
17606 # define DB_VERSION_MAJOR 1
17607 #endif
17608
17609 #ifndef NULL
17610 #define NULL ((void*)0)
17611 #endif
17612
17613 int main() {
17614
17615 #if DB_VERSION_MAJOR > 1
17616         {
17617                 char *version;
17618                 int major, minor, patch;
17619
17620                 version = db_version( &major, &minor, &patch );
17621
17622                 if( major != DB_VERSION_MAJOR ||
17623                         minor < DB_VERSION_MINOR )
17624                 {
17625                         printf("Berkeley DB version mismatch\n"
17626                                 "\texpected: %s\n\tgot: %s\n",
17627                                 DB_VERSION_STRING, version);
17628                         return 1;
17629                 }
17630         }
17631 #endif
17632
17633 #if DB_VERSION_MAJOR > 2
17634         db_env_create( NULL, 0 );
17635 #elif DB_VERSION_MAJOR > 1
17636         db_appexit( NULL );
17637 #else
17638         (void) dbopen( NULL, 0, 0, 0, NULL);
17639 #endif
17640
17641 ; return 0; }
17642 EOF
17643 if { (eval echo configure:17644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17644   rm -rf conftest*
17645   ol_cv_db_db4=yes
17646 else
17647   echo "configure: failed program was:" >&5
17648   cat conftest.$ac_ext >&5
17649   rm -rf conftest*
17650   ol_cv_db_db4=no
17651 fi
17652 rm -f conftest*
17653
17654         LIBS="$ol_LIBS"
17655
17656 fi
17657
17658 echo "$ac_t""$ol_cv_db_db4" 1>&6
17659
17660         if test $ol_cv_db_db4 = yes ; then
17661                 ol_cv_lib_db=-ldb4
17662         fi
17663 fi
17664
17665 if test $ol_cv_lib_db = no ; then
17666         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17667 echo "configure:17668: checking for Berkeley DB link (-ldb3)" >&5
17668 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17669   echo $ac_n "(cached) $ac_c" 1>&6
17670 else
17671   
17672         ol_DB_LIB=-ldb3
17673         ol_LIBS=$LIBS
17674         LIBS="$ol_DB_LIB $LIBS"
17675
17676         cat > conftest.$ac_ext <<EOF
17677 #line 17678 "configure"
17678 #include "confdefs.h"
17679
17680 #ifdef HAVE_DB_185_H
17681 # include <db_185.h>
17682 #else
17683 # include <db.h>
17684 #endif
17685
17686 #ifndef DB_VERSION_MAJOR
17687 # define DB_VERSION_MAJOR 1
17688 #endif
17689
17690 #ifndef NULL
17691 #define NULL ((void*)0)
17692 #endif
17693
17694 int main() {
17695
17696 #if DB_VERSION_MAJOR > 1
17697         {
17698                 char *version;
17699                 int major, minor, patch;
17700
17701                 version = db_version( &major, &minor, &patch );
17702
17703                 if( major != DB_VERSION_MAJOR ||
17704                         minor < DB_VERSION_MINOR )
17705                 {
17706                         printf("Berkeley DB version mismatch\n"
17707                                 "\texpected: %s\n\tgot: %s\n",
17708                                 DB_VERSION_STRING, version);
17709                         return 1;
17710                 }
17711         }
17712 #endif
17713
17714 #if DB_VERSION_MAJOR > 2
17715         db_env_create( NULL, 0 );
17716 #elif DB_VERSION_MAJOR > 1
17717         db_appexit( NULL );
17718 #else
17719         (void) dbopen( NULL, 0, 0, 0, NULL);
17720 #endif
17721
17722 ; return 0; }
17723 EOF
17724 if { (eval echo configure:17725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17725   rm -rf conftest*
17726   ol_cv_db_db3=yes
17727 else
17728   echo "configure: failed program was:" >&5
17729   cat conftest.$ac_ext >&5
17730   rm -rf conftest*
17731   ol_cv_db_db3=no
17732 fi
17733 rm -f conftest*
17734
17735         LIBS="$ol_LIBS"
17736
17737 fi
17738
17739 echo "$ac_t""$ol_cv_db_db3" 1>&6
17740
17741         if test $ol_cv_db_db3 = yes ; then
17742                 ol_cv_lib_db=-ldb3
17743         fi
17744 fi
17745
17746 if test $ol_cv_lib_db = no ; then
17747         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17748 echo "configure:17749: checking for Berkeley DB link (-ldb2)" >&5
17749 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17750   echo $ac_n "(cached) $ac_c" 1>&6
17751 else
17752   
17753         ol_DB_LIB=-ldb2
17754         ol_LIBS=$LIBS
17755         LIBS="$ol_DB_LIB $LIBS"
17756
17757         cat > conftest.$ac_ext <<EOF
17758 #line 17759 "configure"
17759 #include "confdefs.h"
17760
17761 #ifdef HAVE_DB_185_H
17762 # include <db_185.h>
17763 #else
17764 # include <db.h>
17765 #endif
17766
17767 #ifndef DB_VERSION_MAJOR
17768 # define DB_VERSION_MAJOR 1
17769 #endif
17770
17771 #ifndef NULL
17772 #define NULL ((void*)0)
17773 #endif
17774
17775 int main() {
17776
17777 #if DB_VERSION_MAJOR > 1
17778         {
17779                 char *version;
17780                 int major, minor, patch;
17781
17782                 version = db_version( &major, &minor, &patch );
17783
17784                 if( major != DB_VERSION_MAJOR ||
17785                         minor < DB_VERSION_MINOR )
17786                 {
17787                         printf("Berkeley DB version mismatch\n"
17788                                 "\texpected: %s\n\tgot: %s\n",
17789                                 DB_VERSION_STRING, version);
17790                         return 1;
17791                 }
17792         }
17793 #endif
17794
17795 #if DB_VERSION_MAJOR > 2
17796         db_env_create( NULL, 0 );
17797 #elif DB_VERSION_MAJOR > 1
17798         db_appexit( NULL );
17799 #else
17800         (void) dbopen( NULL, 0, 0, 0, NULL);
17801 #endif
17802
17803 ; return 0; }
17804 EOF
17805 if { (eval echo configure:17806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17806   rm -rf conftest*
17807   ol_cv_db_db2=yes
17808 else
17809   echo "configure: failed program was:" >&5
17810   cat conftest.$ac_ext >&5
17811   rm -rf conftest*
17812   ol_cv_db_db2=no
17813 fi
17814 rm -f conftest*
17815
17816         LIBS="$ol_LIBS"
17817
17818 fi
17819
17820 echo "$ac_t""$ol_cv_db_db2" 1>&6
17821
17822         if test $ol_cv_db_db2 = yes ; then
17823                 ol_cv_lib_db=-ldb2
17824         fi
17825 fi
17826
17827 if test $ol_cv_lib_db = no ; then
17828         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17829 echo "configure:17830: checking for Berkeley DB link (-ldb1)" >&5
17830 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17831   echo $ac_n "(cached) $ac_c" 1>&6
17832 else
17833   
17834         ol_DB_LIB=-ldb1
17835         ol_LIBS=$LIBS
17836         LIBS="$ol_DB_LIB $LIBS"
17837
17838         cat > conftest.$ac_ext <<EOF
17839 #line 17840 "configure"
17840 #include "confdefs.h"
17841
17842 #ifdef HAVE_DB_185_H
17843 # include <db_185.h>
17844 #else
17845 # include <db.h>
17846 #endif
17847
17848 #ifndef DB_VERSION_MAJOR
17849 # define DB_VERSION_MAJOR 1
17850 #endif
17851
17852 #ifndef NULL
17853 #define NULL ((void*)0)
17854 #endif
17855
17856 int main() {
17857
17858 #if DB_VERSION_MAJOR > 1
17859         {
17860                 char *version;
17861                 int major, minor, patch;
17862
17863                 version = db_version( &major, &minor, &patch );
17864
17865                 if( major != DB_VERSION_MAJOR ||
17866                         minor < DB_VERSION_MINOR )
17867                 {
17868                         printf("Berkeley DB version mismatch\n"
17869                                 "\texpected: %s\n\tgot: %s\n",
17870                                 DB_VERSION_STRING, version);
17871                         return 1;
17872                 }
17873         }
17874 #endif
17875
17876 #if DB_VERSION_MAJOR > 2
17877         db_env_create( NULL, 0 );
17878 #elif DB_VERSION_MAJOR > 1
17879         db_appexit( NULL );
17880 #else
17881         (void) dbopen( NULL, 0, 0, 0, NULL);
17882 #endif
17883
17884 ; return 0; }
17885 EOF
17886 if { (eval echo configure:17887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17887   rm -rf conftest*
17888   ol_cv_db_db1=yes
17889 else
17890   echo "configure: failed program was:" >&5
17891   cat conftest.$ac_ext >&5
17892   rm -rf conftest*
17893   ol_cv_db_db1=no
17894 fi
17895 rm -f conftest*
17896
17897         LIBS="$ol_LIBS"
17898
17899 fi
17900
17901 echo "$ac_t""$ol_cv_db_db1" 1>&6
17902
17903         if test $ol_cv_db_db1 = yes ; then
17904                 ol_cv_lib_db=-ldb1
17905         fi
17906 fi
17907
17908
17909         if test "$ol_cv_lib_db" != no ; then
17910                 ol_cv_berkeley_db=yes
17911                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
17912 echo "configure:17913: checking for Berkeley DB thread support" >&5
17913 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
17914   echo $ac_n "(cached) $ac_c" 1>&6
17915 else
17916   
17917         ol_LIBS="$LIBS"
17918         if test $ol_cv_lib_db != yes ; then
17919                 LIBS="$ol_cv_lib_db"
17920         fi
17921
17922         if test "$cross_compiling" = yes; then
17923   ol_cv_berkeley_db_thread=cross
17924 else
17925   cat > conftest.$ac_ext <<EOF
17926 #line 17927 "configure"
17927 #include "confdefs.h"
17928
17929 #ifdef HAVE_DB_185_H
17930         choke me;
17931 #else
17932 #include <db.h>
17933 #endif
17934 #ifndef NULL
17935 #define NULL ((void *)0)
17936 #endif
17937 main()
17938 {
17939         int rc;
17940         u_int32_t flags = DB_CREATE |
17941 #ifdef DB_PRIVATE
17942                 DB_PRIVATE |
17943 #endif
17944                 DB_THREAD;
17945
17946 #if DB_VERSION_MAJOR > 2
17947         DB_ENV *env = NULL;
17948
17949         rc = db_env_create( &env, 0 );
17950
17951         flags |= DB_INIT_MPOOL;
17952 #ifdef DB_MPOOL_PRIVATE
17953         flags |= DB_MPOOL_PRIVATE;
17954 #endif
17955
17956         if( rc ) {
17957                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
17958                 return rc;
17959         }
17960
17961 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
17962         rc = env->open( env, NULL, flags, 0 );
17963 #else
17964         rc = env->open( env, NULL, NULL, flags, 0 );
17965 #endif
17966
17967         if ( rc == 0 ) {
17968                 rc = env->close( env, 0 );
17969         }
17970
17971         if( rc ) {
17972                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
17973                 return rc;
17974         }
17975
17976 #else
17977         DB_ENV env;
17978         memset( &env, '\0', sizeof(env) );
17979
17980         rc = db_appinit( NULL, NULL, &env, flags );
17981
17982         if( rc == 0 ) {
17983                 db_appexit( &env );
17984         }
17985
17986         unlink("__db_mpool.share");
17987         unlink("__db_lock.share");
17988 #endif
17989
17990         return rc;
17991 }
17992 EOF
17993 if { (eval echo configure:17994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
17994 then
17995   ol_cv_berkeley_db_thread=yes
17996 else
17997   echo "configure: failed program was:" >&5
17998   cat conftest.$ac_ext >&5
17999   rm -fr conftest*
18000   ol_cv_berkeley_db_thread=no
18001 fi
18002 rm -fr conftest*
18003 fi
18004
18005
18006         LIBS="$ol_LIBS"
18007
18008         if test $ol_cv_berkeley_db_thread != no ; then
18009                 cat >> confdefs.h <<\EOF
18010 #define HAVE_BERKELEY_DB_THREAD 1
18011 EOF
18012
18013         fi
18014
18015 fi
18016
18017 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
18018         fi
18019 fi
18020
18021         fi
18022
18023         if test $ol_cv_berkeley_db != no ; then
18024                 cat >> confdefs.h <<\EOF
18025 #define HAVE_BERKELEY_DB 1
18026 EOF
18027
18028
18029                 ol_link_ldbm=berkeley
18030                 ol_with_ldbm_api=berkeley
18031
18032                 if test $ol_with_ldbm_type = hash ; then
18033                         cat >> confdefs.h <<\EOF
18034 #define LDBM_USE_DBHASH 1
18035 EOF
18036
18037                 else
18038                         cat >> confdefs.h <<\EOF
18039 #define LDBM_USE_DBBTREE 1
18040 EOF
18041
18042                 fi
18043
18044                                                 if test $ol_cv_lib_db != yes ; then
18045                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
18046                 fi
18047         fi
18048 fi
18049
18050 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
18051         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
18052 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
18053         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
18054 echo "configure:18055: checking Berkeley DB version for BDB backend" >&5
18055 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
18056   echo $ac_n "(cached) $ac_c" 1>&6
18057 else
18058   
18059         cat > conftest.$ac_ext <<EOF
18060 #line 18061 "configure"
18061 #include "confdefs.h"
18062
18063 #include <db.h>
18064
18065  /* this check could be improved */
18066 #ifndef DB_VERSION_MAJOR
18067 #       define DB_VERSION_MAJOR 1
18068 #endif
18069
18070 /* require 4.0 or later */
18071 #if DB_VERSION_MAJOR >= 4 
18072         __db_version_compat
18073 #endif
18074         
18075 EOF
18076 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18077   egrep "__db_version_compat" >/dev/null 2>&1; then
18078   rm -rf conftest*
18079   ol_cv_bdb_compat=yes
18080 else
18081   rm -rf conftest*
18082   ol_cv_bdb_compat=no
18083 fi
18084 rm -f conftest*
18085
18086 fi
18087
18088 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
18089
18090
18091         if test $ol_cv_bdb_compat = yes ; then
18092                 ol_enable_bdb=yes
18093         elif test $ol_enable_bdb = yes ; then
18094                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
18095         else
18096                 ol_enable_bdb=no
18097         fi
18098 fi
18099
18100 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
18101         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
18102         ol_with_ldbm_api=none
18103 fi
18104
18105 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
18106         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
18107 echo "configure:18108: checking for MDBM library" >&5
18108 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
18109   echo $ac_n "(cached) $ac_c" 1>&6
18110 else
18111         ol_LIBS="$LIBS"
18112         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
18113 echo "configure:18114: checking for mdbm_set_chain" >&5
18114 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
18115   echo $ac_n "(cached) $ac_c" 1>&6
18116 else
18117   cat > conftest.$ac_ext <<EOF
18118 #line 18119 "configure"
18119 #include "confdefs.h"
18120 /* System header to define __stub macros and hopefully few prototypes,
18121     which can conflict with char mdbm_set_chain(); below.  */
18122 #include <assert.h>
18123 /* Override any gcc2 internal prototype to avoid an error.  */
18124 /* We use char because int might match the return type of a gcc2
18125     builtin and then its argument prototype would still apply.  */
18126 char mdbm_set_chain();
18127 char (*f)();
18128
18129 int main() {
18130
18131 /* The GNU C library defines this for functions which it implements
18132     to always fail with ENOSYS.  Some functions are actually named
18133     something starting with __ and the normal name is an alias.  */
18134 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
18135 choke me
18136 #else
18137 f = mdbm_set_chain;
18138 #endif
18139
18140 ; return 0; }
18141 EOF
18142 if { (eval echo configure:18143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18143   rm -rf conftest*
18144   eval "ac_cv_func_mdbm_set_chain=yes"
18145 else
18146   echo "configure: failed program was:" >&5
18147   cat conftest.$ac_ext >&5
18148   rm -rf conftest*
18149   eval "ac_cv_func_mdbm_set_chain=no"
18150 fi
18151 rm -f conftest*
18152 fi
18153
18154 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
18155   echo "$ac_t""yes" 1>&6
18156   ol_cv_lib_mdbm=yes
18157 else
18158   echo "$ac_t""no" 1>&6
18159
18160                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
18161 echo "configure:18162: checking for mdbm_set_chain in -lmdbm" >&5
18162 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
18163 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18164   echo $ac_n "(cached) $ac_c" 1>&6
18165 else
18166   ac_save_LIBS="$LIBS"
18167 LIBS="-lmdbm  $LIBS"
18168 cat > conftest.$ac_ext <<EOF
18169 #line 18170 "configure"
18170 #include "confdefs.h"
18171 /* Override any gcc2 internal prototype to avoid an error.  */
18172 /* We use char because int might match the return type of a gcc2
18173     builtin and then its argument prototype would still apply.  */
18174 char mdbm_set_chain();
18175
18176 int main() {
18177 mdbm_set_chain()
18178 ; return 0; }
18179 EOF
18180 if { (eval echo configure:18181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18181   rm -rf conftest*
18182   eval "ac_cv_lib_$ac_lib_var=yes"
18183 else
18184   echo "configure: failed program was:" >&5
18185   cat conftest.$ac_ext >&5
18186   rm -rf conftest*
18187   eval "ac_cv_lib_$ac_lib_var=no"
18188 fi
18189 rm -f conftest*
18190 LIBS="$ac_save_LIBS"
18191
18192 fi
18193 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18194   echo "$ac_t""yes" 1>&6
18195   ol_cv_lib_mdbm=-lmdbm
18196 else
18197   echo "$ac_t""no" 1>&6
18198 ol_cv_lib_mdbm=no
18199 fi
18200
18201         
18202 fi
18203
18204         LIBS="$ol_LIBS"
18205
18206 fi
18207
18208 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
18209
18210
18211  for ac_hdr in mdbm.h
18212 do
18213 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18214 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18215 echo "configure:18216: checking for $ac_hdr" >&5
18216 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18217   echo $ac_n "(cached) $ac_c" 1>&6
18218 else
18219   cat > conftest.$ac_ext <<EOF
18220 #line 18221 "configure"
18221 #include "confdefs.h"
18222 #include <$ac_hdr>
18223 EOF
18224 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18225 { (eval echo configure:18226: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18226 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18227 if test -z "$ac_err"; then
18228   rm -rf conftest*
18229   eval "ac_cv_header_$ac_safe=yes"
18230 else
18231   echo "$ac_err" >&5
18232   echo "configure: failed program was:" >&5
18233   cat conftest.$ac_ext >&5
18234   rm -rf conftest*
18235   eval "ac_cv_header_$ac_safe=no"
18236 fi
18237 rm -f conftest*
18238 fi
18239 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18240   echo "$ac_t""yes" 1>&6
18241     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18242   cat >> confdefs.h <<EOF
18243 #define $ac_tr_hdr 1
18244 EOF
18245  
18246 else
18247   echo "$ac_t""no" 1>&6
18248 fi
18249 done
18250
18251  echo $ac_n "checking for db""... $ac_c" 1>&6
18252 echo "configure:18253: checking for db" >&5
18253 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
18254   echo $ac_n "(cached) $ac_c" 1>&6
18255 else
18256   
18257         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
18258                 ol_cv_mdbm=no
18259         else
18260                 ol_cv_mdbm=yes
18261         fi
18262
18263 fi
18264
18265 echo "$ac_t""$ol_cv_mdbm" 1>&6
18266  if test $ol_cv_mdbm = yes ; then
18267         cat >> confdefs.h <<\EOF
18268 #define HAVE_MDBM 1
18269 EOF
18270
18271  fi
18272
18273
18274         if test $ol_cv_mdbm = yes ; then
18275                 ol_link_ldbm=mdbm
18276                 ol_with_ldbm_api=mdbm
18277                 if test $ol_cv_lib_mdbm != yes ; then
18278                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
18279                 fi
18280         fi
18281 fi
18282
18283 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
18284         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
18285 echo "configure:18286: checking for GDBM library" >&5
18286 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
18287   echo $ac_n "(cached) $ac_c" 1>&6
18288 else
18289         ol_LIBS="$LIBS"
18290         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
18291 echo "configure:18292: checking for gdbm_open" >&5
18292 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
18293   echo $ac_n "(cached) $ac_c" 1>&6
18294 else
18295   cat > conftest.$ac_ext <<EOF
18296 #line 18297 "configure"
18297 #include "confdefs.h"
18298 /* System header to define __stub macros and hopefully few prototypes,
18299     which can conflict with char gdbm_open(); below.  */
18300 #include <assert.h>
18301 /* Override any gcc2 internal prototype to avoid an error.  */
18302 /* We use char because int might match the return type of a gcc2
18303     builtin and then its argument prototype would still apply.  */
18304 char gdbm_open();
18305 char (*f)();
18306
18307 int main() {
18308
18309 /* The GNU C library defines this for functions which it implements
18310     to always fail with ENOSYS.  Some functions are actually named
18311     something starting with __ and the normal name is an alias.  */
18312 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
18313 choke me
18314 #else
18315 f = gdbm_open;
18316 #endif
18317
18318 ; return 0; }
18319 EOF
18320 if { (eval echo configure:18321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18321   rm -rf conftest*
18322   eval "ac_cv_func_gdbm_open=yes"
18323 else
18324   echo "configure: failed program was:" >&5
18325   cat conftest.$ac_ext >&5
18326   rm -rf conftest*
18327   eval "ac_cv_func_gdbm_open=no"
18328 fi
18329 rm -f conftest*
18330 fi
18331
18332 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
18333   echo "$ac_t""yes" 1>&6
18334   ol_cv_lib_gdbm=yes
18335 else
18336   echo "$ac_t""no" 1>&6
18337
18338                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
18339 echo "configure:18340: checking for gdbm_open in -lgdbm" >&5
18340 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
18341 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18342   echo $ac_n "(cached) $ac_c" 1>&6
18343 else
18344   ac_save_LIBS="$LIBS"
18345 LIBS="-lgdbm  $LIBS"
18346 cat > conftest.$ac_ext <<EOF
18347 #line 18348 "configure"
18348 #include "confdefs.h"
18349 /* Override any gcc2 internal prototype to avoid an error.  */
18350 /* We use char because int might match the return type of a gcc2
18351     builtin and then its argument prototype would still apply.  */
18352 char gdbm_open();
18353
18354 int main() {
18355 gdbm_open()
18356 ; return 0; }
18357 EOF
18358 if { (eval echo configure:18359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18359   rm -rf conftest*
18360   eval "ac_cv_lib_$ac_lib_var=yes"
18361 else
18362   echo "configure: failed program was:" >&5
18363   cat conftest.$ac_ext >&5
18364   rm -rf conftest*
18365   eval "ac_cv_lib_$ac_lib_var=no"
18366 fi
18367 rm -f conftest*
18368 LIBS="$ac_save_LIBS"
18369
18370 fi
18371 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18372   echo "$ac_t""yes" 1>&6
18373   ol_cv_lib_gdbm=-lgdbm
18374 else
18375   echo "$ac_t""no" 1>&6
18376 ol_cv_lib_gdbm=no
18377 fi
18378
18379         
18380 fi
18381
18382         LIBS="$ol_LIBS"
18383
18384 fi
18385
18386 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
18387
18388
18389  for ac_hdr in gdbm.h
18390 do
18391 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18392 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18393 echo "configure:18394: checking for $ac_hdr" >&5
18394 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18395   echo $ac_n "(cached) $ac_c" 1>&6
18396 else
18397   cat > conftest.$ac_ext <<EOF
18398 #line 18399 "configure"
18399 #include "confdefs.h"
18400 #include <$ac_hdr>
18401 EOF
18402 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18403 { (eval echo configure:18404: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18404 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18405 if test -z "$ac_err"; then
18406   rm -rf conftest*
18407   eval "ac_cv_header_$ac_safe=yes"
18408 else
18409   echo "$ac_err" >&5
18410   echo "configure: failed program was:" >&5
18411   cat conftest.$ac_ext >&5
18412   rm -rf conftest*
18413   eval "ac_cv_header_$ac_safe=no"
18414 fi
18415 rm -f conftest*
18416 fi
18417 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18418   echo "$ac_t""yes" 1>&6
18419     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18420   cat >> confdefs.h <<EOF
18421 #define $ac_tr_hdr 1
18422 EOF
18423  
18424 else
18425   echo "$ac_t""no" 1>&6
18426 fi
18427 done
18428
18429  echo $ac_n "checking for db""... $ac_c" 1>&6
18430 echo "configure:18431: checking for db" >&5
18431 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
18432   echo $ac_n "(cached) $ac_c" 1>&6
18433 else
18434   
18435         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
18436                 ol_cv_gdbm=no
18437         else
18438                 ol_cv_gdbm=yes
18439         fi
18440
18441 fi
18442
18443 echo "$ac_t""$ol_cv_gdbm" 1>&6
18444  if test $ol_cv_gdbm = yes ; then
18445         cat >> confdefs.h <<\EOF
18446 #define HAVE_GDBM 1
18447 EOF
18448
18449  fi
18450
18451
18452         if test $ol_cv_gdbm = yes ; then
18453                 ol_link_ldbm=gdbm
18454                 ol_with_ldbm_api=gdbm
18455
18456                 if test $ol_cv_lib_gdbm != yes ; then
18457                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
18458                 fi
18459         fi
18460 fi
18461
18462 if test $ol_with_ldbm_api = ndbm ; then
18463         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
18464 echo "configure:18465: checking for NDBM library" >&5
18465 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
18466   echo $ac_n "(cached) $ac_c" 1>&6
18467 else
18468         ol_LIBS="$LIBS"
18469         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
18470 echo "configure:18471: checking for dbm_open" >&5
18471 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
18472   echo $ac_n "(cached) $ac_c" 1>&6
18473 else
18474   cat > conftest.$ac_ext <<EOF
18475 #line 18476 "configure"
18476 #include "confdefs.h"
18477 /* System header to define __stub macros and hopefully few prototypes,
18478     which can conflict with char dbm_open(); below.  */
18479 #include <assert.h>
18480 /* Override any gcc2 internal prototype to avoid an error.  */
18481 /* We use char because int might match the return type of a gcc2
18482     builtin and then its argument prototype would still apply.  */
18483 char dbm_open();
18484 char (*f)();
18485
18486 int main() {
18487
18488 /* The GNU C library defines this for functions which it implements
18489     to always fail with ENOSYS.  Some functions are actually named
18490     something starting with __ and the normal name is an alias.  */
18491 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
18492 choke me
18493 #else
18494 f = dbm_open;
18495 #endif
18496
18497 ; return 0; }
18498 EOF
18499 if { (eval echo configure:18500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18500   rm -rf conftest*
18501   eval "ac_cv_func_dbm_open=yes"
18502 else
18503   echo "configure: failed program was:" >&5
18504   cat conftest.$ac_ext >&5
18505   rm -rf conftest*
18506   eval "ac_cv_func_dbm_open=no"
18507 fi
18508 rm -f conftest*
18509 fi
18510
18511 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
18512   echo "$ac_t""yes" 1>&6
18513   ol_cv_lib_ndbm=yes
18514 else
18515   echo "$ac_t""no" 1>&6
18516
18517                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
18518 echo "configure:18519: checking for dbm_open in -lndbm" >&5
18519 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
18520 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18521   echo $ac_n "(cached) $ac_c" 1>&6
18522 else
18523   ac_save_LIBS="$LIBS"
18524 LIBS="-lndbm  $LIBS"
18525 cat > conftest.$ac_ext <<EOF
18526 #line 18527 "configure"
18527 #include "confdefs.h"
18528 /* Override any gcc2 internal prototype to avoid an error.  */
18529 /* We use char because int might match the return type of a gcc2
18530     builtin and then its argument prototype would still apply.  */
18531 char dbm_open();
18532
18533 int main() {
18534 dbm_open()
18535 ; return 0; }
18536 EOF
18537 if { (eval echo configure:18538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18538   rm -rf conftest*
18539   eval "ac_cv_lib_$ac_lib_var=yes"
18540 else
18541   echo "configure: failed program was:" >&5
18542   cat conftest.$ac_ext >&5
18543   rm -rf conftest*
18544   eval "ac_cv_lib_$ac_lib_var=no"
18545 fi
18546 rm -f conftest*
18547 LIBS="$ac_save_LIBS"
18548
18549 fi
18550 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18551   echo "$ac_t""yes" 1>&6
18552   ol_cv_lib_ndbm=-lndbm
18553 else
18554   echo "$ac_t""no" 1>&6
18555
18556                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
18557 echo "configure:18558: checking for dbm_open in -ldbm" >&5
18558 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
18559 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18560   echo $ac_n "(cached) $ac_c" 1>&6
18561 else
18562   ac_save_LIBS="$LIBS"
18563 LIBS="-ldbm  $LIBS"
18564 cat > conftest.$ac_ext <<EOF
18565 #line 18566 "configure"
18566 #include "confdefs.h"
18567 /* Override any gcc2 internal prototype to avoid an error.  */
18568 /* We use char because int might match the return type of a gcc2
18569     builtin and then its argument prototype would still apply.  */
18570 char dbm_open();
18571
18572 int main() {
18573 dbm_open()
18574 ; return 0; }
18575 EOF
18576 if { (eval echo configure:18577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18577   rm -rf conftest*
18578   eval "ac_cv_lib_$ac_lib_var=yes"
18579 else
18580   echo "configure: failed program was:" >&5
18581   cat conftest.$ac_ext >&5
18582   rm -rf conftest*
18583   eval "ac_cv_lib_$ac_lib_var=no"
18584 fi
18585 rm -f conftest*
18586 LIBS="$ac_save_LIBS"
18587
18588 fi
18589 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18590   echo "$ac_t""yes" 1>&6
18591   ol_cv_lib_ndbm=-ldbm
18592 else
18593   echo "$ac_t""no" 1>&6
18594 ol_cv_lib_ndbm=no
18595 fi
18596                 
18597 fi
18598
18599         
18600 fi
18601
18602         LIBS="$ol_LIBS"
18603
18604 fi
18605
18606 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
18607
18608
18609  for ac_hdr in ndbm.h
18610 do
18611 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18612 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18613 echo "configure:18614: checking for $ac_hdr" >&5
18614 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18615   echo $ac_n "(cached) $ac_c" 1>&6
18616 else
18617   cat > conftest.$ac_ext <<EOF
18618 #line 18619 "configure"
18619 #include "confdefs.h"
18620 #include <$ac_hdr>
18621 EOF
18622 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18623 { (eval echo configure:18624: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18624 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18625 if test -z "$ac_err"; then
18626   rm -rf conftest*
18627   eval "ac_cv_header_$ac_safe=yes"
18628 else
18629   echo "$ac_err" >&5
18630   echo "configure: failed program was:" >&5
18631   cat conftest.$ac_ext >&5
18632   rm -rf conftest*
18633   eval "ac_cv_header_$ac_safe=no"
18634 fi
18635 rm -f conftest*
18636 fi
18637 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18638   echo "$ac_t""yes" 1>&6
18639     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18640   cat >> confdefs.h <<EOF
18641 #define $ac_tr_hdr 1
18642 EOF
18643  
18644 else
18645   echo "$ac_t""no" 1>&6
18646 fi
18647 done
18648
18649  echo $ac_n "checking for db""... $ac_c" 1>&6
18650 echo "configure:18651: checking for db" >&5
18651 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
18652   echo $ac_n "(cached) $ac_c" 1>&6
18653 else
18654   
18655         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
18656                 ol_cv_ndbm=no
18657         else
18658                 ol_cv_ndbm=yes
18659         fi
18660
18661 fi
18662
18663 echo "$ac_t""$ol_cv_ndbm" 1>&6
18664  if test $ol_cv_ndbm = yes ; then
18665         cat >> confdefs.h <<\EOF
18666 #define HAVE_NDBM 1
18667 EOF
18668
18669  fi
18670
18671
18672         if test $ol_cv_ndbm = yes ; then
18673                 ol_link_ldbm=ndbm
18674                 ol_with_ldbm_api=ndbm
18675
18676                 if test $ol_cv_lib_ndbm != yes ; then
18677                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
18678                 fi
18679         fi
18680 fi
18681
18682 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
18683         echo "configure: warning: could not find suitable LDBM backend" 1>&2
18684         if test $ol_enable_ldbm = yes ; then
18685                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
18686         fi
18687
18688         echo "configure: warning: disabling LDBM" 1>&2
18689         ol_enable_ldbm=no
18690 fi
18691
18692 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
18693         BUILD_LIBS_DYNAMIC=shared
18694         cat >> confdefs.h <<\EOF
18695 #define LDAP_LIBS_DYNAMIC 1
18696 EOF
18697
18698 else
18699         BUILD_LIBS_DYNAMIC=static
18700 fi
18701
18702 if test $ol_enable_wrappers != no ; then
18703         for ac_hdr in tcpd.h
18704 do
18705 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18706 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18707 echo "configure:18708: checking for $ac_hdr" >&5
18708 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18709   echo $ac_n "(cached) $ac_c" 1>&6
18710 else
18711   cat > conftest.$ac_ext <<EOF
18712 #line 18713 "configure"
18713 #include "confdefs.h"
18714 #include <$ac_hdr>
18715 EOF
18716 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18717 { (eval echo configure:18718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18718 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18719 if test -z "$ac_err"; then
18720   rm -rf conftest*
18721   eval "ac_cv_header_$ac_safe=yes"
18722 else
18723   echo "$ac_err" >&5
18724   echo "configure: failed program was:" >&5
18725   cat conftest.$ac_ext >&5
18726   rm -rf conftest*
18727   eval "ac_cv_header_$ac_safe=no"
18728 fi
18729 rm -f conftest*
18730 fi
18731 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18732   echo "$ac_t""yes" 1>&6
18733     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18734   cat >> confdefs.h <<EOF
18735 #define $ac_tr_hdr 1
18736 EOF
18737  
18738                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
18739 echo "configure:18740: checking for TCP wrappers library" >&5
18740                 save_LIBS="$LIBS"
18741                 LIBS="$LIBS -lwrap"
18742                 cat > conftest.$ac_ext <<EOF
18743 #line 18744 "configure"
18744 #include "confdefs.h"
18745
18746 #include <tcpd.h>
18747 int allow_severity = 0;
18748 int deny_severity  = 0;
18749
18750 struct request_info *req;
18751                 
18752 int main() {
18753
18754 hosts_access(req)
18755                 
18756 ; return 0; }
18757 EOF
18758 if { (eval echo configure:18759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18759   rm -rf conftest*
18760   echo "$ac_t""-lwrap" 1>&6
18761                 have_wrappers=yes
18762                 LIBS="$save_LIBS"
18763 else
18764   echo "configure: failed program was:" >&5
18765   cat conftest.$ac_ext >&5
18766   rm -rf conftest*
18767   
18768                                 LIBS="$LIBS -lnsl"
18769                 cat > conftest.$ac_ext <<EOF
18770 #line 18771 "configure"
18771 #include "confdefs.h"
18772
18773 #include <tcpd.h>
18774 int allow_severity = 0;
18775 int deny_severity  = 0;
18776
18777 struct request_info *req;
18778                 
18779 int main() {
18780
18781 hosts_access(req)
18782                 
18783 ; return 0; }
18784 EOF
18785 if { (eval echo configure:18786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18786   rm -rf conftest*
18787   echo "$ac_t""-lwrap -lnsl" 1>&6
18788                 have_wrappers=yes
18789                 LIBS="$save_LIBS -lnsl"
18790 else
18791   echo "configure: failed program was:" >&5
18792   cat conftest.$ac_ext >&5
18793   rm -rf conftest*
18794   
18795                 echo "$ac_t""no" 1>&6
18796                 have_wrappers=no
18797                 LIBS=$save_LIBS
18798 fi
18799 rm -f conftest*
18800 fi
18801 rm -f conftest*
18802 else
18803   echo "$ac_t""no" 1>&6
18804 have_wrappers=no
18805 fi
18806 done
18807
18808
18809         if test $have_wrappers = yes ; then
18810                 cat >> confdefs.h <<\EOF
18811 #define HAVE_TCPD 1
18812 EOF
18813
18814                 WRAP_LIBS="-lwrap"
18815         elif test $ol_enable_wrappers = yes ; then
18816                 { echo "configure: error: could not find TCP wrappers, select apppropriate options ore disable" 1>&2; exit 1; }
18817         else
18818                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
18819                 WRAP_LIBS=""
18820         fi
18821 fi
18822
18823 if test $ol_enable_syslog != no ; then
18824         echo $ac_n "checking for openlog""... $ac_c" 1>&6
18825 echo "configure:18826: checking for openlog" >&5
18826 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
18827   echo $ac_n "(cached) $ac_c" 1>&6
18828 else
18829   cat > conftest.$ac_ext <<EOF
18830 #line 18831 "configure"
18831 #include "confdefs.h"
18832 /* System header to define __stub macros and hopefully few prototypes,
18833     which can conflict with char openlog(); below.  */
18834 #include <assert.h>
18835 /* Override any gcc2 internal prototype to avoid an error.  */
18836 /* We use char because int might match the return type of a gcc2
18837     builtin and then its argument prototype would still apply.  */
18838 char openlog();
18839 char (*f)();
18840
18841 int main() {
18842
18843 /* The GNU C library defines this for functions which it implements
18844     to always fail with ENOSYS.  Some functions are actually named
18845     something starting with __ and the normal name is an alias.  */
18846 #if defined (__stub_openlog) || defined (__stub___openlog)
18847 choke me
18848 #else
18849 f = openlog;
18850 #endif
18851
18852 ; return 0; }
18853 EOF
18854 if { (eval echo configure:18855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18855   rm -rf conftest*
18856   eval "ac_cv_func_openlog=yes"
18857 else
18858   echo "configure: failed program was:" >&5
18859   cat conftest.$ac_ext >&5
18860   rm -rf conftest*
18861   eval "ac_cv_func_openlog=no"
18862 fi
18863 rm -f conftest*
18864 fi
18865
18866 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
18867   echo "$ac_t""yes" 1>&6
18868   :
18869 else
18870   echo "$ac_t""no" 1>&6
18871 fi
18872
18873         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
18874                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
18875         fi
18876         ol_enable_syslog=$ac_cv_func_openlog
18877 fi
18878
18879
18880 ol_link_sql=no
18881 if test $ol_enable_sql != no ; then
18882         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
18883 echo "configure:18884: checking for SQLDriverConnect in -liodbc" >&5
18884 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
18885 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18886   echo $ac_n "(cached) $ac_c" 1>&6
18887 else
18888   ac_save_LIBS="$LIBS"
18889 LIBS="-liodbc  $LIBS"
18890 cat > conftest.$ac_ext <<EOF
18891 #line 18892 "configure"
18892 #include "confdefs.h"
18893 /* Override any gcc2 internal prototype to avoid an error.  */
18894 /* We use char because int might match the return type of a gcc2
18895     builtin and then its argument prototype would still apply.  */
18896 char SQLDriverConnect();
18897
18898 int main() {
18899 SQLDriverConnect()
18900 ; return 0; }
18901 EOF
18902 if { (eval echo configure:18903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18903   rm -rf conftest*
18904   eval "ac_cv_lib_$ac_lib_var=yes"
18905 else
18906   echo "configure: failed program was:" >&5
18907   cat conftest.$ac_ext >&5
18908   rm -rf conftest*
18909   eval "ac_cv_lib_$ac_lib_var=no"
18910 fi
18911 rm -f conftest*
18912 LIBS="$ac_save_LIBS"
18913
18914 fi
18915 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18916   echo "$ac_t""yes" 1>&6
18917   have_iodbc=yes
18918 else
18919   echo "$ac_t""no" 1>&6
18920 have_iodbc=no
18921 fi
18922
18923         if test $have_iodbc = yes ; then
18924                 ol_link_sql="-liodbc"
18925         else
18926                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
18927 echo "configure:18928: checking for SQLDriverConnect in -lodbc" >&5
18928 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
18929 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18930   echo $ac_n "(cached) $ac_c" 1>&6
18931 else
18932   ac_save_LIBS="$LIBS"
18933 LIBS="-lodbc  $LIBS"
18934 cat > conftest.$ac_ext <<EOF
18935 #line 18936 "configure"
18936 #include "confdefs.h"
18937 /* Override any gcc2 internal prototype to avoid an error.  */
18938 /* We use char because int might match the return type of a gcc2
18939     builtin and then its argument prototype would still apply.  */
18940 char SQLDriverConnect();
18941
18942 int main() {
18943 SQLDriverConnect()
18944 ; return 0; }
18945 EOF
18946 if { (eval echo configure:18947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18947   rm -rf conftest*
18948   eval "ac_cv_lib_$ac_lib_var=yes"
18949 else
18950   echo "configure: failed program was:" >&5
18951   cat conftest.$ac_ext >&5
18952   rm -rf conftest*
18953   eval "ac_cv_lib_$ac_lib_var=no"
18954 fi
18955 rm -f conftest*
18956 LIBS="$ac_save_LIBS"
18957
18958 fi
18959 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18960   echo "$ac_t""yes" 1>&6
18961   have_odbc=yes
18962 else
18963   echo "$ac_t""no" 1>&6
18964 have_odbc=no
18965 fi
18966
18967                 if test $have_odbc = yes ; then
18968                         ol_link_sql="-lodbc"
18969                 fi
18970         fi
18971
18972         if test $ol_link_sql != no ; then
18973                 SLAPD_SQL_LIBS="$ol_link_sql"
18974
18975         elif test $ol_enable_sql != auto ; then
18976                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
18977         fi
18978 fi
18979
18980 if test $ol_enable_tcl != no ; then
18981         for ac_hdr in tcl.h
18982 do
18983 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18984 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18985 echo "configure:18986: checking for $ac_hdr" >&5
18986 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18987   echo $ac_n "(cached) $ac_c" 1>&6
18988 else
18989   cat > conftest.$ac_ext <<EOF
18990 #line 18991 "configure"
18991 #include "confdefs.h"
18992 #include <$ac_hdr>
18993 EOF
18994 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18995 { (eval echo configure:18996: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18996 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18997 if test -z "$ac_err"; then
18998   rm -rf conftest*
18999   eval "ac_cv_header_$ac_safe=yes"
19000 else
19001   echo "$ac_err" >&5
19002   echo "configure: failed program was:" >&5
19003   cat conftest.$ac_ext >&5
19004   rm -rf conftest*
19005   eval "ac_cv_header_$ac_safe=no"
19006 fi
19007 rm -f conftest*
19008 fi
19009 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19010   echo "$ac_t""yes" 1>&6
19011     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19012   cat >> confdefs.h <<EOF
19013 #define $ac_tr_hdr 1
19014 EOF
19015  
19016 else
19017   echo "$ac_t""no" 1>&6
19018 fi
19019 done
19020
19021
19022         if test $ac_cv_header_tcl_h != yes ; then
19023                 have_tcl=no
19024         else
19025                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
19026                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
19027 echo "configure:19028: checking for main in -l$lib" >&5
19028 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
19029 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19030   echo $ac_n "(cached) $ac_c" 1>&6
19031 else
19032   ac_save_LIBS="$LIBS"
19033 LIBS="-l$lib  $LIBS"
19034 cat > conftest.$ac_ext <<EOF
19035 #line 19036 "configure"
19036 #include "confdefs.h"
19037
19038 int main() {
19039 main()
19040 ; return 0; }
19041 EOF
19042 if { (eval echo configure:19043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19043   rm -rf conftest*
19044   eval "ac_cv_lib_$ac_lib_var=yes"
19045 else
19046   echo "configure: failed program was:" >&5
19047   cat conftest.$ac_ext >&5
19048   rm -rf conftest*
19049   eval "ac_cv_lib_$ac_lib_var=no"
19050 fi
19051 rm -f conftest*
19052 LIBS="$ac_save_LIBS"
19053
19054 fi
19055 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19056   echo "$ac_t""yes" 1>&6
19057   have_tcl=yes
19058                            if test x"$ol_with_tcl_module" = "xstatic" ; then
19059                                         SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
19060                            else
19061                                         MOD_TCL_LIB="-l${lib}"
19062                            fi;break
19063 else
19064   echo "$ac_t""no" 1>&6
19065 have_tcl=no
19066 fi
19067
19068                 done
19069         fi
19070
19071         if test $have_tcl != yes ; then
19072                 echo "configure: warning: could not find -ltcl" 1>&2
19073                 if test $ol_enable_tcl = yes ; then
19074                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
19075                 fi
19076
19077                 ol_enable_tcl=no
19078         fi
19079 fi
19080
19081 ol_link_termcap=no
19082 for ac_hdr in termcap.h ncurses.h
19083 do
19084 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19085 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19086 echo "configure:19087: checking for $ac_hdr" >&5
19087 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19088   echo $ac_n "(cached) $ac_c" 1>&6
19089 else
19090   cat > conftest.$ac_ext <<EOF
19091 #line 19092 "configure"
19092 #include "confdefs.h"
19093 #include <$ac_hdr>
19094 EOF
19095 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19096 { (eval echo configure:19097: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19097 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19098 if test -z "$ac_err"; then
19099   rm -rf conftest*
19100   eval "ac_cv_header_$ac_safe=yes"
19101 else
19102   echo "$ac_err" >&5
19103   echo "configure: failed program was:" >&5
19104   cat conftest.$ac_ext >&5
19105   rm -rf conftest*
19106   eval "ac_cv_header_$ac_safe=no"
19107 fi
19108 rm -f conftest*
19109 fi
19110 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19111   echo "$ac_t""yes" 1>&6
19112     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19113   cat >> confdefs.h <<EOF
19114 #define $ac_tr_hdr 1
19115 EOF
19116  
19117 else
19118   echo "$ac_t""no" 1>&6
19119 fi
19120 done
19121
19122
19123 if test $ol_link_termcap = no ; then
19124         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
19125 echo "configure:19126: checking for tputs in -ltermcap" >&5
19126 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
19127 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19128   echo $ac_n "(cached) $ac_c" 1>&6
19129 else
19130   ac_save_LIBS="$LIBS"
19131 LIBS="-ltermcap  $LIBS"
19132 cat > conftest.$ac_ext <<EOF
19133 #line 19134 "configure"
19134 #include "confdefs.h"
19135 /* Override any gcc2 internal prototype to avoid an error.  */
19136 /* We use char because int might match the return type of a gcc2
19137     builtin and then its argument prototype would still apply.  */
19138 char tputs();
19139
19140 int main() {
19141 tputs()
19142 ; return 0; }
19143 EOF
19144 if { (eval echo configure:19145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19145   rm -rf conftest*
19146   eval "ac_cv_lib_$ac_lib_var=yes"
19147 else
19148   echo "configure: failed program was:" >&5
19149   cat conftest.$ac_ext >&5
19150   rm -rf conftest*
19151   eval "ac_cv_lib_$ac_lib_var=no"
19152 fi
19153 rm -f conftest*
19154 LIBS="$ac_save_LIBS"
19155
19156 fi
19157 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19158   echo "$ac_t""yes" 1>&6
19159   have_termcap=yes
19160 else
19161   echo "$ac_t""no" 1>&6
19162 have_termcap=no
19163 fi
19164
19165         if test $have_termcap = yes ; then
19166                 cat >> confdefs.h <<\EOF
19167 #define HAVE_TERMCAP 1
19168 EOF
19169
19170                 ol_link_termcap=yes
19171                 TERMCAP_LIBS=-ltermcap
19172         fi
19173 fi
19174
19175 if test $ol_link_termcap = no ; then
19176         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
19177 echo "configure:19178: checking for initscr in -lncurses" >&5
19178 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
19179 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19180   echo $ac_n "(cached) $ac_c" 1>&6
19181 else
19182   ac_save_LIBS="$LIBS"
19183 LIBS="-lncurses  $LIBS"
19184 cat > conftest.$ac_ext <<EOF
19185 #line 19186 "configure"
19186 #include "confdefs.h"
19187 /* Override any gcc2 internal prototype to avoid an error.  */
19188 /* We use char because int might match the return type of a gcc2
19189     builtin and then its argument prototype would still apply.  */
19190 char initscr();
19191
19192 int main() {
19193 initscr()
19194 ; return 0; }
19195 EOF
19196 if { (eval echo configure:19197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19197   rm -rf conftest*
19198   eval "ac_cv_lib_$ac_lib_var=yes"
19199 else
19200   echo "configure: failed program was:" >&5
19201   cat conftest.$ac_ext >&5
19202   rm -rf conftest*
19203   eval "ac_cv_lib_$ac_lib_var=no"
19204 fi
19205 rm -f conftest*
19206 LIBS="$ac_save_LIBS"
19207
19208 fi
19209 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19210   echo "$ac_t""yes" 1>&6
19211   have_ncurses=yes
19212 else
19213   echo "$ac_t""no" 1>&6
19214 have_ncurses=no
19215 fi
19216
19217         if test $have_ncurses = yes ; then
19218                 cat >> confdefs.h <<\EOF
19219 #define HAVE_NCURSES 1
19220 EOF
19221
19222                 ol_link_termcap=yes
19223                 TERMCAP_LIBS=-lncurses
19224         fi
19225 fi
19226
19227 if test $ol_link_termcap = no ; then
19228         cat >> confdefs.h <<\EOF
19229 #define NO_TERMCAP 1
19230 EOF
19231
19232         TERMCAP_LIBS=
19233 fi
19234
19235 ol_link_sasl=no
19236 ol_link_spasswd=no
19237 if test $ol_with_cyrus_sasl != no ; then
19238         for ac_hdr in sasl.h
19239 do
19240 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19241 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19242 echo "configure:19243: checking for $ac_hdr" >&5
19243 if eval "test \"\${ac_cv_header_$ac_safe+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 #include <$ac_hdr>
19250 EOF
19251 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19252 { (eval echo configure:19253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19253 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19254 if test -z "$ac_err"; then
19255   rm -rf conftest*
19256   eval "ac_cv_header_$ac_safe=yes"
19257 else
19258   echo "$ac_err" >&5
19259   echo "configure: failed program was:" >&5
19260   cat conftest.$ac_ext >&5
19261   rm -rf conftest*
19262   eval "ac_cv_header_$ac_safe=no"
19263 fi
19264 rm -f conftest*
19265 fi
19266 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19267   echo "$ac_t""yes" 1>&6
19268     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19269   cat >> confdefs.h <<EOF
19270 #define $ac_tr_hdr 1
19271 EOF
19272  
19273 else
19274   echo "$ac_t""no" 1>&6
19275 fi
19276 done
19277
19278
19279         if test $ac_cv_header_sasl_h ; then
19280                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
19281 echo "configure:19282: checking for sasl_client_init in -lsasl2" >&5
19282 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
19283 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19284   echo $ac_n "(cached) $ac_c" 1>&6
19285 else
19286   ac_save_LIBS="$LIBS"
19287 LIBS="-lsasl2  $LIBS"
19288 cat > conftest.$ac_ext <<EOF
19289 #line 19290 "configure"
19290 #include "confdefs.h"
19291 /* Override any gcc2 internal prototype to avoid an error.  */
19292 /* We use char because int might match the return type of a gcc2
19293     builtin and then its argument prototype would still apply.  */
19294 char sasl_client_init();
19295
19296 int main() {
19297 sasl_client_init()
19298 ; return 0; }
19299 EOF
19300 if { (eval echo configure:19301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19301   rm -rf conftest*
19302   eval "ac_cv_lib_$ac_lib_var=yes"
19303 else
19304   echo "configure: failed program was:" >&5
19305   cat conftest.$ac_ext >&5
19306   rm -rf conftest*
19307   eval "ac_cv_lib_$ac_lib_var=no"
19308 fi
19309 rm -f conftest*
19310 LIBS="$ac_save_LIBS"
19311
19312 fi
19313 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19314   echo "$ac_t""yes" 1>&6
19315   ol_link_sasl="-lsasl2"
19316 else
19317   echo "$ac_t""no" 1>&6
19318 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
19319 echo "configure:19320: checking for sasl_client_init in -lsasl" >&5
19320 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
19321 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19322   echo $ac_n "(cached) $ac_c" 1>&6
19323 else
19324   ac_save_LIBS="$LIBS"
19325 LIBS="-lsasl  $LIBS"
19326 cat > conftest.$ac_ext <<EOF
19327 #line 19328 "configure"
19328 #include "confdefs.h"
19329 /* Override any gcc2 internal prototype to avoid an error.  */
19330 /* We use char because int might match the return type of a gcc2
19331     builtin and then its argument prototype would still apply.  */
19332 char sasl_client_init();
19333
19334 int main() {
19335 sasl_client_init()
19336 ; return 0; }
19337 EOF
19338 if { (eval echo configure:19339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19339   rm -rf conftest*
19340   eval "ac_cv_lib_$ac_lib_var=yes"
19341 else
19342   echo "configure: failed program was:" >&5
19343   cat conftest.$ac_ext >&5
19344   rm -rf conftest*
19345   eval "ac_cv_lib_$ac_lib_var=no"
19346 fi
19347 rm -f conftest*
19348 LIBS="$ac_save_LIBS"
19349
19350 fi
19351 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19352   echo "$ac_t""yes" 1>&6
19353   ol_link_sasl="-lsasl"
19354 else
19355   echo "$ac_t""no" 1>&6
19356 fi
19357
19358 fi
19359
19360         fi
19361
19362         if test $ol_link_sasl = no ; then
19363                 if test $ol_with_cyrus_sasl != auto ; then
19364                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
19365                 else
19366                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
19367                         echo "configure: warning: SASL authentication not supported!" 1>&2
19368                         if test $ol_link_tls = no ; then
19369                                 echo "configure: warning: Strong authentication not supported!" 1>&2
19370                         fi
19371                 fi
19372         else
19373                 cat >> confdefs.h <<\EOF
19374 #define HAVE_CYRUS_SASL 1
19375 EOF
19376
19377                 SASL_LIBS="$ol_link_sasl"
19378                 if test $ol_enable_spasswd != no ; then
19379                         ol_link_spasswd=yes
19380                 fi
19381         fi
19382
19383 else
19384         echo "configure: warning: SASL authentication not supported!" 1>&2
19385         if test $ol_link_tls = no ; then
19386                 echo "configure: warning: Strong authentication not supported!" 1>&2
19387         fi
19388 fi
19389
19390 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
19391         dev=no
19392         if test -r /dev/urandom ; then
19393                 dev="/dev/urandom";
19394         elif test -r /idev/urandom ; then
19395                 dev="/idev/urandom";
19396         elif test -r /dev/srandom ; then
19397                 dev="/dev/srandom";
19398         elif test -r /dev/random ; then
19399                 dev="/dev/random";
19400         elif test -r /idev/random ; then
19401                 dev="/idev/random";
19402         fi
19403
19404         if test $dev != no ; then
19405                 cat >> confdefs.h <<EOF
19406 #define URANDOM_DEVICE "$dev"
19407 EOF
19408
19409         fi
19410 fi
19411
19412 ol_link_fetch=no
19413 if test $ol_with_fetch != no ; then
19414         ol_LIBS=$LIBS
19415 LIBS="-lfetch -lcom_err $LIBS"
19416 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
19417 echo "configure:19418: checking fetch(3) library" >&5
19418 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
19419   echo $ac_n "(cached) $ac_c" 1>&6
19420 else
19421   
19422         cat > conftest.$ac_ext <<EOF
19423 #line 19424 "configure"
19424 #include "confdefs.h"
19425
19426 #include <sys/param.h>
19427 #include <stdio.h>
19428 #include <fetch.h>
19429 int main() {
19430 struct url *u = fetchParseURL("file:///"); 
19431 ; return 0; }
19432 EOF
19433 if { (eval echo configure:19434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19434   rm -rf conftest*
19435   ol_cv_lib_fetch=yes
19436 else
19437   echo "configure: failed program was:" >&5
19438   cat conftest.$ac_ext >&5
19439   rm -rf conftest*
19440   ol_cv_lib_fetch=no
19441 fi
19442 rm -f conftest*
19443 fi
19444
19445 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
19446 LIBS=$ol_LIBS
19447 if test $ol_cv_lib_fetch != no ; then
19448         ol_link_fetch="-lfetch -lcom_err"
19449         cat >> confdefs.h <<\EOF
19450 #define HAVE_FETCH 1
19451 EOF
19452
19453 fi
19454
19455
19456         if test $ol_cv_lib_fetch != no ; then
19457                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
19458                 ol_link_fetch=freebsd
19459
19460         elif test $ol_with_fetch != auto ; then
19461                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
19462         fi 
19463 fi
19464
19465 ol_link_readline=no
19466 if test $ol_with_readline != no ; then
19467         for ac_hdr in readline/readline.h readline/history.h
19468 do
19469 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19470 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19471 echo "configure:19472: checking for $ac_hdr" >&5
19472 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19473   echo $ac_n "(cached) $ac_c" 1>&6
19474 else
19475   cat > conftest.$ac_ext <<EOF
19476 #line 19477 "configure"
19477 #include "confdefs.h"
19478 #include <$ac_hdr>
19479 EOF
19480 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19481 { (eval echo configure:19482: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19482 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19483 if test -z "$ac_err"; then
19484   rm -rf conftest*
19485   eval "ac_cv_header_$ac_safe=yes"
19486 else
19487   echo "$ac_err" >&5
19488   echo "configure: failed program was:" >&5
19489   cat conftest.$ac_ext >&5
19490   rm -rf conftest*
19491   eval "ac_cv_header_$ac_safe=no"
19492 fi
19493 rm -f conftest*
19494 fi
19495 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19496   echo "$ac_t""yes" 1>&6
19497     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19498   cat >> confdefs.h <<EOF
19499 #define $ac_tr_hdr 1
19500 EOF
19501  
19502 else
19503   echo "$ac_t""no" 1>&6
19504 fi
19505 done
19506
19507
19508         if test $ac_cv_header_readline_readline_h = yes ; then
19509                 save_LIBS="$LIBS"
19510                 LIBS="$TERMCAP_LIBS $LIBS"
19511                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
19512 echo "configure:19513: checking for readline in -lreadline" >&5
19513 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
19514 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19515   echo $ac_n "(cached) $ac_c" 1>&6
19516 else
19517   ac_save_LIBS="$LIBS"
19518 LIBS="-lreadline  $LIBS"
19519 cat > conftest.$ac_ext <<EOF
19520 #line 19521 "configure"
19521 #include "confdefs.h"
19522 /* Override any gcc2 internal prototype to avoid an error.  */
19523 /* We use char because int might match the return type of a gcc2
19524     builtin and then its argument prototype would still apply.  */
19525 char readline();
19526
19527 int main() {
19528 readline()
19529 ; return 0; }
19530 EOF
19531 if { (eval echo configure:19532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19532   rm -rf conftest*
19533   eval "ac_cv_lib_$ac_lib_var=yes"
19534 else
19535   echo "configure: failed program was:" >&5
19536   cat conftest.$ac_ext >&5
19537   rm -rf conftest*
19538   eval "ac_cv_lib_$ac_lib_var=no"
19539 fi
19540 rm -f conftest*
19541 LIBS="$ac_save_LIBS"
19542
19543 fi
19544 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19545   echo "$ac_t""yes" 1>&6
19546   have_readline=yes
19547 else
19548   echo "$ac_t""no" 1>&6
19549 have_readline=no
19550 fi
19551
19552                 LIBS="$save_LIBS"
19553                         
19554                 if test $have_readline = yes ; then
19555                         ol_with_readline=found
19556                         ol_link_readline=yes
19557
19558                         READLINE_LIBS="-lreadline"
19559                 fi
19560         fi
19561 fi
19562
19563 if test $ol_link_readline = yes ; then
19564         cat >> confdefs.h <<\EOF
19565 #define HAVE_READLINE 1
19566 EOF
19567
19568 fi
19569
19570
19571 if test $ol_enable_crypt != no ; then
19572         echo $ac_n "checking for crypt""... $ac_c" 1>&6
19573 echo "configure:19574: checking for crypt" >&5
19574 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
19575   echo $ac_n "(cached) $ac_c" 1>&6
19576 else
19577   cat > conftest.$ac_ext <<EOF
19578 #line 19579 "configure"
19579 #include "confdefs.h"
19580 /* System header to define __stub macros and hopefully few prototypes,
19581     which can conflict with char crypt(); below.  */
19582 #include <assert.h>
19583 /* Override any gcc2 internal prototype to avoid an error.  */
19584 /* We use char because int might match the return type of a gcc2
19585     builtin and then its argument prototype would still apply.  */
19586 char crypt();
19587 char (*f)();
19588
19589 int main() {
19590
19591 /* The GNU C library defines this for functions which it implements
19592     to always fail with ENOSYS.  Some functions are actually named
19593     something starting with __ and the normal name is an alias.  */
19594 #if defined (__stub_crypt) || defined (__stub___crypt)
19595 choke me
19596 #else
19597 f = crypt;
19598 #endif
19599
19600 ; return 0; }
19601 EOF
19602 if { (eval echo configure:19603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19603   rm -rf conftest*
19604   eval "ac_cv_func_crypt=yes"
19605 else
19606   echo "configure: failed program was:" >&5
19607   cat conftest.$ac_ext >&5
19608   rm -rf conftest*
19609   eval "ac_cv_func_crypt=no"
19610 fi
19611 rm -f conftest*
19612 fi
19613
19614 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
19615   echo "$ac_t""yes" 1>&6
19616   have_crypt=yes
19617 else
19618   echo "$ac_t""no" 1>&6
19619
19620                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
19621 echo "configure:19622: checking for crypt in -lcrypt" >&5
19622 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
19623 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19624   echo $ac_n "(cached) $ac_c" 1>&6
19625 else
19626   ac_save_LIBS="$LIBS"
19627 LIBS="-lcrypt  $LIBS"
19628 cat > conftest.$ac_ext <<EOF
19629 #line 19630 "configure"
19630 #include "confdefs.h"
19631 /* Override any gcc2 internal prototype to avoid an error.  */
19632 /* We use char because int might match the return type of a gcc2
19633     builtin and then its argument prototype would still apply.  */
19634 char crypt();
19635
19636 int main() {
19637 crypt()
19638 ; return 0; }
19639 EOF
19640 if { (eval echo configure:19641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19641   rm -rf conftest*
19642   eval "ac_cv_lib_$ac_lib_var=yes"
19643 else
19644   echo "configure: failed program was:" >&5
19645   cat conftest.$ac_ext >&5
19646   rm -rf conftest*
19647   eval "ac_cv_lib_$ac_lib_var=no"
19648 fi
19649 rm -f conftest*
19650 LIBS="$ac_save_LIBS"
19651
19652 fi
19653 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19654   echo "$ac_t""yes" 1>&6
19655   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
19656                         have_crypt=yes
19657 else
19658   echo "$ac_t""no" 1>&6
19659 have_crypt=no
19660 fi
19661
19662 fi
19663
19664
19665         if test $have_crypt = yes ; then
19666                 cat >> confdefs.h <<\EOF
19667 #define HAVE_CRYPT 1
19668 EOF
19669
19670         else
19671                 echo "configure: warning: could not find crypt" 1>&2
19672                 if test $ol_enable_crypt = yes ; then
19673                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
19674                 fi
19675
19676                 echo "configure: warning: disabling crypt support" 1>&2
19677                 ol_enable_crypt=no
19678         fi
19679 fi
19680
19681 if test $ol_enable_proctitle != no ; then
19682         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
19683 echo "configure:19684: checking for setproctitle" >&5
19684 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
19685   echo $ac_n "(cached) $ac_c" 1>&6
19686 else
19687   cat > conftest.$ac_ext <<EOF
19688 #line 19689 "configure"
19689 #include "confdefs.h"
19690 /* System header to define __stub macros and hopefully few prototypes,
19691     which can conflict with char setproctitle(); below.  */
19692 #include <assert.h>
19693 /* Override any gcc2 internal prototype to avoid an error.  */
19694 /* We use char because int might match the return type of a gcc2
19695     builtin and then its argument prototype would still apply.  */
19696 char setproctitle();
19697 char (*f)();
19698
19699 int main() {
19700
19701 /* The GNU C library defines this for functions which it implements
19702     to always fail with ENOSYS.  Some functions are actually named
19703     something starting with __ and the normal name is an alias.  */
19704 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
19705 choke me
19706 #else
19707 f = setproctitle;
19708 #endif
19709
19710 ; return 0; }
19711 EOF
19712 if { (eval echo configure:19713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19713   rm -rf conftest*
19714   eval "ac_cv_func_setproctitle=yes"
19715 else
19716   echo "configure: failed program was:" >&5
19717   cat conftest.$ac_ext >&5
19718   rm -rf conftest*
19719   eval "ac_cv_func_setproctitle=no"
19720 fi
19721 rm -f conftest*
19722 fi
19723
19724 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
19725   echo "$ac_t""yes" 1>&6
19726   have_setproctitle=yes
19727 else
19728   echo "$ac_t""no" 1>&6
19729
19730                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
19731 echo "configure:19732: checking for setproctitle in -lutil" >&5
19732 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
19733 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19734   echo $ac_n "(cached) $ac_c" 1>&6
19735 else
19736   ac_save_LIBS="$LIBS"
19737 LIBS="-lutil  $LIBS"
19738 cat > conftest.$ac_ext <<EOF
19739 #line 19740 "configure"
19740 #include "confdefs.h"
19741 /* Override any gcc2 internal prototype to avoid an error.  */
19742 /* We use char because int might match the return type of a gcc2
19743     builtin and then its argument prototype would still apply.  */
19744 char setproctitle();
19745
19746 int main() {
19747 setproctitle()
19748 ; return 0; }
19749 EOF
19750 if { (eval echo configure:19751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19751   rm -rf conftest*
19752   eval "ac_cv_lib_$ac_lib_var=yes"
19753 else
19754   echo "configure: failed program was:" >&5
19755   cat conftest.$ac_ext >&5
19756   rm -rf conftest*
19757   eval "ac_cv_lib_$ac_lib_var=no"
19758 fi
19759 rm -f conftest*
19760 LIBS="$ac_save_LIBS"
19761
19762 fi
19763 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19764   echo "$ac_t""yes" 1>&6
19765   have_setproctitle=yes
19766                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
19767 else
19768   echo "$ac_t""no" 1>&6
19769 have_setproctitle=no
19770                         LIBOBJS="$LIBOBJS setproctitle.o"
19771                         LIBSRCS="$LIBSRCS setproctitle.c"
19772 fi
19773
19774 fi
19775
19776
19777         if test $have_setproctitle = yes ; then
19778                 cat >> confdefs.h <<\EOF
19779 #define HAVE_SETPROCTITLE 1
19780 EOF
19781
19782         fi
19783 fi
19784
19785 if test $ol_enable_slp != no ; then
19786         for ac_hdr in slp.h 
19787 do
19788 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19789 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19790 echo "configure:19791: checking for $ac_hdr" >&5
19791 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19792   echo $ac_n "(cached) $ac_c" 1>&6
19793 else
19794   cat > conftest.$ac_ext <<EOF
19795 #line 19796 "configure"
19796 #include "confdefs.h"
19797 #include <$ac_hdr>
19798 EOF
19799 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19800 { (eval echo configure:19801: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19801 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19802 if test -z "$ac_err"; then
19803   rm -rf conftest*
19804   eval "ac_cv_header_$ac_safe=yes"
19805 else
19806   echo "$ac_err" >&5
19807   echo "configure: failed program was:" >&5
19808   cat conftest.$ac_ext >&5
19809   rm -rf conftest*
19810   eval "ac_cv_header_$ac_safe=no"
19811 fi
19812 rm -f conftest*
19813 fi
19814 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19815   echo "$ac_t""yes" 1>&6
19816     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19817   cat >> confdefs.h <<EOF
19818 #define $ac_tr_hdr 1
19819 EOF
19820  
19821 else
19822   echo "$ac_t""no" 1>&6
19823 fi
19824 done
19825
19826
19827         if test $ac_cv_header_slp_h = yes ; then
19828                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
19829 echo "configure:19830: checking for SLPOpen in -lslp" >&5
19830 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
19831 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19832   echo $ac_n "(cached) $ac_c" 1>&6
19833 else
19834   ac_save_LIBS="$LIBS"
19835 LIBS="-lslp  $LIBS"
19836 cat > conftest.$ac_ext <<EOF
19837 #line 19838 "configure"
19838 #include "confdefs.h"
19839 /* Override any gcc2 internal prototype to avoid an error.  */
19840 /* We use char because int might match the return type of a gcc2
19841     builtin and then its argument prototype would still apply.  */
19842 char SLPOpen();
19843
19844 int main() {
19845 SLPOpen()
19846 ; return 0; }
19847 EOF
19848 if { (eval echo configure:19849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19849   rm -rf conftest*
19850   eval "ac_cv_lib_$ac_lib_var=yes"
19851 else
19852   echo "configure: failed program was:" >&5
19853   cat conftest.$ac_ext >&5
19854   rm -rf conftest*
19855   eval "ac_cv_lib_$ac_lib_var=no"
19856 fi
19857 rm -f conftest*
19858 LIBS="$ac_save_LIBS"
19859
19860 fi
19861 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19862   echo "$ac_t""yes" 1>&6
19863   have_slp=yes
19864 else
19865   echo "$ac_t""no" 1>&6
19866 have_slp=no
19867 fi
19868
19869                 if test $have_slp = yes ; then
19870                         cat >> confdefs.h <<\EOF
19871 #define HAVE_SLP 1
19872 EOF
19873
19874                         SLAPD_SLP_LIBS=-lslp
19875                 fi
19876
19877         elif test $ol_enable_slp = yes ; then
19878                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
19879         fi
19880 fi
19881
19882 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
19883 echo "configure:19884: checking for ANSI C header files" >&5
19884 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
19885   echo $ac_n "(cached) $ac_c" 1>&6
19886 else
19887   cat > conftest.$ac_ext <<EOF
19888 #line 19889 "configure"
19889 #include "confdefs.h"
19890 #include <stdlib.h>
19891 #include <stdarg.h>
19892 #include <string.h>
19893 #include <float.h>
19894 EOF
19895 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19896 { (eval echo configure:19897: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19897 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19898 if test -z "$ac_err"; then
19899   rm -rf conftest*
19900   ac_cv_header_stdc=yes
19901 else
19902   echo "$ac_err" >&5
19903   echo "configure: failed program was:" >&5
19904   cat conftest.$ac_ext >&5
19905   rm -rf conftest*
19906   ac_cv_header_stdc=no
19907 fi
19908 rm -f conftest*
19909
19910 if test $ac_cv_header_stdc = yes; then
19911   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
19912 cat > conftest.$ac_ext <<EOF
19913 #line 19914 "configure"
19914 #include "confdefs.h"
19915 #include <string.h>
19916 EOF
19917 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19918   egrep "memchr" >/dev/null 2>&1; then
19919   :
19920 else
19921   rm -rf conftest*
19922   ac_cv_header_stdc=no
19923 fi
19924 rm -f conftest*
19925
19926 fi
19927
19928 if test $ac_cv_header_stdc = yes; then
19929   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
19930 cat > conftest.$ac_ext <<EOF
19931 #line 19932 "configure"
19932 #include "confdefs.h"
19933 #include <stdlib.h>
19934 EOF
19935 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19936   egrep "free" >/dev/null 2>&1; then
19937   :
19938 else
19939   rm -rf conftest*
19940   ac_cv_header_stdc=no
19941 fi
19942 rm -f conftest*
19943
19944 fi
19945
19946 if test $ac_cv_header_stdc = yes; then
19947   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
19948 if test "$cross_compiling" = yes; then
19949   :
19950 else
19951   cat > conftest.$ac_ext <<EOF
19952 #line 19953 "configure"
19953 #include "confdefs.h"
19954 #include <ctype.h>
19955 #if ((' ' & 0x0FF) == 0x020)
19956 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
19957 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
19958 #else
19959 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
19960  || ('j' <= (c) && (c) <= 'r') \
19961  || ('s' <= (c) && (c) <= 'z'))
19962 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
19963 #endif
19964 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
19965 int main () { int i; for (i = 0; i < 256; i++)
19966 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
19967 exit (0); }
19968
19969 EOF
19970 if { (eval echo configure:19971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19971 then
19972   :
19973 else
19974   echo "configure: failed program was:" >&5
19975   cat conftest.$ac_ext >&5
19976   rm -fr conftest*
19977   ac_cv_header_stdc=no
19978 fi
19979 rm -fr conftest*
19980 fi
19981
19982 fi
19983 fi
19984
19985 echo "$ac_t""$ac_cv_header_stdc" 1>&6
19986 if test $ac_cv_header_stdc = yes; then
19987   cat >> confdefs.h <<\EOF
19988 #define STDC_HEADERS 1
19989 EOF
19990
19991 fi
19992
19993 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
19994 echo "configure:19995: checking for mode_t" >&5
19995 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
19996   echo $ac_n "(cached) $ac_c" 1>&6
19997 else
19998   cat > conftest.$ac_ext <<EOF
19999 #line 20000 "configure"
20000 #include "confdefs.h"
20001 #include <sys/types.h>
20002 #if STDC_HEADERS
20003 #include <stdlib.h>
20004 #include <stddef.h>
20005 #endif
20006
20007 EOF
20008 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20009   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20010   rm -rf conftest*
20011   eval "ac_cv_type_mode_t=yes"
20012 else
20013   rm -rf conftest*
20014   eval "ac_cv_type_mode_t=no"
20015 fi
20016 rm -f conftest*
20017
20018 fi
20019 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
20020   echo "$ac_t""yes" 1>&6
20021 else
20022   echo "$ac_t""no" 1>&6
20023   cat >> confdefs.h <<EOF
20024 #define mode_t int
20025 EOF
20026
20027 fi
20028
20029 echo $ac_n "checking for off_t""... $ac_c" 1>&6
20030 echo "configure:20031: checking for off_t" >&5
20031 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
20032   echo $ac_n "(cached) $ac_c" 1>&6
20033 else
20034   cat > conftest.$ac_ext <<EOF
20035 #line 20036 "configure"
20036 #include "confdefs.h"
20037 #include <sys/types.h>
20038 #if STDC_HEADERS
20039 #include <stdlib.h>
20040 #include <stddef.h>
20041 #endif
20042
20043 EOF
20044 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20045   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20046   rm -rf conftest*
20047   eval "ac_cv_type_off_t=yes"
20048 else
20049   rm -rf conftest*
20050   eval "ac_cv_type_off_t=no"
20051 fi
20052 rm -f conftest*
20053
20054 fi
20055 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
20056   echo "$ac_t""yes" 1>&6
20057 else
20058   echo "$ac_t""no" 1>&6
20059   cat >> confdefs.h <<EOF
20060 #define off_t long
20061 EOF
20062
20063 fi
20064
20065 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
20066 echo "configure:20067: checking for pid_t" >&5
20067 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
20068   echo $ac_n "(cached) $ac_c" 1>&6
20069 else
20070   cat > conftest.$ac_ext <<EOF
20071 #line 20072 "configure"
20072 #include "confdefs.h"
20073 #include <sys/types.h>
20074 #if STDC_HEADERS
20075 #include <stdlib.h>
20076 #include <stddef.h>
20077 #endif
20078
20079 EOF
20080 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20081   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20082   rm -rf conftest*
20083   eval "ac_cv_type_pid_t=yes"
20084 else
20085   rm -rf conftest*
20086   eval "ac_cv_type_pid_t=no"
20087 fi
20088 rm -f conftest*
20089
20090 fi
20091 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
20092   echo "$ac_t""yes" 1>&6
20093 else
20094   echo "$ac_t""no" 1>&6
20095   cat >> confdefs.h <<EOF
20096 #define pid_t int
20097 EOF
20098
20099 fi
20100
20101 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
20102 echo "configure:20103: checking for ptrdiff_t" >&5
20103 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
20104   echo $ac_n "(cached) $ac_c" 1>&6
20105 else
20106   cat > conftest.$ac_ext <<EOF
20107 #line 20108 "configure"
20108 #include "confdefs.h"
20109 #include <stddef.h>
20110 int main() {
20111 ptrdiff_t p
20112 ; return 0; }
20113 EOF
20114 if { (eval echo configure:20115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20115   rm -rf conftest*
20116   am_cv_type_ptrdiff_t=yes
20117 else
20118   echo "configure: failed program was:" >&5
20119   cat conftest.$ac_ext >&5
20120   rm -rf conftest*
20121   am_cv_type_ptrdiff_t=no
20122 fi
20123 rm -f conftest*
20124 fi
20125
20126 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
20127    if test $am_cv_type_ptrdiff_t = yes; then
20128      cat >> confdefs.h <<\EOF
20129 #define HAVE_PTRDIFF_T 1
20130 EOF
20131
20132    fi
20133
20134 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
20135 echo "configure:20136: checking return type of signal handlers" >&5
20136 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
20137   echo $ac_n "(cached) $ac_c" 1>&6
20138 else
20139   cat > conftest.$ac_ext <<EOF
20140 #line 20141 "configure"
20141 #include "confdefs.h"
20142 #include <sys/types.h>
20143 #include <signal.h>
20144 #ifdef signal
20145 #undef signal
20146 #endif
20147 #ifdef __cplusplus
20148 extern "C" void (*signal (int, void (*)(int)))(int);
20149 #else
20150 void (*signal ()) ();
20151 #endif
20152
20153 int main() {
20154 int i;
20155 ; return 0; }
20156 EOF
20157 if { (eval echo configure:20158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20158   rm -rf conftest*
20159   ac_cv_type_signal=void
20160 else
20161   echo "configure: failed program was:" >&5
20162   cat conftest.$ac_ext >&5
20163   rm -rf conftest*
20164   ac_cv_type_signal=int
20165 fi
20166 rm -f conftest*
20167 fi
20168
20169 echo "$ac_t""$ac_cv_type_signal" 1>&6
20170 cat >> confdefs.h <<EOF
20171 #define RETSIGTYPE $ac_cv_type_signal
20172 EOF
20173
20174
20175 echo $ac_n "checking for size_t""... $ac_c" 1>&6
20176 echo "configure:20177: checking for size_t" >&5
20177 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
20178   echo $ac_n "(cached) $ac_c" 1>&6
20179 else
20180   cat > conftest.$ac_ext <<EOF
20181 #line 20182 "configure"
20182 #include "confdefs.h"
20183 #include <sys/types.h>
20184 #if STDC_HEADERS
20185 #include <stdlib.h>
20186 #include <stddef.h>
20187 #endif
20188
20189 EOF
20190 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20191   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20192   rm -rf conftest*
20193   eval "ac_cv_type_size_t=yes"
20194 else
20195   rm -rf conftest*
20196   eval "ac_cv_type_size_t=no"
20197 fi
20198 rm -f conftest*
20199
20200 fi
20201 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
20202   echo "$ac_t""yes" 1>&6
20203 else
20204   echo "$ac_t""no" 1>&6
20205   cat >> confdefs.h <<EOF
20206 #define size_t unsigned
20207 EOF
20208
20209 fi
20210
20211
20212 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
20213 echo "configure:20214: checking for ssize_t" >&5
20214 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
20215   echo $ac_n "(cached) $ac_c" 1>&6
20216 else
20217   cat > conftest.$ac_ext <<EOF
20218 #line 20219 "configure"
20219 #include "confdefs.h"
20220 #include <sys/types.h>
20221 #if STDC_HEADERS
20222 #include <stdlib.h>
20223 #include <stddef.h>
20224 #endif
20225
20226 EOF
20227 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20228   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20229   rm -rf conftest*
20230   eval "ac_cv_type_ssize_t=yes"
20231 else
20232   rm -rf conftest*
20233   eval "ac_cv_type_ssize_t=no"
20234 fi
20235 rm -f conftest*
20236
20237 fi
20238 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
20239   echo "$ac_t""yes" 1>&6
20240 else
20241   echo "$ac_t""no" 1>&6
20242   cat >> confdefs.h <<EOF
20243 #define ssize_t signed int
20244 EOF
20245
20246 fi
20247
20248 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
20249 echo "configure:20250: checking for caddr_t" >&5
20250 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
20251   echo $ac_n "(cached) $ac_c" 1>&6
20252 else
20253   cat > conftest.$ac_ext <<EOF
20254 #line 20255 "configure"
20255 #include "confdefs.h"
20256 #include <sys/types.h>
20257 #if STDC_HEADERS
20258 #include <stdlib.h>
20259 #include <stddef.h>
20260 #endif
20261
20262 EOF
20263 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20264   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20265   rm -rf conftest*
20266   eval "ac_cv_type_caddr_t=yes"
20267 else
20268   rm -rf conftest*
20269   eval "ac_cv_type_caddr_t=no"
20270 fi
20271 rm -f conftest*
20272
20273 fi
20274 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
20275   echo "$ac_t""yes" 1>&6
20276 else
20277   echo "$ac_t""no" 1>&6
20278   cat >> confdefs.h <<EOF
20279 #define caddr_t char *
20280 EOF
20281
20282 fi
20283
20284
20285 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
20286 echo "configure:20287: checking for socklen_t" >&5
20287 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
20288   echo $ac_n "(cached) $ac_c" 1>&6
20289 else
20290   cat > conftest.$ac_ext <<EOF
20291 #line 20292 "configure"
20292 #include "confdefs.h"
20293
20294 #ifdef HAVE_SYS_TYPES_H
20295 #include <sys/types.h>
20296 #endif
20297 #ifdef HAVE_SYS_SOCKET_H
20298 #include <sys/socket.h>
20299 #endif
20300
20301 int main() {
20302 socklen_t len;
20303 ; return 0; }
20304 EOF
20305 if { (eval echo configure:20306: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20306   rm -rf conftest*
20307   ol_cv_type_socklen_t=yes
20308 else
20309   echo "configure: failed program was:" >&5
20310   cat conftest.$ac_ext >&5
20311   rm -rf conftest*
20312   ol_cv_type_socklen_t=no
20313 fi
20314 rm -f conftest*
20315 fi
20316
20317 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
20318   if test $ol_cv_type_socklen_t = no; then
20319     cat >> confdefs.h <<\EOF
20320 #define socklen_t int
20321 EOF
20322
20323   fi
20324  
20325 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
20326 echo "configure:20327: checking for member st_blksize in aggregate type struct stat" >&5
20327 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
20328   echo $ac_n "(cached) $ac_c" 1>&6
20329 else
20330   cat > conftest.$ac_ext <<EOF
20331 #line 20332 "configure"
20332 #include "confdefs.h"
20333 #include <sys/types.h>
20334 #include <sys/stat.h>
20335 int main() {
20336 struct stat foo; foo.st_blksize;
20337 ; return 0; }
20338 EOF
20339 if { (eval echo configure:20340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20340   rm -rf conftest*
20341   ac_cv_c_struct_member_st_blksize=yes
20342 else
20343   echo "configure: failed program was:" >&5
20344   cat conftest.$ac_ext >&5
20345   rm -rf conftest*
20346   ac_cv_c_struct_member_st_blksize=no
20347 fi
20348 rm -f conftest*
20349 fi
20350
20351 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
20352 st_blksize="$ac_cv_c_struct_member_st_blksize"
20353 if test $ac_cv_c_struct_member_st_blksize = yes; then
20354   cat >> confdefs.h <<\EOF
20355 #define HAVE_ST_BLKSIZE 1
20356 EOF
20357
20358 fi
20359
20360 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
20361 echo "configure:20362: checking whether time.h and sys/time.h may both be included" >&5
20362 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
20363   echo $ac_n "(cached) $ac_c" 1>&6
20364 else
20365   cat > conftest.$ac_ext <<EOF
20366 #line 20367 "configure"
20367 #include "confdefs.h"
20368 #include <sys/types.h>
20369 #include <sys/time.h>
20370 #include <time.h>
20371 int main() {
20372 struct tm *tp;
20373 ; return 0; }
20374 EOF
20375 if { (eval echo configure:20376: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20376   rm -rf conftest*
20377   ac_cv_header_time=yes
20378 else
20379   echo "configure: failed program was:" >&5
20380   cat conftest.$ac_ext >&5
20381   rm -rf conftest*
20382   ac_cv_header_time=no
20383 fi
20384 rm -f conftest*
20385 fi
20386
20387 echo "$ac_t""$ac_cv_header_time" 1>&6
20388 if test $ac_cv_header_time = yes; then
20389   cat >> confdefs.h <<\EOF
20390 #define TIME_WITH_SYS_TIME 1
20391 EOF
20392
20393 fi
20394
20395 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
20396 echo "configure:20397: checking whether struct tm is in sys/time.h or time.h" >&5
20397 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
20398   echo $ac_n "(cached) $ac_c" 1>&6
20399 else
20400   cat > conftest.$ac_ext <<EOF
20401 #line 20402 "configure"
20402 #include "confdefs.h"
20403 #include <sys/types.h>
20404 #include <time.h>
20405 int main() {
20406 struct tm *tp; tp->tm_sec;
20407 ; return 0; }
20408 EOF
20409 if { (eval echo configure:20410: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20410   rm -rf conftest*
20411   ac_cv_struct_tm=time.h
20412 else
20413   echo "configure: failed program was:" >&5
20414   cat conftest.$ac_ext >&5
20415   rm -rf conftest*
20416   ac_cv_struct_tm=sys/time.h
20417 fi
20418 rm -f conftest*
20419 fi
20420
20421 echo "$ac_t""$ac_cv_struct_tm" 1>&6
20422 if test $ac_cv_struct_tm = sys/time.h; then
20423   cat >> confdefs.h <<\EOF
20424 #define TM_IN_SYS_TIME 1
20425 EOF
20426
20427 fi
20428
20429 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
20430 echo "configure:20431: checking for uid_t in sys/types.h" >&5
20431 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
20432   echo $ac_n "(cached) $ac_c" 1>&6
20433 else
20434   cat > conftest.$ac_ext <<EOF
20435 #line 20436 "configure"
20436 #include "confdefs.h"
20437 #include <sys/types.h>
20438 EOF
20439 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20440   egrep "uid_t" >/dev/null 2>&1; then
20441   rm -rf conftest*
20442   ac_cv_type_uid_t=yes
20443 else
20444   rm -rf conftest*
20445   ac_cv_type_uid_t=no
20446 fi
20447 rm -f conftest*
20448
20449 fi
20450
20451 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
20452 if test $ac_cv_type_uid_t = no; then
20453   cat >> confdefs.h <<\EOF
20454 #define uid_t int
20455 EOF
20456
20457   cat >> confdefs.h <<\EOF
20458 #define gid_t int
20459 EOF
20460
20461 fi
20462
20463 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
20464 echo "configure:20465: checking for sig_atomic_t" >&5
20465 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
20466   echo $ac_n "(cached) $ac_c" 1>&6
20467 else
20468   cat > conftest.$ac_ext <<EOF
20469 #line 20470 "configure"
20470 #include "confdefs.h"
20471 #include <signal.h>
20472 int main() {
20473 sig_atomic_t atomic;
20474 ; return 0; }
20475 EOF
20476 if { (eval echo configure:20477: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20477   rm -rf conftest*
20478   ol_cv_type_sig_atomic_t=yes
20479 else
20480   echo "configure: failed program was:" >&5
20481   cat conftest.$ac_ext >&5
20482   rm -rf conftest*
20483   ol_cv_type_sig_atomic_t=no
20484 fi
20485 rm -f conftest*
20486 fi
20487
20488 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
20489   if test $ol_cv_type_sig_atomic_t = no; then
20490     cat >> confdefs.h <<\EOF
20491 #define sig_atomic_t int
20492 EOF
20493
20494   fi
20495  
20496
20497
20498 # test for pw_gecos in struct passwd
20499 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
20500 echo "configure:20501: checking struct passwd for pw_gecos" >&5
20501 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
20502   echo $ac_n "(cached) $ac_c" 1>&6
20503 else
20504   
20505         cat > conftest.$ac_ext <<EOF
20506 #line 20507 "configure"
20507 #include "confdefs.h"
20508 #include <pwd.h>
20509 int main() {
20510
20511         struct passwd pwd;
20512         pwd.pw_gecos = pwd.pw_name;
20513
20514 ; return 0; }
20515 EOF
20516 if { (eval echo configure:20517: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20517   rm -rf conftest*
20518   ol_cv_struct_passwd_pw_gecos=yes
20519 else
20520   echo "configure: failed program was:" >&5
20521   cat conftest.$ac_ext >&5
20522   rm -rf conftest*
20523   ol_cv_struct_passwd_pw_gecos=no
20524 fi
20525 rm -f conftest*
20526 fi
20527
20528 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
20529 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
20530         cat >> confdefs.h <<\EOF
20531 #define HAVE_PW_GECOS 1
20532 EOF
20533
20534 fi
20535
20536 # test for pw_passwd in struct passwd
20537 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
20538 echo "configure:20539: checking struct passwd for pw_passwd" >&5
20539 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
20540   echo $ac_n "(cached) $ac_c" 1>&6
20541 else
20542   
20543         cat > conftest.$ac_ext <<EOF
20544 #line 20545 "configure"
20545 #include "confdefs.h"
20546 #include <pwd.h>
20547 int main() {
20548
20549         struct passwd pwd;
20550         pwd.pw_passwd = pwd.pw_name;
20551
20552 ; return 0; }
20553 EOF
20554 if { (eval echo configure:20555: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20555   rm -rf conftest*
20556   ol_cv_struct_passwd_pw_passwd=yes
20557 else
20558   echo "configure: failed program was:" >&5
20559   cat conftest.$ac_ext >&5
20560   rm -rf conftest*
20561   ol_cv_struct_passwd_pw_passwd=no
20562 fi
20563 rm -f conftest*
20564 fi
20565
20566 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
20567 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
20568         cat >> confdefs.h <<\EOF
20569 #define HAVE_PW_PASSWD 1
20570 EOF
20571
20572 fi
20573
20574
20575 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
20576 echo "configure:20577: checking if toupper() requires islower()" >&5
20577 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
20578   echo $ac_n "(cached) $ac_c" 1>&6
20579 else
20580   
20581         if test "$cross_compiling" = yes; then
20582   ol_cv_c_upper_lower=safe
20583 else
20584   cat > conftest.$ac_ext <<EOF
20585 #line 20586 "configure"
20586 #include "confdefs.h"
20587
20588 #include <ctype.h>
20589 main()
20590 {
20591         if ('C' == toupper('C'))
20592                 exit(0);
20593         else
20594                 exit(1);
20595 }
20596 EOF
20597 if { (eval echo configure:20598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20598 then
20599   ol_cv_c_upper_lower=no
20600 else
20601   echo "configure: failed program was:" >&5
20602   cat conftest.$ac_ext >&5
20603   rm -fr conftest*
20604   ol_cv_c_upper_lower=yes
20605 fi
20606 rm -fr conftest*
20607 fi
20608
20609 fi
20610
20611 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
20612 if test $ol_cv_c_upper_lower != no ; then
20613         cat >> confdefs.h <<\EOF
20614 #define C_UPPER_LOWER 1
20615 EOF
20616
20617 fi
20618
20619 echo $ac_n "checking for working const""... $ac_c" 1>&6
20620 echo "configure:20621: checking for working const" >&5
20621 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
20622   echo $ac_n "(cached) $ac_c" 1>&6
20623 else
20624   cat > conftest.$ac_ext <<EOF
20625 #line 20626 "configure"
20626 #include "confdefs.h"
20627
20628 int main() {
20629
20630 /* Ultrix mips cc rejects this.  */
20631 typedef int charset[2]; const charset x;
20632 /* SunOS 4.1.1 cc rejects this.  */
20633 char const *const *ccp;
20634 char **p;
20635 /* NEC SVR4.0.2 mips cc rejects this.  */
20636 struct point {int x, y;};
20637 static struct point const zero = {0,0};
20638 /* AIX XL C 1.02.0.0 rejects this.
20639    It does not let you subtract one const X* pointer from another in an arm
20640    of an if-expression whose if-part is not a constant expression */
20641 const char *g = "string";
20642 ccp = &g + (g ? g-g : 0);
20643 /* HPUX 7.0 cc rejects these. */
20644 ++ccp;
20645 p = (char**) ccp;
20646 ccp = (char const *const *) p;
20647 { /* SCO 3.2v4 cc rejects this.  */
20648   char *t;
20649   char const *s = 0 ? (char *) 0 : (char const *) 0;
20650
20651   *t++ = 0;
20652 }
20653 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20654   int x[] = {25, 17};
20655   const int *foo = &x[0];
20656   ++foo;
20657 }
20658 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20659   typedef const int *iptr;
20660   iptr p = 0;
20661   ++p;
20662 }
20663 { /* AIX XL C 1.02.0.0 rejects this saying
20664      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20665   struct s { int j; const int *ap[3]; };
20666   struct s *b; b->j = 5;
20667 }
20668 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20669   const int foo = 10;
20670 }
20671
20672 ; return 0; }
20673 EOF
20674 if { (eval echo configure:20675: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20675   rm -rf conftest*
20676   ac_cv_c_const=yes
20677 else
20678   echo "configure: failed program was:" >&5
20679   cat conftest.$ac_ext >&5
20680   rm -rf conftest*
20681   ac_cv_c_const=no
20682 fi
20683 rm -f conftest*
20684 fi
20685
20686 echo "$ac_t""$ac_cv_c_const" 1>&6
20687 if test $ac_cv_c_const = no; then
20688   cat >> confdefs.h <<\EOF
20689 #define const 
20690 EOF
20691
20692 fi
20693
20694 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
20695 echo "configure:20696: checking if compiler understands volatile" >&5
20696 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
20697   echo $ac_n "(cached) $ac_c" 1>&6
20698 else
20699   cat > conftest.$ac_ext <<EOF
20700 #line 20701 "configure"
20701 #include "confdefs.h"
20702 int x, y, z;
20703 int main() {
20704 volatile int a; int * volatile b = x ? &y : &z;
20705       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
20706       *b = 0;
20707 ; return 0; }
20708 EOF
20709 if { (eval echo configure:20710: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20710   rm -rf conftest*
20711   ol_cv_c_volatile=yes
20712 else
20713   echo "configure: failed program was:" >&5
20714   cat conftest.$ac_ext >&5
20715   rm -rf conftest*
20716   ol_cv_c_volatile=no
20717 fi
20718 rm -f conftest*
20719 fi
20720
20721 echo "$ac_t""$ol_cv_c_volatile" 1>&6
20722   if test $ol_cv_c_volatile = yes; then
20723     : 
20724   else
20725     cat >> confdefs.h <<\EOF
20726 #define volatile 
20727 EOF
20728
20729   fi
20730  
20731
20732 if test $cross_compiling = yes ; then
20733         cat >> confdefs.h <<\EOF
20734 #define CROSS_COMPILING 1
20735 EOF
20736
20737 else
20738         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
20739 echo "configure:20740: checking whether byte ordering is bigendian" >&5
20740 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
20741   echo $ac_n "(cached) $ac_c" 1>&6
20742 else
20743   ac_cv_c_bigendian=unknown
20744 # See if sys/param.h defines the BYTE_ORDER macro.
20745 cat > conftest.$ac_ext <<EOF
20746 #line 20747 "configure"
20747 #include "confdefs.h"
20748 #include <sys/types.h>
20749 #include <sys/param.h>
20750 int main() {
20751
20752 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
20753  bogus endian macros
20754 #endif
20755 ; return 0; }
20756 EOF
20757 if { (eval echo configure:20758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20758   rm -rf conftest*
20759   # It does; now see whether it defined to BIG_ENDIAN or not.
20760 cat > conftest.$ac_ext <<EOF
20761 #line 20762 "configure"
20762 #include "confdefs.h"
20763 #include <sys/types.h>
20764 #include <sys/param.h>
20765 int main() {
20766
20767 #if BYTE_ORDER != BIG_ENDIAN
20768  not big endian
20769 #endif
20770 ; return 0; }
20771 EOF
20772 if { (eval echo configure:20773: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20773   rm -rf conftest*
20774   ac_cv_c_bigendian=yes
20775 else
20776   echo "configure: failed program was:" >&5
20777   cat conftest.$ac_ext >&5
20778   rm -rf conftest*
20779   ac_cv_c_bigendian=no
20780 fi
20781 rm -f conftest*
20782 else
20783   echo "configure: failed program was:" >&5
20784   cat conftest.$ac_ext >&5
20785 fi
20786 rm -f conftest*
20787 if test $ac_cv_c_bigendian = unknown; then
20788 if test "$cross_compiling" = yes; then
20789     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
20790 else
20791   cat > conftest.$ac_ext <<EOF
20792 #line 20793 "configure"
20793 #include "confdefs.h"
20794 main () {
20795   /* Are we little or big endian?  From Harbison&Steele.  */
20796   union
20797   {
20798     long l;
20799     char c[sizeof (long)];
20800   } u;
20801   u.l = 1;
20802   exit (u.c[sizeof (long) - 1] == 1);
20803 }
20804 EOF
20805 if { (eval echo configure:20806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20806 then
20807   ac_cv_c_bigendian=no
20808 else
20809   echo "configure: failed program was:" >&5
20810   cat conftest.$ac_ext >&5
20811   rm -fr conftest*
20812   ac_cv_c_bigendian=yes
20813 fi
20814 rm -fr conftest*
20815 fi
20816
20817 fi
20818 fi
20819
20820 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
20821 if test $ac_cv_c_bigendian = yes; then
20822   cat >> confdefs.h <<\EOF
20823 #define WORDS_BIGENDIAN 1
20824 EOF
20825
20826 fi
20827
20828 fi
20829
20830 echo $ac_n "checking size of short""... $ac_c" 1>&6
20831 echo "configure:20832: checking size of short" >&5 
20832 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
20833   echo $ac_n "(cached) $ac_c" 1>&6
20834 else
20835   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
20836   cat > conftest.$ac_ext <<EOF
20837 #line 20838 "configure"
20838 #include "confdefs.h"
20839 #include "confdefs.h" 
20840 #include <sys/types.h> 
20841  
20842
20843 int main() {
20844 switch (0) case 0: case (sizeof (short) == $ac_size):;
20845 ; return 0; }
20846 EOF
20847 if { (eval echo configure:20848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20848   rm -rf conftest*
20849   ac_cv_sizeof_short=$ac_size
20850 else
20851   echo "configure: failed program was:" >&5
20852   cat conftest.$ac_ext >&5
20853 fi
20854 rm -f conftest* 
20855   if test x$ac_cv_sizeof_short != x ; then break; fi 
20856 done 
20857
20858 fi
20859  
20860 if test x$ac_cv_sizeof_short = x ; then 
20861   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
20862 fi 
20863 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
20864 cat >> confdefs.h <<EOF
20865 #define SIZEOF_SHORT $ac_cv_sizeof_short
20866 EOF
20867  
20868  
20869 echo $ac_n "checking size of int""... $ac_c" 1>&6
20870 echo "configure:20871: checking size of int" >&5 
20871 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
20872   echo $ac_n "(cached) $ac_c" 1>&6
20873 else
20874   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
20875   cat > conftest.$ac_ext <<EOF
20876 #line 20877 "configure"
20877 #include "confdefs.h"
20878 #include "confdefs.h" 
20879 #include <sys/types.h> 
20880  
20881
20882 int main() {
20883 switch (0) case 0: case (sizeof (int) == $ac_size):;
20884 ; return 0; }
20885 EOF
20886 if { (eval echo configure:20887: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20887   rm -rf conftest*
20888   ac_cv_sizeof_int=$ac_size
20889 else
20890   echo "configure: failed program was:" >&5
20891   cat conftest.$ac_ext >&5
20892 fi
20893 rm -f conftest* 
20894   if test x$ac_cv_sizeof_int != x ; then break; fi 
20895 done 
20896
20897 fi
20898  
20899 if test x$ac_cv_sizeof_int = x ; then 
20900   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
20901 fi 
20902 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
20903 cat >> confdefs.h <<EOF
20904 #define SIZEOF_INT $ac_cv_sizeof_int
20905 EOF
20906  
20907  
20908 echo $ac_n "checking size of long""... $ac_c" 1>&6
20909 echo "configure:20910: checking size of long" >&5 
20910 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
20911   echo $ac_n "(cached) $ac_c" 1>&6
20912 else
20913   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
20914   cat > conftest.$ac_ext <<EOF
20915 #line 20916 "configure"
20916 #include "confdefs.h"
20917 #include "confdefs.h" 
20918 #include <sys/types.h> 
20919  
20920
20921 int main() {
20922 switch (0) case 0: case (sizeof (long) == $ac_size):;
20923 ; return 0; }
20924 EOF
20925 if { (eval echo configure:20926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20926   rm -rf conftest*
20927   ac_cv_sizeof_long=$ac_size
20928 else
20929   echo "configure: failed program was:" >&5
20930   cat conftest.$ac_ext >&5
20931 fi
20932 rm -f conftest* 
20933   if test x$ac_cv_sizeof_long != x ; then break; fi 
20934 done 
20935
20936 fi
20937  
20938 if test x$ac_cv_sizeof_long = x ; then 
20939   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
20940 fi 
20941 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
20942 cat >> confdefs.h <<EOF
20943 #define SIZEOF_LONG $ac_cv_sizeof_long
20944 EOF
20945  
20946
20947
20948 if test "$ac_cv_sizeof_int" -lt 4 ; then
20949         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
20950
20951         cat >> confdefs.h <<\EOF
20952 #define LBER_INT_T long
20953 EOF
20954
20955 else
20956         cat >> confdefs.h <<\EOF
20957 #define LBER_INT_T int
20958 EOF
20959
20960 fi
20961
20962 cat >> confdefs.h <<\EOF
20963 #define LBER_LEN_T long
20964 EOF
20965
20966 cat >> confdefs.h <<\EOF
20967 #define LBER_SOCKET_T int
20968 EOF
20969
20970 cat >> confdefs.h <<\EOF
20971 #define LBER_TAG_T long
20972 EOF
20973
20974
20975 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
20976 echo "configure:20977: checking for 8-bit clean memcmp" >&5
20977 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
20978   echo $ac_n "(cached) $ac_c" 1>&6
20979 else
20980   if test "$cross_compiling" = yes; then
20981   ac_cv_func_memcmp_clean=no
20982 else
20983   cat > conftest.$ac_ext <<EOF
20984 #line 20985 "configure"
20985 #include "confdefs.h"
20986
20987 main()
20988 {
20989   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
20990   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
20991 }
20992
20993 EOF
20994 if { (eval echo configure:20995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20995 then
20996   ac_cv_func_memcmp_clean=yes
20997 else
20998   echo "configure: failed program was:" >&5
20999   cat conftest.$ac_ext >&5
21000   rm -fr conftest*
21001   ac_cv_func_memcmp_clean=no
21002 fi
21003 rm -fr conftest*
21004 fi
21005
21006 fi
21007
21008 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
21009 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
21010
21011 echo $ac_n "checking for strftime""... $ac_c" 1>&6
21012 echo "configure:21013: checking for strftime" >&5
21013 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
21014   echo $ac_n "(cached) $ac_c" 1>&6
21015 else
21016   cat > conftest.$ac_ext <<EOF
21017 #line 21018 "configure"
21018 #include "confdefs.h"
21019 /* System header to define __stub macros and hopefully few prototypes,
21020     which can conflict with char strftime(); below.  */
21021 #include <assert.h>
21022 /* Override any gcc2 internal prototype to avoid an error.  */
21023 /* We use char because int might match the return type of a gcc2
21024     builtin and then its argument prototype would still apply.  */
21025 char strftime();
21026 char (*f)();
21027
21028 int main() {
21029
21030 /* The GNU C library defines this for functions which it implements
21031     to always fail with ENOSYS.  Some functions are actually named
21032     something starting with __ and the normal name is an alias.  */
21033 #if defined (__stub_strftime) || defined (__stub___strftime)
21034 choke me
21035 #else
21036 f = strftime;
21037 #endif
21038
21039 ; return 0; }
21040 EOF
21041 if { (eval echo configure:21042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21042   rm -rf conftest*
21043   eval "ac_cv_func_strftime=yes"
21044 else
21045   echo "configure: failed program was:" >&5
21046   cat conftest.$ac_ext >&5
21047   rm -rf conftest*
21048   eval "ac_cv_func_strftime=no"
21049 fi
21050 rm -f conftest*
21051 fi
21052
21053 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
21054   echo "$ac_t""yes" 1>&6
21055   cat >> confdefs.h <<\EOF
21056 #define HAVE_STRFTIME 1
21057 EOF
21058
21059 else
21060   echo "$ac_t""no" 1>&6
21061 # strftime is in -lintl on SCO UNIX.
21062 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
21063 echo "configure:21064: checking for strftime in -lintl" >&5
21064 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
21065 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21066   echo $ac_n "(cached) $ac_c" 1>&6
21067 else
21068   ac_save_LIBS="$LIBS"
21069 LIBS="-lintl  $LIBS"
21070 cat > conftest.$ac_ext <<EOF
21071 #line 21072 "configure"
21072 #include "confdefs.h"
21073 /* Override any gcc2 internal prototype to avoid an error.  */
21074 /* We use char because int might match the return type of a gcc2
21075     builtin and then its argument prototype would still apply.  */
21076 char strftime();
21077
21078 int main() {
21079 strftime()
21080 ; return 0; }
21081 EOF
21082 if { (eval echo configure:21083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21083   rm -rf conftest*
21084   eval "ac_cv_lib_$ac_lib_var=yes"
21085 else
21086   echo "configure: failed program was:" >&5
21087   cat conftest.$ac_ext >&5
21088   rm -rf conftest*
21089   eval "ac_cv_lib_$ac_lib_var=no"
21090 fi
21091 rm -f conftest*
21092 LIBS="$ac_save_LIBS"
21093
21094 fi
21095 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21096   echo "$ac_t""yes" 1>&6
21097   cat >> confdefs.h <<\EOF
21098 #define HAVE_STRFTIME 1
21099 EOF
21100
21101 LIBS="-lintl $LIBS"
21102 else
21103   echo "$ac_t""no" 1>&6
21104 fi
21105
21106 fi
21107
21108
21109 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
21110 echo "configure:21111: checking for inet_aton()" >&5
21111 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
21112   echo $ac_n "(cached) $ac_c" 1>&6
21113 else
21114   cat > conftest.$ac_ext <<EOF
21115 #line 21116 "configure"
21116 #include "confdefs.h"
21117
21118 #ifdef HAVE_SYS_TYPES_H
21119 #       include <sys/types.h>
21120 #endif
21121 #ifdef HAVE_SYS_SOCKET_H
21122 #       include <sys/socket.h>
21123 #       ifdef HAVE_SYS_SELECT_H
21124 #               include <sys/select.h>
21125 #       endif
21126 #       include <netinet/in.h>
21127 #       ifdef HAVE_ARPA_INET_H
21128 #               include <arpa/inet.h>
21129 #       endif
21130 #endif
21131
21132 int main() {
21133 struct in_addr in;
21134 int rc = inet_aton( "255.255.255.255", &in );
21135 ; return 0; }
21136 EOF
21137 if { (eval echo configure:21138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21138   rm -rf conftest*
21139   ol_cv_func_inet_aton=yes
21140 else
21141   echo "configure: failed program was:" >&5
21142   cat conftest.$ac_ext >&5
21143   rm -rf conftest*
21144   ol_cv_func_inet_aton=no
21145 fi
21146 rm -f conftest*
21147 fi
21148
21149 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
21150   if test $ol_cv_func_inet_aton != no; then
21151     cat >> confdefs.h <<\EOF
21152 #define HAVE_INET_ATON 1
21153 EOF
21154
21155   fi
21156  
21157
21158 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
21159 echo "configure:21160: checking for _spawnlp" >&5
21160 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
21161   echo $ac_n "(cached) $ac_c" 1>&6
21162 else
21163   cat > conftest.$ac_ext <<EOF
21164 #line 21165 "configure"
21165 #include "confdefs.h"
21166 /* System header to define __stub macros and hopefully few prototypes,
21167     which can conflict with char _spawnlp(); below.  */
21168 #include <assert.h>
21169 /* Override any gcc2 internal prototype to avoid an error.  */
21170 /* We use char because int might match the return type of a gcc2
21171     builtin and then its argument prototype would still apply.  */
21172 char _spawnlp();
21173 char (*f)();
21174
21175 int main() {
21176
21177 /* The GNU C library defines this for functions which it implements
21178     to always fail with ENOSYS.  Some functions are actually named
21179     something starting with __ and the normal name is an alias.  */
21180 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
21181 choke me
21182 #else
21183 f = _spawnlp;
21184 #endif
21185
21186 ; return 0; }
21187 EOF
21188 if { (eval echo configure:21189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21189   rm -rf conftest*
21190   eval "ac_cv_func__spawnlp=yes"
21191 else
21192   echo "configure: failed program was:" >&5
21193   cat conftest.$ac_ext >&5
21194   rm -rf conftest*
21195   eval "ac_cv_func__spawnlp=no"
21196 fi
21197 rm -f conftest*
21198 fi
21199
21200 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
21201   echo "$ac_t""yes" 1>&6
21202   cat >> confdefs.h <<\EOF
21203 #define HAVE_SPAWNLP 1
21204 EOF
21205
21206 else
21207   echo "$ac_t""no" 1>&6
21208 fi
21209
21210
21211 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
21212 echo "configure:21213: checking for _snprintf" >&5
21213 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
21214   echo $ac_n "(cached) $ac_c" 1>&6
21215 else
21216   cat > conftest.$ac_ext <<EOF
21217 #line 21218 "configure"
21218 #include "confdefs.h"
21219 /* System header to define __stub macros and hopefully few prototypes,
21220     which can conflict with char _snprintf(); below.  */
21221 #include <assert.h>
21222 /* Override any gcc2 internal prototype to avoid an error.  */
21223 /* We use char because int might match the return type of a gcc2
21224     builtin and then its argument prototype would still apply.  */
21225 char _snprintf();
21226 char (*f)();
21227
21228 int main() {
21229
21230 /* The GNU C library defines this for functions which it implements
21231     to always fail with ENOSYS.  Some functions are actually named
21232     something starting with __ and the normal name is an alias.  */
21233 #if defined (__stub__snprintf) || defined (__stub____snprintf)
21234 choke me
21235 #else
21236 f = _snprintf;
21237 #endif
21238
21239 ; return 0; }
21240 EOF
21241 if { (eval echo configure:21242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21242   rm -rf conftest*
21243   eval "ac_cv_func__snprintf=yes"
21244 else
21245   echo "configure: failed program was:" >&5
21246   cat conftest.$ac_ext >&5
21247   rm -rf conftest*
21248   eval "ac_cv_func__snprintf=no"
21249 fi
21250 rm -f conftest*
21251 fi
21252
21253 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
21254   echo "$ac_t""yes" 1>&6
21255   ac_cv_func_snprintf=yes
21256         cat >> confdefs.h <<\EOF
21257 #define snprintf _snprintf
21258 EOF
21259
21260
21261 else
21262   echo "$ac_t""no" 1>&6
21263 fi
21264
21265
21266 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
21267 echo "configure:21268: checking for _vsnprintf" >&5
21268 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
21269   echo $ac_n "(cached) $ac_c" 1>&6
21270 else
21271   cat > conftest.$ac_ext <<EOF
21272 #line 21273 "configure"
21273 #include "confdefs.h"
21274 /* System header to define __stub macros and hopefully few prototypes,
21275     which can conflict with char _vsnprintf(); below.  */
21276 #include <assert.h>
21277 /* Override any gcc2 internal prototype to avoid an error.  */
21278 /* We use char because int might match the return type of a gcc2
21279     builtin and then its argument prototype would still apply.  */
21280 char _vsnprintf();
21281 char (*f)();
21282
21283 int main() {
21284
21285 /* The GNU C library defines this for functions which it implements
21286     to always fail with ENOSYS.  Some functions are actually named
21287     something starting with __ and the normal name is an alias.  */
21288 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
21289 choke me
21290 #else
21291 f = _vsnprintf;
21292 #endif
21293
21294 ; return 0; }
21295 EOF
21296 if { (eval echo configure:21297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21297   rm -rf conftest*
21298   eval "ac_cv_func__vsnprintf=yes"
21299 else
21300   echo "configure: failed program was:" >&5
21301   cat conftest.$ac_ext >&5
21302   rm -rf conftest*
21303   eval "ac_cv_func__vsnprintf=no"
21304 fi
21305 rm -f conftest*
21306 fi
21307
21308 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
21309   echo "$ac_t""yes" 1>&6
21310   ac_cv_func_vsnprintf=yes
21311         cat >> confdefs.h <<\EOF
21312 #define vsnprintf _vsnprintf
21313 EOF
21314
21315
21316 else
21317   echo "$ac_t""no" 1>&6
21318 fi
21319
21320
21321 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
21322 echo "configure:21323: checking for vprintf" >&5
21323 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
21324   echo $ac_n "(cached) $ac_c" 1>&6
21325 else
21326   cat > conftest.$ac_ext <<EOF
21327 #line 21328 "configure"
21328 #include "confdefs.h"
21329 /* System header to define __stub macros and hopefully few prototypes,
21330     which can conflict with char vprintf(); below.  */
21331 #include <assert.h>
21332 /* Override any gcc2 internal prototype to avoid an error.  */
21333 /* We use char because int might match the return type of a gcc2
21334     builtin and then its argument prototype would still apply.  */
21335 char vprintf();
21336 char (*f)();
21337
21338 int main() {
21339
21340 /* The GNU C library defines this for functions which it implements
21341     to always fail with ENOSYS.  Some functions are actually named
21342     something starting with __ and the normal name is an alias.  */
21343 #if defined (__stub_vprintf) || defined (__stub___vprintf)
21344 choke me
21345 #else
21346 f = vprintf;
21347 #endif
21348
21349 ; return 0; }
21350 EOF
21351 if { (eval echo configure:21352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21352   rm -rf conftest*
21353   eval "ac_cv_func_vprintf=yes"
21354 else
21355   echo "configure: failed program was:" >&5
21356   cat conftest.$ac_ext >&5
21357   rm -rf conftest*
21358   eval "ac_cv_func_vprintf=no"
21359 fi
21360 rm -f conftest*
21361 fi
21362
21363 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
21364   echo "$ac_t""yes" 1>&6
21365   cat >> confdefs.h <<\EOF
21366 #define HAVE_VPRINTF 1
21367 EOF
21368
21369 else
21370   echo "$ac_t""no" 1>&6
21371 fi
21372
21373 if test "$ac_cv_func_vprintf" != yes; then
21374 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
21375 echo "configure:21376: checking for _doprnt" >&5
21376 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
21377   echo $ac_n "(cached) $ac_c" 1>&6
21378 else
21379   cat > conftest.$ac_ext <<EOF
21380 #line 21381 "configure"
21381 #include "confdefs.h"
21382 /* System header to define __stub macros and hopefully few prototypes,
21383     which can conflict with char _doprnt(); below.  */
21384 #include <assert.h>
21385 /* Override any gcc2 internal prototype to avoid an error.  */
21386 /* We use char because int might match the return type of a gcc2
21387     builtin and then its argument prototype would still apply.  */
21388 char _doprnt();
21389 char (*f)();
21390
21391 int main() {
21392
21393 /* The GNU C library defines this for functions which it implements
21394     to always fail with ENOSYS.  Some functions are actually named
21395     something starting with __ and the normal name is an alias.  */
21396 #if defined (__stub__doprnt) || defined (__stub____doprnt)
21397 choke me
21398 #else
21399 f = _doprnt;
21400 #endif
21401
21402 ; return 0; }
21403 EOF
21404 if { (eval echo configure:21405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21405   rm -rf conftest*
21406   eval "ac_cv_func__doprnt=yes"
21407 else
21408   echo "configure: failed program was:" >&5
21409   cat conftest.$ac_ext >&5
21410   rm -rf conftest*
21411   eval "ac_cv_func__doprnt=no"
21412 fi
21413 rm -f conftest*
21414 fi
21415
21416 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
21417   echo "$ac_t""yes" 1>&6
21418   cat >> confdefs.h <<\EOF
21419 #define HAVE_DOPRNT 1
21420 EOF
21421
21422 else
21423   echo "$ac_t""no" 1>&6
21424 fi
21425
21426 fi
21427
21428
21429 if test $ac_cv_func_vprintf = yes ; then
21430                 for ac_func in vsnprintf vsprintf
21431 do
21432 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
21433 echo "configure:21434: checking for $ac_func" >&5
21434 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
21435   echo $ac_n "(cached) $ac_c" 1>&6
21436 else
21437   cat > conftest.$ac_ext <<EOF
21438 #line 21439 "configure"
21439 #include "confdefs.h"
21440 /* System header to define __stub macros and hopefully few prototypes,
21441     which can conflict with char $ac_func(); below.  */
21442 #include <assert.h>
21443 /* Override any gcc2 internal prototype to avoid an error.  */
21444 /* We use char because int might match the return type of a gcc2
21445     builtin and then its argument prototype would still apply.  */
21446 char $ac_func();
21447 char (*f)();
21448
21449 int main() {
21450
21451 /* The GNU C library defines this for functions which it implements
21452     to always fail with ENOSYS.  Some functions are actually named
21453     something starting with __ and the normal name is an alias.  */
21454 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21455 choke me
21456 #else
21457 f = $ac_func;
21458 #endif
21459
21460 ; return 0; }
21461 EOF
21462 if { (eval echo configure:21463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21463   rm -rf conftest*
21464   eval "ac_cv_func_$ac_func=yes"
21465 else
21466   echo "configure: failed program was:" >&5
21467   cat conftest.$ac_ext >&5
21468   rm -rf conftest*
21469   eval "ac_cv_func_$ac_func=no"
21470 fi
21471 rm -f conftest*
21472 fi
21473
21474 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
21475   echo "$ac_t""yes" 1>&6
21476     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
21477   cat >> confdefs.h <<EOF
21478 #define $ac_tr_func 1
21479 EOF
21480  
21481 else
21482   echo "$ac_t""no" 1>&6
21483 fi
21484 done
21485
21486 fi
21487
21488 for ac_func in \
21489         bcopy                   \
21490         closesocket             \
21491         chroot                  \
21492         endgrent                \
21493         endpwent                \
21494         fcntl                   \
21495         flock                   \
21496         getdtablesize   \
21497         getgrgid                \
21498         gethostname             \
21499         getpass                 \
21500         getpassphrase   \
21501         getpwuid                \
21502         getpwnam                \
21503         getspnam                \
21504         gettimeofday    \
21505         initgroups              \
21506         lockf                   \
21507         memcpy                  \
21508         memmove                 \
21509         mkstemp                 \
21510         mktemp                  \
21511         pipe                    \
21512         read                    \
21513         recv                    \
21514         recvfrom                \
21515         setpwfile               \
21516         setgid                  \
21517         setegid                 \
21518         setsid                  \
21519         setuid                  \
21520         seteuid                 \
21521         sigaction               \
21522         signal                  \
21523         sigset                  \
21524         strdup                  \
21525         strerror                \
21526         strpbrk                 \
21527         strrchr                 \
21528         strsep                  \
21529         strstr                  \
21530         strtol                  \
21531         strtoul                 \
21532         strspn                  \
21533         sysconf                 \
21534         usleep                  \
21535         waitpid                 \
21536         wait4                   \
21537         write                   \
21538         send                    \
21539         sendto                  \
21540
21541 do
21542 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
21543 echo "configure:21544: checking for $ac_func" >&5
21544 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
21545   echo $ac_n "(cached) $ac_c" 1>&6
21546 else
21547   cat > conftest.$ac_ext <<EOF
21548 #line 21549 "configure"
21549 #include "confdefs.h"
21550 /* System header to define __stub macros and hopefully few prototypes,
21551     which can conflict with char $ac_func(); below.  */
21552 #include <assert.h>
21553 /* Override any gcc2 internal prototype to avoid an error.  */
21554 /* We use char because int might match the return type of a gcc2
21555     builtin and then its argument prototype would still apply.  */
21556 char $ac_func();
21557 char (*f)();
21558
21559 int main() {
21560
21561 /* The GNU C library defines this for functions which it implements
21562     to always fail with ENOSYS.  Some functions are actually named
21563     something starting with __ and the normal name is an alias.  */
21564 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21565 choke me
21566 #else
21567 f = $ac_func;
21568 #endif
21569
21570 ; return 0; }
21571 EOF
21572 if { (eval echo configure:21573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21573   rm -rf conftest*
21574   eval "ac_cv_func_$ac_func=yes"
21575 else
21576   echo "configure: failed program was:" >&5
21577   cat conftest.$ac_ext >&5
21578   rm -rf conftest*
21579   eval "ac_cv_func_$ac_func=no"
21580 fi
21581 rm -f conftest*
21582 fi
21583
21584 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
21585   echo "$ac_t""yes" 1>&6
21586     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
21587   cat >> confdefs.h <<EOF
21588 #define $ac_tr_func 1
21589 EOF
21590  
21591 else
21592   echo "$ac_t""no" 1>&6
21593 fi
21594 done
21595
21596
21597 for ac_func in getopt
21598 do
21599 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
21600 echo "configure:21601: checking for $ac_func" >&5
21601 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
21602   echo $ac_n "(cached) $ac_c" 1>&6
21603 else
21604   cat > conftest.$ac_ext <<EOF
21605 #line 21606 "configure"
21606 #include "confdefs.h"
21607 /* System header to define __stub macros and hopefully few prototypes,
21608     which can conflict with char $ac_func(); below.  */
21609 #include <assert.h>
21610 /* Override any gcc2 internal prototype to avoid an error.  */
21611 /* We use char because int might match the return type of a gcc2
21612     builtin and then its argument prototype would still apply.  */
21613 char $ac_func();
21614 char (*f)();
21615
21616 int main() {
21617
21618 /* The GNU C library defines this for functions which it implements
21619     to always fail with ENOSYS.  Some functions are actually named
21620     something starting with __ and the normal name is an alias.  */
21621 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21622 choke me
21623 #else
21624 f = $ac_func;
21625 #endif
21626
21627 ; return 0; }
21628 EOF
21629 if { (eval echo configure:21630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21630   rm -rf conftest*
21631   eval "ac_cv_func_$ac_func=yes"
21632 else
21633   echo "configure: failed program was:" >&5
21634   cat conftest.$ac_ext >&5
21635   rm -rf conftest*
21636   eval "ac_cv_func_$ac_func=no"
21637 fi
21638 rm -f conftest*
21639 fi
21640
21641 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
21642   echo "$ac_t""yes" 1>&6
21643     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
21644   cat >> confdefs.h <<EOF
21645 #define $ac_tr_func 1
21646 EOF
21647  
21648 else
21649   echo "$ac_t""no" 1>&6
21650 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
21651 fi
21652 done
21653
21654
21655
21656 if test "$ac_cv_func_getopt" != yes; then
21657         LIBSRCS="$LIBSRCS getopt.c"
21658 fi
21659
21660 # Check Configuration
21661 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
21662 echo "configure:21663: checking declaration of sys_errlist" >&5
21663 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
21664   echo $ac_n "(cached) $ac_c" 1>&6
21665 else
21666   
21667         cat > conftest.$ac_ext <<EOF
21668 #line 21669 "configure"
21669 #include "confdefs.h"
21670
21671 #include <stdio.h>
21672 #include <sys/types.h>
21673 #include <errno.h>
21674 #ifdef WINNT
21675 #include <stdlib.h>
21676 #endif 
21677 int main() {
21678 char *c = (char *) *sys_errlist
21679 ; return 0; }
21680 EOF
21681 if { (eval echo configure:21682: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21682   rm -rf conftest*
21683   ol_cv_dcl_sys_errlist=yes
21684         ol_cv_have_sys_errlist=yes
21685 else
21686   echo "configure: failed program was:" >&5
21687   cat conftest.$ac_ext >&5
21688   rm -rf conftest*
21689   ol_cv_dcl_sys_errlist=no
21690 fi
21691 rm -f conftest*
21692 fi
21693
21694 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
21695 #
21696 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
21697 if test $ol_cv_dcl_sys_errlist = no ; then
21698         cat >> confdefs.h <<\EOF
21699 #define DECL_SYS_ERRLIST 1
21700 EOF
21701
21702
21703         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
21704 echo "configure:21705: checking existence of sys_errlist" >&5
21705 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
21706   echo $ac_n "(cached) $ac_c" 1>&6
21707 else
21708   
21709                 cat > conftest.$ac_ext <<EOF
21710 #line 21711 "configure"
21711 #include "confdefs.h"
21712 #include <errno.h>
21713 int main() {
21714 char *c = (char *) *sys_errlist
21715 ; return 0; }
21716 EOF
21717 if { (eval echo configure:21718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21718   rm -rf conftest*
21719   ol_cv_have_sys_errlist=yes
21720 else
21721   echo "configure: failed program was:" >&5
21722   cat conftest.$ac_ext >&5
21723   rm -rf conftest*
21724   ol_cv_have_sys_errlist=no
21725 fi
21726 rm -f conftest*
21727 fi
21728
21729 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
21730 fi
21731 if test $ol_cv_have_sys_errlist = yes ; then
21732         cat >> confdefs.h <<\EOF
21733 #define HAVE_SYS_ERRLIST 1
21734 EOF
21735
21736 fi
21737
21738
21739
21740 if test "$ol_enable_debug" != no ; then
21741         cat >> confdefs.h <<\EOF
21742 #define LDAP_DEBUG 1
21743 EOF
21744
21745 fi
21746 if test "$ol_enable_syslog" = yes ; then
21747         cat >> confdefs.h <<\EOF
21748 #define LDAP_SYSLOG 1
21749 EOF
21750
21751 fi
21752 if test "$ol_enable_cache" = no ; then
21753         cat >> confdefs.h <<\EOF
21754 #define LDAP_NOCACHE 1
21755 EOF
21756
21757 fi
21758 if test "$ol_link_kbind" != no ; then
21759         cat >> confdefs.h <<\EOF
21760 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
21761 EOF
21762
21763 fi
21764 if test "$ol_enable_proctitle" != no ; then
21765         cat >> confdefs.h <<\EOF
21766 #define LDAP_PROCTITLE 1
21767 EOF
21768
21769 fi
21770 if test "$ol_enable_referrals" != no ; then
21771         cat >> confdefs.h <<\EOF
21772 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
21773 EOF
21774
21775 fi
21776 if test "$ol_enable_local" != no; then
21777         cat >> confdefs.h <<\EOF
21778 #define LDAP_PF_LOCAL 1
21779 EOF
21780
21781 fi
21782 if test "$ol_link_ipv6" != no; then
21783         cat >> confdefs.h <<\EOF
21784 #define LDAP_PF_INET6 1
21785 EOF
21786
21787 fi
21788 if test "$ol_enable_cleartext" != no ; then
21789         cat >> confdefs.h <<\EOF
21790 #define SLAPD_CLEARTEXT 1
21791 EOF
21792
21793 fi
21794 if test "$ol_enable_crypt" != no ; then
21795         cat >> confdefs.h <<\EOF
21796 #define SLAPD_CRYPT 1
21797 EOF
21798
21799 fi
21800 if test "$ol_link_kpasswd" != no ; then
21801         cat >> confdefs.h <<\EOF
21802 #define SLAPD_KPASSWD 1
21803 EOF
21804
21805 fi
21806 if test "$ol_link_spasswd" != no ; then
21807         cat >> confdefs.h <<\EOF
21808 #define SLAPD_SPASSWD 1
21809 EOF
21810
21811 fi
21812 if test "$ol_enable_phonetic" != no ; then
21813         cat >> confdefs.h <<\EOF
21814 #define SLAPD_PHONETIC 1
21815 EOF
21816
21817 fi
21818 if test "$ol_enable_rlookups" != no ; then
21819         cat >> confdefs.h <<\EOF
21820 #define SLAPD_RLOOKUPS 1
21821 EOF
21822
21823 fi
21824 if test "$ol_enable_aci" != no ; then
21825         cat >> confdefs.h <<\EOF
21826 #define SLAPD_ACI_ENABLED 1
21827 EOF
21828
21829 fi
21830
21831 if test "$ol_link_modules" != no ; then
21832         cat >> confdefs.h <<\EOF
21833 #define SLAPD_MODULES 1
21834 EOF
21835
21836         BUILD_SLAPD=yes
21837         SLAPD_MODULES_LDFLAGS="-dlopen self"
21838 fi
21839
21840 if test "$ol_enable_bdb" != no ; then
21841         cat >> confdefs.h <<\EOF
21842 #define SLAPD_BDB 1
21843 EOF
21844
21845         BUILD_SLAPD=yes
21846         BUILD_BDB=yes
21847         if test "$ol_with_bdb_module" != static ; then
21848                 cat >> confdefs.h <<\EOF
21849 #define SLAPD_BDB_DYNAMIC 1
21850 EOF
21851
21852                 BUILD_BDB=mod
21853                 BUILD_BDB_DYNAMIC=shared
21854                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb/back_bdb.la"
21855                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
21856         else
21857                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
21858         fi
21859 fi
21860
21861 if test "$ol_link_dnssrv" != no ; then
21862         cat >> confdefs.h <<\EOF
21863 #define SLAPD_DNSSRV 1
21864 EOF
21865
21866         BUILD_SLAPD=yes
21867         BUILD_DNSSRV=yes
21868         if test "$ol_with_dnssrv_module" != static ; then
21869                 cat >> confdefs.h <<\EOF
21870 #define SLAPD_DNSSRV_DYNAMIC 1
21871 EOF
21872
21873                 BUILD_DNSSRV=mod
21874                 BUILD_DNSSRV_DYNAMIC=shared
21875                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
21876                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
21877         else
21878                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
21879         fi
21880 fi
21881
21882 if test "$ol_enable_ldap" != no ; then
21883         cat >> confdefs.h <<\EOF
21884 #define SLAPD_LDAP 1
21885 EOF
21886
21887         BUILD_SLAPD=yes
21888         BUILD_LDAP=yes
21889         if test "$ol_with_ldap_module" != static ; then
21890                 cat >> confdefs.h <<\EOF
21891 #define SLAPD_LDAP_DYNAMIC 1
21892 EOF
21893
21894                 BUILD_LDAP=mod
21895                 BUILD_LDAP_DYNAMIC=shared
21896                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
21897                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
21898         else
21899                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
21900         fi
21901 fi
21902
21903 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
21904         cat >> confdefs.h <<\EOF
21905 #define SLAPD_LDBM 1
21906 EOF
21907
21908         BUILD_SLAPD=yes
21909         BUILD_LDBM=yes
21910         LDBM_LIB="-lldbm"
21911         if test "$ol_with_ldbm_module" != static ; then
21912                 cat >> confdefs.h <<\EOF
21913 #define SLAPD_LDBM_DYNAMIC 1
21914 EOF
21915
21916                 BUILD_LDBM=mod
21917                 BUILD_LDBM_DYNAMIC=shared
21918                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
21919                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
21920         else
21921                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
21922         fi
21923 fi
21924
21925 if test "$ol_enable_meta" != no ; then
21926         if test "$ol_enable_ldap" = no ; then
21927                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
21928         fi
21929         if test "$ol_enable_rewrite" = no ; then
21930                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
21931         fi
21932         cat >> confdefs.h <<\EOF
21933 #define SLAPD_META 1
21934 EOF
21935
21936         BUILD_SLAPD=yes
21937         BUILD_META=yes
21938         if test "$ol_with_meta_module" != static ; then
21939                 cat >> confdefs.h <<\EOF
21940 #define SLAPD_META_DYNAMIC 1
21941 EOF
21942
21943                 BUILD_META=mod
21944                 BUILD_META_DYNAMIC=shared
21945                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-meta/back_meta.la"
21946                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
21947         else
21948                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
21949         fi
21950 fi
21951
21952 if test "$ol_enable_monitor" != no ; then
21953         cat >> confdefs.h <<\EOF
21954 #define SLAPD_MONITOR 1
21955 EOF
21956
21957         BUILD_SLAPD=yes
21958         BUILD_MONITOR=yes
21959         if test "$ol_with_monitor_module" != static ; then
21960                 cat >> confdefs.h <<\EOF
21961 #define SLAPD_MONITOR_DYNAMIC 1
21962 EOF
21963
21964                 BUILD_MONITOR=mod
21965                 BUILD_MONITOR_DYNAMIC=shared
21966                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-monitor/back_monitor.la"
21967                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
21968         else
21969                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
21970         fi
21971 fi
21972
21973 if test "$ol_enable_passwd" != no ; then
21974         cat >> confdefs.h <<\EOF
21975 #define SLAPD_PASSWD 1
21976 EOF
21977
21978         BUILD_SLAPD=yes
21979         BUILD_PASSWD=yes
21980         if test "$ol_with_passwd_module" != static ; then
21981                 cat >> confdefs.h <<\EOF
21982 #define SLAPD_PASSWD_DYNAMIC 1
21983 EOF
21984
21985                 BUILD_PASSWD=mod
21986                 BUILD_PASSWD_DYNAMIC=shared
21987                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
21988                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
21989         else
21990                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
21991         fi
21992 fi
21993
21994 if test "$ol_link_perl" != no ; then
21995         cat >> confdefs.h <<\EOF
21996 #define SLAPD_PERL 1
21997 EOF
21998
21999         BUILD_SLAPD=yes
22000         BUILD_PERL=yes
22001         if test "$ol_with_perl_module" != static ; then
22002                 cat >> confdefs.h <<\EOF
22003 #define SLAPD_PERL_DYNAMIC 1
22004 EOF
22005
22006                 BUILD_PERL=mod
22007                 BUILD_PERL_DYNAMIC=shared
22008                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
22009                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
22010         else
22011                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
22012         fi
22013 fi
22014
22015 if test "$ol_enable_shell" != no ; then
22016         cat >> confdefs.h <<\EOF
22017 #define SLAPD_SHELL 1
22018 EOF
22019
22020         BUILD_SLAPD=yes
22021         BUILD_SHELL=yes
22022         if test "$ol_with_shell_module" != static ; then
22023                 cat >> confdefs.h <<\EOF
22024 #define SLAPD_SHELL_DYNAMIC 1
22025 EOF
22026
22027                 BUILD_SHELL=mod
22028                 BUILD_SHELL_DYNAMIC=shared
22029                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
22030                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
22031         else
22032                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
22033         fi
22034 fi
22035
22036 if test "$ol_enable_tcl" != no ; then
22037         cat >> confdefs.h <<\EOF
22038 #define SLAPD_TCL 1
22039 EOF
22040
22041         BUILD_SLAPD=yes
22042         BUILD_TCL=yes
22043         if test "$ol_with_tcl_module" != static; then
22044                 cat >> confdefs.h <<\EOF
22045 #define SLAPD_TCL_DYNAMIC 1
22046 EOF
22047
22048                 BUILD_TCL=mod
22049                 BUILD_TCL_DYNAMIC=shared
22050                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
22051                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-tcl"
22052         else
22053                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-tcl"
22054         fi
22055 fi
22056
22057 if test "$ol_link_sql" != no ; then
22058         cat >> confdefs.h <<\EOF
22059 #define SLAPD_SQL 1
22060 EOF
22061
22062         BUILD_SLAPD=yes
22063         BUILD_SQL=yes
22064         if test "$ol_with_sql_module" != static; then
22065                 cat >> confdefs.h <<\EOF
22066 #define SLAPD_SQL_DYNAMIC 1
22067 EOF
22068
22069                 BUILD_SQL=mod
22070                 BUILD_SQL_DYNAMIC=shared
22071                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
22072                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
22073         else
22074                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
22075         fi
22076 fi
22077
22078 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
22079         $BUILD_SLAPD = yes ; then
22080         BUILD_SLURPD=yes
22081 fi
22082
22083 if test "$ol_enable_rewrite" != no ; then
22084         cat >> confdefs.h <<\EOF
22085 #define ENABLE_REWRITE 1
22086 EOF
22087
22088         BUILD_REWRITE=yes
22089         SLAPD_LIBS="$SLAPD_LIBS -lrewrite"
22090 fi
22091
22092
22093
22094 if test "$ac_cv_mingw32" = yes ; then
22095         PLAT=NT
22096         SLAPD_MODULES_LDFLAGS=
22097         SLAPD_MODULES_LIST=
22098 else
22099         PLAT=UNIX
22100 fi
22101
22102
22103
22104
22105
22106
22107   
22108   
22109   
22110   
22111   
22112   
22113   
22114   
22115   
22116   
22117   
22118   
22119   
22120   
22121   
22122   
22123   
22124   
22125   
22126   
22127   
22128   
22129
22130
22131
22132
22133
22134
22135
22136
22137
22138
22139
22140
22141
22142
22143
22144
22145
22146
22147
22148
22149
22150
22151
22152
22153
22154
22155
22156
22157
22158
22159
22160
22161
22162
22163
22164
22165
22166
22167
22168
22169
22170 trap '' 1 2 15
22171
22172 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
22173
22174 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22175 # Let make expand exec_prefix.
22176 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22177
22178 # Any assignment to VPATH causes Sun make to only execute
22179 # the first set of double-colon rules, so remove it if not needed.
22180 # If there is a colon in the path, we need to keep it.
22181 if test "x$srcdir" = x.; then
22182   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
22183 fi
22184
22185 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
22186
22187 DEFS=-DHAVE_CONFIG_H
22188
22189 # Without the "./", some shells look in PATH for config.status.
22190 : ${CONFIG_STATUS=./config.status}
22191
22192 echo creating $CONFIG_STATUS
22193 rm -f $CONFIG_STATUS
22194 cat > $CONFIG_STATUS <<EOF
22195 #! /bin/sh
22196 # Generated automatically by configure.
22197 # Run this file to recreate the current configuration.
22198 # This directory was configured as follows,
22199 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
22200 #
22201 # $0 $ac_configure_args
22202 #
22203 # Compiler output produced by configure, useful for debugging
22204 # configure, is in ./config.log if it exists.
22205
22206 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
22207 for ac_option
22208 do
22209   case "\$ac_option" in
22210   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22211     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
22212     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
22213   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
22214     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
22215     exit 0 ;;
22216   -help | --help | --hel | --he | --h)
22217     echo "\$ac_cs_usage"; exit 0 ;;
22218   *) echo "\$ac_cs_usage"; exit 1 ;;
22219   esac
22220 done
22221
22222 ac_given_srcdir=$srcdir
22223 ac_given_INSTALL="$INSTALL"
22224
22225 trap 'rm -fr `echo "\
22226 Makefile:build/top.mk:Makefile.in:build/dir.mk \
22227 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
22228 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
22229 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
22230 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
22231 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
22232 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
22233 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
22234 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
22235 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
22236 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
22237 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
22238 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
22239 include/Makefile:build/top.mk:include/Makefile.in \
22240 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
22241 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
22242 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22243 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22244 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
22245 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
22246 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
22247 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
22248 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
22249 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
22250 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
22251 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
22252 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
22253 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
22254 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
22255 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
22256 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
22257 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
22258 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
22259 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
22260 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
22261 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
22262 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
22263 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
22264 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
22265 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
22266 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
22267 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
22268  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
22269 EOF
22270 cat >> $CONFIG_STATUS <<EOF
22271
22272 # Protect against being on the right side of a sed subst in config.status.
22273 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
22274  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
22275 $ac_vpsub
22276 $extrasub
22277 s%@SHELL@%$SHELL%g
22278 s%@CFLAGS@%$CFLAGS%g
22279 s%@CPPFLAGS@%$CPPFLAGS%g
22280 s%@CXXFLAGS@%$CXXFLAGS%g
22281 s%@FFLAGS@%$FFLAGS%g
22282 s%@DEFS@%$DEFS%g
22283 s%@LDFLAGS@%$LDFLAGS%g
22284 s%@LIBS@%$LIBS%g
22285 s%@exec_prefix@%$exec_prefix%g
22286 s%@prefix@%$prefix%g
22287 s%@program_transform_name@%$program_transform_name%g
22288 s%@bindir@%$bindir%g
22289 s%@sbindir@%$sbindir%g
22290 s%@libexecdir@%$libexecdir%g
22291 s%@datadir@%$datadir%g
22292 s%@sysconfdir@%$sysconfdir%g
22293 s%@sharedstatedir@%$sharedstatedir%g
22294 s%@localstatedir@%$localstatedir%g
22295 s%@libdir@%$libdir%g
22296 s%@includedir@%$includedir%g
22297 s%@oldincludedir@%$oldincludedir%g
22298 s%@infodir@%$infodir%g
22299 s%@mandir@%$mandir%g
22300 s%@SHTOOL@%$SHTOOL%g
22301 s%@host@%$host%g
22302 s%@host_alias@%$host_alias%g
22303 s%@host_cpu@%$host_cpu%g
22304 s%@host_vendor@%$host_vendor%g
22305 s%@host_os@%$host_os%g
22306 s%@target@%$target%g
22307 s%@target_alias@%$target_alias%g
22308 s%@target_cpu@%$target_cpu%g
22309 s%@target_vendor@%$target_vendor%g
22310 s%@target_os@%$target_os%g
22311 s%@build@%$build%g
22312 s%@build_alias@%$build_alias%g
22313 s%@build_cpu@%$build_cpu%g
22314 s%@build_vendor@%$build_vendor%g
22315 s%@build_os@%$build_os%g
22316 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
22317 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
22318 s%@INSTALL_DATA@%$INSTALL_DATA%g
22319 s%@PACKAGE@%$PACKAGE%g
22320 s%@VERSION@%$VERSION%g
22321 s%@ACLOCAL@%$ACLOCAL%g
22322 s%@AUTOCONF@%$AUTOCONF%g
22323 s%@AUTOMAKE@%$AUTOMAKE%g
22324 s%@AUTOHEADER@%$AUTOHEADER%g
22325 s%@MAKEINFO@%$MAKEINFO%g
22326 s%@install_sh@%$install_sh%g
22327 s%@AMTAR@%$AMTAR%g
22328 s%@AWK@%$AWK%g
22329 s%@AMTARFLAGS@%$AMTARFLAGS%g
22330 s%@SET_MAKE@%$SET_MAKE%g
22331 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
22332 s%@top_builddir@%$top_builddir%g
22333 s%@ldap_subdir@%$ldap_subdir%g
22334 s%@CC@%$CC%g
22335 s%@AR@%$AR%g
22336 s%@LN_S@%$LN_S%g
22337 s%@OBJEXT@%$OBJEXT%g
22338 s%@EXEEXT@%$EXEEXT%g
22339 s%@ECHO@%$ECHO%g
22340 s%@RANLIB@%$RANLIB%g
22341 s%@STRIP@%$STRIP%g
22342 s%@DLLTOOL@%$DLLTOOL%g
22343 s%@AS@%$AS%g
22344 s%@OBJDUMP@%$OBJDUMP%g
22345 s%@CPP@%$CPP%g
22346 s%@LIBTOOL@%$LIBTOOL%g
22347 s%@SENDMAIL@%$SENDMAIL%g
22348 s%@EDITOR@%$EDITOR%g
22349 s%@FINGER@%$FINGER%g
22350 s%@PERLBIN@%$PERLBIN%g
22351 s%@OL_MKDEP@%$OL_MKDEP%g
22352 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
22353 s%@LIBOBJS@%$LIBOBJS%g
22354 s%@LIBSRCS@%$LIBSRCS%g
22355 s%@PLAT@%$PLAT%g
22356 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
22357 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
22358 s%@BUILD_BDB@%$BUILD_BDB%g
22359 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
22360 s%@BUILD_LDAP@%$BUILD_LDAP%g
22361 s%@BUILD_LDBM@%$BUILD_LDBM%g
22362 s%@BUILD_META@%$BUILD_META%g
22363 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
22364 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
22365 s%@BUILD_PERL@%$BUILD_PERL%g
22366 s%@BUILD_SHELL@%$BUILD_SHELL%g
22367 s%@BUILD_SQL@%$BUILD_SQL%g
22368 s%@BUILD_TCL@%$BUILD_TCL%g
22369 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
22370 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
22371 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
22372 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
22373 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
22374 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
22375 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
22376 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
22377 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
22378 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
22379 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
22380 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
22381 s%@LDBM_LIB@%$LDBM_LIB%g
22382 s%@LDAP_LIBS@%$LDAP_LIBS%g
22383 s%@LDIF_LIBS@%$LDIF_LIBS%g
22384 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
22385 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
22386 s%@LDBM_LIBS@%$LDBM_LIBS%g
22387 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
22388 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
22389 s%@WRAP_LIBS@%$WRAP_LIBS%g
22390 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
22391 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
22392 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
22393 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
22394 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
22395 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
22396 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
22397 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
22398 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
22399 s%@KRB4_LIBS@%$KRB4_LIBS%g
22400 s%@KRB5_LIBS@%$KRB5_LIBS%g
22401 s%@READLINE_LIBS@%$READLINE_LIBS%g
22402 s%@SASL_LIBS@%$SASL_LIBS%g
22403 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
22404 s%@TLS_LIBS@%$TLS_LIBS%g
22405 s%@MODULES_LIBS@%$MODULES_LIBS%g
22406 s%@AUTH_LIBS@%$AUTH_LIBS%g
22407 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
22408 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
22409 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
22410 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
22411
22412 CEOF
22413 EOF
22414
22415 cat >> $CONFIG_STATUS <<\EOF
22416
22417 # Split the substitutions into bite-sized pieces for seds with
22418 # small command number limits, like on Digital OSF/1 and HP-UX.
22419 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
22420 ac_file=1 # Number of current file.
22421 ac_beg=1 # First line for current file.
22422 ac_end=$ac_max_sed_cmds # Line after last line for current file.
22423 ac_more_lines=:
22424 ac_sed_cmds=""
22425 while $ac_more_lines; do
22426   if test $ac_beg -gt 1; then
22427     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
22428   else
22429     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
22430   fi
22431   if test ! -s conftest.s$ac_file; then
22432     ac_more_lines=false
22433     rm -f conftest.s$ac_file
22434   else
22435     if test -z "$ac_sed_cmds"; then
22436       ac_sed_cmds="sed -f conftest.s$ac_file"
22437     else
22438       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
22439     fi
22440     ac_file=`expr $ac_file + 1`
22441     ac_beg=$ac_end
22442     ac_end=`expr $ac_end + $ac_max_sed_cmds`
22443   fi
22444 done
22445 if test -z "$ac_sed_cmds"; then
22446   ac_sed_cmds=cat
22447 fi
22448 EOF
22449
22450 cat >> $CONFIG_STATUS <<EOF
22451
22452 CONFIG_FILES=\${CONFIG_FILES-"\
22453 Makefile:build/top.mk:Makefile.in:build/dir.mk \
22454 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
22455 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
22456 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
22457 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
22458 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
22459 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
22460 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
22461 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
22462 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
22463 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
22464 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
22465 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
22466 include/Makefile:build/top.mk:include/Makefile.in \
22467 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
22468 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
22469 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22470 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22471 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
22472 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
22473 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
22474 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
22475 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
22476 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
22477 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
22478 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
22479 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
22480 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
22481 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
22482 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
22483 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
22484 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
22485 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
22486 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
22487 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
22488 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
22489 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
22490 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
22491 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
22492 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
22493 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
22494 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
22495 "}
22496 EOF
22497 cat >> $CONFIG_STATUS <<\EOF
22498 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
22499   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22500   case "$ac_file" in
22501   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
22502        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
22503   *) ac_file_in="${ac_file}.in" ;;
22504   esac
22505
22506   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
22507
22508   # Remove last slash and all that follows it.  Not all systems have dirname.
22509   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
22510   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22511     # The file is in a subdirectory.
22512     test ! -d "$ac_dir" && mkdir "$ac_dir"
22513     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
22514     # A "../" for each directory in $ac_dir_suffix.
22515     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
22516   else
22517     ac_dir_suffix= ac_dots=
22518   fi
22519
22520   case "$ac_given_srcdir" in
22521   .)  srcdir=.
22522       if test -z "$ac_dots"; then top_srcdir=.
22523       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
22524   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
22525   *) # Relative path.
22526     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
22527     top_srcdir="$ac_dots$ac_given_srcdir" ;;
22528   esac
22529
22530   case "$ac_given_INSTALL" in
22531   [/$]*) INSTALL="$ac_given_INSTALL" ;;
22532   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
22533   esac
22534
22535   echo creating "$ac_file"
22536   rm -f "$ac_file"
22537   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
22538   case "$ac_file" in
22539   *[Mm]akefile*) ac_comsub="1i\\
22540 # $configure_input" ;;
22541   *) ac_comsub= ;;
22542   esac
22543
22544   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
22545   sed -e "$ac_comsub
22546 s%@configure_input@%$configure_input%g
22547 s%@srcdir@%$srcdir%g
22548 s%@top_srcdir@%$top_srcdir%g
22549 s%@INSTALL@%$INSTALL%g
22550 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
22551 fi; done
22552 rm -f conftest.s*
22553
22554 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
22555 # NAME is the cpp macro being defined and VALUE is the value it is being given.
22556 #
22557 # ac_d sets the value in "#define NAME VALUE" lines.
22558 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
22559 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
22560 ac_dC='\3'
22561 ac_dD='%g'
22562 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
22563 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
22564 ac_uB='\([      ]\)%\1#\2define\3'
22565 ac_uC=' '
22566 ac_uD='\4%g'
22567 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
22568 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
22569 ac_eB='$%\1#\2define\3'
22570 ac_eC=' '
22571 ac_eD='%g'
22572
22573 if test "${CONFIG_HEADERS+set}" != set; then
22574 EOF
22575 cat >> $CONFIG_STATUS <<EOF
22576   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
22577 EOF
22578 cat >> $CONFIG_STATUS <<\EOF
22579 fi
22580 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
22581   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22582   case "$ac_file" in
22583   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
22584        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
22585   *) ac_file_in="${ac_file}.in" ;;
22586   esac
22587
22588   echo creating $ac_file
22589
22590   rm -f conftest.frag conftest.in conftest.out
22591   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
22592   cat $ac_file_inputs > conftest.in
22593
22594 EOF
22595
22596 # Transform confdefs.h into a sed script conftest.vals that substitutes
22597 # the proper values into config.h.in to produce config.h.  And first:
22598 # Protect against being on the right side of a sed subst in config.status.
22599 # Protect against being in an unquoted here document in config.status.
22600 rm -f conftest.vals
22601 cat > conftest.hdr <<\EOF
22602 s/[\\&%]/\\&/g
22603 s%[\\$`]%\\&%g
22604 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
22605 s%ac_d%ac_u%gp
22606 s%ac_u%ac_e%gp
22607 EOF
22608 sed -n -f conftest.hdr confdefs.h > conftest.vals
22609 rm -f conftest.hdr
22610
22611 # This sed command replaces #undef with comments.  This is necessary, for
22612 # example, in the case of _POSIX_SOURCE, which is predefined and required
22613 # on some systems where configure will not decide to define it.
22614 cat >> conftest.vals <<\EOF
22615 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
22616 EOF
22617
22618 # Break up conftest.vals because some shells have a limit on
22619 # the size of here documents, and old seds have small limits too.
22620
22621 rm -f conftest.tail
22622 while :
22623 do
22624   ac_lines=`grep -c . conftest.vals`
22625   # grep -c gives empty output for an empty file on some AIX systems.
22626   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
22627   # Write a limited-size here document to conftest.frag.
22628   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
22629   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
22630   echo 'CEOF
22631   sed -f conftest.frag conftest.in > conftest.out
22632   rm -f conftest.in
22633   mv conftest.out conftest.in
22634 ' >> $CONFIG_STATUS
22635   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
22636   rm -f conftest.vals
22637   mv conftest.tail conftest.vals
22638 done
22639 rm -f conftest.vals
22640
22641 cat >> $CONFIG_STATUS <<\EOF
22642   rm -f conftest.frag conftest.h
22643   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
22644   cat conftest.in >> conftest.h
22645   rm -f conftest.in
22646   if cmp -s $ac_file conftest.h 2>/dev/null; then
22647     echo "$ac_file is unchanged"
22648     rm -f conftest.h
22649   else
22650     # Remove last slash and all that follows it.  Not all systems have dirname.
22651       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
22652       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22653       # The file is in a subdirectory.
22654       test ! -d "$ac_dir" && mkdir "$ac_dir"
22655     fi
22656     rm -f $ac_file
22657     mv conftest.h $ac_file
22658   fi
22659 fi; done
22660
22661 EOF
22662 cat >> $CONFIG_STATUS <<EOF
22663
22664 EOF
22665 cat >> $CONFIG_STATUS <<\EOF
22666
22667 date > stamp-h
22668 echo Please \"make depend\" to build dependencies
22669
22670 exit 0
22671 EOF
22672 chmod +x $CONFIG_STATUS
22673 rm -fr confdefs* $ac_clean_files
22674 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
22675