]> git.sur5r.net Git - openldap/blob - configure
Support for Cyrus SASLv2. Untested.
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.400 2002/02/10 03:30:35 kurt Exp  
4
5 # Copyright 1998-2002 The OpenLDAP Foundation.  All Rights Reserved.
6
7 # Redistribution and use in source and binary forms, with or without
8 # modification, are permitted only as authorized by the OpenLDAP
9 # Public License.  A copy of this license is available at
10 # http://www.OpenLDAP.org/license.html or in file LICENSE in the
11 # top-level directory of the distribution.
12
13 echo "Copyright 1998-2002 The OpenLDAP Foundation,  All Rights Reserved."
14 echo "Restrictions apply, see COPYRIGHT and LICENSE files."
15
16 # Guess values for system-dependent variables and create Makefiles.
17 # Generated automatically using autoconf version 2.13.1 
18 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
19 #
20 # This configure script is free software; the Free Software Foundation
21 # gives unlimited permission to copy, distribute and modify it.
22
23 # Defaults:
24 ac_help=
25 ac_default_prefix=/usr/local
26 # Any additions from configure.in:
27 ac_default_prefix=/usr/local
28 ac_help="$ac_help
29   --with-subdir=DIR       change default subdirectory used for installs"
30 ac_help="$ac_help
31   --enable-debug          enable debugging [yes]"
32 ac_help="$ac_help
33   --enable-syslog         enable syslog support [auto]"
34 ac_help="$ac_help
35   --enable-proctitle      enable proctitle support [yes]"
36 ac_help="$ac_help
37   --enable-cache          enable caching (experimental) [no]"
38 ac_help="$ac_help
39   --enable-referrals      enable LDAPv2+ Referrals (experimental) [no]"
40 ac_help="$ac_help
41   --enable-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 # test for ln hardlink support
7658 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7659 echo "configure:7660: checking whether ln works" >&5
7660 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7661   echo $ac_n "(cached) $ac_c" 1>&6
7662 else
7663   rm -f conftest.src conftest.dst
7664 echo "conftest" > conftest.src
7665 if ln conftest.src conftest.dst 2>/dev/null
7666 then
7667   ol_cv_prog_LN_H="ln"
7668 else
7669   ol_cv_prog_LN_H="cp"
7670 fi
7671 rm -f conftest.src conftest.dst
7672
7673 fi
7674 LN_H="$ol_cv_prog_LN_H"
7675 if test "$ol_cv_prog_LN_H" = "ln"; then
7676         echo "$ac_t""yes" 1>&6
7677 else
7678         echo "$ac_t""no" 1>&6
7679 fi
7680
7681 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7682 echo "configure:7683: checking whether ln -s works" >&5
7683 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7684   echo $ac_n "(cached) $ac_c" 1>&6
7685 else
7686   rm -f conftestdata
7687 if ln -s X conftestdata 2>/dev/null
7688 then
7689   rm -f conftestdata
7690   ac_cv_prog_LN_S="ln -s"
7691 else
7692   ac_cv_prog_LN_S=ln
7693 fi
7694 fi
7695 LN_S="$ac_cv_prog_LN_S"
7696 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7697   echo "$ac_t""yes" 1>&6
7698 else
7699   echo "$ac_t""no" 1>&6
7700 fi
7701
7702
7703 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
7704         LN_S="$LN_H"
7705 fi
7706
7707 # Extract the first word of "sendmail", so it can be a program name with args.
7708 set dummy sendmail; ac_word=$2
7709 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7710 echo "configure:7711: checking for $ac_word" >&5
7711 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
7712   echo $ac_n "(cached) $ac_c" 1>&6
7713 else
7714   case "$SENDMAIL" in
7715   /*)
7716   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
7717   ;;
7718   ?:/*)
7719   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
7720   ;;
7721   *)
7722   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7723   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
7724   for ac_dir in $ac_dummy; do 
7725     test -z "$ac_dir" && ac_dir=.
7726     if test -f $ac_dir/$ac_word; then
7727       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
7728       break
7729     fi
7730   done
7731   IFS="$ac_save_ifs"
7732   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
7733   ;;
7734 esac
7735 fi
7736 SENDMAIL="$ac_cv_path_SENDMAIL"
7737 if test -n "$SENDMAIL"; then
7738   echo "$ac_t""$SENDMAIL" 1>&6
7739 else
7740   echo "$ac_t""no" 1>&6
7741 fi
7742
7743 # Extract the first word of "vi", so it can be a program name with args.
7744 set dummy vi; ac_word=$2
7745 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7746 echo "configure:7747: checking for $ac_word" >&5
7747 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
7748   echo $ac_n "(cached) $ac_c" 1>&6
7749 else
7750   case "$EDITOR" in
7751   /*)
7752   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
7753   ;;
7754   ?:/*)
7755   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
7756   ;;
7757   *)
7758   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7759   ac_dummy="$PATH:/usr/ucb"
7760   for ac_dir in $ac_dummy; do 
7761     test -z "$ac_dir" && ac_dir=.
7762     if test -f $ac_dir/$ac_word; then
7763       ac_cv_path_EDITOR="$ac_dir/$ac_word"
7764       break
7765     fi
7766   done
7767   IFS="$ac_save_ifs"
7768   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
7769   ;;
7770 esac
7771 fi
7772 EDITOR="$ac_cv_path_EDITOR"
7773 if test -n "$EDITOR"; then
7774   echo "$ac_t""$EDITOR" 1>&6
7775 else
7776   echo "$ac_t""no" 1>&6
7777 fi
7778
7779 # Extract the first word of "finger", so it can be a program name with args.
7780 set dummy finger; ac_word=$2
7781 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7782 echo "configure:7783: checking for $ac_word" >&5
7783 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
7784   echo $ac_n "(cached) $ac_c" 1>&6
7785 else
7786   case "$FINGER" in
7787   /*)
7788   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
7789   ;;
7790   ?:/*)
7791   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
7792   ;;
7793   *)
7794   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7795   ac_dummy="$PATH:/usr/ucb"
7796   for ac_dir in $ac_dummy; do 
7797     test -z "$ac_dir" && ac_dir=.
7798     if test -f $ac_dir/$ac_word; then
7799       ac_cv_path_FINGER="$ac_dir/$ac_word"
7800       break
7801     fi
7802   done
7803   IFS="$ac_save_ifs"
7804   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
7805   ;;
7806 esac
7807 fi
7808 FINGER="$ac_cv_path_FINGER"
7809 if test -n "$FINGER"; then
7810   echo "$ac_t""$FINGER" 1>&6
7811 else
7812   echo "$ac_t""no" 1>&6
7813 fi
7814
7815
7816 ol_link_perl=no
7817 if test $ol_enable_perl != no ; then
7818         # Extract the first word of "perl", so it can be a program name with args.
7819 set dummy perl; ac_word=$2
7820 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7821 echo "configure:7822: checking for $ac_word" >&5
7822 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7823   echo $ac_n "(cached) $ac_c" 1>&6
7824 else
7825   case "$PERLBIN" in
7826   /*)
7827   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7828   ;;
7829   ?:/*)
7830   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7831   ;;
7832   *)
7833   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7834   ac_dummy="$PATH"
7835   for ac_dir in $ac_dummy; do 
7836     test -z "$ac_dir" && ac_dir=.
7837     if test -f $ac_dir/$ac_word; then
7838       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7839       break
7840     fi
7841   done
7842   IFS="$ac_save_ifs"
7843   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7844   ;;
7845 esac
7846 fi
7847 PERLBIN="$ac_cv_path_PERLBIN"
7848 if test -n "$PERLBIN"; then
7849   echo "$ac_t""$PERLBIN" 1>&6
7850 else
7851   echo "$ac_t""no" 1>&6
7852 fi
7853
7854
7855         if test "no$PERLBIN" = "no" ; then
7856                 if test $ol_enable_perl = yes ; then
7857                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7858                 fi
7859
7860         else
7861                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7862                 if test x"$ol_with_perl_module" = "xstatic" ; then
7863                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7864                 else
7865                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7866                 fi
7867                                 ol_link_perl=yes
7868         fi
7869 fi
7870
7871 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7872 echo "configure:7873: checking how to run the C preprocessor" >&5
7873 # On Suns, sometimes $CPP names a directory.
7874 if test -n "$CPP" && test -d "$CPP"; then
7875   CPP=
7876 fi
7877 if test -z "$CPP"; then
7878 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7879   echo $ac_n "(cached) $ac_c" 1>&6
7880 else
7881     # This must be in double quotes, not single quotes, because CPP may get
7882   # substituted into the Makefile and "${CC-cc}" will confuse make.
7883   CPP="${CC-cc} -E"
7884   # On the NeXT, cc -E runs the code through the compiler's parser,
7885   # not just through cpp.
7886   cat > conftest.$ac_ext <<EOF
7887 #line 7888 "configure"
7888 #include "confdefs.h"
7889 #include <assert.h>
7890 Syntax Error
7891 EOF
7892 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7893 { (eval echo configure:7894: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7894 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7895 if test -z "$ac_err"; then
7896   :
7897 else
7898   echo "$ac_err" >&5
7899   echo "configure: failed program was:" >&5
7900   cat conftest.$ac_ext >&5
7901   rm -rf conftest*
7902   CPP="${CC-cc} -E -traditional-cpp"
7903   cat > conftest.$ac_ext <<EOF
7904 #line 7905 "configure"
7905 #include "confdefs.h"
7906 #include <assert.h>
7907 Syntax Error
7908 EOF
7909 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7910 { (eval echo configure:7911: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7911 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7912 if test -z "$ac_err"; then
7913   :
7914 else
7915   echo "$ac_err" >&5
7916   echo "configure: failed program was:" >&5
7917   cat conftest.$ac_ext >&5
7918   rm -rf conftest*
7919   CPP="${CC-cc} -nologo -E"
7920   cat > conftest.$ac_ext <<EOF
7921 #line 7922 "configure"
7922 #include "confdefs.h"
7923 #include <assert.h>
7924 Syntax Error
7925 EOF
7926 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7927 { (eval echo configure:7928: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7928 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7929 if test -z "$ac_err"; then
7930   :
7931 else
7932   echo "$ac_err" >&5
7933   echo "configure: failed program was:" >&5
7934   cat conftest.$ac_ext >&5
7935   rm -rf conftest*
7936   CPP=/lib/cpp
7937 fi
7938 rm -f conftest*
7939 fi
7940 rm -f conftest*
7941 fi
7942 rm -f conftest*
7943   ac_cv_prog_CPP="$CPP"
7944 fi
7945   CPP="$ac_cv_prog_CPP"
7946 else
7947   ac_cv_prog_CPP="$CPP"
7948 fi
7949 echo "$ac_t""$CPP" 1>&6
7950
7951
7952 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
7953         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
7954
7955 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
7956         echo "configure: warning: programs compiled here do run here..." 1>&2
7957         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
7958
7959 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
7960         echo "configure: warning: programs compiled here do not run here..." 1>&2
7961         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
7962 fi
7963
7964
7965 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7966 echo "configure:7967: checking for Cygwin environment" >&5
7967 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7968   echo $ac_n "(cached) $ac_c" 1>&6
7969 else
7970   cat > conftest.$ac_ext <<EOF
7971 #line 7972 "configure"
7972 #include "confdefs.h"
7973
7974 int main() {
7975
7976 #ifndef __CYGWIN__
7977 #define __CYGWIN__ __CYGWIN32__
7978 #endif
7979 return __CYGWIN__;
7980 ; return 0; }
7981 EOF
7982 if { (eval echo configure:7983: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7983   rm -rf conftest*
7984   ac_cv_cygwin=yes
7985 else
7986   echo "configure: failed program was:" >&5
7987   cat conftest.$ac_ext >&5
7988   rm -rf conftest*
7989   ac_cv_cygwin=no
7990 fi
7991 rm -f conftest*
7992 fi
7993
7994 echo "$ac_t""$ac_cv_cygwin" 1>&6
7995 CYGWIN=
7996 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7997 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7998 echo "configure:7999: checking for mingw32 environment" >&5
7999 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
8000   echo $ac_n "(cached) $ac_c" 1>&6
8001 else
8002   cat > conftest.$ac_ext <<EOF
8003 #line 8004 "configure"
8004 #include "confdefs.h"
8005
8006 int main() {
8007 return __MINGW32__;
8008 ; return 0; }
8009 EOF
8010 if { (eval echo configure:8011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8011   rm -rf conftest*
8012   ac_cv_mingw32=yes
8013 else
8014   echo "configure: failed program was:" >&5
8015   cat conftest.$ac_ext >&5
8016   rm -rf conftest*
8017   ac_cv_mingw32=no
8018 fi
8019 rm -f conftest*
8020 fi
8021
8022 echo "$ac_t""$ac_cv_mingw32" 1>&6
8023 MINGW32=
8024 test "$ac_cv_mingw32" = yes && MINGW32=yes
8025
8026
8027
8028 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
8029 echo "configure:8030: checking for executable suffix" >&5
8030 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
8031   echo $ac_n "(cached) $ac_c" 1>&6
8032 else
8033   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
8034   ac_cv_exeext=.exe
8035 else
8036   rm -f conftest*
8037   echo 'int main () { return 0; }' > conftest.$ac_ext
8038   ac_cv_exeext=
8039   if { (eval echo configure:8040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
8040     for file in conftest.*; do
8041       case $file in
8042       *.c | *.C | *.o | *.obj | *.xcoff) ;;
8043       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8044       esac
8045     done
8046   else
8047     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8048   fi
8049   rm -f conftest*
8050   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8051 fi
8052 fi
8053
8054 EXEEXT=""
8055 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8056 echo "$ac_t""${ac_cv_exeext}" 1>&6
8057 ac_exeext=$EXEEXT
8058
8059 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8060 echo "configure:8061: checking for object suffix" >&5
8061 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8062   echo $ac_n "(cached) $ac_c" 1>&6
8063 else
8064   rm -f conftest*
8065 echo 'int i = 1;' > conftest.$ac_ext
8066 if { (eval echo configure:8067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8067   for ac_file in conftest.*; do
8068     case $ac_file in
8069     *.c) ;;
8070     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8071     esac
8072   done
8073 else
8074   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8075 fi
8076 rm -f conftest*
8077 fi
8078
8079 echo "$ac_t""$ac_cv_objext" 1>&6
8080 OBJEXT=$ac_cv_objext
8081 ac_objext=$ac_cv_objext
8082
8083
8084 cat >> confdefs.h <<EOF
8085 #define EXEEXT "${EXEEXT}"
8086 EOF
8087
8088
8089 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8090 echo "configure:8091: checking for be_app in -lbe" >&5
8091 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8092 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8093   echo $ac_n "(cached) $ac_c" 1>&6
8094 else
8095   ac_save_LIBS="$LIBS"
8096 LIBS="-lbe -lroot -lnet $LIBS"
8097 cat > conftest.$ac_ext <<EOF
8098 #line 8099 "configure"
8099 #include "confdefs.h"
8100 /* Override any gcc2 internal prototype to avoid an error.  */
8101 /* We use char because int might match the return type of a gcc2
8102     builtin and then its argument prototype would still apply.  */
8103 char be_app();
8104
8105 int main() {
8106 be_app()
8107 ; return 0; }
8108 EOF
8109 if { (eval echo configure:8110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8110   rm -rf conftest*
8111   eval "ac_cv_lib_$ac_lib_var=yes"
8112 else
8113   echo "configure: failed program was:" >&5
8114   cat conftest.$ac_ext >&5
8115   rm -rf conftest*
8116   eval "ac_cv_lib_$ac_lib_var=no"
8117 fi
8118 rm -f conftest*
8119 LIBS="$ac_save_LIBS"
8120
8121 fi
8122 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8123   echo "$ac_t""yes" 1>&6
8124   LIBS="$LIBS -lbe -lroot -lnet"
8125 else
8126   echo "$ac_t""no" 1>&6
8127 :
8128 fi
8129
8130
8131
8132
8133
8134 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8135 echo "configure:8136: checking for ${CC-cc} option to accept ANSI C" >&5
8136 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8137   echo $ac_n "(cached) $ac_c" 1>&6
8138 else
8139   am_cv_prog_cc_stdc=no
8140 ac_save_CC="$CC"
8141 # Don't try gcc -ansi; that turns off useful extensions and
8142 # breaks some systems' header files.
8143 # AIX                   -qlanglvl=ansi
8144 # Ultrix and OSF/1      -std1
8145 # HP-UX 10.20 and later -Ae
8146 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8147 # SVR4                  -Xc -D__EXTENSIONS__
8148 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8149 do
8150   CC="$ac_save_CC $ac_arg"
8151   cat > conftest.$ac_ext <<EOF
8152 #line 8153 "configure"
8153 #include "confdefs.h"
8154 #include <stdarg.h>
8155 #include <stdio.h>
8156 #include <sys/types.h>
8157 #include <sys/stat.h>
8158 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8159 struct buf { int x; };
8160 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8161 static char *e (p, i)
8162      char **p;
8163      int i;
8164 {
8165   return p[i];
8166 }
8167 static char *f (char * (*g) (char **, int), char **p, ...)
8168 {
8169   char *s;
8170   va_list v;
8171   va_start (v,p);
8172   s = g (p, va_arg (v,int));
8173   va_end (v);
8174   return s;
8175 }
8176 int test (int i, double x);
8177 struct s1 {int (*f) (int a);};
8178 struct s2 {int (*f) (double a);};
8179 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8180 int argc;
8181 char **argv;
8182
8183 int main() {
8184
8185 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8186
8187 ; return 0; }
8188 EOF
8189 if { (eval echo configure:8190: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8190   rm -rf conftest*
8191   am_cv_prog_cc_stdc="$ac_arg"; break
8192 else
8193   echo "configure: failed program was:" >&5
8194   cat conftest.$ac_ext >&5
8195 fi
8196 rm -f conftest*
8197 done
8198 CC="$ac_save_CC"
8199
8200 fi
8201
8202 if test -z "$am_cv_prog_cc_stdc"; then
8203   echo "$ac_t""none needed" 1>&6
8204 else
8205   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8206 fi
8207 case "x$am_cv_prog_cc_stdc" in
8208   x|xno) ;;
8209   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8210 esac
8211
8212 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8213         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8214 fi
8215
8216 # test for make depend flag
8217 OL_MKDEP=
8218 OL_MKDEP_FLAGS=
8219 if test -z "${MKDEP}"; then
8220         OL_MKDEP="${CC-cc}"
8221         if test -z "${MKDEP_FLAGS}"; then
8222                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8223 echo "configure:8224: checking for ${OL_MKDEP} depend flag" >&5
8224 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8225   echo $ac_n "(cached) $ac_c" 1>&6
8226 else
8227   
8228                         ol_cv_mkdep=no
8229                         for flag in "-M" "-xM"; do
8230                                 cat > conftest.c <<EOF
8231  noCode;
8232 EOF
8233                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8234                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8235                                 then
8236                                         if test ! -f conftest."${ac_object}" ; then
8237                                                 ol_cv_mkdep=$flag
8238                                                 OL_MKDEP_FLAGS="$flag"
8239                                                 break
8240                                         fi
8241                                 fi
8242                         done
8243                         rm -f conftest*
8244                 
8245 fi
8246
8247 echo "$ac_t""$ol_cv_mkdep" 1>&6
8248         else
8249                 cc_cv_mkdep=yes
8250                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8251         fi
8252 else
8253         cc_cv_mkdep=yes
8254         OL_MKDEP="${MKDEP}"
8255         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8256 fi
8257
8258
8259
8260 if test "${ol_cv_mkdep}" = no ; then
8261         # this will soon become an error
8262         echo "configure: warning: do not know how to generate dependencies" 1>&2
8263 fi
8264
8265 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8266 echo "configure:8267: checking for afopen in -ls" >&5
8267 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8268 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8269   echo $ac_n "(cached) $ac_c" 1>&6
8270 else
8271   ac_save_LIBS="$LIBS"
8272 LIBS="-ls  $LIBS"
8273 cat > conftest.$ac_ext <<EOF
8274 #line 8275 "configure"
8275 #include "confdefs.h"
8276 /* Override any gcc2 internal prototype to avoid an error.  */
8277 /* We use char because int might match the return type of a gcc2
8278     builtin and then its argument prototype would still apply.  */
8279 char afopen();
8280
8281 int main() {
8282 afopen()
8283 ; return 0; }
8284 EOF
8285 if { (eval echo configure:8286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8286   rm -rf conftest*
8287   eval "ac_cv_lib_$ac_lib_var=yes"
8288 else
8289   echo "configure: failed program was:" >&5
8290   cat conftest.$ac_ext >&5
8291   rm -rf conftest*
8292   eval "ac_cv_lib_$ac_lib_var=no"
8293 fi
8294 rm -f conftest*
8295 LIBS="$ac_save_LIBS"
8296
8297 fi
8298 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8299   echo "$ac_t""yes" 1>&6
8300   
8301         AUTH_LIBS=-ls
8302         cat >> confdefs.h <<\EOF
8303 #define HAVE_AIX_SECURITY 1
8304 EOF
8305
8306
8307 else
8308   echo "$ac_t""no" 1>&6
8309 fi
8310
8311
8312
8313 ol_link_modules=no
8314 if test $ol_enable_modules != no ; then
8315         for ac_hdr in ltdl.h
8316 do
8317 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8318 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8319 echo "configure:8320: checking for $ac_hdr" >&5
8320 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8321   echo $ac_n "(cached) $ac_c" 1>&6
8322 else
8323   cat > conftest.$ac_ext <<EOF
8324 #line 8325 "configure"
8325 #include "confdefs.h"
8326 #include <$ac_hdr>
8327 EOF
8328 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8329 { (eval echo configure:8330: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8330 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8331 if test -z "$ac_err"; then
8332   rm -rf conftest*
8333   eval "ac_cv_header_$ac_safe=yes"
8334 else
8335   echo "$ac_err" >&5
8336   echo "configure: failed program was:" >&5
8337   cat conftest.$ac_ext >&5
8338   rm -rf conftest*
8339   eval "ac_cv_header_$ac_safe=no"
8340 fi
8341 rm -f conftest*
8342 fi
8343 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8344   echo "$ac_t""yes" 1>&6
8345     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8346   cat >> confdefs.h <<EOF
8347 #define $ac_tr_hdr 1
8348 EOF
8349  
8350 else
8351   echo "$ac_t""no" 1>&6
8352 fi
8353 done
8354
8355
8356         if test $ac_cv_header_ltdl_h = no ; then
8357                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8358         fi
8359
8360         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8361 echo "configure:8362: checking for lt_dlinit in -lltdl" >&5
8362 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8363 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8364   echo $ac_n "(cached) $ac_c" 1>&6
8365 else
8366   ac_save_LIBS="$LIBS"
8367 LIBS="-lltdl  $LIBS"
8368 cat > conftest.$ac_ext <<EOF
8369 #line 8370 "configure"
8370 #include "confdefs.h"
8371 /* Override any gcc2 internal prototype to avoid an error.  */
8372 /* We use char because int might match the return type of a gcc2
8373     builtin and then its argument prototype would still apply.  */
8374 char lt_dlinit();
8375
8376 int main() {
8377 lt_dlinit()
8378 ; return 0; }
8379 EOF
8380 if { (eval echo configure:8381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8381   rm -rf conftest*
8382   eval "ac_cv_lib_$ac_lib_var=yes"
8383 else
8384   echo "configure: failed program was:" >&5
8385   cat conftest.$ac_ext >&5
8386   rm -rf conftest*
8387   eval "ac_cv_lib_$ac_lib_var=no"
8388 fi
8389 rm -f conftest*
8390 LIBS="$ac_save_LIBS"
8391
8392 fi
8393 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8394   echo "$ac_t""yes" 1>&6
8395   
8396                 MODULES_LIBS=-lltdl
8397                 cat >> confdefs.h <<\EOF
8398 #define HAVE_LIBLTDL 1
8399 EOF
8400
8401         
8402 else
8403   echo "$ac_t""no" 1>&6
8404 fi
8405
8406
8407         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8408                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8409         fi
8410         ol_link_modules=yes
8411 else
8412         ol_with_bdb_module=static
8413         ol_with_dnssrv_module=static
8414         ol_with_ldap_module=static
8415         ol_with_ldbm_module=static
8416         ol_with_meta_module=static
8417         ol_with_monitor_module=static
8418         ol_with_passwd_module=static
8419         ol_with_perl_module=static
8420         ol_with_shell_module=static
8421         ol_with_tcl_module=static
8422         ol_with_sql_module=static
8423 fi
8424
8425 # test for EBCDIC
8426 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8427 echo "configure:8428: checking for EBCDIC" >&5
8428 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8429   echo $ac_n "(cached) $ac_c" 1>&6
8430 else
8431   
8432         cat > conftest.$ac_ext <<EOF
8433 #line 8434 "configure"
8434 #include "confdefs.h"
8435
8436 #if !('M' == 0xd4)
8437 #include <__ASCII__/generate_error.h>
8438 #endif
8439
8440 EOF
8441 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8442 { (eval echo configure:8443: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8443 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8444 if test -z "$ac_err"; then
8445   rm -rf conftest*
8446   ol_cv_cpp_ebcdic=yes
8447 else
8448   echo "$ac_err" >&5
8449   echo "configure: failed program was:" >&5
8450   cat conftest.$ac_ext >&5
8451   rm -rf conftest*
8452   ol_cv_cpp_ebcdic=no
8453 fi
8454 rm -f conftest*
8455 fi
8456
8457 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8458 if test $ol_cv_cpp_ebcdic = yes ; then
8459         cat >> confdefs.h <<\EOF
8460 #define HAVE_EBCDIC 1
8461 EOF
8462
8463 fi
8464
8465 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8466 echo "configure:8467: checking for ANSI C header files" >&5
8467 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8468   echo $ac_n "(cached) $ac_c" 1>&6
8469 else
8470   cat > conftest.$ac_ext <<EOF
8471 #line 8472 "configure"
8472 #include "confdefs.h"
8473 #include <stdlib.h>
8474 #include <stdarg.h>
8475 #include <string.h>
8476 #include <float.h>
8477 EOF
8478 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8479 { (eval echo configure:8480: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8480 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8481 if test -z "$ac_err"; then
8482   rm -rf conftest*
8483   ol_cv_header_stdc=yes
8484 else
8485   echo "$ac_err" >&5
8486   echo "configure: failed program was:" >&5
8487   cat conftest.$ac_ext >&5
8488   rm -rf conftest*
8489   ol_cv_header_stdc=no
8490 fi
8491 rm -f conftest*
8492
8493 if test $ol_cv_header_stdc = yes; then
8494   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8495 cat > conftest.$ac_ext <<EOF
8496 #line 8497 "configure"
8497 #include "confdefs.h"
8498 #include <string.h>
8499 EOF
8500 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8501   egrep "memchr" >/dev/null 2>&1; then
8502   :
8503 else
8504   rm -rf conftest*
8505   ol_cv_header_stdc=no
8506 fi
8507 rm -f conftest*
8508
8509 fi
8510
8511 if test $ol_cv_header_stdc = yes; then
8512   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8513 cat > conftest.$ac_ext <<EOF
8514 #line 8515 "configure"
8515 #include "confdefs.h"
8516 #include <stdlib.h>
8517 EOF
8518 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8519   egrep "free" >/dev/null 2>&1; then
8520   :
8521 else
8522   rm -rf conftest*
8523   ol_cv_header_stdc=no
8524 fi
8525 rm -f conftest*
8526
8527 fi
8528
8529 if test $ol_cv_header_stdc = yes; then
8530   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8531 if test "$cross_compiling" = yes; then
8532   :
8533 else
8534   cat > conftest.$ac_ext <<EOF
8535 #line 8536 "configure"
8536 #include "confdefs.h"
8537 #include <ctype.h>
8538 #ifndef HAVE_EBCDIC
8539 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8540 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8541 #else
8542 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8543                 || ('j' <= (c) && (c) <= 'r') \
8544                 || ('s' <= (c) && (c) <= 'z'))
8545 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8546 #endif
8547 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8548 int main () { int i; for (i = 0; i < 256; i++)
8549 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8550 exit (0); }
8551
8552 EOF
8553 if { (eval echo configure:8554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8554 then
8555   :
8556 else
8557   echo "configure: failed program was:" >&5
8558   cat conftest.$ac_ext >&5
8559   rm -fr conftest*
8560   ol_cv_header_stdc=no
8561 fi
8562 rm -fr conftest*
8563 fi
8564
8565 fi
8566 fi
8567
8568 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8569 if test $ol_cv_header_stdc = yes; then
8570   cat >> confdefs.h <<\EOF
8571 #define STDC_HEADERS 1
8572 EOF
8573
8574 fi
8575 ac_cv_header_stdc=disable
8576
8577
8578 if test $ol_cv_header_stdc != yes; then
8579         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8580 fi
8581
8582 ac_header_dirent=no
8583 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8584 do
8585 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8586 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8587 echo "configure:8588: checking for $ac_hdr that defines DIR" >&5
8588 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8589   echo $ac_n "(cached) $ac_c" 1>&6
8590 else
8591   cat > conftest.$ac_ext <<EOF
8592 #line 8593 "configure"
8593 #include "confdefs.h"
8594 #include <sys/types.h>
8595 #include <$ac_hdr>
8596 int main() {
8597 DIR *dirp = 0;
8598 ; return 0; }
8599 EOF
8600 if { (eval echo configure:8601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8601   rm -rf conftest*
8602   eval "ac_cv_header_dirent_$ac_safe=yes"
8603 else
8604   echo "configure: failed program was:" >&5
8605   cat conftest.$ac_ext >&5
8606   rm -rf conftest*
8607   eval "ac_cv_header_dirent_$ac_safe=no"
8608 fi
8609 rm -f conftest*
8610 fi
8611 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8612   echo "$ac_t""yes" 1>&6
8613     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8614   cat >> confdefs.h <<EOF
8615 #define $ac_tr_hdr 1
8616 EOF
8617  ac_header_dirent=$ac_hdr; break
8618 else
8619   echo "$ac_t""no" 1>&6
8620 fi
8621 done
8622 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8623 if test $ac_header_dirent = dirent.h; then
8624 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8625 echo "configure:8626: checking for opendir in -ldir" >&5
8626 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8627 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8628   echo $ac_n "(cached) $ac_c" 1>&6
8629 else
8630   ac_save_LIBS="$LIBS"
8631 LIBS="-ldir  $LIBS"
8632 cat > conftest.$ac_ext <<EOF
8633 #line 8634 "configure"
8634 #include "confdefs.h"
8635 /* Override any gcc2 internal prototype to avoid an error.  */
8636 /* We use char because int might match the return type of a gcc2
8637     builtin and then its argument prototype would still apply.  */
8638 char opendir();
8639
8640 int main() {
8641 opendir()
8642 ; return 0; }
8643 EOF
8644 if { (eval echo configure:8645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8645   rm -rf conftest*
8646   eval "ac_cv_lib_$ac_lib_var=yes"
8647 else
8648   echo "configure: failed program was:" >&5
8649   cat conftest.$ac_ext >&5
8650   rm -rf conftest*
8651   eval "ac_cv_lib_$ac_lib_var=no"
8652 fi
8653 rm -f conftest*
8654 LIBS="$ac_save_LIBS"
8655
8656 fi
8657 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8658   echo "$ac_t""yes" 1>&6
8659   LIBS="$LIBS -ldir"
8660 else
8661   echo "$ac_t""no" 1>&6
8662 fi
8663
8664 else
8665 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8666 echo "configure:8667: checking for opendir in -lx" >&5
8667 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8668 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8669   echo $ac_n "(cached) $ac_c" 1>&6
8670 else
8671   ac_save_LIBS="$LIBS"
8672 LIBS="-lx  $LIBS"
8673 cat > conftest.$ac_ext <<EOF
8674 #line 8675 "configure"
8675 #include "confdefs.h"
8676 /* Override any gcc2 internal prototype to avoid an error.  */
8677 /* We use char because int might match the return type of a gcc2
8678     builtin and then its argument prototype would still apply.  */
8679 char opendir();
8680
8681 int main() {
8682 opendir()
8683 ; return 0; }
8684 EOF
8685 if { (eval echo configure:8686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8686   rm -rf conftest*
8687   eval "ac_cv_lib_$ac_lib_var=yes"
8688 else
8689   echo "configure: failed program was:" >&5
8690   cat conftest.$ac_ext >&5
8691   rm -rf conftest*
8692   eval "ac_cv_lib_$ac_lib_var=no"
8693 fi
8694 rm -f conftest*
8695 LIBS="$ac_save_LIBS"
8696
8697 fi
8698 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8699   echo "$ac_t""yes" 1>&6
8700   LIBS="$LIBS -lx"
8701 else
8702   echo "$ac_t""no" 1>&6
8703 fi
8704
8705 fi
8706
8707 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8708 echo "configure:8709: checking for sys/wait.h that is POSIX.1 compatible" >&5
8709 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8710   echo $ac_n "(cached) $ac_c" 1>&6
8711 else
8712   cat > conftest.$ac_ext <<EOF
8713 #line 8714 "configure"
8714 #include "confdefs.h"
8715 #include <sys/types.h>
8716 #include <sys/wait.h>
8717 #ifndef WEXITSTATUS
8718 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8719 #endif
8720 #ifndef WIFEXITED
8721 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8722 #endif
8723 int main() {
8724 int s;
8725 wait (&s);
8726 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8727 ; return 0; }
8728 EOF
8729 if { (eval echo configure:8730: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8730   rm -rf conftest*
8731   ac_cv_header_sys_wait_h=yes
8732 else
8733   echo "configure: failed program was:" >&5
8734   cat conftest.$ac_ext >&5
8735   rm -rf conftest*
8736   ac_cv_header_sys_wait_h=no
8737 fi
8738 rm -f conftest*
8739 fi
8740
8741 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8742 if test $ac_cv_header_sys_wait_h = yes; then
8743   cat >> confdefs.h <<\EOF
8744 #define HAVE_SYS_WAIT_H 1
8745 EOF
8746
8747 fi
8748
8749 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8750 echo "configure:8751: checking POSIX termios" >&5
8751 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8752   echo $ac_n "(cached) $ac_c" 1>&6
8753 else
8754   cat > conftest.$ac_ext <<EOF
8755 #line 8756 "configure"
8756 #include "confdefs.h"
8757 #include <sys/types.h>
8758 #include <unistd.h>
8759 #include <termios.h>
8760 int main() {
8761 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8762    tcgetattr(0, 0);
8763 ; return 0; }
8764 EOF
8765 if { (eval echo configure:8766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8766   rm -rf conftest*
8767   am_cv_sys_posix_termios=yes
8768 else
8769   echo "configure: failed program was:" >&5
8770   cat conftest.$ac_ext >&5
8771   rm -rf conftest*
8772   am_cv_sys_posix_termios=no
8773 fi
8774 rm -f conftest*
8775 fi
8776
8777 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8778
8779
8780  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8781 echo "configure:8782: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8782 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8783   echo $ac_n "(cached) $ac_c" 1>&6
8784 else
8785   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8786
8787   gwinsz_in_termios_h=no
8788   if test $am_cv_sys_posix_termios = yes; then
8789     cat > conftest.$ac_ext <<EOF
8790 #line 8791 "configure"
8791 #include "confdefs.h"
8792 #include <sys/types.h>
8793 #     include <termios.h>
8794 #     ifdef TIOCGWINSZ
8795         yes
8796 #     endif
8797     
8798 EOF
8799 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8800   egrep "yes" >/dev/null 2>&1; then
8801   rm -rf conftest*
8802   gwinsz_in_termios_h=yes
8803 fi
8804 rm -f conftest*
8805
8806   fi
8807
8808   if test $gwinsz_in_termios_h = no; then
8809     cat > conftest.$ac_ext <<EOF
8810 #line 8811 "configure"
8811 #include "confdefs.h"
8812 #include <sys/types.h>
8813 #     include <sys/ioctl.h>
8814 #     ifdef TIOCGWINSZ
8815         yes
8816 #     endif
8817     
8818 EOF
8819 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8820   egrep "yes" >/dev/null 2>&1; then
8821   rm -rf conftest*
8822   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8823 fi
8824 rm -f conftest*
8825
8826   fi
8827   
8828 fi
8829
8830 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8831   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8832     cat >> confdefs.h <<\EOF
8833 #define GWINSZ_IN_SYS_IOCTL 1
8834 EOF
8835
8836   fi
8837
8838 if test $am_cv_sys_posix_termios = yes ; then
8839         cat >> confdefs.h <<\EOF
8840 #define HAVE_POSIX_TERMIOS 1
8841 EOF
8842
8843 fi
8844
8845 for ac_hdr in \
8846         arpa/inet.h             \
8847         arpa/nameser.h  \
8848         assert.h                \
8849         conio.h                 \
8850         crypt.h                 \
8851         direct.h                \
8852         errno.h                 \
8853         fcntl.h                 \
8854         filio.h                 \
8855         getopt.h                \
8856         grp.h                   \
8857         io.h                    \
8858         libutil.h               \
8859         limits.h                \
8860         locale.h                \
8861         netinet/tcp.h   \
8862         malloc.h                \
8863         memory.h                \
8864         psap.h                  \
8865         pwd.h                   \
8866         process.h               \
8867         resolv.h                \
8868         sgtty.h                 \
8869         shadow.h                \
8870         stddef.h                \
8871         string.h                \
8872         strings.h               \
8873         sysexits.h              \
8874         sys/file.h              \
8875         sys/filio.h             \
8876         sys/errno.h             \
8877         sys/ioctl.h             \
8878         sys/param.h             \
8879         sys/resource.h  \
8880         sys/select.h    \
8881         sys/socket.h    \
8882         sys/syslog.h    \
8883         sys/time.h              \
8884         sys/types.h             \
8885         syslog.h                \
8886         termios.h               \
8887         unistd.h                \
8888         winsock.h               \
8889         winsock2.h              \
8890
8891 do
8892 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8893 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8894 echo "configure:8895: checking for $ac_hdr" >&5
8895 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8896   echo $ac_n "(cached) $ac_c" 1>&6
8897 else
8898   cat > conftest.$ac_ext <<EOF
8899 #line 8900 "configure"
8900 #include "confdefs.h"
8901 #include <$ac_hdr>
8902 EOF
8903 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8904 { (eval echo configure:8905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8905 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8906 if test -z "$ac_err"; then
8907   rm -rf conftest*
8908   eval "ac_cv_header_$ac_safe=yes"
8909 else
8910   echo "$ac_err" >&5
8911   echo "configure: failed program was:" >&5
8912   cat conftest.$ac_ext >&5
8913   rm -rf conftest*
8914   eval "ac_cv_header_$ac_safe=no"
8915 fi
8916 rm -f conftest*
8917 fi
8918 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8919   echo "$ac_t""yes" 1>&6
8920     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8921   cat >> confdefs.h <<EOF
8922 #define $ac_tr_hdr 1
8923 EOF
8924  
8925 else
8926   echo "$ac_t""no" 1>&6
8927 fi
8928 done
8929
8930
8931
8932
8933 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
8934 echo "configure:8935: checking for dlopen" >&5
8935 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
8936   echo $ac_n "(cached) $ac_c" 1>&6
8937 else
8938   cat > conftest.$ac_ext <<EOF
8939 #line 8940 "configure"
8940 #include "confdefs.h"
8941 /* System header to define __stub macros and hopefully few prototypes,
8942     which can conflict with char dlopen(); below.  */
8943 #include <assert.h>
8944 /* Override any gcc2 internal prototype to avoid an error.  */
8945 /* We use char because int might match the return type of a gcc2
8946     builtin and then its argument prototype would still apply.  */
8947 char dlopen();
8948 char (*f)();
8949
8950 int main() {
8951
8952 /* The GNU C library defines this for functions which it implements
8953     to always fail with ENOSYS.  Some functions are actually named
8954     something starting with __ and the normal name is an alias.  */
8955 #if defined (__stub_dlopen) || defined (__stub___dlopen)
8956 choke me
8957 #else
8958 f = dlopen;
8959 #endif
8960
8961 ; return 0; }
8962 EOF
8963 if { (eval echo configure:8964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8964   rm -rf conftest*
8965   eval "ac_cv_func_dlopen=yes"
8966 else
8967   echo "configure: failed program was:" >&5
8968   cat conftest.$ac_ext >&5
8969   rm -rf conftest*
8970   eval "ac_cv_func_dlopen=no"
8971 fi
8972 rm -f conftest*
8973 fi
8974
8975 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
8976   echo "$ac_t""yes" 1>&6
8977   :
8978 else
8979   echo "$ac_t""no" 1>&6
8980 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
8981 echo "configure:8982: checking for dlopen in -ldl" >&5
8982 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
8983 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8984   echo $ac_n "(cached) $ac_c" 1>&6
8985 else
8986   ac_save_LIBS="$LIBS"
8987 LIBS="-ldl  $LIBS"
8988 cat > conftest.$ac_ext <<EOF
8989 #line 8990 "configure"
8990 #include "confdefs.h"
8991 /* Override any gcc2 internal prototype to avoid an error.  */
8992 /* We use char because int might match the return type of a gcc2
8993     builtin and then its argument prototype would still apply.  */
8994 char dlopen();
8995
8996 int main() {
8997 dlopen()
8998 ; return 0; }
8999 EOF
9000 if { (eval echo configure:9001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9001   rm -rf conftest*
9002   eval "ac_cv_lib_$ac_lib_var=yes"
9003 else
9004   echo "configure: failed program was:" >&5
9005   cat conftest.$ac_ext >&5
9006   rm -rf conftest*
9007   eval "ac_cv_lib_$ac_lib_var=no"
9008 fi
9009 rm -f conftest*
9010 LIBS="$ac_save_LIBS"
9011
9012 fi
9013 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9014   echo "$ac_t""yes" 1>&6
9015     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9016     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9017   cat >> confdefs.h <<EOF
9018 #define $ac_tr_lib 1
9019 EOF
9020
9021   LIBS="-ldl $LIBS"
9022
9023 else
9024   echo "$ac_t""no" 1>&6
9025 fi
9026
9027 fi
9028
9029
9030 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
9031 echo "configure:9032: checking for sigset in -lV3" >&5
9032 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
9033 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9034   echo $ac_n "(cached) $ac_c" 1>&6
9035 else
9036   ac_save_LIBS="$LIBS"
9037 LIBS="-lV3  $LIBS"
9038 cat > conftest.$ac_ext <<EOF
9039 #line 9040 "configure"
9040 #include "confdefs.h"
9041 /* Override any gcc2 internal prototype to avoid an error.  */
9042 /* We use char because int might match the return type of a gcc2
9043     builtin and then its argument prototype would still apply.  */
9044 char sigset();
9045
9046 int main() {
9047 sigset()
9048 ; return 0; }
9049 EOF
9050 if { (eval echo configure:9051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9051   rm -rf conftest*
9052   eval "ac_cv_lib_$ac_lib_var=yes"
9053 else
9054   echo "configure: failed program was:" >&5
9055   cat conftest.$ac_ext >&5
9056   rm -rf conftest*
9057   eval "ac_cv_lib_$ac_lib_var=no"
9058 fi
9059 rm -f conftest*
9060 LIBS="$ac_save_LIBS"
9061
9062 fi
9063 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9064   echo "$ac_t""yes" 1>&6
9065     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9066     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9067   cat >> confdefs.h <<EOF
9068 #define $ac_tr_lib 1
9069 EOF
9070
9071   LIBS="-lV3 $LIBS"
9072
9073 else
9074   echo "$ac_t""no" 1>&6
9075 fi
9076
9077
9078 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9079 echo "configure:9080: checking for winsock" >&5
9080 save_LIBS="$LIBS"
9081 for curlib in ws2_32 wsock32; do
9082         LIBS="$LIBS -l$curlib"
9083         cat > conftest.$ac_ext <<EOF
9084 #line 9085 "configure"
9085 #include "confdefs.h"
9086
9087                         char socket@12();
9088                         char select@20();
9089                         char closesocket@4();
9090                         char gethostname@8();
9091                         
9092 int main() {
9093
9094                         socket@12();
9095                         select@20();
9096                         closesocket@4();
9097                         gethostname@8();
9098                         
9099 ; return 0; }
9100 EOF
9101 if { (eval echo configure:9102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9102   rm -rf conftest*
9103   have_winsock=yes
9104 else
9105   echo "configure: failed program was:" >&5
9106   cat conftest.$ac_ext >&5
9107   rm -rf conftest*
9108   have_winsock=no
9109 fi
9110 rm -f conftest*
9111
9112         if test $have_winsock = yes; then
9113                 cat >> confdefs.h <<\EOF
9114 #define HAVE_WINSOCK 1
9115 EOF
9116
9117                 ac_cv_func_socket=yes
9118                 ac_cv_func_select=yes
9119                 ac_cv_func_closesocket=yes
9120                 ac_cv_func_gethostname=yes
9121                 if test $curlib = ws2_32; then
9122                         have_winsock=winsock2
9123                         cat >> confdefs.h <<\EOF
9124 #define HAVE_WINSOCK2 1
9125 EOF
9126
9127                 fi
9128                 break
9129         fi
9130         LIBS="$save_LIBS"
9131 done
9132 echo "$ac_t""$have_winsock" 1>&6
9133
9134
9135 echo $ac_n "checking for socket""... $ac_c" 1>&6
9136 echo "configure:9137: checking for socket" >&5
9137 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9138   echo $ac_n "(cached) $ac_c" 1>&6
9139 else
9140   cat > conftest.$ac_ext <<EOF
9141 #line 9142 "configure"
9142 #include "confdefs.h"
9143 /* System header to define __stub macros and hopefully few prototypes,
9144     which can conflict with char socket(); below.  */
9145 #include <assert.h>
9146 /* Override any gcc2 internal prototype to avoid an error.  */
9147 /* We use char because int might match the return type of a gcc2
9148     builtin and then its argument prototype would still apply.  */
9149 char socket();
9150 char (*f)();
9151
9152 int main() {
9153
9154 /* The GNU C library defines this for functions which it implements
9155     to always fail with ENOSYS.  Some functions are actually named
9156     something starting with __ and the normal name is an alias.  */
9157 #if defined (__stub_socket) || defined (__stub___socket)
9158 choke me
9159 #else
9160 f = socket;
9161 #endif
9162
9163 ; return 0; }
9164 EOF
9165 if { (eval echo configure:9166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9166   rm -rf conftest*
9167   eval "ac_cv_func_socket=yes"
9168 else
9169   echo "configure: failed program was:" >&5
9170   cat conftest.$ac_ext >&5
9171   rm -rf conftest*
9172   eval "ac_cv_func_socket=no"
9173 fi
9174 rm -f conftest*
9175 fi
9176
9177 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9178   echo "$ac_t""yes" 1>&6
9179   :
9180 else
9181   echo "$ac_t""no" 1>&6
9182         
9183         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9184 echo "configure:9185: checking for main in -lsocket" >&5
9185 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9186 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9187   echo $ac_n "(cached) $ac_c" 1>&6
9188 else
9189   ac_save_LIBS="$LIBS"
9190 LIBS="-lsocket  $LIBS"
9191 cat > conftest.$ac_ext <<EOF
9192 #line 9193 "configure"
9193 #include "confdefs.h"
9194
9195 int main() {
9196 main()
9197 ; return 0; }
9198 EOF
9199 if { (eval echo configure:9200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9200   rm -rf conftest*
9201   eval "ac_cv_lib_$ac_lib_var=yes"
9202 else
9203   echo "configure: failed program was:" >&5
9204   cat conftest.$ac_ext >&5
9205   rm -rf conftest*
9206   eval "ac_cv_lib_$ac_lib_var=no"
9207 fi
9208 rm -f conftest*
9209 LIBS="$ac_save_LIBS"
9210
9211 fi
9212 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9213   echo "$ac_t""yes" 1>&6
9214     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9215     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9216   cat >> confdefs.h <<EOF
9217 #define $ac_tr_lib 1
9218 EOF
9219
9220   LIBS="-lsocket $LIBS"
9221
9222 else
9223   echo "$ac_t""no" 1>&6
9224 fi
9225
9226         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9227 echo "configure:9228: checking for main in -lnet" >&5
9228 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9229 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9230   echo $ac_n "(cached) $ac_c" 1>&6
9231 else
9232   ac_save_LIBS="$LIBS"
9233 LIBS="-lnet  $LIBS"
9234 cat > conftest.$ac_ext <<EOF
9235 #line 9236 "configure"
9236 #include "confdefs.h"
9237
9238 int main() {
9239 main()
9240 ; return 0; }
9241 EOF
9242 if { (eval echo configure:9243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9243   rm -rf conftest*
9244   eval "ac_cv_lib_$ac_lib_var=yes"
9245 else
9246   echo "configure: failed program was:" >&5
9247   cat conftest.$ac_ext >&5
9248   rm -rf conftest*
9249   eval "ac_cv_lib_$ac_lib_var=no"
9250 fi
9251 rm -f conftest*
9252 LIBS="$ac_save_LIBS"
9253
9254 fi
9255 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9256   echo "$ac_t""yes" 1>&6
9257     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9258     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9259   cat >> confdefs.h <<EOF
9260 #define $ac_tr_lib 1
9261 EOF
9262
9263   LIBS="-lnet $LIBS"
9264
9265 else
9266   echo "$ac_t""no" 1>&6
9267 fi
9268
9269         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9270 echo "configure:9271: checking for main in -lnsl_s" >&5
9271 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9272 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9273   echo $ac_n "(cached) $ac_c" 1>&6
9274 else
9275   ac_save_LIBS="$LIBS"
9276 LIBS="-lnsl_s  $LIBS"
9277 cat > conftest.$ac_ext <<EOF
9278 #line 9279 "configure"
9279 #include "confdefs.h"
9280
9281 int main() {
9282 main()
9283 ; return 0; }
9284 EOF
9285 if { (eval echo configure:9286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9286   rm -rf conftest*
9287   eval "ac_cv_lib_$ac_lib_var=yes"
9288 else
9289   echo "configure: failed program was:" >&5
9290   cat conftest.$ac_ext >&5
9291   rm -rf conftest*
9292   eval "ac_cv_lib_$ac_lib_var=no"
9293 fi
9294 rm -f conftest*
9295 LIBS="$ac_save_LIBS"
9296
9297 fi
9298 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9299   echo "$ac_t""yes" 1>&6
9300     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9301     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9302   cat >> confdefs.h <<EOF
9303 #define $ac_tr_lib 1
9304 EOF
9305
9306   LIBS="-lnsl_s $LIBS"
9307
9308 else
9309   echo "$ac_t""no" 1>&6
9310 fi
9311
9312         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9313 echo "configure:9314: checking for main in -lnsl" >&5
9314 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9315 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9316   echo $ac_n "(cached) $ac_c" 1>&6
9317 else
9318   ac_save_LIBS="$LIBS"
9319 LIBS="-lnsl  $LIBS"
9320 cat > conftest.$ac_ext <<EOF
9321 #line 9322 "configure"
9322 #include "confdefs.h"
9323
9324 int main() {
9325 main()
9326 ; return 0; }
9327 EOF
9328 if { (eval echo configure:9329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9329   rm -rf conftest*
9330   eval "ac_cv_lib_$ac_lib_var=yes"
9331 else
9332   echo "configure: failed program was:" >&5
9333   cat conftest.$ac_ext >&5
9334   rm -rf conftest*
9335   eval "ac_cv_lib_$ac_lib_var=no"
9336 fi
9337 rm -f conftest*
9338 LIBS="$ac_save_LIBS"
9339
9340 fi
9341 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9342   echo "$ac_t""yes" 1>&6
9343     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9344     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9345   cat >> confdefs.h <<EOF
9346 #define $ac_tr_lib 1
9347 EOF
9348
9349   LIBS="-lnsl $LIBS"
9350
9351 else
9352   echo "$ac_t""no" 1>&6
9353 fi
9354
9355         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9356 echo "configure:9357: checking for socket in -linet" >&5
9357 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9358 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9359   echo $ac_n "(cached) $ac_c" 1>&6
9360 else
9361   ac_save_LIBS="$LIBS"
9362 LIBS="-linet  $LIBS"
9363 cat > conftest.$ac_ext <<EOF
9364 #line 9365 "configure"
9365 #include "confdefs.h"
9366 /* Override any gcc2 internal prototype to avoid an error.  */
9367 /* We use char because int might match the return type of a gcc2
9368     builtin and then its argument prototype would still apply.  */
9369 char socket();
9370
9371 int main() {
9372 socket()
9373 ; return 0; }
9374 EOF
9375 if { (eval echo configure:9376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9376   rm -rf conftest*
9377   eval "ac_cv_lib_$ac_lib_var=yes"
9378 else
9379   echo "configure: failed program was:" >&5
9380   cat conftest.$ac_ext >&5
9381   rm -rf conftest*
9382   eval "ac_cv_lib_$ac_lib_var=no"
9383 fi
9384 rm -f conftest*
9385 LIBS="$ac_save_LIBS"
9386
9387 fi
9388 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9389   echo "$ac_t""yes" 1>&6
9390     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9391     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9392   cat >> confdefs.h <<EOF
9393 #define $ac_tr_lib 1
9394 EOF
9395
9396   LIBS="-linet $LIBS"
9397
9398 else
9399   echo "$ac_t""no" 1>&6
9400 fi
9401
9402         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9403 echo "configure:9404: checking for main in -lgen" >&5
9404 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9405 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9406   echo $ac_n "(cached) $ac_c" 1>&6
9407 else
9408   ac_save_LIBS="$LIBS"
9409 LIBS="-lgen  $LIBS"
9410 cat > conftest.$ac_ext <<EOF
9411 #line 9412 "configure"
9412 #include "confdefs.h"
9413
9414 int main() {
9415 main()
9416 ; return 0; }
9417 EOF
9418 if { (eval echo configure:9419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9419   rm -rf conftest*
9420   eval "ac_cv_lib_$ac_lib_var=yes"
9421 else
9422   echo "configure: failed program was:" >&5
9423   cat conftest.$ac_ext >&5
9424   rm -rf conftest*
9425   eval "ac_cv_lib_$ac_lib_var=no"
9426 fi
9427 rm -f conftest*
9428 LIBS="$ac_save_LIBS"
9429
9430 fi
9431 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9432   echo "$ac_t""yes" 1>&6
9433     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9434     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9435   cat >> confdefs.h <<EOF
9436 #define $ac_tr_lib 1
9437 EOF
9438
9439   LIBS="-lgen $LIBS"
9440
9441 else
9442   echo "$ac_t""no" 1>&6
9443 fi
9444
9445
9446 fi
9447
9448
9449 echo $ac_n "checking for select""... $ac_c" 1>&6
9450 echo "configure:9451: checking for select" >&5
9451 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9452   echo $ac_n "(cached) $ac_c" 1>&6
9453 else
9454   cat > conftest.$ac_ext <<EOF
9455 #line 9456 "configure"
9456 #include "confdefs.h"
9457 /* System header to define __stub macros and hopefully few prototypes,
9458     which can conflict with char select(); below.  */
9459 #include <assert.h>
9460 /* Override any gcc2 internal prototype to avoid an error.  */
9461 /* We use char because int might match the return type of a gcc2
9462     builtin and then its argument prototype would still apply.  */
9463 char select();
9464 char (*f)();
9465
9466 int main() {
9467
9468 /* The GNU C library defines this for functions which it implements
9469     to always fail with ENOSYS.  Some functions are actually named
9470     something starting with __ and the normal name is an alias.  */
9471 #if defined (__stub_select) || defined (__stub___select)
9472 choke me
9473 #else
9474 f = select;
9475 #endif
9476
9477 ; return 0; }
9478 EOF
9479 if { (eval echo configure:9480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9480   rm -rf conftest*
9481   eval "ac_cv_func_select=yes"
9482 else
9483   echo "configure: failed program was:" >&5
9484   cat conftest.$ac_ext >&5
9485   rm -rf conftest*
9486   eval "ac_cv_func_select=no"
9487 fi
9488 rm -f conftest*
9489 fi
9490
9491 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9492   echo "$ac_t""yes" 1>&6
9493   :
9494 else
9495   echo "$ac_t""no" 1>&6
9496 { echo "configure: error: select() required." 1>&2; exit 1; }
9497 fi
9498
9499
9500 if test "${ac_cv_header_winsock_h}" != yes; then
9501                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9502 echo "configure:9503: checking types of arguments for select()" >&5
9503  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9504   echo $ac_n "(cached) $ac_c" 1>&6
9505 else
9506    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9507   echo $ac_n "(cached) $ac_c" 1>&6
9508 else
9509     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9510   echo $ac_n "(cached) $ac_c" 1>&6
9511 else
9512      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9513      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9514       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9515        cat > conftest.$ac_ext <<EOF
9516 #line 9517 "configure"
9517 #include "confdefs.h"
9518 #ifdef HAVE_SYS_TYPES_H
9519 #include <sys/types.h>
9520 #endif
9521 #ifdef HAVE_SYS_TIME_H
9522 #include <sys/time.h>
9523 #endif
9524 #ifdef HAVE_SYS_SELECT_H
9525 #include <sys/select.h>
9526 #endif
9527 #ifdef HAVE_SYS_SOCKET_H
9528 #include <sys/socket.h>
9529 #endif
9530 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);
9531 int main() {
9532
9533 ; return 0; }
9534 EOF
9535 if { (eval echo configure:9536: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9536   rm -rf conftest*
9537           ac_not_found=no ; break 3
9538 else
9539   echo "configure: failed program was:" >&5
9540   cat conftest.$ac_ext >&5
9541   rm -rf conftest*
9542   ac_not_found=yes
9543 fi
9544 rm -f conftest*
9545       done
9546      done
9547     done
9548    
9549 fi
9550   
9551 fi
9552  
9553 fi
9554  if test "$ac_not_found" = yes; then
9555   ac_cv_func_select_arg1=int 
9556   ac_cv_func_select_arg234='int *' 
9557   ac_cv_func_select_arg5='struct timeval *'
9558  fi
9559  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9560  cat >> confdefs.h <<EOF
9561 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9562 EOF
9563
9564  cat >> confdefs.h <<EOF
9565 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9566 EOF
9567
9568  cat >> confdefs.h <<EOF
9569 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9570 EOF
9571
9572
9573 fi
9574
9575
9576 for ac_hdr in regex.h 
9577 do
9578 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9579 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9580 echo "configure:9581: checking for $ac_hdr" >&5
9581 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9582   echo $ac_n "(cached) $ac_c" 1>&6
9583 else
9584   cat > conftest.$ac_ext <<EOF
9585 #line 9586 "configure"
9586 #include "confdefs.h"
9587 #include <$ac_hdr>
9588 EOF
9589 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9590 { (eval echo configure:9591: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9591 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9592 if test -z "$ac_err"; then
9593   rm -rf conftest*
9594   eval "ac_cv_header_$ac_safe=yes"
9595 else
9596   echo "$ac_err" >&5
9597   echo "configure: failed program was:" >&5
9598   cat conftest.$ac_ext >&5
9599   rm -rf conftest*
9600   eval "ac_cv_header_$ac_safe=no"
9601 fi
9602 rm -f conftest*
9603 fi
9604 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9605   echo "$ac_t""yes" 1>&6
9606     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9607   cat >> confdefs.h <<EOF
9608 #define $ac_tr_hdr 1
9609 EOF
9610  
9611 else
9612   echo "$ac_t""no" 1>&6
9613 fi
9614 done
9615
9616 if test "$ac_cv_header_regex_h" != yes ; then
9617         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9618 fi
9619
9620 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9621 echo "configure:9622: checking for library containing regfree" >&5
9622 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9623   echo $ac_n "(cached) $ac_c" 1>&6
9624 else
9625   ac_func_search_save_LIBS="$LIBS"
9626 ac_cv_search_regfree="no"
9627 cat > conftest.$ac_ext <<EOF
9628 #line 9629 "configure"
9629 #include "confdefs.h"
9630 /* Override any gcc2 internal prototype to avoid an error.  */
9631 /* We use char because int might match the return type of a gcc2
9632     builtin and then its argument prototype would still apply.  */
9633 char regfree();
9634
9635 int main() {
9636 regfree()
9637 ; return 0; }
9638 EOF
9639 if { (eval echo configure:9640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9640   rm -rf conftest*
9641   ac_cv_search_regfree="none required"
9642 else
9643   echo "configure: failed program was:" >&5
9644   cat conftest.$ac_ext >&5
9645 fi
9646 rm -f conftest*
9647 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9648 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9649 cat > conftest.$ac_ext <<EOF
9650 #line 9651 "configure"
9651 #include "confdefs.h"
9652 /* Override any gcc2 internal prototype to avoid an error.  */
9653 /* We use char because int might match the return type of a gcc2
9654     builtin and then its argument prototype would still apply.  */
9655 char regfree();
9656
9657 int main() {
9658 regfree()
9659 ; return 0; }
9660 EOF
9661 if { (eval echo configure:9662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9662   rm -rf conftest*
9663   ac_cv_search_regfree="-l$ac_lib"
9664 break
9665 else
9666   echo "configure: failed program was:" >&5
9667   cat conftest.$ac_ext >&5
9668 fi
9669 rm -f conftest*
9670 done
9671 LIBS="$ac_func_search_save_LIBS"
9672 fi
9673
9674 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9675 if test "$ac_cv_search_regfree" != "no"; then
9676   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9677   :
9678 else :
9679   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9680 fi
9681
9682
9683 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9684 echo "configure:9685: checking for compatible POSIX regex" >&5
9685 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9686   echo $ac_n "(cached) $ac_c" 1>&6
9687 else
9688   
9689         if test "$cross_compiling" = yes; then
9690   ol_cv_c_posix_regex=cross
9691 else
9692   cat > conftest.$ac_ext <<EOF
9693 #line 9694 "configure"
9694 #include "confdefs.h"
9695
9696 #include <sys/types.h>
9697 #include <regex.h>
9698 static char *pattern, *string;
9699 main()
9700 {
9701         int rc;
9702         regex_t re;
9703
9704         pattern = "^A";
9705
9706         if(regcomp(&re, pattern, 0)) {
9707                 return -1;
9708         }
9709         
9710         string = "ALL MATCH";
9711         
9712         rc = regexec(&re, string, 0, (void*)0, 0);
9713
9714         regfree(&re);
9715
9716         return rc;
9717 }
9718 EOF
9719 if { (eval echo configure:9720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9720 then
9721   ol_cv_c_posix_regex=yes
9722 else
9723   echo "configure: failed program was:" >&5
9724   cat conftest.$ac_ext >&5
9725   rm -fr conftest*
9726   ol_cv_c_posix_regex=no
9727 fi
9728 rm -fr conftest*
9729 fi
9730
9731 fi
9732
9733 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9734
9735 if test "$ol_cv_c_posix_regex" = no ; then
9736         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9737 fi
9738
9739 echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9740 echo "configure:9741: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9741 save_LIBS="$LIBS"
9742 LIBS="$LIBS -lrpcrt4"
9743 cat > conftest.$ac_ext <<EOF
9744 #line 9745 "configure"
9745 #include "confdefs.h"
9746
9747                 char UuidCreate@4();
9748                 char UuidToStringA@8();
9749                 
9750 int main() {
9751
9752                 UuidCreate@4();
9753                 UuidToStringA@8();
9754                 
9755 ; return 0; }
9756 EOF
9757 if { (eval echo configure:9758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9758   rm -rf conftest*
9759   need_rpcrt=yes
9760 else
9761   echo "configure: failed program was:" >&5
9762   cat conftest.$ac_ext >&5
9763   rm -rf conftest*
9764   need_rpcrt=no
9765 fi
9766 rm -f conftest*
9767 if test $need_rpcrt = yes; then
9768         SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9769 fi
9770 LIBS="$save_LIBS"
9771 echo "$ac_t""$need_rpcrt" 1>&6
9772
9773 ol_link_dnssrv=no
9774 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9775 echo "configure:9776: checking for res_query" >&5
9776 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9777   echo $ac_n "(cached) $ac_c" 1>&6
9778 else
9779   cat > conftest.$ac_ext <<EOF
9780 #line 9781 "configure"
9781 #include "confdefs.h"
9782 /* System header to define __stub macros and hopefully few prototypes,
9783     which can conflict with char res_query(); below.  */
9784 #include <assert.h>
9785 /* Override any gcc2 internal prototype to avoid an error.  */
9786 /* We use char because int might match the return type of a gcc2
9787     builtin and then its argument prototype would still apply.  */
9788 char res_query();
9789 char (*f)();
9790
9791 int main() {
9792
9793 /* The GNU C library defines this for functions which it implements
9794     to always fail with ENOSYS.  Some functions are actually named
9795     something starting with __ and the normal name is an alias.  */
9796 #if defined (__stub_res_query) || defined (__stub___res_query)
9797 choke me
9798 #else
9799 f = res_query;
9800 #endif
9801
9802 ; return 0; }
9803 EOF
9804 if { (eval echo configure:9805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9805   rm -rf conftest*
9806   eval "ac_cv_func_res_query=yes"
9807 else
9808   echo "configure: failed program was:" >&5
9809   cat conftest.$ac_ext >&5
9810   rm -rf conftest*
9811   eval "ac_cv_func_res_query=no"
9812 fi
9813 rm -f conftest*
9814 fi
9815
9816 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9817   echo "$ac_t""yes" 1>&6
9818   :
9819 else
9820   echo "$ac_t""no" 1>&6
9821 fi
9822
9823 if test $ac_cv_func_res_query = no ; then 
9824         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9825 echo "configure:9826: checking for __res_query" >&5
9826 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9827   echo $ac_n "(cached) $ac_c" 1>&6
9828 else
9829   cat > conftest.$ac_ext <<EOF
9830 #line 9831 "configure"
9831 #include "confdefs.h"
9832 /* System header to define __stub macros and hopefully few prototypes,
9833     which can conflict with char __res_query(); below.  */
9834 #include <assert.h>
9835 /* Override any gcc2 internal prototype to avoid an error.  */
9836 /* We use char because int might match the return type of a gcc2
9837     builtin and then its argument prototype would still apply.  */
9838 char __res_query();
9839 char (*f)();
9840
9841 int main() {
9842
9843 /* The GNU C library defines this for functions which it implements
9844     to always fail with ENOSYS.  Some functions are actually named
9845     something starting with __ and the normal name is an alias.  */
9846 #if defined (__stub___res_query) || defined (__stub_____res_query)
9847 choke me
9848 #else
9849 f = __res_query;
9850 #endif
9851
9852 ; return 0; }
9853 EOF
9854 if { (eval echo configure:9855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9855   rm -rf conftest*
9856   eval "ac_cv_func___res_query=yes"
9857 else
9858   echo "configure: failed program was:" >&5
9859   cat conftest.$ac_ext >&5
9860   rm -rf conftest*
9861   eval "ac_cv_func___res_query=no"
9862 fi
9863 rm -f conftest*
9864 fi
9865
9866 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
9867   echo "$ac_t""yes" 1>&6
9868   :
9869 else
9870   echo "$ac_t""no" 1>&6
9871 fi
9872
9873         ac_cv_func_res_query=$ac_cv_func___res_query
9874 fi
9875
9876 if test $ac_cv_func_res_query = no ; then 
9877         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
9878 echo "configure:9879: checking for res_query in -lbind" >&5
9879 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
9880 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9881   echo $ac_n "(cached) $ac_c" 1>&6
9882 else
9883   ac_save_LIBS="$LIBS"
9884 LIBS="-lbind  $LIBS"
9885 cat > conftest.$ac_ext <<EOF
9886 #line 9887 "configure"
9887 #include "confdefs.h"
9888 /* Override any gcc2 internal prototype to avoid an error.  */
9889 /* We use char because int might match the return type of a gcc2
9890     builtin and then its argument prototype would still apply.  */
9891 char res_query();
9892
9893 int main() {
9894 res_query()
9895 ; return 0; }
9896 EOF
9897 if { (eval echo configure:9898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9898   rm -rf conftest*
9899   eval "ac_cv_lib_$ac_lib_var=yes"
9900 else
9901   echo "configure: failed program was:" >&5
9902   cat conftest.$ac_ext >&5
9903   rm -rf conftest*
9904   eval "ac_cv_lib_$ac_lib_var=no"
9905 fi
9906 rm -f conftest*
9907 LIBS="$ac_save_LIBS"
9908
9909 fi
9910 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9911   echo "$ac_t""yes" 1>&6
9912     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9913     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9914   cat >> confdefs.h <<EOF
9915 #define $ac_tr_lib 1
9916 EOF
9917
9918   LIBS="-lbind $LIBS"
9919
9920 else
9921   echo "$ac_t""no" 1>&6
9922 fi
9923
9924         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
9925 fi
9926
9927 if test $ac_cv_func_res_query = no ; then 
9928         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
9929 echo "configure:9930: checking for __res_query in -lbind" >&5
9930 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
9931 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9932   echo $ac_n "(cached) $ac_c" 1>&6
9933 else
9934   ac_save_LIBS="$LIBS"
9935 LIBS="-lbind  $LIBS"
9936 cat > conftest.$ac_ext <<EOF
9937 #line 9938 "configure"
9938 #include "confdefs.h"
9939 /* Override any gcc2 internal prototype to avoid an error.  */
9940 /* We use char because int might match the return type of a gcc2
9941     builtin and then its argument prototype would still apply.  */
9942 char __res_query();
9943
9944 int main() {
9945 __res_query()
9946 ; return 0; }
9947 EOF
9948 if { (eval echo configure:9949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9949   rm -rf conftest*
9950   eval "ac_cv_lib_$ac_lib_var=yes"
9951 else
9952   echo "configure: failed program was:" >&5
9953   cat conftest.$ac_ext >&5
9954   rm -rf conftest*
9955   eval "ac_cv_lib_$ac_lib_var=no"
9956 fi
9957 rm -f conftest*
9958 LIBS="$ac_save_LIBS"
9959
9960 fi
9961 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9962   echo "$ac_t""yes" 1>&6
9963     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9964     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9965   cat >> confdefs.h <<EOF
9966 #define $ac_tr_lib 1
9967 EOF
9968
9969   LIBS="-lbind $LIBS"
9970
9971 else
9972   echo "$ac_t""no" 1>&6
9973 fi
9974
9975         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
9976 fi
9977
9978 if test $ac_cv_func_res_query = no ; then 
9979         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
9980 echo "configure:9981: checking for res_query in -lresolv" >&5
9981 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
9982 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9983   echo $ac_n "(cached) $ac_c" 1>&6
9984 else
9985   ac_save_LIBS="$LIBS"
9986 LIBS="-lresolv  $LIBS"
9987 cat > conftest.$ac_ext <<EOF
9988 #line 9989 "configure"
9989 #include "confdefs.h"
9990 /* Override any gcc2 internal prototype to avoid an error.  */
9991 /* We use char because int might match the return type of a gcc2
9992     builtin and then its argument prototype would still apply.  */
9993 char res_query();
9994
9995 int main() {
9996 res_query()
9997 ; return 0; }
9998 EOF
9999 if { (eval echo configure:10000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10000   rm -rf conftest*
10001   eval "ac_cv_lib_$ac_lib_var=yes"
10002 else
10003   echo "configure: failed program was:" >&5
10004   cat conftest.$ac_ext >&5
10005   rm -rf conftest*
10006   eval "ac_cv_lib_$ac_lib_var=no"
10007 fi
10008 rm -f conftest*
10009 LIBS="$ac_save_LIBS"
10010
10011 fi
10012 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10013   echo "$ac_t""yes" 1>&6
10014     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10015     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10016   cat >> confdefs.h <<EOF
10017 #define $ac_tr_lib 1
10018 EOF
10019
10020   LIBS="-lresolv $LIBS"
10021
10022 else
10023   echo "$ac_t""no" 1>&6
10024 fi
10025
10026         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10027 fi
10028
10029 if test $ac_cv_func_res_query = no ; then 
10030         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10031 echo "configure:10032: checking for __res_query in -lresolv" >&5
10032 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10033 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10034   echo $ac_n "(cached) $ac_c" 1>&6
10035 else
10036   ac_save_LIBS="$LIBS"
10037 LIBS="-lresolv  $LIBS"
10038 cat > conftest.$ac_ext <<EOF
10039 #line 10040 "configure"
10040 #include "confdefs.h"
10041 /* Override any gcc2 internal prototype to avoid an error.  */
10042 /* We use char because int might match the return type of a gcc2
10043     builtin and then its argument prototype would still apply.  */
10044 char __res_query();
10045
10046 int main() {
10047 __res_query()
10048 ; return 0; }
10049 EOF
10050 if { (eval echo configure:10051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10051   rm -rf conftest*
10052   eval "ac_cv_lib_$ac_lib_var=yes"
10053 else
10054   echo "configure: failed program was:" >&5
10055   cat conftest.$ac_ext >&5
10056   rm -rf conftest*
10057   eval "ac_cv_lib_$ac_lib_var=no"
10058 fi
10059 rm -f conftest*
10060 LIBS="$ac_save_LIBS"
10061
10062 fi
10063 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10064   echo "$ac_t""yes" 1>&6
10065     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10066     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10067   cat >> confdefs.h <<EOF
10068 #define $ac_tr_lib 1
10069 EOF
10070
10071   LIBS="-lresolv $LIBS"
10072
10073 else
10074   echo "$ac_t""no" 1>&6
10075 fi
10076
10077         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10078 fi
10079
10080 if test "$ac_cv_func_res_query" = yes ; then
10081         cat >> confdefs.h <<\EOF
10082 #define HAVE_RES_QUERY 1
10083 EOF
10084
10085
10086         if test $ol_enable_dnssrv != no ; then
10087                 ol_link_dnssrv=yes
10088         fi
10089 fi
10090
10091 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10092         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10093 fi
10094
10095 for ac_func in getaddrinfo gai_strerror inet_ntop 
10096 do
10097 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10098 echo "configure:10099: checking for $ac_func" >&5
10099 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10100   echo $ac_n "(cached) $ac_c" 1>&6
10101 else
10102   cat > conftest.$ac_ext <<EOF
10103 #line 10104 "configure"
10104 #include "confdefs.h"
10105 /* System header to define __stub macros and hopefully few prototypes,
10106     which can conflict with char $ac_func(); below.  */
10107 #include <assert.h>
10108 /* Override any gcc2 internal prototype to avoid an error.  */
10109 /* We use char because int might match the return type of a gcc2
10110     builtin and then its argument prototype would still apply.  */
10111 char $ac_func();
10112 char (*f)();
10113
10114 int main() {
10115
10116 /* The GNU C library defines this for functions which it implements
10117     to always fail with ENOSYS.  Some functions are actually named
10118     something starting with __ and the normal name is an alias.  */
10119 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10120 choke me
10121 #else
10122 f = $ac_func;
10123 #endif
10124
10125 ; return 0; }
10126 EOF
10127 if { (eval echo configure:10128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10128   rm -rf conftest*
10129   eval "ac_cv_func_$ac_func=yes"
10130 else
10131   echo "configure: failed program was:" >&5
10132   cat conftest.$ac_ext >&5
10133   rm -rf conftest*
10134   eval "ac_cv_func_$ac_func=no"
10135 fi
10136 rm -f conftest*
10137 fi
10138
10139 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10140   echo "$ac_t""yes" 1>&6
10141     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10142   cat >> confdefs.h <<EOF
10143 #define $ac_tr_func 1
10144 EOF
10145  
10146 else
10147   echo "$ac_t""no" 1>&6
10148 fi
10149 done
10150
10151
10152 ol_link_ipv6=no
10153 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10154         if test $ol_enable_ipv6 = yes ; then
10155                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10156         fi
10157 elif test $ol_enable_ipv6 != no ; then
10158         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10159 echo "configure:10160: checking INET6_ADDRSTRLEN" >&5
10160 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10161   echo $ac_n "(cached) $ac_c" 1>&6
10162 else
10163   
10164                 cat > conftest.$ac_ext <<EOF
10165 #line 10166 "configure"
10166 #include "confdefs.h"
10167
10168 #                       include <netinet/in.h>
10169 #                       ifdef INET6_ADDRSTRLEN
10170                                 __has_inet6_addrstrlen__;
10171 #                       endif
10172                 
10173 EOF
10174 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10175   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10176   rm -rf conftest*
10177   ol_cv_inet6_addrstrlen=yes
10178 else
10179   rm -rf conftest*
10180   ol_cv_inet6_addrstrlen=no
10181 fi
10182 rm -f conftest*
10183
10184 fi
10185
10186 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10187
10188         if test $ol_cv_inet6_addrstrlen = yes ; then
10189                 ol_link_ipv6=yes
10190         elif test $ol_enable_ipv6 = yes ; then
10191                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10192         fi
10193 fi
10194
10195 if test $ol_enable_local != no ; then
10196         for ac_hdr in sys/un.h 
10197 do
10198 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10199 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10200 echo "configure:10201: checking for $ac_hdr" >&5
10201 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10202   echo $ac_n "(cached) $ac_c" 1>&6
10203 else
10204   cat > conftest.$ac_ext <<EOF
10205 #line 10206 "configure"
10206 #include "confdefs.h"
10207 #include <$ac_hdr>
10208 EOF
10209 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10210 { (eval echo configure:10211: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10211 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10212 if test -z "$ac_err"; then
10213   rm -rf conftest*
10214   eval "ac_cv_header_$ac_safe=yes"
10215 else
10216   echo "$ac_err" >&5
10217   echo "configure: failed program was:" >&5
10218   cat conftest.$ac_ext >&5
10219   rm -rf conftest*
10220   eval "ac_cv_header_$ac_safe=no"
10221 fi
10222 rm -f conftest*
10223 fi
10224 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10225   echo "$ac_t""yes" 1>&6
10226     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10227   cat >> confdefs.h <<EOF
10228 #define $ac_tr_hdr 1
10229 EOF
10230  
10231 else
10232   echo "$ac_t""no" 1>&6
10233 fi
10234 done
10235
10236
10237         if test $ol_enable_local = auto ; then
10238                 ol_enable_local=$ac_cv_header_sys_un_h
10239         elif test $ac_cv_header_sys_un_h = no ; then
10240                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10241         fi
10242 fi
10243
10244 ol_link_kbind=no
10245 ol_link_kpasswd=no
10246 ol_link_krb5=no
10247 ol_link_krb4=no
10248
10249 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10250         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10251         -o $ol_with_kerberos = k425 ; then
10252
10253         for ac_hdr in krb5.h
10254 do
10255 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10256 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10257 echo "configure:10258: checking for $ac_hdr" >&5
10258 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10259   echo $ac_n "(cached) $ac_c" 1>&6
10260 else
10261   cat > conftest.$ac_ext <<EOF
10262 #line 10263 "configure"
10263 #include "confdefs.h"
10264 #include <$ac_hdr>
10265 EOF
10266 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10267 { (eval echo configure:10268: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10268 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10269 if test -z "$ac_err"; then
10270   rm -rf conftest*
10271   eval "ac_cv_header_$ac_safe=yes"
10272 else
10273   echo "$ac_err" >&5
10274   echo "configure: failed program was:" >&5
10275   cat conftest.$ac_ext >&5
10276   rm -rf conftest*
10277   eval "ac_cv_header_$ac_safe=no"
10278 fi
10279 rm -f conftest*
10280 fi
10281 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10282   echo "$ac_t""yes" 1>&6
10283     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10284   cat >> confdefs.h <<EOF
10285 #define $ac_tr_hdr 1
10286 EOF
10287  
10288 else
10289   echo "$ac_t""no" 1>&6
10290 fi
10291 done
10292
10293
10294         if test $ac_cv_header_krb5_h = yes ; then
10295                                 for ac_hdr in heim_err.h
10296 do
10297 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10298 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10299 echo "configure:10300: checking for $ac_hdr" >&5
10300 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10301   echo $ac_n "(cached) $ac_c" 1>&6
10302 else
10303   cat > conftest.$ac_ext <<EOF
10304 #line 10305 "configure"
10305 #include "confdefs.h"
10306 #include <$ac_hdr>
10307 EOF
10308 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10309 { (eval echo configure:10310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10310 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10311 if test -z "$ac_err"; then
10312   rm -rf conftest*
10313   eval "ac_cv_header_$ac_safe=yes"
10314 else
10315   echo "$ac_err" >&5
10316   echo "configure: failed program was:" >&5
10317   cat conftest.$ac_ext >&5
10318   rm -rf conftest*
10319   eval "ac_cv_header_$ac_safe=no"
10320 fi
10321 rm -f conftest*
10322 fi
10323 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10324   echo "$ac_t""yes" 1>&6
10325     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10326   cat >> confdefs.h <<EOF
10327 #define $ac_tr_hdr 1
10328 EOF
10329  
10330 else
10331   echo "$ac_t""no" 1>&6
10332 fi
10333 done
10334
10335                 if test $ac_cv_header_heim_err_h = yes ; then
10336                         krb5_impl=heimdal
10337                 else
10338                         krb5_impl=mit
10339                 fi
10340
10341                 if test $krb5_impl = mit; then
10342                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10343 echo "configure:10344: checking for main in -lk5crypto" >&5
10344 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10345 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10346   echo $ac_n "(cached) $ac_c" 1>&6
10347 else
10348   ac_save_LIBS="$LIBS"
10349 LIBS="-lk5crypto  $LIBS"
10350 cat > conftest.$ac_ext <<EOF
10351 #line 10352 "configure"
10352 #include "confdefs.h"
10353
10354 int main() {
10355 main()
10356 ; return 0; }
10357 EOF
10358 if { (eval echo configure:10359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10359   rm -rf conftest*
10360   eval "ac_cv_lib_$ac_lib_var=yes"
10361 else
10362   echo "configure: failed program was:" >&5
10363   cat conftest.$ac_ext >&5
10364   rm -rf conftest*
10365   eval "ac_cv_lib_$ac_lib_var=no"
10366 fi
10367 rm -f conftest*
10368 LIBS="$ac_save_LIBS"
10369
10370 fi
10371 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10372   echo "$ac_t""yes" 1>&6
10373   krb5crypto=k5crypto
10374 else
10375   echo "$ac_t""no" 1>&6
10376 krb5crypto=crypto
10377 fi
10378
10379
10380                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10381 echo "configure:10382: checking for main in -lkrb5" >&5
10382 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10383 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10384   echo $ac_n "(cached) $ac_c" 1>&6
10385 else
10386   ac_save_LIBS="$LIBS"
10387 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10388 cat > conftest.$ac_ext <<EOF
10389 #line 10390 "configure"
10390 #include "confdefs.h"
10391
10392 int main() {
10393 main()
10394 ; return 0; }
10395 EOF
10396 if { (eval echo configure:10397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10397   rm -rf conftest*
10398   eval "ac_cv_lib_$ac_lib_var=yes"
10399 else
10400   echo "configure: failed program was:" >&5
10401   cat conftest.$ac_ext >&5
10402   rm -rf conftest*
10403   eval "ac_cv_lib_$ac_lib_var=no"
10404 fi
10405 rm -f conftest*
10406 LIBS="$ac_save_LIBS"
10407
10408 fi
10409 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10410   echo "$ac_t""yes" 1>&6
10411   have_krb5=yes
10412                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10413 else
10414   echo "$ac_t""no" 1>&6
10415 have_krb5=no
10416 fi
10417
10418
10419                 elif test $krb5_impl = heimdal; then
10420                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10421 echo "configure:10422: checking for main in -lkrb5" >&5
10422 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10423 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10424   echo $ac_n "(cached) $ac_c" 1>&6
10425 else
10426   ac_save_LIBS="$LIBS"
10427 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
10428 cat > conftest.$ac_ext <<EOF
10429 #line 10430 "configure"
10430 #include "confdefs.h"
10431
10432 int main() {
10433 main()
10434 ; return 0; }
10435 EOF
10436 if { (eval echo configure:10437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10437   rm -rf conftest*
10438   eval "ac_cv_lib_$ac_lib_var=yes"
10439 else
10440   echo "configure: failed program was:" >&5
10441   cat conftest.$ac_ext >&5
10442   rm -rf conftest*
10443   eval "ac_cv_lib_$ac_lib_var=no"
10444 fi
10445 rm -f conftest*
10446 LIBS="$ac_save_LIBS"
10447
10448 fi
10449 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10450   echo "$ac_t""yes" 1>&6
10451   have_krb5=yes
10452                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
10453 else
10454   echo "$ac_t""no" 1>&6
10455 have_krb5=no
10456 fi
10457
10458
10459                         cat >> confdefs.h <<\EOF
10460 #define HAVE_HEIMDAL_KERBEROS 1
10461 EOF
10462
10463
10464                 else
10465                         have_krb5=no
10466                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
10467                 fi
10468
10469                 if test $have_krb5 = yes ; then
10470                         ol_link_krb5=yes
10471
10472                         cat >> confdefs.h <<\EOF
10473 #define HAVE_KRB5 1
10474 EOF
10475
10476
10477                         if test $ol_enable_kpasswd != no ; then
10478                                 ol_link_kpasswd=yes;
10479                         fi
10480
10481                         if test $ol_with_kerberos = k5only ; then
10482                                 ol_with_kerberos=found
10483                         fi
10484
10485                 elif test $ol_with_kerberos != auto ; then
10486                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10487                 fi
10488
10489         fi
10490 fi
10491
10492 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10493         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10494
10495         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10496 do
10497 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10498 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10499 echo "configure:10500: checking for $ac_hdr" >&5
10500 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10501   echo $ac_n "(cached) $ac_c" 1>&6
10502 else
10503   cat > conftest.$ac_ext <<EOF
10504 #line 10505 "configure"
10505 #include "confdefs.h"
10506 #include <$ac_hdr>
10507 EOF
10508 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10509 { (eval echo configure:10510: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10510 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10511 if test -z "$ac_err"; then
10512   rm -rf conftest*
10513   eval "ac_cv_header_$ac_safe=yes"
10514 else
10515   echo "$ac_err" >&5
10516   echo "configure: failed program was:" >&5
10517   cat conftest.$ac_ext >&5
10518   rm -rf conftest*
10519   eval "ac_cv_header_$ac_safe=no"
10520 fi
10521 rm -f conftest*
10522 fi
10523 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10524   echo "$ac_t""yes" 1>&6
10525     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10526   cat >> confdefs.h <<EOF
10527 #define $ac_tr_hdr 1
10528 EOF
10529  
10530 else
10531   echo "$ac_t""no" 1>&6
10532 fi
10533 done
10534
10535
10536         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10537                 if test $krb5_impl = mit; then
10538                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10539 echo "configure:10540: checking for main in -lkrb4" >&5
10540 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10541 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10542   echo $ac_n "(cached) $ac_c" 1>&6
10543 else
10544   ac_save_LIBS="$LIBS"
10545 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10546 cat > conftest.$ac_ext <<EOF
10547 #line 10548 "configure"
10548 #include "confdefs.h"
10549
10550 int main() {
10551 main()
10552 ; return 0; }
10553 EOF
10554 if { (eval echo configure:10555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10555   rm -rf conftest*
10556   eval "ac_cv_lib_$ac_lib_var=yes"
10557 else
10558   echo "configure: failed program was:" >&5
10559   cat conftest.$ac_ext >&5
10560   rm -rf conftest*
10561   eval "ac_cv_lib_$ac_lib_var=no"
10562 fi
10563 rm -f conftest*
10564 LIBS="$ac_save_LIBS"
10565
10566 fi
10567 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10568   echo "$ac_t""yes" 1>&6
10569   have_k425=yes
10570                                 KRB4_LIBS="-lkrb4 -ldes425"
10571 else
10572   echo "$ac_t""no" 1>&6
10573 have_k425=no
10574 fi
10575
10576
10577                 elif test $krb5_impl = heimdal; then
10578                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10579 echo "configure:10580: checking for main in -lkrb4" >&5
10580 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10581 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10582   echo $ac_n "(cached) $ac_c" 1>&6
10583 else
10584   ac_save_LIBS="$LIBS"
10585 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
10586 cat > conftest.$ac_ext <<EOF
10587 #line 10588 "configure"
10588 #include "confdefs.h"
10589
10590 int main() {
10591 main()
10592 ; return 0; }
10593 EOF
10594 if { (eval echo configure:10595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10595   rm -rf conftest*
10596   eval "ac_cv_lib_$ac_lib_var=yes"
10597 else
10598   echo "configure: failed program was:" >&5
10599   cat conftest.$ac_ext >&5
10600   rm -rf conftest*
10601   eval "ac_cv_lib_$ac_lib_var=no"
10602 fi
10603 rm -f conftest*
10604 LIBS="$ac_save_LIBS"
10605
10606 fi
10607 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10608   echo "$ac_t""yes" 1>&6
10609   have_k425=yes
10610                                 KRB4_LIBS="-lkrb4"
10611 else
10612   echo "$ac_t""no" 1>&6
10613 have_k425=no
10614 fi
10615
10616
10617                 else
10618                         have_425=no
10619                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10620                 fi
10621
10622                 if test $have_k425 = yes ; then
10623                         ol_with_kerberos=found
10624                         ol_link_krb4=yes
10625
10626                         cat >> confdefs.h <<\EOF
10627 #define HAVE_KRB425 1
10628 EOF
10629
10630                         cat >> confdefs.h <<\EOF
10631 #define HAVE_KRB4 1
10632 EOF
10633
10634
10635                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10636 echo "configure:10637: checking for des_debug in Kerberos libraries" >&5
10637 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10638   echo $ac_n "(cached) $ac_c" 1>&6
10639 else
10640   
10641                                                                 save_LIBS="$LIBS"
10642                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10643                                 cat > conftest.$ac_ext <<EOF
10644 #line 10645 "configure"
10645 #include "confdefs.h"
10646
10647 #include <kerberosIV/krb.h>
10648 #include <kerberosIV/des.h>
10649 extern int des_debug;
10650
10651 int main() {
10652
10653 des_debug = 1;
10654
10655 ; return 0; }
10656 EOF
10657 if { (eval echo configure:10658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10658   rm -rf conftest*
10659   ol_cv_var_des_debug=yes
10660 else
10661   echo "configure: failed program was:" >&5
10662   cat conftest.$ac_ext >&5
10663   rm -rf conftest*
10664   ol_cv_var_des_debug=no
10665 fi
10666 rm -f conftest*
10667                                                                 LIBS="$save_LIBS"
10668                         
10669 fi
10670
10671 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10672
10673                         if test $ol_cv_var_des_debug = yes ; then
10674                                 cat >> confdefs.h <<\EOF
10675 #define HAVE_DES_DEBUG 1
10676 EOF
10677
10678                         fi
10679
10680                         LIBS="$save_LIBS"
10681                 fi
10682         fi
10683 fi
10684
10685 if test $ol_link_krb5 = yes ; then
10686         ol_with_kerberos=found
10687 fi
10688
10689 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10690         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10691
10692         for ac_hdr in krb.h des.h krb-archaeology.h 
10693 do
10694 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10695 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10696 echo "configure:10697: checking for $ac_hdr" >&5
10697 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10698   echo $ac_n "(cached) $ac_c" 1>&6
10699 else
10700   cat > conftest.$ac_ext <<EOF
10701 #line 10702 "configure"
10702 #include "confdefs.h"
10703 #include <$ac_hdr>
10704 EOF
10705 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10706 { (eval echo configure:10707: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10707 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10708 if test -z "$ac_err"; then
10709   rm -rf conftest*
10710   eval "ac_cv_header_$ac_safe=yes"
10711 else
10712   echo "$ac_err" >&5
10713   echo "configure: failed program was:" >&5
10714   cat conftest.$ac_ext >&5
10715   rm -rf conftest*
10716   eval "ac_cv_header_$ac_safe=no"
10717 fi
10718 rm -f conftest*
10719 fi
10720 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10721   echo "$ac_t""yes" 1>&6
10722     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10723   cat >> confdefs.h <<EOF
10724 #define $ac_tr_hdr 1
10725 EOF
10726  
10727 else
10728   echo "$ac_t""no" 1>&6
10729 fi
10730 done
10731
10732
10733         if test $ac_cv_header_krb_h = yes ; then
10734                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10735 echo "configure:10736: checking for main in -lkrb" >&5
10736 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10737 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10738   echo $ac_n "(cached) $ac_c" 1>&6
10739 else
10740   ac_save_LIBS="$LIBS"
10741 LIBS="-lkrb -ldes $LIBS"
10742 cat > conftest.$ac_ext <<EOF
10743 #line 10744 "configure"
10744 #include "confdefs.h"
10745
10746 int main() {
10747 main()
10748 ; return 0; }
10749 EOF
10750 if { (eval echo configure:10751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10751   rm -rf conftest*
10752   eval "ac_cv_lib_$ac_lib_var=yes"
10753 else
10754   echo "configure: failed program was:" >&5
10755   cat conftest.$ac_ext >&5
10756   rm -rf conftest*
10757   eval "ac_cv_lib_$ac_lib_var=no"
10758 fi
10759 rm -f conftest*
10760 LIBS="$ac_save_LIBS"
10761
10762 fi
10763 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10764   echo "$ac_t""yes" 1>&6
10765   have_k4=yes
10766 else
10767   echo "$ac_t""no" 1>&6
10768 have_k4=no
10769 fi
10770
10771
10772                 if test $have_k4 = yes ; then
10773                         ol_with_kerberos=found
10774                         ol_link_krb4=yes
10775
10776                         cat >> confdefs.h <<\EOF
10777 #define HAVE_KRB4 1
10778 EOF
10779
10780
10781                         KRB4_LIBS="-lkrb -ldes"
10782
10783                         if test $ac_cv_header_krb_archaeology_h = yes ; then
10784                                 cat >> confdefs.h <<\EOF
10785 #define HAVE_KTH_KERBEROS 1
10786 EOF
10787
10788                         fi
10789                 fi
10790         fi
10791 fi
10792
10793 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
10794         ol_link_kpasswd=yes
10795 fi
10796
10797 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
10798         ol_link_kbind=yes
10799
10800 elif test $ol_enable_kbind = yes ; then
10801         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
10802 fi
10803
10804 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
10805         cat >> confdefs.h <<\EOF
10806 #define HAVE_KERBEROS 1
10807 EOF
10808
10809
10810 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
10811         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
10812 fi
10813
10814 ol_link_tls=no
10815 if test $ol_with_tls != no ; then
10816         for ac_hdr in openssl/ssl.h ssl.h
10817 do
10818 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10819 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10820 echo "configure:10821: checking for $ac_hdr" >&5
10821 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10822   echo $ac_n "(cached) $ac_c" 1>&6
10823 else
10824   cat > conftest.$ac_ext <<EOF
10825 #line 10826 "configure"
10826 #include "confdefs.h"
10827 #include <$ac_hdr>
10828 EOF
10829 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10830 { (eval echo configure:10831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10831 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10832 if test -z "$ac_err"; then
10833   rm -rf conftest*
10834   eval "ac_cv_header_$ac_safe=yes"
10835 else
10836   echo "$ac_err" >&5
10837   echo "configure: failed program was:" >&5
10838   cat conftest.$ac_ext >&5
10839   rm -rf conftest*
10840   eval "ac_cv_header_$ac_safe=no"
10841 fi
10842 rm -f conftest*
10843 fi
10844 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10845   echo "$ac_t""yes" 1>&6
10846     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10847   cat >> confdefs.h <<EOF
10848 #define $ac_tr_hdr 1
10849 EOF
10850  
10851 else
10852   echo "$ac_t""no" 1>&6
10853 fi
10854 done
10855
10856         
10857         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
10858                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
10859 echo "configure:10860: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
10860 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
10861 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10862   echo $ac_n "(cached) $ac_c" 1>&6
10863 else
10864   ac_save_LIBS="$LIBS"
10865 LIBS="-lssl -lcrypto $LIBS"
10866 cat > conftest.$ac_ext <<EOF
10867 #line 10868 "configure"
10868 #include "confdefs.h"
10869 /* Override any gcc2 internal prototype to avoid an error.  */
10870 /* We use char because int might match the return type of a gcc2
10871     builtin and then its argument prototype would still apply.  */
10872 char SSLeay_add_ssl_algorithms();
10873
10874 int main() {
10875 SSLeay_add_ssl_algorithms()
10876 ; return 0; }
10877 EOF
10878 if { (eval echo configure:10879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10879   rm -rf conftest*
10880   eval "ac_cv_lib_$ac_lib_var=yes"
10881 else
10882   echo "configure: failed program was:" >&5
10883   cat conftest.$ac_ext >&5
10884   rm -rf conftest*
10885   eval "ac_cv_lib_$ac_lib_var=no"
10886 fi
10887 rm -f conftest*
10888 LIBS="$ac_save_LIBS"
10889
10890 fi
10891 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10892   echo "$ac_t""yes" 1>&6
10893   have_ssleay=yes
10894                         need_rsaref=no
10895 else
10896   echo "$ac_t""no" 1>&6
10897 have_ssleay=no
10898 fi
10899
10900                         
10901                 if test $have_ssleay = no ; then
10902                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
10903 echo "configure:10904: checking for SSL_library_init in -lssl" >&5
10904 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
10905 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10906   echo $ac_n "(cached) $ac_c" 1>&6
10907 else
10908   ac_save_LIBS="$LIBS"
10909 LIBS="-lssl -lcrypto $LIBS"
10910 cat > conftest.$ac_ext <<EOF
10911 #line 10912 "configure"
10912 #include "confdefs.h"
10913 /* Override any gcc2 internal prototype to avoid an error.  */
10914 /* We use char because int might match the return type of a gcc2
10915     builtin and then its argument prototype would still apply.  */
10916 char SSL_library_init();
10917
10918 int main() {
10919 SSL_library_init()
10920 ; return 0; }
10921 EOF
10922 if { (eval echo configure:10923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10923   rm -rf conftest*
10924   eval "ac_cv_lib_$ac_lib_var=yes"
10925 else
10926   echo "configure: failed program was:" >&5
10927   cat conftest.$ac_ext >&5
10928   rm -rf conftest*
10929   eval "ac_cv_lib_$ac_lib_var=no"
10930 fi
10931 rm -f conftest*
10932 LIBS="$ac_save_LIBS"
10933
10934 fi
10935 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10936   echo "$ac_t""yes" 1>&6
10937   have_ssleay=yes
10938                                 need_rsaref=no
10939 else
10940   echo "$ac_t""no" 1>&6
10941 have_ssleay=no
10942 fi
10943
10944                 fi
10945
10946                 if test $have_ssleay = no ; then
10947                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
10948 echo "configure:10949: checking for ssl3_accept in -lssl" >&5
10949 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
10950 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10951   echo $ac_n "(cached) $ac_c" 1>&6
10952 else
10953   ac_save_LIBS="$LIBS"
10954 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
10955 cat > conftest.$ac_ext <<EOF
10956 #line 10957 "configure"
10957 #include "confdefs.h"
10958 /* Override any gcc2 internal prototype to avoid an error.  */
10959 /* We use char because int might match the return type of a gcc2
10960     builtin and then its argument prototype would still apply.  */
10961 char ssl3_accept();
10962
10963 int main() {
10964 ssl3_accept()
10965 ; return 0; }
10966 EOF
10967 if { (eval echo configure:10968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10968   rm -rf conftest*
10969   eval "ac_cv_lib_$ac_lib_var=yes"
10970 else
10971   echo "configure: failed program was:" >&5
10972   cat conftest.$ac_ext >&5
10973   rm -rf conftest*
10974   eval "ac_cv_lib_$ac_lib_var=no"
10975 fi
10976 rm -f conftest*
10977 LIBS="$ac_save_LIBS"
10978
10979 fi
10980 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10981   echo "$ac_t""yes" 1>&6
10982   have_ssleay=yes
10983                                 need_rsaref=yes
10984 else
10985   echo "$ac_t""no" 1>&6
10986 have_ssleay=no
10987 fi
10988
10989                 fi
10990
10991                 if test $have_ssleay = yes ; then
10992                         ol_with_tls=found
10993                         ol_link_tls=yes
10994
10995                         cat >> confdefs.h <<\EOF
10996 #define HAVE_SSLEAY 1
10997 EOF
10998
10999
11000                         if test $need_rsaref = yes; then
11001                                 cat >> confdefs.h <<\EOF
11002 #define HAVE_RSAREF 1
11003 EOF
11004
11005
11006                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11007                         else
11008                                 TLS_LIBS="-lssl -lcrypto"
11009                         fi
11010                 fi
11011         fi
11012
11013 else
11014         echo "configure: warning: TLS privacy protection not supported!" 1>&2
11015 fi
11016
11017 if test $ol_link_tls = yes ; then
11018         cat >> confdefs.h <<\EOF
11019 #define HAVE_TLS 1
11020 EOF
11021
11022
11023 elif test $ol_with_tls = auto ; then
11024         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11025         echo "configure: warning: TLS privacy protection not supported!" 1>&2
11026
11027 elif test $ol_with_tls != no ; then
11028         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11029 fi
11030
11031 if test $ol_enable_lmpasswd != no; then
11032         if test $ol_link_tls != yes ; then
11033                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11034         fi
11035
11036         cat >> confdefs.h <<\EOF
11037 #define SLAPD_LMHASH 1
11038 EOF
11039
11040 fi
11041
11042 for ac_func in \
11043         ctime_r                 \
11044         gethostbyname_r gethostbyaddr_r \
11045
11046 do
11047 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11048 echo "configure:11049: checking for $ac_func" >&5
11049 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11050   echo $ac_n "(cached) $ac_c" 1>&6
11051 else
11052   cat > conftest.$ac_ext <<EOF
11053 #line 11054 "configure"
11054 #include "confdefs.h"
11055 /* System header to define __stub macros and hopefully few prototypes,
11056     which can conflict with char $ac_func(); below.  */
11057 #include <assert.h>
11058 /* Override any gcc2 internal prototype to avoid an error.  */
11059 /* We use char because int might match the return type of a gcc2
11060     builtin and then its argument prototype would still apply.  */
11061 char $ac_func();
11062 char (*f)();
11063
11064 int main() {
11065
11066 /* The GNU C library defines this for functions which it implements
11067     to always fail with ENOSYS.  Some functions are actually named
11068     something starting with __ and the normal name is an alias.  */
11069 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11070 choke me
11071 #else
11072 f = $ac_func;
11073 #endif
11074
11075 ; return 0; }
11076 EOF
11077 if { (eval echo configure:11078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11078   rm -rf conftest*
11079   eval "ac_cv_func_$ac_func=yes"
11080 else
11081   echo "configure: failed program was:" >&5
11082   cat conftest.$ac_ext >&5
11083   rm -rf conftest*
11084   eval "ac_cv_func_$ac_func=no"
11085 fi
11086 rm -f conftest*
11087 fi
11088
11089 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11090   echo "$ac_t""yes" 1>&6
11091     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11092   cat >> confdefs.h <<EOF
11093 #define $ac_tr_func 1
11094 EOF
11095  
11096 else
11097   echo "$ac_t""no" 1>&6
11098 fi
11099 done
11100
11101
11102 if test "$ac_cv_func_ctime_r" = no ; then
11103         ol_cv_func_ctime_r_nargs=0
11104 else
11105         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
11106 echo "configure:11107: checking number of arguments of ctime_r" >&5
11107 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
11108   echo $ac_n "(cached) $ac_c" 1>&6
11109 else
11110   cat > conftest.$ac_ext <<EOF
11111 #line 11112 "configure"
11112 #include "confdefs.h"
11113 #include <time.h>
11114 int main() {
11115 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
11116 ; return 0; }
11117 EOF
11118 if { (eval echo configure:11119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11119   rm -rf conftest*
11120   ol_cv_func_ctime_r_nargs3=yes
11121 else
11122   echo "configure: failed program was:" >&5
11123   cat conftest.$ac_ext >&5
11124   rm -rf conftest*
11125   ol_cv_func_ctime_r_nargs3=no
11126 fi
11127 rm -f conftest*
11128
11129         cat > conftest.$ac_ext <<EOF
11130 #line 11131 "configure"
11131 #include "confdefs.h"
11132 #include <time.h>
11133 int main() {
11134 time_t ti; char *buffer; ctime_r(&ti,buffer);
11135 ; return 0; }
11136 EOF
11137 if { (eval echo configure:11138: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11138   rm -rf conftest*
11139   ol_cv_func_ctime_r_nargs2=yes
11140 else
11141   echo "configure: failed program was:" >&5
11142   cat conftest.$ac_ext >&5
11143   rm -rf conftest*
11144   ol_cv_func_ctime_r_nargs2=no
11145 fi
11146 rm -f conftest*
11147
11148         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
11149                 $ol_cv_func_ctime_r_nargs2 = no ; then
11150
11151                 ol_cv_func_ctime_r_nargs=3
11152
11153         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
11154                 $ol_cv_func_ctime_r_nargs2 = yes ; then
11155
11156                 ol_cv_func_ctime_r_nargs=2
11157
11158         else
11159                 ol_cv_func_ctime_r_nargs=0
11160         fi
11161   
11162 fi
11163
11164 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
11165
11166   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
11167         cat >> confdefs.h <<EOF
11168 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
11169 EOF
11170
11171   fi
11172
11173 fi
11174
11175 if test "$ac_cv_func_gethostbyname_r" = yes ; then
11176         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
11177 echo "configure:11178: checking number of arguments of gethostbyname_r" >&5
11178 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
11179   echo $ac_n "(cached) $ac_c" 1>&6
11180 else
11181   cat > conftest.$ac_ext <<EOF
11182 #line 11183 "configure"
11183 #include "confdefs.h"
11184 #include <sys/types.h>
11185 #include <sys/socket.h>
11186 #include <netinet/in.h>
11187 #include <netdb.h>
11188 #define BUFSIZE (sizeof(struct hostent)+10)
11189 int main() {
11190 struct hostent hent; char buffer[BUFSIZE];
11191                 int bufsize=BUFSIZE;int h_errno;
11192                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
11193                         buffer, bufsize, &h_errno);
11194 ; return 0; }
11195 EOF
11196 if { (eval echo configure:11197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11197   rm -rf conftest*
11198   ol_cv_func_gethostbyname_r_nargs5=yes
11199 else
11200   echo "configure: failed program was:" >&5
11201   cat conftest.$ac_ext >&5
11202   rm -rf conftest*
11203   ol_cv_func_gethostbyname_r_nargs5=no
11204 fi
11205 rm -f conftest*
11206
11207         cat > conftest.$ac_ext <<EOF
11208 #line 11209 "configure"
11209 #include "confdefs.h"
11210 #include <sys/types.h>
11211 #include <sys/socket.h>
11212 #include <netinet/in.h>
11213 #include <netdb.h>
11214 #define BUFSIZE (sizeof(struct hostent)+10)
11215 int main() {
11216 struct hostent hent;struct hostent *rhent;
11217                 char buffer[BUFSIZE];
11218                 int bufsize=BUFSIZE;int h_errno;
11219                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
11220                         &rhent, &h_errno);
11221 ; return 0; }
11222 EOF
11223 if { (eval echo configure:11224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11224   rm -rf conftest*
11225   ol_cv_func_gethostbyname_r_nargs6=yes
11226 else
11227   echo "configure: failed program was:" >&5
11228   cat conftest.$ac_ext >&5
11229   rm -rf conftest*
11230   ol_cv_func_gethostbyname_r_nargs6=no
11231 fi
11232 rm -f conftest*
11233
11234         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
11235                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
11236
11237                 ol_cv_func_gethostbyname_r_nargs=5
11238
11239         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
11240                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
11241
11242                 ol_cv_func_gethostbyname_r_nargs=6
11243
11244         else
11245                 ol_cv_func_gethostbyname_r_nargs=0
11246         fi
11247   
11248 fi
11249
11250 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
11251   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
11252         cat >> confdefs.h <<EOF
11253 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
11254 EOF
11255
11256   fi
11257
11258 else
11259         ol_cv_func_gethostbyname_r_nargs=0
11260 fi
11261  
11262 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
11263         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
11264 echo "configure:11265: checking number of arguments of gethostbyaddr_r" >&5
11265 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
11266   echo $ac_n "(cached) $ac_c" 1>&6
11267 else
11268   cat > conftest.$ac_ext <<EOF
11269 #line 11270 "configure"
11270 #include "confdefs.h"
11271 #include <sys/types.h>
11272 #include <sys/socket.h>
11273 #include <netinet/in.h>
11274 #include <netdb.h>
11275 #define BUFSIZE (sizeof(struct hostent)+10)
11276 int main() {
11277 struct hostent hent; char buffer[BUFSIZE]; 
11278             struct in_addr add;
11279             size_t alen=sizeof(struct in_addr);
11280             int bufsize=BUFSIZE;int h_errno;
11281                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
11282                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
11283 ; return 0; }
11284 EOF
11285 if { (eval echo configure:11286: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11286   rm -rf conftest*
11287   ol_cv_func_gethostbyaddr_r_nargs7=yes
11288 else
11289   echo "configure: failed program was:" >&5
11290   cat conftest.$ac_ext >&5
11291   rm -rf conftest*
11292   ol_cv_func_gethostbyaddr_r_nargs7=no
11293 fi
11294 rm -f conftest*
11295
11296         cat > conftest.$ac_ext <<EOF
11297 #line 11298 "configure"
11298 #include "confdefs.h"
11299 #include <sys/types.h>
11300 #include <sys/socket.h>
11301 #include <netinet/in.h>
11302 #include <netdb.h>
11303 #define BUFSIZE (sizeof(struct hostent)+10)
11304 int main() {
11305 struct hostent hent;
11306                 struct hostent *rhent; char buffer[BUFSIZE]; 
11307                 struct in_addr add;
11308                 size_t alen=sizeof(struct in_addr);
11309                 int bufsize=BUFSIZE;int h_errno;
11310                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
11311                         alen, AF_INET, &hent, buffer, bufsize, 
11312                         &rhent, &h_errno);
11313 ; return 0; }
11314 EOF
11315 if { (eval echo configure:11316: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11316   rm -rf conftest*
11317   ol_cv_func_gethostbyaddr_r_nargs8=yes
11318 else
11319   echo "configure: failed program was:" >&5
11320   cat conftest.$ac_ext >&5
11321   rm -rf conftest*
11322   ol_cv_func_gethostbyaddr_r_nargs8=no
11323 fi
11324 rm -f conftest*
11325
11326         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
11327                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
11328
11329                 ol_cv_func_gethostbyaddr_r_nargs=7
11330
11331         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
11332                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
11333
11334                 ol_cv_func_gethostbyaddr_r_nargs=8
11335
11336         else
11337                 ol_cv_func_gethostbyaddr_r_nargs=0
11338         fi
11339   
11340 fi
11341
11342 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
11343   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
11344     cat >> confdefs.h <<EOF
11345 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
11346 EOF
11347
11348   fi
11349
11350 else
11351         ol_cv_func_gethostbyaddr_r_nargs=0
11352 fi
11353
11354 if test "$ac_cv_func_ctime_r" = yes \
11355         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
11356         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
11357         -a "$ac_cv_func_gethostbyname_r" = yes \
11358         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
11359         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
11360         -a "$ac_cv_func_gethostbyaddr_r" = yes \
11361         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
11362         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
11363         ; then
11364  
11365         cat >> confdefs.h <<\EOF
11366 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
11367 EOF
11368
11369 fi
11370
11371 ol_link_threads=no
11372
11373 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11374         -o $ol_with_threads = nt ; then
11375
11376         
11377         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11378 echo "configure:11379: checking for _beginthread" >&5
11379 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11380   echo $ac_n "(cached) $ac_c" 1>&6
11381 else
11382   cat > conftest.$ac_ext <<EOF
11383 #line 11384 "configure"
11384 #include "confdefs.h"
11385 /* System header to define __stub macros and hopefully few prototypes,
11386     which can conflict with char _beginthread(); below.  */
11387 #include <assert.h>
11388 /* Override any gcc2 internal prototype to avoid an error.  */
11389 /* We use char because int might match the return type of a gcc2
11390     builtin and then its argument prototype would still apply.  */
11391 char _beginthread();
11392 char (*f)();
11393
11394 int main() {
11395
11396 /* The GNU C library defines this for functions which it implements
11397     to always fail with ENOSYS.  Some functions are actually named
11398     something starting with __ and the normal name is an alias.  */
11399 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11400 choke me
11401 #else
11402 f = _beginthread;
11403 #endif
11404
11405 ; return 0; }
11406 EOF
11407 if { (eval echo configure:11408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11408   rm -rf conftest*
11409   eval "ac_cv_func__beginthread=yes"
11410 else
11411   echo "configure: failed program was:" >&5
11412   cat conftest.$ac_ext >&5
11413   rm -rf conftest*
11414   eval "ac_cv_func__beginthread=no"
11415 fi
11416 rm -f conftest*
11417 fi
11418
11419 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11420   echo "$ac_t""yes" 1>&6
11421   :
11422 else
11423   echo "$ac_t""no" 1>&6
11424 fi
11425
11426
11427         if test $ac_cv_func__beginthread = yes ; then
11428                 cat >> confdefs.h <<\EOF
11429 #define HAVE_NT_THREADS 1
11430 EOF
11431
11432                 ol_cv_nt_threads=yes
11433         fi
11434
11435
11436         if test "$ol_cv_nt_threads" = yes ; then
11437                 ol_link_threads=nt
11438                 ol_with_threads=found
11439                 ol_with_yielding_select=yes
11440
11441                 cat >> confdefs.h <<\EOF
11442 #define HAVE_NT_SERVICE_MANAGER 1
11443 EOF
11444
11445                 cat >> confdefs.h <<\EOF
11446 #define HAVE_NT_EVENT_LOG 1
11447 EOF
11448
11449         fi
11450
11451         if test $ol_with_threads = nt ; then
11452                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11453         fi
11454 fi
11455
11456 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11457         -o $ol_with_threads = posix ; then
11458
11459         for ac_hdr in pthread.h
11460 do
11461 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11462 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11463 echo "configure:11464: checking for $ac_hdr" >&5
11464 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11465   echo $ac_n "(cached) $ac_c" 1>&6
11466 else
11467   cat > conftest.$ac_ext <<EOF
11468 #line 11469 "configure"
11469 #include "confdefs.h"
11470 #include <$ac_hdr>
11471 EOF
11472 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11473 { (eval echo configure:11474: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11474 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11475 if test -z "$ac_err"; then
11476   rm -rf conftest*
11477   eval "ac_cv_header_$ac_safe=yes"
11478 else
11479   echo "$ac_err" >&5
11480   echo "configure: failed program was:" >&5
11481   cat conftest.$ac_ext >&5
11482   rm -rf conftest*
11483   eval "ac_cv_header_$ac_safe=no"
11484 fi
11485 rm -f conftest*
11486 fi
11487 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11488   echo "$ac_t""yes" 1>&6
11489     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11490   cat >> confdefs.h <<EOF
11491 #define $ac_tr_hdr 1
11492 EOF
11493  
11494 else
11495   echo "$ac_t""no" 1>&6
11496 fi
11497 done
11498
11499
11500         if test $ac_cv_header_pthread_h = yes ; then
11501                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11502 echo "configure:11503: checking POSIX thread version" >&5
11503 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11504   echo $ac_n "(cached) $ac_c" 1>&6
11505 else
11506   
11507         cat > conftest.$ac_ext <<EOF
11508 #line 11509 "configure"
11509 #include "confdefs.h"
11510
11511 #               include <pthread.h>
11512                 /* this check could be improved */
11513 #               ifdef PTHREAD_ONCE_INIT
11514                         pthread_version_final;
11515 #               endif
11516         
11517 EOF
11518 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11519   egrep "pthread_version_final" >/dev/null 2>&1; then
11520   rm -rf conftest*
11521   ol_pthread_final=yes
11522 else
11523   rm -rf conftest*
11524   ol_pthread_final=no
11525 fi
11526 rm -f conftest*
11527
11528
11529         cat > conftest.$ac_ext <<EOF
11530 #line 11531 "configure"
11531 #include "confdefs.h"
11532
11533 #               include <pthread.h>
11534                 /* this check could be improved */
11535 #               ifdef pthread_once_init
11536                         pthread_version_draft4;
11537 #               endif
11538         
11539 EOF
11540 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11541   egrep "pthread_version_draft4" >/dev/null 2>&1; then
11542   rm -rf conftest*
11543   ol_pthread_draft4=yes
11544 else
11545   rm -rf conftest*
11546   ol_pthread_draft4=no
11547 fi
11548 rm -f conftest*
11549
11550
11551         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
11552                 ol_cv_pthread_version=final
11553         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
11554                 ol_cv_pthread_version=draft4
11555         else
11556                 ol_cv_pthread_version=unknown
11557         fi
11558
11559 fi
11560
11561 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11562
11563
11564                 if test $ol_cv_pthread_version = final ; then
11565                         cat >> confdefs.h <<\EOF
11566 #define HAVE_PTHREADS_FINAL 1
11567 EOF
11568
11569                 elif test $ol_cv_pthread_version = draft4 ; then
11570                         cat >> confdefs.h <<\EOF
11571 #define HAVE_PTHREADS_D4 1
11572 EOF
11573
11574                 else
11575                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11576                 fi
11577
11578                 # consider threads found
11579                 ol_with_threads=found
11580
11581                 
11582         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11583 echo "configure:11584: checking for LinuxThreads pthread.h" >&5
11584 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11585   echo $ac_n "(cached) $ac_c" 1>&6
11586 else
11587   cat > conftest.$ac_ext <<EOF
11588 #line 11589 "configure"
11589 #include "confdefs.h"
11590 #include <pthread.h>
11591 EOF
11592 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11593   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11594   rm -rf conftest*
11595   ol_cv_header_linux_threads=yes
11596 else
11597   rm -rf conftest*
11598   ol_cv_header_linux_threads=no
11599 fi
11600 rm -f conftest*
11601
11602                 
11603 fi
11604
11605 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11606         if test $ol_cv_header_linux_threads = yes; then
11607                 cat >> confdefs.h <<\EOF
11608 #define HAVE_LINUX_THREADS 1
11609 EOF
11610
11611         fi
11612
11613                 
11614         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11615 echo "configure:11616: checking for GNU Pth pthread.h" >&5
11616 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11617   echo $ac_n "(cached) $ac_c" 1>&6
11618 else
11619   cat > conftest.$ac_ext <<EOF
11620 #line 11621 "configure"
11621 #include "confdefs.h"
11622 #include <pthread.h>
11623 #ifdef _POSIX_THREAD_IS_GNU_PTH
11624         __gnu_pth__;
11625 #endif
11626
11627 EOF
11628 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11629   egrep "__gnu_pth__" >/dev/null 2>&1; then
11630   rm -rf conftest*
11631   ol_cv_header_gnu_pth_pthread_h=yes
11632 else
11633   rm -rf conftest*
11634   ol_cv_header_gnu_pth_pthread_h=no
11635 fi
11636 rm -f conftest*
11637
11638                 
11639 fi
11640
11641 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11642
11643
11644                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11645                         for ac_hdr in sched.h
11646 do
11647 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11648 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11649 echo "configure:11650: checking for $ac_hdr" >&5
11650 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11651   echo $ac_n "(cached) $ac_c" 1>&6
11652 else
11653   cat > conftest.$ac_ext <<EOF
11654 #line 11655 "configure"
11655 #include "confdefs.h"
11656 #include <$ac_hdr>
11657 EOF
11658 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11659 { (eval echo configure:11660: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11660 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11661 if test -z "$ac_err"; then
11662   rm -rf conftest*
11663   eval "ac_cv_header_$ac_safe=yes"
11664 else
11665   echo "$ac_err" >&5
11666   echo "configure: failed program was:" >&5
11667   cat conftest.$ac_ext >&5
11668   rm -rf conftest*
11669   eval "ac_cv_header_$ac_safe=no"
11670 fi
11671 rm -f conftest*
11672 fi
11673 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11674   echo "$ac_t""yes" 1>&6
11675     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11676   cat >> confdefs.h <<EOF
11677 #define $ac_tr_hdr 1
11678 EOF
11679  
11680 else
11681   echo "$ac_t""no" 1>&6
11682 fi
11683 done
11684
11685                 fi
11686
11687                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11688                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11689 echo "configure:11690: checking for pthread_create in default libraries" >&5
11690 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11691   echo $ac_n "(cached) $ac_c" 1>&6
11692 else
11693   
11694                 if test "$cross_compiling" = yes; then
11695   cat > conftest.$ac_ext <<EOF
11696 #line 11697 "configure"
11697 #include "confdefs.h"
11698 /* pthread test headers */
11699 #include <pthread.h>
11700 #ifndef NULL
11701 #define NULL (void*)0
11702 #endif
11703
11704 static void *task(p)
11705         void *p;
11706 {
11707         return (void *) (p == NULL);
11708 }
11709
11710 int main() {
11711
11712         /* pthread test function */
11713         pthread_t t;
11714         int status;
11715         int detach = 1;
11716
11717 #ifdef HAVE_PTHREADS_FINAL
11718         /* Final pthreads */
11719         pthread_attr_t attr;
11720
11721         status = pthread_attr_init(&attr);
11722         if( status ) return status;
11723
11724 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11725         if( !detach ) {
11726 #if defined( PTHREAD_CREATE_JOINABLE )
11727                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11728 #else
11729                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11730 #endif
11731
11732 #ifdef PTHREAD_CREATE_DETACHED
11733         } else {
11734                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11735 #endif
11736         }
11737         if( status ) return status;
11738 #endif
11739
11740         status = pthread_create( &t, &attr, task, NULL );
11741         if( status ) return status;
11742
11743 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11744         if( detach ) {
11745                 /* give thread a chance to complete */
11746                 /* it should remain joinable and hence detachable */
11747                 sleep( 1 );
11748
11749                 status = pthread_detach( t );
11750                 if( status ) return status;
11751         }
11752 #endif
11753
11754 #else
11755         /* Draft 4 pthreads */
11756         status = pthread_create( &t, pthread_attr_default, task, NULL );
11757         if( status ) return status;
11758
11759         if( detach ) {
11760                 /* give thread a chance to complete */
11761                 /* it should remain joinable and hence detachable */
11762                 sleep( 1 );
11763
11764                 status = pthread_detach( &t );
11765                 if( status ) return status;
11766         }
11767 #endif
11768
11769 #ifdef HAVE_LINUX_THREADS
11770         pthread_kill_other_threads_np();
11771 #endif
11772
11773         return 0;
11774
11775 ; return 0; }
11776 EOF
11777 if { (eval echo configure:11778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11778   rm -rf conftest*
11779   ol_cv_pthread_create=yes
11780 else
11781   echo "configure: failed program was:" >&5
11782   cat conftest.$ac_ext >&5
11783   rm -rf conftest*
11784   ol_cv_pthread_create=no
11785 fi
11786 rm -f conftest*
11787 else
11788   cat > conftest.$ac_ext <<EOF
11789 #line 11790 "configure"
11790 #include "confdefs.h"
11791 /* pthread test headers */
11792 #include <pthread.h>
11793 #ifndef NULL
11794 #define NULL (void*)0
11795 #endif
11796
11797 static void *task(p)
11798         void *p;
11799 {
11800         return (void *) (p == NULL);
11801 }
11802
11803
11804 int main(argc, argv)
11805         int argc;
11806         char **argv;
11807 {
11808
11809         /* pthread test function */
11810         pthread_t t;
11811         int status;
11812         int detach = 1;
11813
11814 #ifdef HAVE_PTHREADS_FINAL
11815         /* Final pthreads */
11816         pthread_attr_t attr;
11817
11818         status = pthread_attr_init(&attr);
11819         if( status ) return status;
11820
11821 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11822         if( !detach ) {
11823 #if defined( PTHREAD_CREATE_JOINABLE )
11824                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11825 #else
11826                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11827 #endif
11828
11829 #ifdef PTHREAD_CREATE_DETACHED
11830         } else {
11831                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11832 #endif
11833         }
11834         if( status ) return status;
11835 #endif
11836
11837         status = pthread_create( &t, &attr, task, NULL );
11838         if( status ) return status;
11839
11840 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11841         if( detach ) {
11842                 /* give thread a chance to complete */
11843                 /* it should remain joinable and hence detachable */
11844                 sleep( 1 );
11845
11846                 status = pthread_detach( t );
11847                 if( status ) return status;
11848         }
11849 #endif
11850
11851 #else
11852         /* Draft 4 pthreads */
11853         status = pthread_create( &t, pthread_attr_default, task, NULL );
11854         if( status ) return status;
11855
11856         if( detach ) {
11857                 /* give thread a chance to complete */
11858                 /* it should remain joinable and hence detachable */
11859                 sleep( 1 );
11860
11861                 status = pthread_detach( &t );
11862                 if( status ) return status;
11863         }
11864 #endif
11865
11866 #ifdef HAVE_LINUX_THREADS
11867         pthread_kill_other_threads_np();
11868 #endif
11869
11870         return 0;
11871
11872 }
11873
11874 EOF
11875 if { (eval echo configure:11876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11876 then
11877   ol_cv_pthread_create=yes
11878 else
11879   echo "configure: failed program was:" >&5
11880   cat conftest.$ac_ext >&5
11881   rm -fr conftest*
11882   ol_cv_pthread_create=no
11883 fi
11884 rm -fr conftest*
11885 fi
11886
11887 fi
11888
11889 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11890
11891                 if test $ol_cv_pthread_create != no ; then
11892                         ol_link_threads=posix
11893                         ol_link_pthreads=""
11894                 fi
11895                 
11896                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11897 if test "$ol_link_threads" = no ; then
11898         # try -kthread
11899         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11900 echo "configure:11901: checking for pthread link with -kthread" >&5
11901 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11902   echo $ac_n "(cached) $ac_c" 1>&6
11903 else
11904   
11905                 # save the flags
11906                 ol_LIBS="$LIBS"
11907                 LIBS="-kthread $LIBS"
11908
11909                 if test "$cross_compiling" = yes; then
11910   cat > conftest.$ac_ext <<EOF
11911 #line 11912 "configure"
11912 #include "confdefs.h"
11913 /* pthread test headers */
11914 #include <pthread.h>
11915 #ifndef NULL
11916 #define NULL (void*)0
11917 #endif
11918
11919 static void *task(p)
11920         void *p;
11921 {
11922         return (void *) (p == NULL);
11923 }
11924
11925 int main() {
11926
11927         /* pthread test function */
11928         pthread_t t;
11929         int status;
11930         int detach = 1;
11931
11932 #ifdef HAVE_PTHREADS_FINAL
11933         /* Final pthreads */
11934         pthread_attr_t attr;
11935
11936         status = pthread_attr_init(&attr);
11937         if( status ) return status;
11938
11939 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11940         if( !detach ) {
11941 #if defined( PTHREAD_CREATE_JOINABLE )
11942                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11943 #else
11944                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11945 #endif
11946
11947 #ifdef PTHREAD_CREATE_DETACHED
11948         } else {
11949                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11950 #endif
11951         }
11952         if( status ) return status;
11953 #endif
11954
11955         status = pthread_create( &t, &attr, task, NULL );
11956         if( status ) return status;
11957
11958 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11959         if( detach ) {
11960                 /* give thread a chance to complete */
11961                 /* it should remain joinable and hence detachable */
11962                 sleep( 1 );
11963
11964                 status = pthread_detach( t );
11965                 if( status ) return status;
11966         }
11967 #endif
11968
11969 #else
11970         /* Draft 4 pthreads */
11971         status = pthread_create( &t, pthread_attr_default, task, NULL );
11972         if( status ) return status;
11973
11974         if( detach ) {
11975                 /* give thread a chance to complete */
11976                 /* it should remain joinable and hence detachable */
11977                 sleep( 1 );
11978
11979                 status = pthread_detach( &t );
11980                 if( status ) return status;
11981         }
11982 #endif
11983
11984 #ifdef HAVE_LINUX_THREADS
11985         pthread_kill_other_threads_np();
11986 #endif
11987
11988         return 0;
11989
11990 ; return 0; }
11991 EOF
11992 if { (eval echo configure:11993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11993   rm -rf conftest*
11994   ol_cv_pthread_kthread=yes
11995 else
11996   echo "configure: failed program was:" >&5
11997   cat conftest.$ac_ext >&5
11998   rm -rf conftest*
11999   ol_cv_pthread_kthread=no
12000 fi
12001 rm -f conftest*
12002 else
12003   cat > conftest.$ac_ext <<EOF
12004 #line 12005 "configure"
12005 #include "confdefs.h"
12006 /* pthread test headers */
12007 #include <pthread.h>
12008 #ifndef NULL
12009 #define NULL (void*)0
12010 #endif
12011
12012 static void *task(p)
12013         void *p;
12014 {
12015         return (void *) (p == NULL);
12016 }
12017
12018
12019 int main(argc, argv)
12020         int argc;
12021         char **argv;
12022 {
12023
12024         /* pthread test function */
12025         pthread_t t;
12026         int status;
12027         int detach = 1;
12028
12029 #ifdef HAVE_PTHREADS_FINAL
12030         /* Final pthreads */
12031         pthread_attr_t attr;
12032
12033         status = pthread_attr_init(&attr);
12034         if( status ) return status;
12035
12036 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12037         if( !detach ) {
12038 #if defined( PTHREAD_CREATE_JOINABLE )
12039                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12040 #else
12041                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12042 #endif
12043
12044 #ifdef PTHREAD_CREATE_DETACHED
12045         } else {
12046                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12047 #endif
12048         }
12049         if( status ) return status;
12050 #endif
12051
12052         status = pthread_create( &t, &attr, task, NULL );
12053         if( status ) return status;
12054
12055 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12056         if( detach ) {
12057                 /* give thread a chance to complete */
12058                 /* it should remain joinable and hence detachable */
12059                 sleep( 1 );
12060
12061                 status = pthread_detach( t );
12062                 if( status ) return status;
12063         }
12064 #endif
12065
12066 #else
12067         /* Draft 4 pthreads */
12068         status = pthread_create( &t, pthread_attr_default, task, NULL );
12069         if( status ) return status;
12070
12071         if( detach ) {
12072                 /* give thread a chance to complete */
12073                 /* it should remain joinable and hence detachable */
12074                 sleep( 1 );
12075
12076                 status = pthread_detach( &t );
12077                 if( status ) return status;
12078         }
12079 #endif
12080
12081 #ifdef HAVE_LINUX_THREADS
12082         pthread_kill_other_threads_np();
12083 #endif
12084
12085         return 0;
12086
12087 }
12088
12089 EOF
12090 if { (eval echo configure:12091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12091 then
12092   ol_cv_pthread_kthread=yes
12093 else
12094   echo "configure: failed program was:" >&5
12095   cat conftest.$ac_ext >&5
12096   rm -fr conftest*
12097   ol_cv_pthread_kthread=no
12098 fi
12099 rm -fr conftest*
12100 fi
12101
12102
12103                 # restore the LIBS
12104                 LIBS="$ol_LIBS"
12105         
12106 fi
12107
12108 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12109
12110         if test $ol_cv_pthread_kthread = yes ; then
12111                 ol_link_pthreads="-kthread"
12112                 ol_link_threads=posix
12113         fi
12114 fi
12115
12116                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12117 if test "$ol_link_threads" = no ; then
12118         # try -pthread
12119         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12120 echo "configure:12121: checking for pthread link with -pthread" >&5
12121 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12122   echo $ac_n "(cached) $ac_c" 1>&6
12123 else
12124   
12125                 # save the flags
12126                 ol_LIBS="$LIBS"
12127                 LIBS="-pthread $LIBS"
12128
12129                 if test "$cross_compiling" = yes; then
12130   cat > conftest.$ac_ext <<EOF
12131 #line 12132 "configure"
12132 #include "confdefs.h"
12133 /* pthread test headers */
12134 #include <pthread.h>
12135 #ifndef NULL
12136 #define NULL (void*)0
12137 #endif
12138
12139 static void *task(p)
12140         void *p;
12141 {
12142         return (void *) (p == NULL);
12143 }
12144
12145 int main() {
12146
12147         /* pthread test function */
12148         pthread_t t;
12149         int status;
12150         int detach = 1;
12151
12152 #ifdef HAVE_PTHREADS_FINAL
12153         /* Final pthreads */
12154         pthread_attr_t attr;
12155
12156         status = pthread_attr_init(&attr);
12157         if( status ) return status;
12158
12159 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12160         if( !detach ) {
12161 #if defined( PTHREAD_CREATE_JOINABLE )
12162                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12163 #else
12164                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12165 #endif
12166
12167 #ifdef PTHREAD_CREATE_DETACHED
12168         } else {
12169                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12170 #endif
12171         }
12172         if( status ) return status;
12173 #endif
12174
12175         status = pthread_create( &t, &attr, task, NULL );
12176         if( status ) return status;
12177
12178 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12179         if( detach ) {
12180                 /* give thread a chance to complete */
12181                 /* it should remain joinable and hence detachable */
12182                 sleep( 1 );
12183
12184                 status = pthread_detach( t );
12185                 if( status ) return status;
12186         }
12187 #endif
12188
12189 #else
12190         /* Draft 4 pthreads */
12191         status = pthread_create( &t, pthread_attr_default, task, NULL );
12192         if( status ) return status;
12193
12194         if( detach ) {
12195                 /* give thread a chance to complete */
12196                 /* it should remain joinable and hence detachable */
12197                 sleep( 1 );
12198
12199                 status = pthread_detach( &t );
12200                 if( status ) return status;
12201         }
12202 #endif
12203
12204 #ifdef HAVE_LINUX_THREADS
12205         pthread_kill_other_threads_np();
12206 #endif
12207
12208         return 0;
12209
12210 ; return 0; }
12211 EOF
12212 if { (eval echo configure:12213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12213   rm -rf conftest*
12214   ol_cv_pthread_pthread=yes
12215 else
12216   echo "configure: failed program was:" >&5
12217   cat conftest.$ac_ext >&5
12218   rm -rf conftest*
12219   ol_cv_pthread_pthread=no
12220 fi
12221 rm -f conftest*
12222 else
12223   cat > conftest.$ac_ext <<EOF
12224 #line 12225 "configure"
12225 #include "confdefs.h"
12226 /* pthread test headers */
12227 #include <pthread.h>
12228 #ifndef NULL
12229 #define NULL (void*)0
12230 #endif
12231
12232 static void *task(p)
12233         void *p;
12234 {
12235         return (void *) (p == NULL);
12236 }
12237
12238
12239 int main(argc, argv)
12240         int argc;
12241         char **argv;
12242 {
12243
12244         /* pthread test function */
12245         pthread_t t;
12246         int status;
12247         int detach = 1;
12248
12249 #ifdef HAVE_PTHREADS_FINAL
12250         /* Final pthreads */
12251         pthread_attr_t attr;
12252
12253         status = pthread_attr_init(&attr);
12254         if( status ) return status;
12255
12256 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12257         if( !detach ) {
12258 #if defined( PTHREAD_CREATE_JOINABLE )
12259                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12260 #else
12261                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12262 #endif
12263
12264 #ifdef PTHREAD_CREATE_DETACHED
12265         } else {
12266                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12267 #endif
12268         }
12269         if( status ) return status;
12270 #endif
12271
12272         status = pthread_create( &t, &attr, task, NULL );
12273         if( status ) return status;
12274
12275 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12276         if( detach ) {
12277                 /* give thread a chance to complete */
12278                 /* it should remain joinable and hence detachable */
12279                 sleep( 1 );
12280
12281                 status = pthread_detach( t );
12282                 if( status ) return status;
12283         }
12284 #endif
12285
12286 #else
12287         /* Draft 4 pthreads */
12288         status = pthread_create( &t, pthread_attr_default, task, NULL );
12289         if( status ) return status;
12290
12291         if( detach ) {
12292                 /* give thread a chance to complete */
12293                 /* it should remain joinable and hence detachable */
12294                 sleep( 1 );
12295
12296                 status = pthread_detach( &t );
12297                 if( status ) return status;
12298         }
12299 #endif
12300
12301 #ifdef HAVE_LINUX_THREADS
12302         pthread_kill_other_threads_np();
12303 #endif
12304
12305         return 0;
12306
12307 }
12308
12309 EOF
12310 if { (eval echo configure:12311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12311 then
12312   ol_cv_pthread_pthread=yes
12313 else
12314   echo "configure: failed program was:" >&5
12315   cat conftest.$ac_ext >&5
12316   rm -fr conftest*
12317   ol_cv_pthread_pthread=no
12318 fi
12319 rm -fr conftest*
12320 fi
12321
12322
12323                 # restore the LIBS
12324                 LIBS="$ol_LIBS"
12325         
12326 fi
12327
12328 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12329
12330         if test $ol_cv_pthread_pthread = yes ; then
12331                 ol_link_pthreads="-pthread"
12332                 ol_link_threads=posix
12333         fi
12334 fi
12335
12336                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12337 if test "$ol_link_threads" = no ; then
12338         # try -pthreads
12339         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12340 echo "configure:12341: checking for pthread link with -pthreads" >&5
12341 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12342   echo $ac_n "(cached) $ac_c" 1>&6
12343 else
12344   
12345                 # save the flags
12346                 ol_LIBS="$LIBS"
12347                 LIBS="-pthreads $LIBS"
12348
12349                 if test "$cross_compiling" = yes; then
12350   cat > conftest.$ac_ext <<EOF
12351 #line 12352 "configure"
12352 #include "confdefs.h"
12353 /* pthread test headers */
12354 #include <pthread.h>
12355 #ifndef NULL
12356 #define NULL (void*)0
12357 #endif
12358
12359 static void *task(p)
12360         void *p;
12361 {
12362         return (void *) (p == NULL);
12363 }
12364
12365 int main() {
12366
12367         /* pthread test function */
12368         pthread_t t;
12369         int status;
12370         int detach = 1;
12371
12372 #ifdef HAVE_PTHREADS_FINAL
12373         /* Final pthreads */
12374         pthread_attr_t attr;
12375
12376         status = pthread_attr_init(&attr);
12377         if( status ) return status;
12378
12379 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12380         if( !detach ) {
12381 #if defined( PTHREAD_CREATE_JOINABLE )
12382                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12383 #else
12384                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12385 #endif
12386
12387 #ifdef PTHREAD_CREATE_DETACHED
12388         } else {
12389                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12390 #endif
12391         }
12392         if( status ) return status;
12393 #endif
12394
12395         status = pthread_create( &t, &attr, task, NULL );
12396         if( status ) return status;
12397
12398 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12399         if( detach ) {
12400                 /* give thread a chance to complete */
12401                 /* it should remain joinable and hence detachable */
12402                 sleep( 1 );
12403
12404                 status = pthread_detach( t );
12405                 if( status ) return status;
12406         }
12407 #endif
12408
12409 #else
12410         /* Draft 4 pthreads */
12411         status = pthread_create( &t, pthread_attr_default, task, NULL );
12412         if( status ) return status;
12413
12414         if( detach ) {
12415                 /* give thread a chance to complete */
12416                 /* it should remain joinable and hence detachable */
12417                 sleep( 1 );
12418
12419                 status = pthread_detach( &t );
12420                 if( status ) return status;
12421         }
12422 #endif
12423
12424 #ifdef HAVE_LINUX_THREADS
12425         pthread_kill_other_threads_np();
12426 #endif
12427
12428         return 0;
12429
12430 ; return 0; }
12431 EOF
12432 if { (eval echo configure:12433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12433   rm -rf conftest*
12434   ol_cv_pthread_pthreads=yes
12435 else
12436   echo "configure: failed program was:" >&5
12437   cat conftest.$ac_ext >&5
12438   rm -rf conftest*
12439   ol_cv_pthread_pthreads=no
12440 fi
12441 rm -f conftest*
12442 else
12443   cat > conftest.$ac_ext <<EOF
12444 #line 12445 "configure"
12445 #include "confdefs.h"
12446 /* pthread test headers */
12447 #include <pthread.h>
12448 #ifndef NULL
12449 #define NULL (void*)0
12450 #endif
12451
12452 static void *task(p)
12453         void *p;
12454 {
12455         return (void *) (p == NULL);
12456 }
12457
12458
12459 int main(argc, argv)
12460         int argc;
12461         char **argv;
12462 {
12463
12464         /* pthread test function */
12465         pthread_t t;
12466         int status;
12467         int detach = 1;
12468
12469 #ifdef HAVE_PTHREADS_FINAL
12470         /* Final pthreads */
12471         pthread_attr_t attr;
12472
12473         status = pthread_attr_init(&attr);
12474         if( status ) return status;
12475
12476 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12477         if( !detach ) {
12478 #if defined( PTHREAD_CREATE_JOINABLE )
12479                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12480 #else
12481                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12482 #endif
12483
12484 #ifdef PTHREAD_CREATE_DETACHED
12485         } else {
12486                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12487 #endif
12488         }
12489         if( status ) return status;
12490 #endif
12491
12492         status = pthread_create( &t, &attr, task, NULL );
12493         if( status ) return status;
12494
12495 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12496         if( detach ) {
12497                 /* give thread a chance to complete */
12498                 /* it should remain joinable and hence detachable */
12499                 sleep( 1 );
12500
12501                 status = pthread_detach( t );
12502                 if( status ) return status;
12503         }
12504 #endif
12505
12506 #else
12507         /* Draft 4 pthreads */
12508         status = pthread_create( &t, pthread_attr_default, task, NULL );
12509         if( status ) return status;
12510
12511         if( detach ) {
12512                 /* give thread a chance to complete */
12513                 /* it should remain joinable and hence detachable */
12514                 sleep( 1 );
12515
12516                 status = pthread_detach( &t );
12517                 if( status ) return status;
12518         }
12519 #endif
12520
12521 #ifdef HAVE_LINUX_THREADS
12522         pthread_kill_other_threads_np();
12523 #endif
12524
12525         return 0;
12526
12527 }
12528
12529 EOF
12530 if { (eval echo configure:12531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12531 then
12532   ol_cv_pthread_pthreads=yes
12533 else
12534   echo "configure: failed program was:" >&5
12535   cat conftest.$ac_ext >&5
12536   rm -fr conftest*
12537   ol_cv_pthread_pthreads=no
12538 fi
12539 rm -fr conftest*
12540 fi
12541
12542
12543                 # restore the LIBS
12544                 LIBS="$ol_LIBS"
12545         
12546 fi
12547
12548 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12549
12550         if test $ol_cv_pthread_pthreads = yes ; then
12551                 ol_link_pthreads="-pthreads"
12552                 ol_link_threads=posix
12553         fi
12554 fi
12555
12556                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12557 if test "$ol_link_threads" = no ; then
12558         # try -mthreads
12559         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12560 echo "configure:12561: checking for pthread link with -mthreads" >&5
12561 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12562   echo $ac_n "(cached) $ac_c" 1>&6
12563 else
12564   
12565                 # save the flags
12566                 ol_LIBS="$LIBS"
12567                 LIBS="-mthreads $LIBS"
12568
12569                 if test "$cross_compiling" = yes; then
12570   cat > conftest.$ac_ext <<EOF
12571 #line 12572 "configure"
12572 #include "confdefs.h"
12573 /* pthread test headers */
12574 #include <pthread.h>
12575 #ifndef NULL
12576 #define NULL (void*)0
12577 #endif
12578
12579 static void *task(p)
12580         void *p;
12581 {
12582         return (void *) (p == NULL);
12583 }
12584
12585 int main() {
12586
12587         /* pthread test function */
12588         pthread_t t;
12589         int status;
12590         int detach = 1;
12591
12592 #ifdef HAVE_PTHREADS_FINAL
12593         /* Final pthreads */
12594         pthread_attr_t attr;
12595
12596         status = pthread_attr_init(&attr);
12597         if( status ) return status;
12598
12599 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12600         if( !detach ) {
12601 #if defined( PTHREAD_CREATE_JOINABLE )
12602                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12603 #else
12604                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12605 #endif
12606
12607 #ifdef PTHREAD_CREATE_DETACHED
12608         } else {
12609                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12610 #endif
12611         }
12612         if( status ) return status;
12613 #endif
12614
12615         status = pthread_create( &t, &attr, task, NULL );
12616         if( status ) return status;
12617
12618 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12619         if( detach ) {
12620                 /* give thread a chance to complete */
12621                 /* it should remain joinable and hence detachable */
12622                 sleep( 1 );
12623
12624                 status = pthread_detach( t );
12625                 if( status ) return status;
12626         }
12627 #endif
12628
12629 #else
12630         /* Draft 4 pthreads */
12631         status = pthread_create( &t, pthread_attr_default, task, NULL );
12632         if( status ) return status;
12633
12634         if( detach ) {
12635                 /* give thread a chance to complete */
12636                 /* it should remain joinable and hence detachable */
12637                 sleep( 1 );
12638
12639                 status = pthread_detach( &t );
12640                 if( status ) return status;
12641         }
12642 #endif
12643
12644 #ifdef HAVE_LINUX_THREADS
12645         pthread_kill_other_threads_np();
12646 #endif
12647
12648         return 0;
12649
12650 ; return 0; }
12651 EOF
12652 if { (eval echo configure:12653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12653   rm -rf conftest*
12654   ol_cv_pthread_mthreads=yes
12655 else
12656   echo "configure: failed program was:" >&5
12657   cat conftest.$ac_ext >&5
12658   rm -rf conftest*
12659   ol_cv_pthread_mthreads=no
12660 fi
12661 rm -f conftest*
12662 else
12663   cat > conftest.$ac_ext <<EOF
12664 #line 12665 "configure"
12665 #include "confdefs.h"
12666 /* pthread test headers */
12667 #include <pthread.h>
12668 #ifndef NULL
12669 #define NULL (void*)0
12670 #endif
12671
12672 static void *task(p)
12673         void *p;
12674 {
12675         return (void *) (p == NULL);
12676 }
12677
12678
12679 int main(argc, argv)
12680         int argc;
12681         char **argv;
12682 {
12683
12684         /* pthread test function */
12685         pthread_t t;
12686         int status;
12687         int detach = 1;
12688
12689 #ifdef HAVE_PTHREADS_FINAL
12690         /* Final pthreads */
12691         pthread_attr_t attr;
12692
12693         status = pthread_attr_init(&attr);
12694         if( status ) return status;
12695
12696 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12697         if( !detach ) {
12698 #if defined( PTHREAD_CREATE_JOINABLE )
12699                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12700 #else
12701                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12702 #endif
12703
12704 #ifdef PTHREAD_CREATE_DETACHED
12705         } else {
12706                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12707 #endif
12708         }
12709         if( status ) return status;
12710 #endif
12711
12712         status = pthread_create( &t, &attr, task, NULL );
12713         if( status ) return status;
12714
12715 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12716         if( detach ) {
12717                 /* give thread a chance to complete */
12718                 /* it should remain joinable and hence detachable */
12719                 sleep( 1 );
12720
12721                 status = pthread_detach( t );
12722                 if( status ) return status;
12723         }
12724 #endif
12725
12726 #else
12727         /* Draft 4 pthreads */
12728         status = pthread_create( &t, pthread_attr_default, task, NULL );
12729         if( status ) return status;
12730
12731         if( detach ) {
12732                 /* give thread a chance to complete */
12733                 /* it should remain joinable and hence detachable */
12734                 sleep( 1 );
12735
12736                 status = pthread_detach( &t );
12737                 if( status ) return status;
12738         }
12739 #endif
12740
12741 #ifdef HAVE_LINUX_THREADS
12742         pthread_kill_other_threads_np();
12743 #endif
12744
12745         return 0;
12746
12747 }
12748
12749 EOF
12750 if { (eval echo configure:12751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12751 then
12752   ol_cv_pthread_mthreads=yes
12753 else
12754   echo "configure: failed program was:" >&5
12755   cat conftest.$ac_ext >&5
12756   rm -fr conftest*
12757   ol_cv_pthread_mthreads=no
12758 fi
12759 rm -fr conftest*
12760 fi
12761
12762
12763                 # restore the LIBS
12764                 LIBS="$ol_LIBS"
12765         
12766 fi
12767
12768 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12769
12770         if test $ol_cv_pthread_mthreads = yes ; then
12771                 ol_link_pthreads="-mthreads"
12772                 ol_link_threads=posix
12773         fi
12774 fi
12775
12776                 # Pthread try link: -thread (ol_cv_pthread_thread)
12777 if test "$ol_link_threads" = no ; then
12778         # try -thread
12779         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12780 echo "configure:12781: checking for pthread link with -thread" >&5
12781 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12782   echo $ac_n "(cached) $ac_c" 1>&6
12783 else
12784   
12785                 # save the flags
12786                 ol_LIBS="$LIBS"
12787                 LIBS="-thread $LIBS"
12788
12789                 if test "$cross_compiling" = yes; then
12790   cat > conftest.$ac_ext <<EOF
12791 #line 12792 "configure"
12792 #include "confdefs.h"
12793 /* pthread test headers */
12794 #include <pthread.h>
12795 #ifndef NULL
12796 #define NULL (void*)0
12797 #endif
12798
12799 static void *task(p)
12800         void *p;
12801 {
12802         return (void *) (p == NULL);
12803 }
12804
12805 int main() {
12806
12807         /* pthread test function */
12808         pthread_t t;
12809         int status;
12810         int detach = 1;
12811
12812 #ifdef HAVE_PTHREADS_FINAL
12813         /* Final pthreads */
12814         pthread_attr_t attr;
12815
12816         status = pthread_attr_init(&attr);
12817         if( status ) return status;
12818
12819 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12820         if( !detach ) {
12821 #if defined( PTHREAD_CREATE_JOINABLE )
12822                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12823 #else
12824                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12825 #endif
12826
12827 #ifdef PTHREAD_CREATE_DETACHED
12828         } else {
12829                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12830 #endif
12831         }
12832         if( status ) return status;
12833 #endif
12834
12835         status = pthread_create( &t, &attr, task, NULL );
12836         if( status ) return status;
12837
12838 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12839         if( detach ) {
12840                 /* give thread a chance to complete */
12841                 /* it should remain joinable and hence detachable */
12842                 sleep( 1 );
12843
12844                 status = pthread_detach( t );
12845                 if( status ) return status;
12846         }
12847 #endif
12848
12849 #else
12850         /* Draft 4 pthreads */
12851         status = pthread_create( &t, pthread_attr_default, task, NULL );
12852         if( status ) return status;
12853
12854         if( detach ) {
12855                 /* give thread a chance to complete */
12856                 /* it should remain joinable and hence detachable */
12857                 sleep( 1 );
12858
12859                 status = pthread_detach( &t );
12860                 if( status ) return status;
12861         }
12862 #endif
12863
12864 #ifdef HAVE_LINUX_THREADS
12865         pthread_kill_other_threads_np();
12866 #endif
12867
12868         return 0;
12869
12870 ; return 0; }
12871 EOF
12872 if { (eval echo configure:12873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12873   rm -rf conftest*
12874   ol_cv_pthread_thread=yes
12875 else
12876   echo "configure: failed program was:" >&5
12877   cat conftest.$ac_ext >&5
12878   rm -rf conftest*
12879   ol_cv_pthread_thread=no
12880 fi
12881 rm -f conftest*
12882 else
12883   cat > conftest.$ac_ext <<EOF
12884 #line 12885 "configure"
12885 #include "confdefs.h"
12886 /* pthread test headers */
12887 #include <pthread.h>
12888 #ifndef NULL
12889 #define NULL (void*)0
12890 #endif
12891
12892 static void *task(p)
12893         void *p;
12894 {
12895         return (void *) (p == NULL);
12896 }
12897
12898
12899 int main(argc, argv)
12900         int argc;
12901         char **argv;
12902 {
12903
12904         /* pthread test function */
12905         pthread_t t;
12906         int status;
12907         int detach = 1;
12908
12909 #ifdef HAVE_PTHREADS_FINAL
12910         /* Final pthreads */
12911         pthread_attr_t attr;
12912
12913         status = pthread_attr_init(&attr);
12914         if( status ) return status;
12915
12916 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12917         if( !detach ) {
12918 #if defined( PTHREAD_CREATE_JOINABLE )
12919                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12920 #else
12921                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12922 #endif
12923
12924 #ifdef PTHREAD_CREATE_DETACHED
12925         } else {
12926                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12927 #endif
12928         }
12929         if( status ) return status;
12930 #endif
12931
12932         status = pthread_create( &t, &attr, task, NULL );
12933         if( status ) return status;
12934
12935 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12936         if( detach ) {
12937                 /* give thread a chance to complete */
12938                 /* it should remain joinable and hence detachable */
12939                 sleep( 1 );
12940
12941                 status = pthread_detach( t );
12942                 if( status ) return status;
12943         }
12944 #endif
12945
12946 #else
12947         /* Draft 4 pthreads */
12948         status = pthread_create( &t, pthread_attr_default, task, NULL );
12949         if( status ) return status;
12950
12951         if( detach ) {
12952                 /* give thread a chance to complete */
12953                 /* it should remain joinable and hence detachable */
12954                 sleep( 1 );
12955
12956                 status = pthread_detach( &t );
12957                 if( status ) return status;
12958         }
12959 #endif
12960
12961 #ifdef HAVE_LINUX_THREADS
12962         pthread_kill_other_threads_np();
12963 #endif
12964
12965         return 0;
12966
12967 }
12968
12969 EOF
12970 if { (eval echo configure:12971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12971 then
12972   ol_cv_pthread_thread=yes
12973 else
12974   echo "configure: failed program was:" >&5
12975   cat conftest.$ac_ext >&5
12976   rm -fr conftest*
12977   ol_cv_pthread_thread=no
12978 fi
12979 rm -fr conftest*
12980 fi
12981
12982
12983                 # restore the LIBS
12984                 LIBS="$ol_LIBS"
12985         
12986 fi
12987
12988 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12989
12990         if test $ol_cv_pthread_thread = yes ; then
12991                 ol_link_pthreads="-thread"
12992                 ol_link_threads=posix
12993         fi
12994 fi
12995
12996
12997                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12998 if test "$ol_link_threads" = no ; then
12999         # try -lpthread -lmach -lexc -lc_r
13000         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
13001 echo "configure:13002: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
13002 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
13003   echo $ac_n "(cached) $ac_c" 1>&6
13004 else
13005   
13006                 # save the flags
13007                 ol_LIBS="$LIBS"
13008                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
13009
13010                 if test "$cross_compiling" = yes; then
13011   cat > conftest.$ac_ext <<EOF
13012 #line 13013 "configure"
13013 #include "confdefs.h"
13014 /* pthread test headers */
13015 #include <pthread.h>
13016 #ifndef NULL
13017 #define NULL (void*)0
13018 #endif
13019
13020 static void *task(p)
13021         void *p;
13022 {
13023         return (void *) (p == NULL);
13024 }
13025
13026 int main() {
13027
13028         /* pthread test function */
13029         pthread_t t;
13030         int status;
13031         int detach = 1;
13032
13033 #ifdef HAVE_PTHREADS_FINAL
13034         /* Final pthreads */
13035         pthread_attr_t attr;
13036
13037         status = pthread_attr_init(&attr);
13038         if( status ) return status;
13039
13040 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13041         if( !detach ) {
13042 #if defined( PTHREAD_CREATE_JOINABLE )
13043                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13044 #else
13045                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13046 #endif
13047
13048 #ifdef PTHREAD_CREATE_DETACHED
13049         } else {
13050                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13051 #endif
13052         }
13053         if( status ) return status;
13054 #endif
13055
13056         status = pthread_create( &t, &attr, task, NULL );
13057         if( status ) return status;
13058
13059 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13060         if( detach ) {
13061                 /* give thread a chance to complete */
13062                 /* it should remain joinable and hence detachable */
13063                 sleep( 1 );
13064
13065                 status = pthread_detach( t );
13066                 if( status ) return status;
13067         }
13068 #endif
13069
13070 #else
13071         /* Draft 4 pthreads */
13072         status = pthread_create( &t, pthread_attr_default, task, NULL );
13073         if( status ) return status;
13074
13075         if( detach ) {
13076                 /* give thread a chance to complete */
13077                 /* it should remain joinable and hence detachable */
13078                 sleep( 1 );
13079
13080                 status = pthread_detach( &t );
13081                 if( status ) return status;
13082         }
13083 #endif
13084
13085 #ifdef HAVE_LINUX_THREADS
13086         pthread_kill_other_threads_np();
13087 #endif
13088
13089         return 0;
13090
13091 ; return 0; }
13092 EOF
13093 if { (eval echo configure:13094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13094   rm -rf conftest*
13095   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13096 else
13097   echo "configure: failed program was:" >&5
13098   cat conftest.$ac_ext >&5
13099   rm -rf conftest*
13100   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13101 fi
13102 rm -f conftest*
13103 else
13104   cat > conftest.$ac_ext <<EOF
13105 #line 13106 "configure"
13106 #include "confdefs.h"
13107 /* pthread test headers */
13108 #include <pthread.h>
13109 #ifndef NULL
13110 #define NULL (void*)0
13111 #endif
13112
13113 static void *task(p)
13114         void *p;
13115 {
13116         return (void *) (p == NULL);
13117 }
13118
13119
13120 int main(argc, argv)
13121         int argc;
13122         char **argv;
13123 {
13124
13125         /* pthread test function */
13126         pthread_t t;
13127         int status;
13128         int detach = 1;
13129
13130 #ifdef HAVE_PTHREADS_FINAL
13131         /* Final pthreads */
13132         pthread_attr_t attr;
13133
13134         status = pthread_attr_init(&attr);
13135         if( status ) return status;
13136
13137 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13138         if( !detach ) {
13139 #if defined( PTHREAD_CREATE_JOINABLE )
13140                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13141 #else
13142                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13143 #endif
13144
13145 #ifdef PTHREAD_CREATE_DETACHED
13146         } else {
13147                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13148 #endif
13149         }
13150         if( status ) return status;
13151 #endif
13152
13153         status = pthread_create( &t, &attr, task, NULL );
13154         if( status ) return status;
13155
13156 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13157         if( detach ) {
13158                 /* give thread a chance to complete */
13159                 /* it should remain joinable and hence detachable */
13160                 sleep( 1 );
13161
13162                 status = pthread_detach( t );
13163                 if( status ) return status;
13164         }
13165 #endif
13166
13167 #else
13168         /* Draft 4 pthreads */
13169         status = pthread_create( &t, pthread_attr_default, task, NULL );
13170         if( status ) return status;
13171
13172         if( detach ) {
13173                 /* give thread a chance to complete */
13174                 /* it should remain joinable and hence detachable */
13175                 sleep( 1 );
13176
13177                 status = pthread_detach( &t );
13178                 if( status ) return status;
13179         }
13180 #endif
13181
13182 #ifdef HAVE_LINUX_THREADS
13183         pthread_kill_other_threads_np();
13184 #endif
13185
13186         return 0;
13187
13188 }
13189
13190 EOF
13191 if { (eval echo configure:13192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13192 then
13193   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13194 else
13195   echo "configure: failed program was:" >&5
13196   cat conftest.$ac_ext >&5
13197   rm -fr conftest*
13198   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13199 fi
13200 rm -fr conftest*
13201 fi
13202
13203
13204                 # restore the LIBS
13205                 LIBS="$ol_LIBS"
13206         
13207 fi
13208
13209 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13210
13211         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13212                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13213                 ol_link_threads=posix
13214         fi
13215 fi
13216
13217                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13218 if test "$ol_link_threads" = no ; then
13219         # try -lpthread -lmach -lexc
13220         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13221 echo "configure:13222: checking for pthread link with -lpthread -lmach -lexc" >&5
13222 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13223   echo $ac_n "(cached) $ac_c" 1>&6
13224 else
13225   
13226                 # save the flags
13227                 ol_LIBS="$LIBS"
13228                 LIBS="-lpthread -lmach -lexc $LIBS"
13229
13230                 if test "$cross_compiling" = yes; then
13231   cat > conftest.$ac_ext <<EOF
13232 #line 13233 "configure"
13233 #include "confdefs.h"
13234 /* pthread test headers */
13235 #include <pthread.h>
13236 #ifndef NULL
13237 #define NULL (void*)0
13238 #endif
13239
13240 static void *task(p)
13241         void *p;
13242 {
13243         return (void *) (p == NULL);
13244 }
13245
13246 int main() {
13247
13248         /* pthread test function */
13249         pthread_t t;
13250         int status;
13251         int detach = 1;
13252
13253 #ifdef HAVE_PTHREADS_FINAL
13254         /* Final pthreads */
13255         pthread_attr_t attr;
13256
13257         status = pthread_attr_init(&attr);
13258         if( status ) return status;
13259
13260 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13261         if( !detach ) {
13262 #if defined( PTHREAD_CREATE_JOINABLE )
13263                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13264 #else
13265                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13266 #endif
13267
13268 #ifdef PTHREAD_CREATE_DETACHED
13269         } else {
13270                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13271 #endif
13272         }
13273         if( status ) return status;
13274 #endif
13275
13276         status = pthread_create( &t, &attr, task, NULL );
13277         if( status ) return status;
13278
13279 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13280         if( detach ) {
13281                 /* give thread a chance to complete */
13282                 /* it should remain joinable and hence detachable */
13283                 sleep( 1 );
13284
13285                 status = pthread_detach( t );
13286                 if( status ) return status;
13287         }
13288 #endif
13289
13290 #else
13291         /* Draft 4 pthreads */
13292         status = pthread_create( &t, pthread_attr_default, task, NULL );
13293         if( status ) return status;
13294
13295         if( detach ) {
13296                 /* give thread a chance to complete */
13297                 /* it should remain joinable and hence detachable */
13298                 sleep( 1 );
13299
13300                 status = pthread_detach( &t );
13301                 if( status ) return status;
13302         }
13303 #endif
13304
13305 #ifdef HAVE_LINUX_THREADS
13306         pthread_kill_other_threads_np();
13307 #endif
13308
13309         return 0;
13310
13311 ; return 0; }
13312 EOF
13313 if { (eval echo configure:13314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13314   rm -rf conftest*
13315   ol_cv_pthread_lpthread_lmach_lexc=yes
13316 else
13317   echo "configure: failed program was:" >&5
13318   cat conftest.$ac_ext >&5
13319   rm -rf conftest*
13320   ol_cv_pthread_lpthread_lmach_lexc=no
13321 fi
13322 rm -f conftest*
13323 else
13324   cat > conftest.$ac_ext <<EOF
13325 #line 13326 "configure"
13326 #include "confdefs.h"
13327 /* pthread test headers */
13328 #include <pthread.h>
13329 #ifndef NULL
13330 #define NULL (void*)0
13331 #endif
13332
13333 static void *task(p)
13334         void *p;
13335 {
13336         return (void *) (p == NULL);
13337 }
13338
13339
13340 int main(argc, argv)
13341         int argc;
13342         char **argv;
13343 {
13344
13345         /* pthread test function */
13346         pthread_t t;
13347         int status;
13348         int detach = 1;
13349
13350 #ifdef HAVE_PTHREADS_FINAL
13351         /* Final pthreads */
13352         pthread_attr_t attr;
13353
13354         status = pthread_attr_init(&attr);
13355         if( status ) return status;
13356
13357 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13358         if( !detach ) {
13359 #if defined( PTHREAD_CREATE_JOINABLE )
13360                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13361 #else
13362                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13363 #endif
13364
13365 #ifdef PTHREAD_CREATE_DETACHED
13366         } else {
13367                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13368 #endif
13369         }
13370         if( status ) return status;
13371 #endif
13372
13373         status = pthread_create( &t, &attr, task, NULL );
13374         if( status ) return status;
13375
13376 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13377         if( detach ) {
13378                 /* give thread a chance to complete */
13379                 /* it should remain joinable and hence detachable */
13380                 sleep( 1 );
13381
13382                 status = pthread_detach( t );
13383                 if( status ) return status;
13384         }
13385 #endif
13386
13387 #else
13388         /* Draft 4 pthreads */
13389         status = pthread_create( &t, pthread_attr_default, task, NULL );
13390         if( status ) return status;
13391
13392         if( detach ) {
13393                 /* give thread a chance to complete */
13394                 /* it should remain joinable and hence detachable */
13395                 sleep( 1 );
13396
13397                 status = pthread_detach( &t );
13398                 if( status ) return status;
13399         }
13400 #endif
13401
13402 #ifdef HAVE_LINUX_THREADS
13403         pthread_kill_other_threads_np();
13404 #endif
13405
13406         return 0;
13407
13408 }
13409
13410 EOF
13411 if { (eval echo configure:13412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13412 then
13413   ol_cv_pthread_lpthread_lmach_lexc=yes
13414 else
13415   echo "configure: failed program was:" >&5
13416   cat conftest.$ac_ext >&5
13417   rm -fr conftest*
13418   ol_cv_pthread_lpthread_lmach_lexc=no
13419 fi
13420 rm -fr conftest*
13421 fi
13422
13423
13424                 # restore the LIBS
13425                 LIBS="$ol_LIBS"
13426         
13427 fi
13428
13429 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13430
13431         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13432                 ol_link_pthreads="-lpthread -lmach -lexc"
13433                 ol_link_threads=posix
13434         fi
13435 fi
13436
13437
13438                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13439 if test "$ol_link_threads" = no ; then
13440         # try -lpthread -Wl,-woff,85
13441         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13442 echo "configure:13443: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13443 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13444   echo $ac_n "(cached) $ac_c" 1>&6
13445 else
13446   
13447                 # save the flags
13448                 ol_LIBS="$LIBS"
13449                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13450
13451                 if test "$cross_compiling" = yes; then
13452   cat > conftest.$ac_ext <<EOF
13453 #line 13454 "configure"
13454 #include "confdefs.h"
13455 /* pthread test headers */
13456 #include <pthread.h>
13457 #ifndef NULL
13458 #define NULL (void*)0
13459 #endif
13460
13461 static void *task(p)
13462         void *p;
13463 {
13464         return (void *) (p == NULL);
13465 }
13466
13467 int main() {
13468
13469         /* pthread test function */
13470         pthread_t t;
13471         int status;
13472         int detach = 1;
13473
13474 #ifdef HAVE_PTHREADS_FINAL
13475         /* Final pthreads */
13476         pthread_attr_t attr;
13477
13478         status = pthread_attr_init(&attr);
13479         if( status ) return status;
13480
13481 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13482         if( !detach ) {
13483 #if defined( PTHREAD_CREATE_JOINABLE )
13484                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13485 #else
13486                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13487 #endif
13488
13489 #ifdef PTHREAD_CREATE_DETACHED
13490         } else {
13491                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13492 #endif
13493         }
13494         if( status ) return status;
13495 #endif
13496
13497         status = pthread_create( &t, &attr, task, NULL );
13498         if( status ) return status;
13499
13500 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13501         if( detach ) {
13502                 /* give thread a chance to complete */
13503                 /* it should remain joinable and hence detachable */
13504                 sleep( 1 );
13505
13506                 status = pthread_detach( t );
13507                 if( status ) return status;
13508         }
13509 #endif
13510
13511 #else
13512         /* Draft 4 pthreads */
13513         status = pthread_create( &t, pthread_attr_default, task, NULL );
13514         if( status ) return status;
13515
13516         if( detach ) {
13517                 /* give thread a chance to complete */
13518                 /* it should remain joinable and hence detachable */
13519                 sleep( 1 );
13520
13521                 status = pthread_detach( &t );
13522                 if( status ) return status;
13523         }
13524 #endif
13525
13526 #ifdef HAVE_LINUX_THREADS
13527         pthread_kill_other_threads_np();
13528 #endif
13529
13530         return 0;
13531
13532 ; return 0; }
13533 EOF
13534 if { (eval echo configure:13535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13535   rm -rf conftest*
13536   ol_cv_pthread_lib_lpthread_woff=yes
13537 else
13538   echo "configure: failed program was:" >&5
13539   cat conftest.$ac_ext >&5
13540   rm -rf conftest*
13541   ol_cv_pthread_lib_lpthread_woff=no
13542 fi
13543 rm -f conftest*
13544 else
13545   cat > conftest.$ac_ext <<EOF
13546 #line 13547 "configure"
13547 #include "confdefs.h"
13548 /* pthread test headers */
13549 #include <pthread.h>
13550 #ifndef NULL
13551 #define NULL (void*)0
13552 #endif
13553
13554 static void *task(p)
13555         void *p;
13556 {
13557         return (void *) (p == NULL);
13558 }
13559
13560
13561 int main(argc, argv)
13562         int argc;
13563         char **argv;
13564 {
13565
13566         /* pthread test function */
13567         pthread_t t;
13568         int status;
13569         int detach = 1;
13570
13571 #ifdef HAVE_PTHREADS_FINAL
13572         /* Final pthreads */
13573         pthread_attr_t attr;
13574
13575         status = pthread_attr_init(&attr);
13576         if( status ) return status;
13577
13578 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13579         if( !detach ) {
13580 #if defined( PTHREAD_CREATE_JOINABLE )
13581                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13582 #else
13583                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13584 #endif
13585
13586 #ifdef PTHREAD_CREATE_DETACHED
13587         } else {
13588                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13589 #endif
13590         }
13591         if( status ) return status;
13592 #endif
13593
13594         status = pthread_create( &t, &attr, task, NULL );
13595         if( status ) return status;
13596
13597 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13598         if( detach ) {
13599                 /* give thread a chance to complete */
13600                 /* it should remain joinable and hence detachable */
13601                 sleep( 1 );
13602
13603                 status = pthread_detach( t );
13604                 if( status ) return status;
13605         }
13606 #endif
13607
13608 #else
13609         /* Draft 4 pthreads */
13610         status = pthread_create( &t, pthread_attr_default, task, NULL );
13611         if( status ) return status;
13612
13613         if( detach ) {
13614                 /* give thread a chance to complete */
13615                 /* it should remain joinable and hence detachable */
13616                 sleep( 1 );
13617
13618                 status = pthread_detach( &t );
13619                 if( status ) return status;
13620         }
13621 #endif
13622
13623 #ifdef HAVE_LINUX_THREADS
13624         pthread_kill_other_threads_np();
13625 #endif
13626
13627         return 0;
13628
13629 }
13630
13631 EOF
13632 if { (eval echo configure:13633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13633 then
13634   ol_cv_pthread_lib_lpthread_woff=yes
13635 else
13636   echo "configure: failed program was:" >&5
13637   cat conftest.$ac_ext >&5
13638   rm -fr conftest*
13639   ol_cv_pthread_lib_lpthread_woff=no
13640 fi
13641 rm -fr conftest*
13642 fi
13643
13644
13645                 # restore the LIBS
13646                 LIBS="$ol_LIBS"
13647         
13648 fi
13649
13650 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13651
13652         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13653                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13654                 ol_link_threads=posix
13655         fi
13656 fi
13657
13658
13659                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13660 if test "$ol_link_threads" = no ; then
13661         # try -lpthread
13662         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13663 echo "configure:13664: checking for pthread link with -lpthread" >&5
13664 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13665   echo $ac_n "(cached) $ac_c" 1>&6
13666 else
13667   
13668                 # save the flags
13669                 ol_LIBS="$LIBS"
13670                 LIBS="-lpthread $LIBS"
13671
13672                 if test "$cross_compiling" = yes; then
13673   cat > conftest.$ac_ext <<EOF
13674 #line 13675 "configure"
13675 #include "confdefs.h"
13676 /* pthread test headers */
13677 #include <pthread.h>
13678 #ifndef NULL
13679 #define NULL (void*)0
13680 #endif
13681
13682 static void *task(p)
13683         void *p;
13684 {
13685         return (void *) (p == NULL);
13686 }
13687
13688 int main() {
13689
13690         /* pthread test function */
13691         pthread_t t;
13692         int status;
13693         int detach = 1;
13694
13695 #ifdef HAVE_PTHREADS_FINAL
13696         /* Final pthreads */
13697         pthread_attr_t attr;
13698
13699         status = pthread_attr_init(&attr);
13700         if( status ) return status;
13701
13702 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13703         if( !detach ) {
13704 #if defined( PTHREAD_CREATE_JOINABLE )
13705                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13706 #else
13707                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13708 #endif
13709
13710 #ifdef PTHREAD_CREATE_DETACHED
13711         } else {
13712                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13713 #endif
13714         }
13715         if( status ) return status;
13716 #endif
13717
13718         status = pthread_create( &t, &attr, task, NULL );
13719         if( status ) return status;
13720
13721 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13722         if( detach ) {
13723                 /* give thread a chance to complete */
13724                 /* it should remain joinable and hence detachable */
13725                 sleep( 1 );
13726
13727                 status = pthread_detach( t );
13728                 if( status ) return status;
13729         }
13730 #endif
13731
13732 #else
13733         /* Draft 4 pthreads */
13734         status = pthread_create( &t, pthread_attr_default, task, NULL );
13735         if( status ) return status;
13736
13737         if( detach ) {
13738                 /* give thread a chance to complete */
13739                 /* it should remain joinable and hence detachable */
13740                 sleep( 1 );
13741
13742                 status = pthread_detach( &t );
13743                 if( status ) return status;
13744         }
13745 #endif
13746
13747 #ifdef HAVE_LINUX_THREADS
13748         pthread_kill_other_threads_np();
13749 #endif
13750
13751         return 0;
13752
13753 ; return 0; }
13754 EOF
13755 if { (eval echo configure:13756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13756   rm -rf conftest*
13757   ol_cv_pthread_lpthread=yes
13758 else
13759   echo "configure: failed program was:" >&5
13760   cat conftest.$ac_ext >&5
13761   rm -rf conftest*
13762   ol_cv_pthread_lpthread=no
13763 fi
13764 rm -f conftest*
13765 else
13766   cat > conftest.$ac_ext <<EOF
13767 #line 13768 "configure"
13768 #include "confdefs.h"
13769 /* pthread test headers */
13770 #include <pthread.h>
13771 #ifndef NULL
13772 #define NULL (void*)0
13773 #endif
13774
13775 static void *task(p)
13776         void *p;
13777 {
13778         return (void *) (p == NULL);
13779 }
13780
13781
13782 int main(argc, argv)
13783         int argc;
13784         char **argv;
13785 {
13786
13787         /* pthread test function */
13788         pthread_t t;
13789         int status;
13790         int detach = 1;
13791
13792 #ifdef HAVE_PTHREADS_FINAL
13793         /* Final pthreads */
13794         pthread_attr_t attr;
13795
13796         status = pthread_attr_init(&attr);
13797         if( status ) return status;
13798
13799 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13800         if( !detach ) {
13801 #if defined( PTHREAD_CREATE_JOINABLE )
13802                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13803 #else
13804                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13805 #endif
13806
13807 #ifdef PTHREAD_CREATE_DETACHED
13808         } else {
13809                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13810 #endif
13811         }
13812         if( status ) return status;
13813 #endif
13814
13815         status = pthread_create( &t, &attr, task, NULL );
13816         if( status ) return status;
13817
13818 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13819         if( detach ) {
13820                 /* give thread a chance to complete */
13821                 /* it should remain joinable and hence detachable */
13822                 sleep( 1 );
13823
13824                 status = pthread_detach( t );
13825                 if( status ) return status;
13826         }
13827 #endif
13828
13829 #else
13830         /* Draft 4 pthreads */
13831         status = pthread_create( &t, pthread_attr_default, task, NULL );
13832         if( status ) return status;
13833
13834         if( detach ) {
13835                 /* give thread a chance to complete */
13836                 /* it should remain joinable and hence detachable */
13837                 sleep( 1 );
13838
13839                 status = pthread_detach( &t );
13840                 if( status ) return status;
13841         }
13842 #endif
13843
13844 #ifdef HAVE_LINUX_THREADS
13845         pthread_kill_other_threads_np();
13846 #endif
13847
13848         return 0;
13849
13850 }
13851
13852 EOF
13853 if { (eval echo configure:13854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13854 then
13855   ol_cv_pthread_lpthread=yes
13856 else
13857   echo "configure: failed program was:" >&5
13858   cat conftest.$ac_ext >&5
13859   rm -fr conftest*
13860   ol_cv_pthread_lpthread=no
13861 fi
13862 rm -fr conftest*
13863 fi
13864
13865
13866                 # restore the LIBS
13867                 LIBS="$ol_LIBS"
13868         
13869 fi
13870
13871 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13872
13873         if test $ol_cv_pthread_lpthread = yes ; then
13874                 ol_link_pthreads="-lpthread"
13875                 ol_link_threads=posix
13876         fi
13877 fi
13878
13879                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13880 if test "$ol_link_threads" = no ; then
13881         # try -lc_r
13882         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13883 echo "configure:13884: checking for pthread link with -lc_r" >&5
13884 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13885   echo $ac_n "(cached) $ac_c" 1>&6
13886 else
13887   
13888                 # save the flags
13889                 ol_LIBS="$LIBS"
13890                 LIBS="-lc_r $LIBS"
13891
13892                 if test "$cross_compiling" = yes; then
13893   cat > conftest.$ac_ext <<EOF
13894 #line 13895 "configure"
13895 #include "confdefs.h"
13896 /* pthread test headers */
13897 #include <pthread.h>
13898 #ifndef NULL
13899 #define NULL (void*)0
13900 #endif
13901
13902 static void *task(p)
13903         void *p;
13904 {
13905         return (void *) (p == NULL);
13906 }
13907
13908 int main() {
13909
13910         /* pthread test function */
13911         pthread_t t;
13912         int status;
13913         int detach = 1;
13914
13915 #ifdef HAVE_PTHREADS_FINAL
13916         /* Final pthreads */
13917         pthread_attr_t attr;
13918
13919         status = pthread_attr_init(&attr);
13920         if( status ) return status;
13921
13922 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13923         if( !detach ) {
13924 #if defined( PTHREAD_CREATE_JOINABLE )
13925                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13926 #else
13927                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13928 #endif
13929
13930 #ifdef PTHREAD_CREATE_DETACHED
13931         } else {
13932                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13933 #endif
13934         }
13935         if( status ) return status;
13936 #endif
13937
13938         status = pthread_create( &t, &attr, task, NULL );
13939         if( status ) return status;
13940
13941 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13942         if( detach ) {
13943                 /* give thread a chance to complete */
13944                 /* it should remain joinable and hence detachable */
13945                 sleep( 1 );
13946
13947                 status = pthread_detach( t );
13948                 if( status ) return status;
13949         }
13950 #endif
13951
13952 #else
13953         /* Draft 4 pthreads */
13954         status = pthread_create( &t, pthread_attr_default, task, NULL );
13955         if( status ) return status;
13956
13957         if( detach ) {
13958                 /* give thread a chance to complete */
13959                 /* it should remain joinable and hence detachable */
13960                 sleep( 1 );
13961
13962                 status = pthread_detach( &t );
13963                 if( status ) return status;
13964         }
13965 #endif
13966
13967 #ifdef HAVE_LINUX_THREADS
13968         pthread_kill_other_threads_np();
13969 #endif
13970
13971         return 0;
13972
13973 ; return 0; }
13974 EOF
13975 if { (eval echo configure:13976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13976   rm -rf conftest*
13977   ol_cv_pthread_lc_r=yes
13978 else
13979   echo "configure: failed program was:" >&5
13980   cat conftest.$ac_ext >&5
13981   rm -rf conftest*
13982   ol_cv_pthread_lc_r=no
13983 fi
13984 rm -f conftest*
13985 else
13986   cat > conftest.$ac_ext <<EOF
13987 #line 13988 "configure"
13988 #include "confdefs.h"
13989 /* pthread test headers */
13990 #include <pthread.h>
13991 #ifndef NULL
13992 #define NULL (void*)0
13993 #endif
13994
13995 static void *task(p)
13996         void *p;
13997 {
13998         return (void *) (p == NULL);
13999 }
14000
14001
14002 int main(argc, argv)
14003         int argc;
14004         char **argv;
14005 {
14006
14007         /* pthread test function */
14008         pthread_t t;
14009         int status;
14010         int detach = 1;
14011
14012 #ifdef HAVE_PTHREADS_FINAL
14013         /* Final pthreads */
14014         pthread_attr_t attr;
14015
14016         status = pthread_attr_init(&attr);
14017         if( status ) return status;
14018
14019 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14020         if( !detach ) {
14021 #if defined( PTHREAD_CREATE_JOINABLE )
14022                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14023 #else
14024                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14025 #endif
14026
14027 #ifdef PTHREAD_CREATE_DETACHED
14028         } else {
14029                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14030 #endif
14031         }
14032         if( status ) return status;
14033 #endif
14034
14035         status = pthread_create( &t, &attr, task, NULL );
14036         if( status ) return status;
14037
14038 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14039         if( detach ) {
14040                 /* give thread a chance to complete */
14041                 /* it should remain joinable and hence detachable */
14042                 sleep( 1 );
14043
14044                 status = pthread_detach( t );
14045                 if( status ) return status;
14046         }
14047 #endif
14048
14049 #else
14050         /* Draft 4 pthreads */
14051         status = pthread_create( &t, pthread_attr_default, task, NULL );
14052         if( status ) return status;
14053
14054         if( detach ) {
14055                 /* give thread a chance to complete */
14056                 /* it should remain joinable and hence detachable */
14057                 sleep( 1 );
14058
14059                 status = pthread_detach( &t );
14060                 if( status ) return status;
14061         }
14062 #endif
14063
14064 #ifdef HAVE_LINUX_THREADS
14065         pthread_kill_other_threads_np();
14066 #endif
14067
14068         return 0;
14069
14070 }
14071
14072 EOF
14073 if { (eval echo configure:14074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14074 then
14075   ol_cv_pthread_lc_r=yes
14076 else
14077   echo "configure: failed program was:" >&5
14078   cat conftest.$ac_ext >&5
14079   rm -fr conftest*
14080   ol_cv_pthread_lc_r=no
14081 fi
14082 rm -fr conftest*
14083 fi
14084
14085
14086                 # restore the LIBS
14087                 LIBS="$ol_LIBS"
14088         
14089 fi
14090
14091 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
14092
14093         if test $ol_cv_pthread_lc_r = yes ; then
14094                 ol_link_pthreads="-lc_r"
14095                 ol_link_threads=posix
14096         fi
14097 fi
14098
14099
14100                 # Pthread try link: -threads (ol_cv_pthread_threads)
14101 if test "$ol_link_threads" = no ; then
14102         # try -threads
14103         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
14104 echo "configure:14105: checking for pthread link with -threads" >&5
14105 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
14106   echo $ac_n "(cached) $ac_c" 1>&6
14107 else
14108   
14109                 # save the flags
14110                 ol_LIBS="$LIBS"
14111                 LIBS="-threads $LIBS"
14112
14113                 if test "$cross_compiling" = yes; then
14114   cat > conftest.$ac_ext <<EOF
14115 #line 14116 "configure"
14116 #include "confdefs.h"
14117 /* pthread test headers */
14118 #include <pthread.h>
14119 #ifndef NULL
14120 #define NULL (void*)0
14121 #endif
14122
14123 static void *task(p)
14124         void *p;
14125 {
14126         return (void *) (p == NULL);
14127 }
14128
14129 int main() {
14130
14131         /* pthread test function */
14132         pthread_t t;
14133         int status;
14134         int detach = 1;
14135
14136 #ifdef HAVE_PTHREADS_FINAL
14137         /* Final pthreads */
14138         pthread_attr_t attr;
14139
14140         status = pthread_attr_init(&attr);
14141         if( status ) return status;
14142
14143 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14144         if( !detach ) {
14145 #if defined( PTHREAD_CREATE_JOINABLE )
14146                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14147 #else
14148                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14149 #endif
14150
14151 #ifdef PTHREAD_CREATE_DETACHED
14152         } else {
14153                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14154 #endif
14155         }
14156         if( status ) return status;
14157 #endif
14158
14159         status = pthread_create( &t, &attr, task, NULL );
14160         if( status ) return status;
14161
14162 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14163         if( detach ) {
14164                 /* give thread a chance to complete */
14165                 /* it should remain joinable and hence detachable */
14166                 sleep( 1 );
14167
14168                 status = pthread_detach( t );
14169                 if( status ) return status;
14170         }
14171 #endif
14172
14173 #else
14174         /* Draft 4 pthreads */
14175         status = pthread_create( &t, pthread_attr_default, task, NULL );
14176         if( status ) return status;
14177
14178         if( detach ) {
14179                 /* give thread a chance to complete */
14180                 /* it should remain joinable and hence detachable */
14181                 sleep( 1 );
14182
14183                 status = pthread_detach( &t );
14184                 if( status ) return status;
14185         }
14186 #endif
14187
14188 #ifdef HAVE_LINUX_THREADS
14189         pthread_kill_other_threads_np();
14190 #endif
14191
14192         return 0;
14193
14194 ; return 0; }
14195 EOF
14196 if { (eval echo configure:14197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14197   rm -rf conftest*
14198   ol_cv_pthread_threads=yes
14199 else
14200   echo "configure: failed program was:" >&5
14201   cat conftest.$ac_ext >&5
14202   rm -rf conftest*
14203   ol_cv_pthread_threads=no
14204 fi
14205 rm -f conftest*
14206 else
14207   cat > conftest.$ac_ext <<EOF
14208 #line 14209 "configure"
14209 #include "confdefs.h"
14210 /* pthread test headers */
14211 #include <pthread.h>
14212 #ifndef NULL
14213 #define NULL (void*)0
14214 #endif
14215
14216 static void *task(p)
14217         void *p;
14218 {
14219         return (void *) (p == NULL);
14220 }
14221
14222
14223 int main(argc, argv)
14224         int argc;
14225         char **argv;
14226 {
14227
14228         /* pthread test function */
14229         pthread_t t;
14230         int status;
14231         int detach = 1;
14232
14233 #ifdef HAVE_PTHREADS_FINAL
14234         /* Final pthreads */
14235         pthread_attr_t attr;
14236
14237         status = pthread_attr_init(&attr);
14238         if( status ) return status;
14239
14240 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14241         if( !detach ) {
14242 #if defined( PTHREAD_CREATE_JOINABLE )
14243                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14244 #else
14245                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14246 #endif
14247
14248 #ifdef PTHREAD_CREATE_DETACHED
14249         } else {
14250                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14251 #endif
14252         }
14253         if( status ) return status;
14254 #endif
14255
14256         status = pthread_create( &t, &attr, task, NULL );
14257         if( status ) return status;
14258
14259 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14260         if( detach ) {
14261                 /* give thread a chance to complete */
14262                 /* it should remain joinable and hence detachable */
14263                 sleep( 1 );
14264
14265                 status = pthread_detach( t );
14266                 if( status ) return status;
14267         }
14268 #endif
14269
14270 #else
14271         /* Draft 4 pthreads */
14272         status = pthread_create( &t, pthread_attr_default, task, NULL );
14273         if( status ) return status;
14274
14275         if( detach ) {
14276                 /* give thread a chance to complete */
14277                 /* it should remain joinable and hence detachable */
14278                 sleep( 1 );
14279
14280                 status = pthread_detach( &t );
14281                 if( status ) return status;
14282         }
14283 #endif
14284
14285 #ifdef HAVE_LINUX_THREADS
14286         pthread_kill_other_threads_np();
14287 #endif
14288
14289         return 0;
14290
14291 }
14292
14293 EOF
14294 if { (eval echo configure:14295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14295 then
14296   ol_cv_pthread_threads=yes
14297 else
14298   echo "configure: failed program was:" >&5
14299   cat conftest.$ac_ext >&5
14300   rm -fr conftest*
14301   ol_cv_pthread_threads=no
14302 fi
14303 rm -fr conftest*
14304 fi
14305
14306
14307                 # restore the LIBS
14308                 LIBS="$ol_LIBS"
14309         
14310 fi
14311
14312 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14313
14314         if test $ol_cv_pthread_threads = yes ; then
14315                 ol_link_pthreads="-threads"
14316                 ol_link_threads=posix
14317         fi
14318 fi
14319
14320
14321                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14322 if test "$ol_link_threads" = no ; then
14323         # try -lpthreads -lmach -lexc -lc_r
14324         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14325 echo "configure:14326: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14326 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14327   echo $ac_n "(cached) $ac_c" 1>&6
14328 else
14329   
14330                 # save the flags
14331                 ol_LIBS="$LIBS"
14332                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14333
14334                 if test "$cross_compiling" = yes; then
14335   cat > conftest.$ac_ext <<EOF
14336 #line 14337 "configure"
14337 #include "confdefs.h"
14338 /* pthread test headers */
14339 #include <pthread.h>
14340 #ifndef NULL
14341 #define NULL (void*)0
14342 #endif
14343
14344 static void *task(p)
14345         void *p;
14346 {
14347         return (void *) (p == NULL);
14348 }
14349
14350 int main() {
14351
14352         /* pthread test function */
14353         pthread_t t;
14354         int status;
14355         int detach = 1;
14356
14357 #ifdef HAVE_PTHREADS_FINAL
14358         /* Final pthreads */
14359         pthread_attr_t attr;
14360
14361         status = pthread_attr_init(&attr);
14362         if( status ) return status;
14363
14364 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14365         if( !detach ) {
14366 #if defined( PTHREAD_CREATE_JOINABLE )
14367                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14368 #else
14369                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14370 #endif
14371
14372 #ifdef PTHREAD_CREATE_DETACHED
14373         } else {
14374                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14375 #endif
14376         }
14377         if( status ) return status;
14378 #endif
14379
14380         status = pthread_create( &t, &attr, task, NULL );
14381         if( status ) return status;
14382
14383 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14384         if( detach ) {
14385                 /* give thread a chance to complete */
14386                 /* it should remain joinable and hence detachable */
14387                 sleep( 1 );
14388
14389                 status = pthread_detach( t );
14390                 if( status ) return status;
14391         }
14392 #endif
14393
14394 #else
14395         /* Draft 4 pthreads */
14396         status = pthread_create( &t, pthread_attr_default, task, NULL );
14397         if( status ) return status;
14398
14399         if( detach ) {
14400                 /* give thread a chance to complete */
14401                 /* it should remain joinable and hence detachable */
14402                 sleep( 1 );
14403
14404                 status = pthread_detach( &t );
14405                 if( status ) return status;
14406         }
14407 #endif
14408
14409 #ifdef HAVE_LINUX_THREADS
14410         pthread_kill_other_threads_np();
14411 #endif
14412
14413         return 0;
14414
14415 ; return 0; }
14416 EOF
14417 if { (eval echo configure:14418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14418   rm -rf conftest*
14419   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14420 else
14421   echo "configure: failed program was:" >&5
14422   cat conftest.$ac_ext >&5
14423   rm -rf conftest*
14424   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14425 fi
14426 rm -f conftest*
14427 else
14428   cat > conftest.$ac_ext <<EOF
14429 #line 14430 "configure"
14430 #include "confdefs.h"
14431 /* pthread test headers */
14432 #include <pthread.h>
14433 #ifndef NULL
14434 #define NULL (void*)0
14435 #endif
14436
14437 static void *task(p)
14438         void *p;
14439 {
14440         return (void *) (p == NULL);
14441 }
14442
14443
14444 int main(argc, argv)
14445         int argc;
14446         char **argv;
14447 {
14448
14449         /* pthread test function */
14450         pthread_t t;
14451         int status;
14452         int detach = 1;
14453
14454 #ifdef HAVE_PTHREADS_FINAL
14455         /* Final pthreads */
14456         pthread_attr_t attr;
14457
14458         status = pthread_attr_init(&attr);
14459         if( status ) return status;
14460
14461 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14462         if( !detach ) {
14463 #if defined( PTHREAD_CREATE_JOINABLE )
14464                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14465 #else
14466                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14467 #endif
14468
14469 #ifdef PTHREAD_CREATE_DETACHED
14470         } else {
14471                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14472 #endif
14473         }
14474         if( status ) return status;
14475 #endif
14476
14477         status = pthread_create( &t, &attr, task, NULL );
14478         if( status ) return status;
14479
14480 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14481         if( detach ) {
14482                 /* give thread a chance to complete */
14483                 /* it should remain joinable and hence detachable */
14484                 sleep( 1 );
14485
14486                 status = pthread_detach( t );
14487                 if( status ) return status;
14488         }
14489 #endif
14490
14491 #else
14492         /* Draft 4 pthreads */
14493         status = pthread_create( &t, pthread_attr_default, task, NULL );
14494         if( status ) return status;
14495
14496         if( detach ) {
14497                 /* give thread a chance to complete */
14498                 /* it should remain joinable and hence detachable */
14499                 sleep( 1 );
14500
14501                 status = pthread_detach( &t );
14502                 if( status ) return status;
14503         }
14504 #endif
14505
14506 #ifdef HAVE_LINUX_THREADS
14507         pthread_kill_other_threads_np();
14508 #endif
14509
14510         return 0;
14511
14512 }
14513
14514 EOF
14515 if { (eval echo configure:14516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14516 then
14517   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14518 else
14519   echo "configure: failed program was:" >&5
14520   cat conftest.$ac_ext >&5
14521   rm -fr conftest*
14522   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14523 fi
14524 rm -fr conftest*
14525 fi
14526
14527
14528                 # restore the LIBS
14529                 LIBS="$ol_LIBS"
14530         
14531 fi
14532
14533 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14534
14535         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14536                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14537                 ol_link_threads=posix
14538         fi
14539 fi
14540
14541                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14542 if test "$ol_link_threads" = no ; then
14543         # try -lpthreads -lmach -lexc
14544         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14545 echo "configure:14546: checking for pthread link with -lpthreads -lmach -lexc" >&5
14546 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14547   echo $ac_n "(cached) $ac_c" 1>&6
14548 else
14549   
14550                 # save the flags
14551                 ol_LIBS="$LIBS"
14552                 LIBS="-lpthreads -lmach -lexc $LIBS"
14553
14554                 if test "$cross_compiling" = yes; then
14555   cat > conftest.$ac_ext <<EOF
14556 #line 14557 "configure"
14557 #include "confdefs.h"
14558 /* pthread test headers */
14559 #include <pthread.h>
14560 #ifndef NULL
14561 #define NULL (void*)0
14562 #endif
14563
14564 static void *task(p)
14565         void *p;
14566 {
14567         return (void *) (p == NULL);
14568 }
14569
14570 int main() {
14571
14572         /* pthread test function */
14573         pthread_t t;
14574         int status;
14575         int detach = 1;
14576
14577 #ifdef HAVE_PTHREADS_FINAL
14578         /* Final pthreads */
14579         pthread_attr_t attr;
14580
14581         status = pthread_attr_init(&attr);
14582         if( status ) return status;
14583
14584 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14585         if( !detach ) {
14586 #if defined( PTHREAD_CREATE_JOINABLE )
14587                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14588 #else
14589                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14590 #endif
14591
14592 #ifdef PTHREAD_CREATE_DETACHED
14593         } else {
14594                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14595 #endif
14596         }
14597         if( status ) return status;
14598 #endif
14599
14600         status = pthread_create( &t, &attr, task, NULL );
14601         if( status ) return status;
14602
14603 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14604         if( detach ) {
14605                 /* give thread a chance to complete */
14606                 /* it should remain joinable and hence detachable */
14607                 sleep( 1 );
14608
14609                 status = pthread_detach( t );
14610                 if( status ) return status;
14611         }
14612 #endif
14613
14614 #else
14615         /* Draft 4 pthreads */
14616         status = pthread_create( &t, pthread_attr_default, task, NULL );
14617         if( status ) return status;
14618
14619         if( detach ) {
14620                 /* give thread a chance to complete */
14621                 /* it should remain joinable and hence detachable */
14622                 sleep( 1 );
14623
14624                 status = pthread_detach( &t );
14625                 if( status ) return status;
14626         }
14627 #endif
14628
14629 #ifdef HAVE_LINUX_THREADS
14630         pthread_kill_other_threads_np();
14631 #endif
14632
14633         return 0;
14634
14635 ; return 0; }
14636 EOF
14637 if { (eval echo configure:14638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14638   rm -rf conftest*
14639   ol_cv_pthread_lpthreads_lmach_lexc=yes
14640 else
14641   echo "configure: failed program was:" >&5
14642   cat conftest.$ac_ext >&5
14643   rm -rf conftest*
14644   ol_cv_pthread_lpthreads_lmach_lexc=no
14645 fi
14646 rm -f conftest*
14647 else
14648   cat > conftest.$ac_ext <<EOF
14649 #line 14650 "configure"
14650 #include "confdefs.h"
14651 /* pthread test headers */
14652 #include <pthread.h>
14653 #ifndef NULL
14654 #define NULL (void*)0
14655 #endif
14656
14657 static void *task(p)
14658         void *p;
14659 {
14660         return (void *) (p == NULL);
14661 }
14662
14663
14664 int main(argc, argv)
14665         int argc;
14666         char **argv;
14667 {
14668
14669         /* pthread test function */
14670         pthread_t t;
14671         int status;
14672         int detach = 1;
14673
14674 #ifdef HAVE_PTHREADS_FINAL
14675         /* Final pthreads */
14676         pthread_attr_t attr;
14677
14678         status = pthread_attr_init(&attr);
14679         if( status ) return status;
14680
14681 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14682         if( !detach ) {
14683 #if defined( PTHREAD_CREATE_JOINABLE )
14684                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14685 #else
14686                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14687 #endif
14688
14689 #ifdef PTHREAD_CREATE_DETACHED
14690         } else {
14691                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14692 #endif
14693         }
14694         if( status ) return status;
14695 #endif
14696
14697         status = pthread_create( &t, &attr, task, NULL );
14698         if( status ) return status;
14699
14700 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14701         if( detach ) {
14702                 /* give thread a chance to complete */
14703                 /* it should remain joinable and hence detachable */
14704                 sleep( 1 );
14705
14706                 status = pthread_detach( t );
14707                 if( status ) return status;
14708         }
14709 #endif
14710
14711 #else
14712         /* Draft 4 pthreads */
14713         status = pthread_create( &t, pthread_attr_default, task, NULL );
14714         if( status ) return status;
14715
14716         if( detach ) {
14717                 /* give thread a chance to complete */
14718                 /* it should remain joinable and hence detachable */
14719                 sleep( 1 );
14720
14721                 status = pthread_detach( &t );
14722                 if( status ) return status;
14723         }
14724 #endif
14725
14726 #ifdef HAVE_LINUX_THREADS
14727         pthread_kill_other_threads_np();
14728 #endif
14729
14730         return 0;
14731
14732 }
14733
14734 EOF
14735 if { (eval echo configure:14736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14736 then
14737   ol_cv_pthread_lpthreads_lmach_lexc=yes
14738 else
14739   echo "configure: failed program was:" >&5
14740   cat conftest.$ac_ext >&5
14741   rm -fr conftest*
14742   ol_cv_pthread_lpthreads_lmach_lexc=no
14743 fi
14744 rm -fr conftest*
14745 fi
14746
14747
14748                 # restore the LIBS
14749                 LIBS="$ol_LIBS"
14750         
14751 fi
14752
14753 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14754
14755         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14756                 ol_link_pthreads="-lpthreads -lmach -lexc"
14757                 ol_link_threads=posix
14758         fi
14759 fi
14760
14761                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14762 if test "$ol_link_threads" = no ; then
14763         # try -lpthreads -lexc
14764         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14765 echo "configure:14766: checking for pthread link with -lpthreads -lexc" >&5
14766 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14767   echo $ac_n "(cached) $ac_c" 1>&6
14768 else
14769   
14770                 # save the flags
14771                 ol_LIBS="$LIBS"
14772                 LIBS="-lpthreads -lexc $LIBS"
14773
14774                 if test "$cross_compiling" = yes; then
14775   cat > conftest.$ac_ext <<EOF
14776 #line 14777 "configure"
14777 #include "confdefs.h"
14778 /* pthread test headers */
14779 #include <pthread.h>
14780 #ifndef NULL
14781 #define NULL (void*)0
14782 #endif
14783
14784 static void *task(p)
14785         void *p;
14786 {
14787         return (void *) (p == NULL);
14788 }
14789
14790 int main() {
14791
14792         /* pthread test function */
14793         pthread_t t;
14794         int status;
14795         int detach = 1;
14796
14797 #ifdef HAVE_PTHREADS_FINAL
14798         /* Final pthreads */
14799         pthread_attr_t attr;
14800
14801         status = pthread_attr_init(&attr);
14802         if( status ) return status;
14803
14804 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14805         if( !detach ) {
14806 #if defined( PTHREAD_CREATE_JOINABLE )
14807                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14808 #else
14809                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14810 #endif
14811
14812 #ifdef PTHREAD_CREATE_DETACHED
14813         } else {
14814                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14815 #endif
14816         }
14817         if( status ) return status;
14818 #endif
14819
14820         status = pthread_create( &t, &attr, task, NULL );
14821         if( status ) return status;
14822
14823 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14824         if( detach ) {
14825                 /* give thread a chance to complete */
14826                 /* it should remain joinable and hence detachable */
14827                 sleep( 1 );
14828
14829                 status = pthread_detach( t );
14830                 if( status ) return status;
14831         }
14832 #endif
14833
14834 #else
14835         /* Draft 4 pthreads */
14836         status = pthread_create( &t, pthread_attr_default, task, NULL );
14837         if( status ) return status;
14838
14839         if( detach ) {
14840                 /* give thread a chance to complete */
14841                 /* it should remain joinable and hence detachable */
14842                 sleep( 1 );
14843
14844                 status = pthread_detach( &t );
14845                 if( status ) return status;
14846         }
14847 #endif
14848
14849 #ifdef HAVE_LINUX_THREADS
14850         pthread_kill_other_threads_np();
14851 #endif
14852
14853         return 0;
14854
14855 ; return 0; }
14856 EOF
14857 if { (eval echo configure:14858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14858   rm -rf conftest*
14859   ol_cv_pthread_lpthreads_lexc=yes
14860 else
14861   echo "configure: failed program was:" >&5
14862   cat conftest.$ac_ext >&5
14863   rm -rf conftest*
14864   ol_cv_pthread_lpthreads_lexc=no
14865 fi
14866 rm -f conftest*
14867 else
14868   cat > conftest.$ac_ext <<EOF
14869 #line 14870 "configure"
14870 #include "confdefs.h"
14871 /* pthread test headers */
14872 #include <pthread.h>
14873 #ifndef NULL
14874 #define NULL (void*)0
14875 #endif
14876
14877 static void *task(p)
14878         void *p;
14879 {
14880         return (void *) (p == NULL);
14881 }
14882
14883
14884 int main(argc, argv)
14885         int argc;
14886         char **argv;
14887 {
14888
14889         /* pthread test function */
14890         pthread_t t;
14891         int status;
14892         int detach = 1;
14893
14894 #ifdef HAVE_PTHREADS_FINAL
14895         /* Final pthreads */
14896         pthread_attr_t attr;
14897
14898         status = pthread_attr_init(&attr);
14899         if( status ) return status;
14900
14901 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14902         if( !detach ) {
14903 #if defined( PTHREAD_CREATE_JOINABLE )
14904                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14905 #else
14906                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14907 #endif
14908
14909 #ifdef PTHREAD_CREATE_DETACHED
14910         } else {
14911                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14912 #endif
14913         }
14914         if( status ) return status;
14915 #endif
14916
14917         status = pthread_create( &t, &attr, task, NULL );
14918         if( status ) return status;
14919
14920 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14921         if( detach ) {
14922                 /* give thread a chance to complete */
14923                 /* it should remain joinable and hence detachable */
14924                 sleep( 1 );
14925
14926                 status = pthread_detach( t );
14927                 if( status ) return status;
14928         }
14929 #endif
14930
14931 #else
14932         /* Draft 4 pthreads */
14933         status = pthread_create( &t, pthread_attr_default, task, NULL );
14934         if( status ) return status;
14935
14936         if( detach ) {
14937                 /* give thread a chance to complete */
14938                 /* it should remain joinable and hence detachable */
14939                 sleep( 1 );
14940
14941                 status = pthread_detach( &t );
14942                 if( status ) return status;
14943         }
14944 #endif
14945
14946 #ifdef HAVE_LINUX_THREADS
14947         pthread_kill_other_threads_np();
14948 #endif
14949
14950         return 0;
14951
14952 }
14953
14954 EOF
14955 if { (eval echo configure:14956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14956 then
14957   ol_cv_pthread_lpthreads_lexc=yes
14958 else
14959   echo "configure: failed program was:" >&5
14960   cat conftest.$ac_ext >&5
14961   rm -fr conftest*
14962   ol_cv_pthread_lpthreads_lexc=no
14963 fi
14964 rm -fr conftest*
14965 fi
14966
14967
14968                 # restore the LIBS
14969                 LIBS="$ol_LIBS"
14970         
14971 fi
14972
14973 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14974
14975         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14976                 ol_link_pthreads="-lpthreads -lexc"
14977                 ol_link_threads=posix
14978         fi
14979 fi
14980
14981
14982                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14983 if test "$ol_link_threads" = no ; then
14984         # try -lpthreads
14985         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14986 echo "configure:14987: checking for pthread link with -lpthreads" >&5
14987 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14988   echo $ac_n "(cached) $ac_c" 1>&6
14989 else
14990   
14991                 # save the flags
14992                 ol_LIBS="$LIBS"
14993                 LIBS="-lpthreads $LIBS"
14994
14995                 if test "$cross_compiling" = yes; then
14996   cat > conftest.$ac_ext <<EOF
14997 #line 14998 "configure"
14998 #include "confdefs.h"
14999 /* pthread test headers */
15000 #include <pthread.h>
15001 #ifndef NULL
15002 #define NULL (void*)0
15003 #endif
15004
15005 static void *task(p)
15006         void *p;
15007 {
15008         return (void *) (p == NULL);
15009 }
15010
15011 int main() {
15012
15013         /* pthread test function */
15014         pthread_t t;
15015         int status;
15016         int detach = 1;
15017
15018 #ifdef HAVE_PTHREADS_FINAL
15019         /* Final pthreads */
15020         pthread_attr_t attr;
15021
15022         status = pthread_attr_init(&attr);
15023         if( status ) return status;
15024
15025 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15026         if( !detach ) {
15027 #if defined( PTHREAD_CREATE_JOINABLE )
15028                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15029 #else
15030                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15031 #endif
15032
15033 #ifdef PTHREAD_CREATE_DETACHED
15034         } else {
15035                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15036 #endif
15037         }
15038         if( status ) return status;
15039 #endif
15040
15041         status = pthread_create( &t, &attr, task, NULL );
15042         if( status ) return status;
15043
15044 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15045         if( detach ) {
15046                 /* give thread a chance to complete */
15047                 /* it should remain joinable and hence detachable */
15048                 sleep( 1 );
15049
15050                 status = pthread_detach( t );
15051                 if( status ) return status;
15052         }
15053 #endif
15054
15055 #else
15056         /* Draft 4 pthreads */
15057         status = pthread_create( &t, pthread_attr_default, task, NULL );
15058         if( status ) return status;
15059
15060         if( detach ) {
15061                 /* give thread a chance to complete */
15062                 /* it should remain joinable and hence detachable */
15063                 sleep( 1 );
15064
15065                 status = pthread_detach( &t );
15066                 if( status ) return status;
15067         }
15068 #endif
15069
15070 #ifdef HAVE_LINUX_THREADS
15071         pthread_kill_other_threads_np();
15072 #endif
15073
15074         return 0;
15075
15076 ; return 0; }
15077 EOF
15078 if { (eval echo configure:15079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15079   rm -rf conftest*
15080   ol_cv_pthread_lib_lpthreads=yes
15081 else
15082   echo "configure: failed program was:" >&5
15083   cat conftest.$ac_ext >&5
15084   rm -rf conftest*
15085   ol_cv_pthread_lib_lpthreads=no
15086 fi
15087 rm -f conftest*
15088 else
15089   cat > conftest.$ac_ext <<EOF
15090 #line 15091 "configure"
15091 #include "confdefs.h"
15092 /* pthread test headers */
15093 #include <pthread.h>
15094 #ifndef NULL
15095 #define NULL (void*)0
15096 #endif
15097
15098 static void *task(p)
15099         void *p;
15100 {
15101         return (void *) (p == NULL);
15102 }
15103
15104
15105 int main(argc, argv)
15106         int argc;
15107         char **argv;
15108 {
15109
15110         /* pthread test function */
15111         pthread_t t;
15112         int status;
15113         int detach = 1;
15114
15115 #ifdef HAVE_PTHREADS_FINAL
15116         /* Final pthreads */
15117         pthread_attr_t attr;
15118
15119         status = pthread_attr_init(&attr);
15120         if( status ) return status;
15121
15122 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15123         if( !detach ) {
15124 #if defined( PTHREAD_CREATE_JOINABLE )
15125                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15126 #else
15127                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15128 #endif
15129
15130 #ifdef PTHREAD_CREATE_DETACHED
15131         } else {
15132                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15133 #endif
15134         }
15135         if( status ) return status;
15136 #endif
15137
15138         status = pthread_create( &t, &attr, task, NULL );
15139         if( status ) return status;
15140
15141 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15142         if( detach ) {
15143                 /* give thread a chance to complete */
15144                 /* it should remain joinable and hence detachable */
15145                 sleep( 1 );
15146
15147                 status = pthread_detach( t );
15148                 if( status ) return status;
15149         }
15150 #endif
15151
15152 #else
15153         /* Draft 4 pthreads */
15154         status = pthread_create( &t, pthread_attr_default, task, NULL );
15155         if( status ) return status;
15156
15157         if( detach ) {
15158                 /* give thread a chance to complete */
15159                 /* it should remain joinable and hence detachable */
15160                 sleep( 1 );
15161
15162                 status = pthread_detach( &t );
15163                 if( status ) return status;
15164         }
15165 #endif
15166
15167 #ifdef HAVE_LINUX_THREADS
15168         pthread_kill_other_threads_np();
15169 #endif
15170
15171         return 0;
15172
15173 }
15174
15175 EOF
15176 if { (eval echo configure:15177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15177 then
15178   ol_cv_pthread_lib_lpthreads=yes
15179 else
15180   echo "configure: failed program was:" >&5
15181   cat conftest.$ac_ext >&5
15182   rm -fr conftest*
15183   ol_cv_pthread_lib_lpthreads=no
15184 fi
15185 rm -fr conftest*
15186 fi
15187
15188
15189                 # restore the LIBS
15190                 LIBS="$ol_LIBS"
15191         
15192 fi
15193
15194 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
15195
15196         if test $ol_cv_pthread_lib_lpthreads = yes ; then
15197                 ol_link_pthreads="-lpthreads"
15198                 ol_link_threads=posix
15199         fi
15200 fi
15201
15202
15203                 if test $ol_link_threads != no ; then
15204                         cat >> confdefs.h <<\EOF
15205 #define HAVE_PTHREADS 1
15206 EOF
15207
15208
15209                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
15210
15211                                                 save_CPPFLAGS="$CPPFLAGS"
15212                         save_LIBS="$LIBS"
15213                         LIBS="$LTHREAD_LIBS $LIBS"
15214
15215                                                                                                 for ac_func in sched_yield pthread_yield
15216 do
15217 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15218 echo "configure:15219: checking for $ac_func" >&5
15219 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15220   echo $ac_n "(cached) $ac_c" 1>&6
15221 else
15222   cat > conftest.$ac_ext <<EOF
15223 #line 15224 "configure"
15224 #include "confdefs.h"
15225 /* System header to define __stub macros and hopefully few prototypes,
15226     which can conflict with char $ac_func(); below.  */
15227 #include <assert.h>
15228 /* Override any gcc2 internal prototype to avoid an error.  */
15229 /* We use char because int might match the return type of a gcc2
15230     builtin and then its argument prototype would still apply.  */
15231 char $ac_func();
15232 char (*f)();
15233
15234 int main() {
15235
15236 /* The GNU C library defines this for functions which it implements
15237     to always fail with ENOSYS.  Some functions are actually named
15238     something starting with __ and the normal name is an alias.  */
15239 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15240 choke me
15241 #else
15242 f = $ac_func;
15243 #endif
15244
15245 ; return 0; }
15246 EOF
15247 if { (eval echo configure:15248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15248   rm -rf conftest*
15249   eval "ac_cv_func_$ac_func=yes"
15250 else
15251   echo "configure: failed program was:" >&5
15252   cat conftest.$ac_ext >&5
15253   rm -rf conftest*
15254   eval "ac_cv_func_$ac_func=no"
15255 fi
15256 rm -f conftest*
15257 fi
15258
15259 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15260   echo "$ac_t""yes" 1>&6
15261     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15262   cat >> confdefs.h <<EOF
15263 #define $ac_tr_func 1
15264 EOF
15265  
15266 else
15267   echo "$ac_t""no" 1>&6
15268 fi
15269 done
15270
15271
15272                         if test $ac_cv_func_sched_yield = no -a \
15273                                 $ac_cv_func_pthread_yield = no ; then
15274                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
15275 echo "configure:15276: checking for sched_yield in -lrt" >&5
15276 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
15277 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15278   echo $ac_n "(cached) $ac_c" 1>&6
15279 else
15280   ac_save_LIBS="$LIBS"
15281 LIBS="-lrt  $LIBS"
15282 cat > conftest.$ac_ext <<EOF
15283 #line 15284 "configure"
15284 #include "confdefs.h"
15285 /* Override any gcc2 internal prototype to avoid an error.  */
15286 /* We use char because int might match the return type of a gcc2
15287     builtin and then its argument prototype would still apply.  */
15288 char sched_yield();
15289
15290 int main() {
15291 sched_yield()
15292 ; return 0; }
15293 EOF
15294 if { (eval echo configure:15295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15295   rm -rf conftest*
15296   eval "ac_cv_lib_$ac_lib_var=yes"
15297 else
15298   echo "configure: failed program was:" >&5
15299   cat conftest.$ac_ext >&5
15300   rm -rf conftest*
15301   eval "ac_cv_lib_$ac_lib_var=no"
15302 fi
15303 rm -f conftest*
15304 LIBS="$ac_save_LIBS"
15305
15306 fi
15307 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15308   echo "$ac_t""yes" 1>&6
15309   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
15310                                         cat >> confdefs.h <<\EOF
15311 #define HAVE_SCHED_YIELD 1
15312 EOF
15313
15314                                         ac_cv_func_sched_yield=yes
15315 else
15316   echo "$ac_t""no" 1>&6
15317 ac_cv_func_sched_yield=no
15318 fi
15319
15320                         fi
15321                         if test $ac_cv_func_sched_yield = no -a \
15322                                 $ac_cv_func_pthread_yield = no ; then
15323                                                                                                 for ac_func in thr_yield
15324 do
15325 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15326 echo "configure:15327: checking for $ac_func" >&5
15327 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15328   echo $ac_n "(cached) $ac_c" 1>&6
15329 else
15330   cat > conftest.$ac_ext <<EOF
15331 #line 15332 "configure"
15332 #include "confdefs.h"
15333 /* System header to define __stub macros and hopefully few prototypes,
15334     which can conflict with char $ac_func(); below.  */
15335 #include <assert.h>
15336 /* Override any gcc2 internal prototype to avoid an error.  */
15337 /* We use char because int might match the return type of a gcc2
15338     builtin and then its argument prototype would still apply.  */
15339 char $ac_func();
15340 char (*f)();
15341
15342 int main() {
15343
15344 /* The GNU C library defines this for functions which it implements
15345     to always fail with ENOSYS.  Some functions are actually named
15346     something starting with __ and the normal name is an alias.  */
15347 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15348 choke me
15349 #else
15350 f = $ac_func;
15351 #endif
15352
15353 ; return 0; }
15354 EOF
15355 if { (eval echo configure:15356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15356   rm -rf conftest*
15357   eval "ac_cv_func_$ac_func=yes"
15358 else
15359   echo "configure: failed program was:" >&5
15360   cat conftest.$ac_ext >&5
15361   rm -rf conftest*
15362   eval "ac_cv_func_$ac_func=no"
15363 fi
15364 rm -f conftest*
15365 fi
15366
15367 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15368   echo "$ac_t""yes" 1>&6
15369     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15370   cat >> confdefs.h <<EOF
15371 #define $ac_tr_func 1
15372 EOF
15373  
15374 else
15375   echo "$ac_t""no" 1>&6
15376 fi
15377 done
15378
15379                         fi
15380                         if test $ac_cv_func_sched_yield = no -a \
15381                                 $ac_cv_func_pthread_yield = no -a \
15382                                 "$ac_cv_func_thr_yield" = no ; then
15383                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
15384                         fi
15385
15386                                                 for ac_func in pthread_kill pthread_rwlock_destroy
15387 do
15388 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15389 echo "configure:15390: checking for $ac_func" >&5
15390 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15391   echo $ac_n "(cached) $ac_c" 1>&6
15392 else
15393   cat > conftest.$ac_ext <<EOF
15394 #line 15395 "configure"
15395 #include "confdefs.h"
15396 /* System header to define __stub macros and hopefully few prototypes,
15397     which can conflict with char $ac_func(); below.  */
15398 #include <assert.h>
15399 /* Override any gcc2 internal prototype to avoid an error.  */
15400 /* We use char because int might match the return type of a gcc2
15401     builtin and then its argument prototype would still apply.  */
15402 char $ac_func();
15403 char (*f)();
15404
15405 int main() {
15406
15407 /* The GNU C library defines this for functions which it implements
15408     to always fail with ENOSYS.  Some functions are actually named
15409     something starting with __ and the normal name is an alias.  */
15410 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15411 choke me
15412 #else
15413 f = $ac_func;
15414 #endif
15415
15416 ; return 0; }
15417 EOF
15418 if { (eval echo configure:15419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15419   rm -rf conftest*
15420   eval "ac_cv_func_$ac_func=yes"
15421 else
15422   echo "configure: failed program was:" >&5
15423   cat conftest.$ac_ext >&5
15424   rm -rf conftest*
15425   eval "ac_cv_func_$ac_func=no"
15426 fi
15427 rm -f conftest*
15428 fi
15429
15430 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15431   echo "$ac_t""yes" 1>&6
15432     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15433   cat >> confdefs.h <<EOF
15434 #define $ac_tr_func 1
15435 EOF
15436  
15437 else
15438   echo "$ac_t""no" 1>&6
15439 fi
15440 done
15441
15442
15443                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
15444 echo "configure:15445: checking for pthread_detach with <pthread.h>" >&5
15445 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
15446   echo $ac_n "(cached) $ac_c" 1>&6
15447 else
15448   
15449                                                                 cat > conftest.$ac_ext <<EOF
15450 #line 15451 "configure"
15451 #include "confdefs.h"
15452
15453 #include <pthread.h>
15454 #ifndef NULL
15455 #define NULL (void*)0
15456 #endif
15457
15458 int main() {
15459 pthread_detach(NULL);
15460 ; return 0; }
15461 EOF
15462 if { (eval echo configure:15463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15463   rm -rf conftest*
15464   ol_cv_func_pthread_detach=yes
15465 else
15466   echo "configure: failed program was:" >&5
15467   cat conftest.$ac_ext >&5
15468   rm -rf conftest*
15469   ol_cv_func_pthread_detach=no
15470 fi
15471 rm -f conftest*
15472                         
15473 fi
15474
15475 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15476
15477                         if test $ol_cv_func_pthread_detach = no ; then
15478                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15479                         fi
15480
15481                         cat >> confdefs.h <<\EOF
15482 #define HAVE_PTHREAD_DETACH 1
15483 EOF
15484
15485
15486                                                 for ac_func in \
15487                                 pthread_setconcurrency \
15488                                 pthread_getconcurrency \
15489                                 thr_setconcurrency \
15490                                 thr_getconcurrency \
15491                         
15492 do
15493 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15494 echo "configure:15495: checking for $ac_func" >&5
15495 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15496   echo $ac_n "(cached) $ac_c" 1>&6
15497 else
15498   cat > conftest.$ac_ext <<EOF
15499 #line 15500 "configure"
15500 #include "confdefs.h"
15501 /* System header to define __stub macros and hopefully few prototypes,
15502     which can conflict with char $ac_func(); below.  */
15503 #include <assert.h>
15504 /* Override any gcc2 internal prototype to avoid an error.  */
15505 /* We use char because int might match the return type of a gcc2
15506     builtin and then its argument prototype would still apply.  */
15507 char $ac_func();
15508 char (*f)();
15509
15510 int main() {
15511
15512 /* The GNU C library defines this for functions which it implements
15513     to always fail with ENOSYS.  Some functions are actually named
15514     something starting with __ and the normal name is an alias.  */
15515 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15516 choke me
15517 #else
15518 f = $ac_func;
15519 #endif
15520
15521 ; return 0; }
15522 EOF
15523 if { (eval echo configure:15524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15524   rm -rf conftest*
15525   eval "ac_cv_func_$ac_func=yes"
15526 else
15527   echo "configure: failed program was:" >&5
15528   cat conftest.$ac_ext >&5
15529   rm -rf conftest*
15530   eval "ac_cv_func_$ac_func=no"
15531 fi
15532 rm -f conftest*
15533 fi
15534
15535 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15536   echo "$ac_t""yes" 1>&6
15537     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15538   cat >> confdefs.h <<EOF
15539 #define $ac_tr_func 1
15540 EOF
15541  
15542 else
15543   echo "$ac_t""no" 1>&6
15544 fi
15545 done
15546
15547
15548                         
15549         for ac_func in pthread_kill_other_threads_np
15550 do
15551 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15552 echo "configure:15553: checking for $ac_func" >&5
15553 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15554   echo $ac_n "(cached) $ac_c" 1>&6
15555 else
15556   cat > conftest.$ac_ext <<EOF
15557 #line 15558 "configure"
15558 #include "confdefs.h"
15559 /* System header to define __stub macros and hopefully few prototypes,
15560     which can conflict with char $ac_func(); below.  */
15561 #include <assert.h>
15562 /* Override any gcc2 internal prototype to avoid an error.  */
15563 /* We use char because int might match the return type of a gcc2
15564     builtin and then its argument prototype would still apply.  */
15565 char $ac_func();
15566 char (*f)();
15567
15568 int main() {
15569
15570 /* The GNU C library defines this for functions which it implements
15571     to always fail with ENOSYS.  Some functions are actually named
15572     something starting with __ and the normal name is an alias.  */
15573 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15574 choke me
15575 #else
15576 f = $ac_func;
15577 #endif
15578
15579 ; return 0; }
15580 EOF
15581 if { (eval echo configure:15582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15582   rm -rf conftest*
15583   eval "ac_cv_func_$ac_func=yes"
15584 else
15585   echo "configure: failed program was:" >&5
15586   cat conftest.$ac_ext >&5
15587   rm -rf conftest*
15588   eval "ac_cv_func_$ac_func=no"
15589 fi
15590 rm -f conftest*
15591 fi
15592
15593 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15594   echo "$ac_t""yes" 1>&6
15595     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15596   cat >> confdefs.h <<EOF
15597 #define $ac_tr_func 1
15598 EOF
15599  
15600 else
15601   echo "$ac_t""no" 1>&6
15602 fi
15603 done
15604
15605         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15606 echo "configure:15607: checking for LinuxThreads implementation" >&5
15607 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15608   echo $ac_n "(cached) $ac_c" 1>&6
15609 else
15610   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15611 fi
15612
15613 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15614
15615                         
15616         
15617         
15618         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15619 echo "configure:15620: checking for LinuxThreads consistency" >&5
15620 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15621   echo $ac_n "(cached) $ac_c" 1>&6
15622 else
15623   
15624                 if test $ol_cv_header_linux_threads = yes -a \
15625                         $ol_cv_sys_linux_threads = yes; then
15626                         ol_cv_linux_threads=yes
15627                 elif test $ol_cv_header_linux_threads = no -a \
15628                         $ol_cv_sys_linux_threads = no; then
15629                         ol_cv_linux_threads=no
15630                 else
15631                         ol_cv_linux_threads=error
15632                 fi
15633         
15634 fi
15635
15636 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15637
15638
15639                         if test $ol_cv_linux_threads = error; then
15640                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15641                         fi
15642
15643                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15644 echo "configure:15645: checking if pthread_create() works" >&5
15645 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15646   echo $ac_n "(cached) $ac_c" 1>&6
15647 else
15648   
15649                         if test "$cross_compiling" = yes; then
15650                                 ol_cv_pthread_create_works=yes
15651 else
15652   cat > conftest.$ac_ext <<EOF
15653 #line 15654 "configure"
15654 #include "confdefs.h"
15655 /* pthread test headers */
15656 #include <pthread.h>
15657 #ifndef NULL
15658 #define NULL (void*)0
15659 #endif
15660
15661 static void *task(p)
15662         void *p;
15663 {
15664         return (void *) (p == NULL);
15665 }
15666
15667
15668 int main(argc, argv)
15669         int argc;
15670         char **argv;
15671 {
15672
15673         /* pthread test function */
15674         pthread_t t;
15675         int status;
15676         int detach = 1;
15677
15678 #ifdef HAVE_PTHREADS_FINAL
15679         /* Final pthreads */
15680         pthread_attr_t attr;
15681
15682         status = pthread_attr_init(&attr);
15683         if( status ) return status;
15684
15685 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15686         if( !detach ) {
15687 #if defined( PTHREAD_CREATE_JOINABLE )
15688                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15689 #else
15690                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15691 #endif
15692
15693 #ifdef PTHREAD_CREATE_DETACHED
15694         } else {
15695                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15696 #endif
15697         }
15698         if( status ) return status;
15699 #endif
15700
15701         status = pthread_create( &t, &attr, task, NULL );
15702         if( status ) return status;
15703
15704 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15705         if( detach ) {
15706                 /* give thread a chance to complete */
15707                 /* it should remain joinable and hence detachable */
15708                 sleep( 1 );
15709
15710                 status = pthread_detach( t );
15711                 if( status ) return status;
15712         }
15713 #endif
15714
15715 #else
15716         /* Draft 4 pthreads */
15717         status = pthread_create( &t, pthread_attr_default, task, NULL );
15718         if( status ) return status;
15719
15720         if( detach ) {
15721                 /* give thread a chance to complete */
15722                 /* it should remain joinable and hence detachable */
15723                 sleep( 1 );
15724
15725                 status = pthread_detach( &t );
15726                 if( status ) return status;
15727         }
15728 #endif
15729
15730 #ifdef HAVE_LINUX_THREADS
15731         pthread_kill_other_threads_np();
15732 #endif
15733
15734         return 0;
15735
15736 }
15737
15738 EOF
15739 if { (eval echo configure:15740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15740 then
15741   ol_cv_pthread_create_works=yes
15742 else
15743   echo "configure: failed program was:" >&5
15744   cat conftest.$ac_ext >&5
15745   rm -fr conftest*
15746   ol_cv_pthread_create_works=no
15747 fi
15748 rm -fr conftest*
15749 fi
15750
15751 fi
15752
15753 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15754
15755                         if test $ol_cv_pthread_create_works = no ; then
15756                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15757                         fi
15758
15759                                                 if test $ol_with_yielding_select = auto ; then
15760                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15761 echo "configure:15762: checking if select yields when using pthreads" >&5
15762 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15763   echo $ac_n "(cached) $ac_c" 1>&6
15764 else
15765   
15766                                 if test "$cross_compiling" = yes; then
15767   ol_cv_pthread_select_yields=cross
15768 else
15769   cat > conftest.$ac_ext <<EOF
15770 #line 15771 "configure"
15771 #include "confdefs.h"
15772
15773 #include <sys/types.h>
15774 #include <sys/time.h>
15775 #include <unistd.h>
15776 #include <pthread.h>
15777 #ifndef NULL
15778 #define NULL (void*) 0
15779 #endif
15780
15781 static int fildes[2];
15782
15783 static void *task(p)
15784         void *p;
15785 {
15786         int i;
15787         struct timeval tv;
15788
15789         fd_set rfds;
15790
15791         tv.tv_sec=10;
15792         tv.tv_usec=0;
15793
15794         FD_ZERO(&rfds);
15795         FD_SET(fildes[0], &rfds);
15796
15797         /* we're not interested in any fds */
15798         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15799
15800         if(i < 0) {
15801                 perror("select");
15802                 exit(10);
15803         }
15804
15805         exit(0); /* if we exit here, the select blocked the whole process */
15806 }
15807
15808 int main(argc, argv)
15809         int argc;
15810         char **argv;
15811 {
15812         pthread_t t;
15813
15814         /* create a pipe to select */
15815         if(pipe(&fildes[0])) {
15816                 perror("select");
15817                 exit(1);
15818         }
15819
15820 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15821         (void) pthread_setconcurrency(2);
15822 #else
15823 #ifdef HAVE_THR_SETCONCURRENCY
15824         /* Set Solaris LWP concurrency to 2 */
15825         thr_setconcurrency(2);
15826 #endif
15827 #endif
15828
15829 #if HAVE_PTHREADS_D4
15830         pthread_create(&t, pthread_attr_default, task, NULL);
15831 #else
15832         pthread_create(&t, NULL, task, NULL);
15833 #endif
15834
15835 #if HAVE_SCHED_YIELD
15836         sched_yield();  /* make sure task runs first */
15837 #else
15838 #ifdef HAVE_PTHREAD_YIELD
15839         pthread_yield();        /* make sure task runs first */
15840 #endif
15841 #endif
15842
15843         exit(2);
15844 }
15845 EOF
15846 if { (eval echo configure:15847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15847 then
15848   ol_cv_pthread_select_yields=no
15849 else
15850   echo "configure: failed program was:" >&5
15851   cat conftest.$ac_ext >&5
15852   rm -fr conftest*
15853   ol_cv_pthread_select_yields=yes
15854 fi
15855 rm -fr conftest*
15856 fi
15857
15858 fi
15859
15860 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15861
15862                                 if test $ol_cv_pthread_select_yields = cross ; then
15863                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15864                                 fi
15865
15866                                 if test $ol_cv_pthread_select_yields = yes ; then
15867                                         ol_with_yielding_select=yes
15868                                 fi
15869                         fi
15870
15871                                                 CPPFLAGS="$save_CPPFLAGS"
15872                         LIBS="$save_LIBS"
15873                 else
15874                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15875                 fi
15876         fi
15877
15878         if test $ol_with_threads = posix ; then
15879                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15880         fi
15881 fi
15882
15883 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15884         -o $ol_with_threads = mach ; then
15885
15886                 for ac_hdr in mach/cthreads.h cthreads.h
15887 do
15888 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15889 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15890 echo "configure:15891: checking for $ac_hdr" >&5
15891 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15892   echo $ac_n "(cached) $ac_c" 1>&6
15893 else
15894   cat > conftest.$ac_ext <<EOF
15895 #line 15896 "configure"
15896 #include "confdefs.h"
15897 #include <$ac_hdr>
15898 EOF
15899 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15900 { (eval echo configure:15901: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15901 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15902 if test -z "$ac_err"; then
15903   rm -rf conftest*
15904   eval "ac_cv_header_$ac_safe=yes"
15905 else
15906   echo "$ac_err" >&5
15907   echo "configure: failed program was:" >&5
15908   cat conftest.$ac_ext >&5
15909   rm -rf conftest*
15910   eval "ac_cv_header_$ac_safe=no"
15911 fi
15912 rm -f conftest*
15913 fi
15914 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15915   echo "$ac_t""yes" 1>&6
15916     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15917   cat >> confdefs.h <<EOF
15918 #define $ac_tr_hdr 1
15919 EOF
15920  
15921 else
15922   echo "$ac_t""no" 1>&6
15923 fi
15924 done
15925
15926         if test $ac_cv_header_mach_cthreads_h = yes ; then
15927                 ol_with_threads=found
15928
15929                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15930 echo "configure:15931: checking for cthread_fork" >&5
15931 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15932   echo $ac_n "(cached) $ac_c" 1>&6
15933 else
15934   cat > conftest.$ac_ext <<EOF
15935 #line 15936 "configure"
15936 #include "confdefs.h"
15937 /* System header to define __stub macros and hopefully few prototypes,
15938     which can conflict with char cthread_fork(); below.  */
15939 #include <assert.h>
15940 /* Override any gcc2 internal prototype to avoid an error.  */
15941 /* We use char because int might match the return type of a gcc2
15942     builtin and then its argument prototype would still apply.  */
15943 char cthread_fork();
15944 char (*f)();
15945
15946 int main() {
15947
15948 /* The GNU C library defines this for functions which it implements
15949     to always fail with ENOSYS.  Some functions are actually named
15950     something starting with __ and the normal name is an alias.  */
15951 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15952 choke me
15953 #else
15954 f = cthread_fork;
15955 #endif
15956
15957 ; return 0; }
15958 EOF
15959 if { (eval echo configure:15960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15960   rm -rf conftest*
15961   eval "ac_cv_func_cthread_fork=yes"
15962 else
15963   echo "configure: failed program was:" >&5
15964   cat conftest.$ac_ext >&5
15965   rm -rf conftest*
15966   eval "ac_cv_func_cthread_fork=no"
15967 fi
15968 rm -f conftest*
15969 fi
15970
15971 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15972   echo "$ac_t""yes" 1>&6
15973   ol_link_threads=yes
15974 else
15975   echo "$ac_t""no" 1>&6
15976 fi
15977
15978
15979                 if test $ol_link_threads = no ; then
15980                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15981 echo "configure:15982: checking for cthread_fork with -all_load" >&5
15982 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15983   echo $ac_n "(cached) $ac_c" 1>&6
15984 else
15985   
15986                                                                 save_LIBS="$LIBS"
15987                                 LIBS="-all_load $LIBS"
15988                                 cat > conftest.$ac_ext <<EOF
15989 #line 15990 "configure"
15990 #include "confdefs.h"
15991 #include <mach/cthreads.h>
15992 int main() {
15993
15994                                         cthread_fork((void *)0, (void *)0);
15995                                         
15996 ; return 0; }
15997 EOF
15998 if { (eval echo configure:15999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15999   rm -rf conftest*
16000   ol_cv_cthread_all_load=yes
16001 else
16002   echo "configure: failed program was:" >&5
16003   cat conftest.$ac_ext >&5
16004   rm -rf conftest*
16005   ol_cv_cthread_all_load=no
16006 fi
16007 rm -f conftest*
16008                                                                 LIBS="$save_LIBS"
16009                         
16010 fi
16011
16012 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
16013
16014                         if test $ol_cv_cthread_all_load = yes ; then
16015                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
16016                                 ol_link_threads=mach
16017                                 ol_with_threads=found
16018                         fi
16019                 fi
16020
16021         elif test $ac_cv_header_cthreads_h = yes ; then
16022                                 
16023                 ol_with_threads=found
16024  
16025                                 save_LIBS="$LIBS"
16026                 LIBS="$LIBS -lthreads"
16027                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
16028 echo "configure:16029: checking for cthread_fork" >&5
16029 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
16030   echo $ac_n "(cached) $ac_c" 1>&6
16031 else
16032   cat > conftest.$ac_ext <<EOF
16033 #line 16034 "configure"
16034 #include "confdefs.h"
16035 /* System header to define __stub macros and hopefully few prototypes,
16036     which can conflict with char cthread_fork(); below.  */
16037 #include <assert.h>
16038 /* Override any gcc2 internal prototype to avoid an error.  */
16039 /* We use char because int might match the return type of a gcc2
16040     builtin and then its argument prototype would still apply.  */
16041 char cthread_fork();
16042 char (*f)();
16043
16044 int main() {
16045
16046 /* The GNU C library defines this for functions which it implements
16047     to always fail with ENOSYS.  Some functions are actually named
16048     something starting with __ and the normal name is an alias.  */
16049 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
16050 choke me
16051 #else
16052 f = cthread_fork;
16053 #endif
16054
16055 ; return 0; }
16056 EOF
16057 if { (eval echo configure:16058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16058   rm -rf conftest*
16059   eval "ac_cv_func_cthread_fork=yes"
16060 else
16061   echo "configure: failed program was:" >&5
16062   cat conftest.$ac_ext >&5
16063   rm -rf conftest*
16064   eval "ac_cv_func_cthread_fork=no"
16065 fi
16066 rm -f conftest*
16067 fi
16068
16069 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
16070   echo "$ac_t""yes" 1>&6
16071   ol_link_threads=yes
16072 else
16073   echo "$ac_t""no" 1>&6
16074 fi
16075
16076                 LIBS="$save_LIBS"
16077
16078                 if test $ol_link_threads = yes ; then
16079                         LTHREAD_LIBS="-lthreads"
16080                         ol_link_threads=mach
16081                         ol_with_threads=found
16082                 else
16083                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
16084                 fi
16085
16086         elif test $ol_with_threads = mach ; then
16087                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
16088         fi
16089
16090         if test $ol_link_threads = mach ; then
16091                 cat >> confdefs.h <<\EOF
16092 #define HAVE_MACH_CTHREADS 1
16093 EOF
16094
16095         elif test $ol_with_threads = found ; then
16096                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
16097         fi
16098 fi
16099
16100 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16101         -o $ol_with_threads = pth ; then
16102
16103         for ac_hdr in pth.h
16104 do
16105 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16106 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16107 echo "configure:16108: checking for $ac_hdr" >&5
16108 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16109   echo $ac_n "(cached) $ac_c" 1>&6
16110 else
16111   cat > conftest.$ac_ext <<EOF
16112 #line 16113 "configure"
16113 #include "confdefs.h"
16114 #include <$ac_hdr>
16115 EOF
16116 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16117 { (eval echo configure:16118: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16118 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16119 if test -z "$ac_err"; then
16120   rm -rf conftest*
16121   eval "ac_cv_header_$ac_safe=yes"
16122 else
16123   echo "$ac_err" >&5
16124   echo "configure: failed program was:" >&5
16125   cat conftest.$ac_ext >&5
16126   rm -rf conftest*
16127   eval "ac_cv_header_$ac_safe=no"
16128 fi
16129 rm -f conftest*
16130 fi
16131 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16132   echo "$ac_t""yes" 1>&6
16133     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16134   cat >> confdefs.h <<EOF
16135 #define $ac_tr_hdr 1
16136 EOF
16137  
16138 else
16139   echo "$ac_t""no" 1>&6
16140 fi
16141 done
16142
16143
16144         if test $ac_cv_header_pth_h = yes ; then
16145                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
16146 echo "configure:16147: checking for pth_version in -lpth" >&5
16147 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
16148 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16149   echo $ac_n "(cached) $ac_c" 1>&6
16150 else
16151   ac_save_LIBS="$LIBS"
16152 LIBS="-lpth  $LIBS"
16153 cat > conftest.$ac_ext <<EOF
16154 #line 16155 "configure"
16155 #include "confdefs.h"
16156 /* Override any gcc2 internal prototype to avoid an error.  */
16157 /* We use char because int might match the return type of a gcc2
16158     builtin and then its argument prototype would still apply.  */
16159 char pth_version();
16160
16161 int main() {
16162 pth_version()
16163 ; return 0; }
16164 EOF
16165 if { (eval echo configure:16166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16166   rm -rf conftest*
16167   eval "ac_cv_lib_$ac_lib_var=yes"
16168 else
16169   echo "configure: failed program was:" >&5
16170   cat conftest.$ac_ext >&5
16171   rm -rf conftest*
16172   eval "ac_cv_lib_$ac_lib_var=no"
16173 fi
16174 rm -f conftest*
16175 LIBS="$ac_save_LIBS"
16176
16177 fi
16178 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16179   echo "$ac_t""yes" 1>&6
16180   have_pth=yes
16181 else
16182   echo "$ac_t""no" 1>&6
16183 have_pth=no
16184 fi
16185
16186
16187                 if test $have_pth = yes ; then
16188                         cat >> confdefs.h <<\EOF
16189 #define HAVE_GNU_PTH 1
16190 EOF
16191
16192                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
16193                         ol_link_threads=pth
16194                         ol_with_threads=found
16195
16196                         if test $ol_with_yielding_select = auto ; then
16197                                 ol_with_yielding_select=yes
16198                         fi
16199                 fi
16200         fi
16201 fi
16202
16203 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16204         -o $ol_with_threads = lwp ; then
16205
16206                 for ac_hdr in thread.h synch.h
16207 do
16208 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16209 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16210 echo "configure:16211: checking for $ac_hdr" >&5
16211 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16212   echo $ac_n "(cached) $ac_c" 1>&6
16213 else
16214   cat > conftest.$ac_ext <<EOF
16215 #line 16216 "configure"
16216 #include "confdefs.h"
16217 #include <$ac_hdr>
16218 EOF
16219 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16220 { (eval echo configure:16221: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16221 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16222 if test -z "$ac_err"; then
16223   rm -rf conftest*
16224   eval "ac_cv_header_$ac_safe=yes"
16225 else
16226   echo "$ac_err" >&5
16227   echo "configure: failed program was:" >&5
16228   cat conftest.$ac_ext >&5
16229   rm -rf conftest*
16230   eval "ac_cv_header_$ac_safe=no"
16231 fi
16232 rm -f conftest*
16233 fi
16234 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16235   echo "$ac_t""yes" 1>&6
16236     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16237   cat >> confdefs.h <<EOF
16238 #define $ac_tr_hdr 1
16239 EOF
16240  
16241 else
16242   echo "$ac_t""no" 1>&6
16243 fi
16244 done
16245
16246         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
16247                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
16248 echo "configure:16249: checking for thr_create in -lthread" >&5
16249 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
16250 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16251   echo $ac_n "(cached) $ac_c" 1>&6
16252 else
16253   ac_save_LIBS="$LIBS"
16254 LIBS="-lthread  $LIBS"
16255 cat > conftest.$ac_ext <<EOF
16256 #line 16257 "configure"
16257 #include "confdefs.h"
16258 /* Override any gcc2 internal prototype to avoid an error.  */
16259 /* We use char because int might match the return type of a gcc2
16260     builtin and then its argument prototype would still apply.  */
16261 char thr_create();
16262
16263 int main() {
16264 thr_create()
16265 ; return 0; }
16266 EOF
16267 if { (eval echo configure:16268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16268   rm -rf conftest*
16269   eval "ac_cv_lib_$ac_lib_var=yes"
16270 else
16271   echo "configure: failed program was:" >&5
16272   cat conftest.$ac_ext >&5
16273   rm -rf conftest*
16274   eval "ac_cv_lib_$ac_lib_var=no"
16275 fi
16276 rm -f conftest*
16277 LIBS="$ac_save_LIBS"
16278
16279 fi
16280 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16281   echo "$ac_t""yes" 1>&6
16282   have_thr=yes
16283 else
16284   echo "$ac_t""no" 1>&6
16285 have_thr=no
16286 fi
16287
16288
16289                 if test $have_thr = yes ; then
16290                         cat >> confdefs.h <<\EOF
16291 #define HAVE_THR 1
16292 EOF
16293
16294                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
16295                         ol_link_threads=thr
16296
16297                         if test $ol_with_yielding_select = auto ; then
16298                                 ol_with_yielding_select=yes
16299                         fi
16300
16301                                                 for ac_func in \
16302                                 thr_setconcurrency \
16303                                 thr_getconcurrency \
16304                         
16305 do
16306 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16307 echo "configure:16308: checking for $ac_func" >&5
16308 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16309   echo $ac_n "(cached) $ac_c" 1>&6
16310 else
16311   cat > conftest.$ac_ext <<EOF
16312 #line 16313 "configure"
16313 #include "confdefs.h"
16314 /* System header to define __stub macros and hopefully few prototypes,
16315     which can conflict with char $ac_func(); below.  */
16316 #include <assert.h>
16317 /* Override any gcc2 internal prototype to avoid an error.  */
16318 /* We use char because int might match the return type of a gcc2
16319     builtin and then its argument prototype would still apply.  */
16320 char $ac_func();
16321 char (*f)();
16322
16323 int main() {
16324
16325 /* The GNU C library defines this for functions which it implements
16326     to always fail with ENOSYS.  Some functions are actually named
16327     something starting with __ and the normal name is an alias.  */
16328 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16329 choke me
16330 #else
16331 f = $ac_func;
16332 #endif
16333
16334 ; return 0; }
16335 EOF
16336 if { (eval echo configure:16337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16337   rm -rf conftest*
16338   eval "ac_cv_func_$ac_func=yes"
16339 else
16340   echo "configure: failed program was:" >&5
16341   cat conftest.$ac_ext >&5
16342   rm -rf conftest*
16343   eval "ac_cv_func_$ac_func=no"
16344 fi
16345 rm -f conftest*
16346 fi
16347
16348 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16349   echo "$ac_t""yes" 1>&6
16350     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16351   cat >> confdefs.h <<EOF
16352 #define $ac_tr_func 1
16353 EOF
16354  
16355 else
16356   echo "$ac_t""no" 1>&6
16357 fi
16358 done
16359
16360                 fi
16361         fi
16362
16363                 for ac_hdr in lwp/lwp.h
16364 do
16365 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16366 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16367 echo "configure:16368: checking for $ac_hdr" >&5
16368 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16369   echo $ac_n "(cached) $ac_c" 1>&6
16370 else
16371   cat > conftest.$ac_ext <<EOF
16372 #line 16373 "configure"
16373 #include "confdefs.h"
16374 #include <$ac_hdr>
16375 EOF
16376 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16377 { (eval echo configure:16378: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16378 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16379 if test -z "$ac_err"; then
16380   rm -rf conftest*
16381   eval "ac_cv_header_$ac_safe=yes"
16382 else
16383   echo "$ac_err" >&5
16384   echo "configure: failed program was:" >&5
16385   cat conftest.$ac_ext >&5
16386   rm -rf conftest*
16387   eval "ac_cv_header_$ac_safe=no"
16388 fi
16389 rm -f conftest*
16390 fi
16391 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16392   echo "$ac_t""yes" 1>&6
16393     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16394   cat >> confdefs.h <<EOF
16395 #define $ac_tr_hdr 1
16396 EOF
16397  
16398 else
16399   echo "$ac_t""no" 1>&6
16400 fi
16401 done
16402
16403         if test $ac_cv_header_lwp_lwp_h = yes ; then
16404                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
16405 echo "configure:16406: checking for lwp_create in -llwp" >&5
16406 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
16407 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16408   echo $ac_n "(cached) $ac_c" 1>&6
16409 else
16410   ac_save_LIBS="$LIBS"
16411 LIBS="-llwp  $LIBS"
16412 cat > conftest.$ac_ext <<EOF
16413 #line 16414 "configure"
16414 #include "confdefs.h"
16415 /* Override any gcc2 internal prototype to avoid an error.  */
16416 /* We use char because int might match the return type of a gcc2
16417     builtin and then its argument prototype would still apply.  */
16418 char lwp_create();
16419
16420 int main() {
16421 lwp_create()
16422 ; return 0; }
16423 EOF
16424 if { (eval echo configure:16425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16425   rm -rf conftest*
16426   eval "ac_cv_lib_$ac_lib_var=yes"
16427 else
16428   echo "configure: failed program was:" >&5
16429   cat conftest.$ac_ext >&5
16430   rm -rf conftest*
16431   eval "ac_cv_lib_$ac_lib_var=no"
16432 fi
16433 rm -f conftest*
16434 LIBS="$ac_save_LIBS"
16435
16436 fi
16437 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16438   echo "$ac_t""yes" 1>&6
16439   have_lwp=yes
16440 else
16441   echo "$ac_t""no" 1>&6
16442 have_lwp=no
16443 fi
16444
16445
16446                 if test $have_lwp = yes ; then
16447                         cat >> confdefs.h <<\EOF
16448 #define HAVE_LWP 1
16449 EOF
16450
16451                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
16452                         ol_link_threads=lwp
16453
16454                         if test $ol_with_yielding_select = auto ; then
16455                                 ol_with_yielding_select=no
16456                         fi
16457                 fi
16458         fi
16459 fi
16460
16461 if test $ol_with_yielding_select = yes ; then
16462         cat >> confdefs.h <<\EOF
16463 #define HAVE_YIELDING_SELECT 1
16464 EOF
16465
16466 fi
16467
16468 if test $ol_with_threads = manual ; then
16469                 ol_link_threads=yes
16470
16471         echo "configure: warning: thread defines and link options must be set manually" 1>&2
16472
16473         for ac_hdr in pthread.h sched.h
16474 do
16475 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16476 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16477 echo "configure:16478: checking for $ac_hdr" >&5
16478 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16479   echo $ac_n "(cached) $ac_c" 1>&6
16480 else
16481   cat > conftest.$ac_ext <<EOF
16482 #line 16483 "configure"
16483 #include "confdefs.h"
16484 #include <$ac_hdr>
16485 EOF
16486 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16487 { (eval echo configure:16488: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16488 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16489 if test -z "$ac_err"; then
16490   rm -rf conftest*
16491   eval "ac_cv_header_$ac_safe=yes"
16492 else
16493   echo "$ac_err" >&5
16494   echo "configure: failed program was:" >&5
16495   cat conftest.$ac_ext >&5
16496   rm -rf conftest*
16497   eval "ac_cv_header_$ac_safe=no"
16498 fi
16499 rm -f conftest*
16500 fi
16501 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16502   echo "$ac_t""yes" 1>&6
16503     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16504   cat >> confdefs.h <<EOF
16505 #define $ac_tr_hdr 1
16506 EOF
16507  
16508 else
16509   echo "$ac_t""no" 1>&6
16510 fi
16511 done
16512
16513         for ac_func in sched_yield pthread_yield
16514 do
16515 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16516 echo "configure:16517: checking for $ac_func" >&5
16517 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16518   echo $ac_n "(cached) $ac_c" 1>&6
16519 else
16520   cat > conftest.$ac_ext <<EOF
16521 #line 16522 "configure"
16522 #include "confdefs.h"
16523 /* System header to define __stub macros and hopefully few prototypes,
16524     which can conflict with char $ac_func(); below.  */
16525 #include <assert.h>
16526 /* Override any gcc2 internal prototype to avoid an error.  */
16527 /* We use char because int might match the return type of a gcc2
16528     builtin and then its argument prototype would still apply.  */
16529 char $ac_func();
16530 char (*f)();
16531
16532 int main() {
16533
16534 /* The GNU C library defines this for functions which it implements
16535     to always fail with ENOSYS.  Some functions are actually named
16536     something starting with __ and the normal name is an alias.  */
16537 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16538 choke me
16539 #else
16540 f = $ac_func;
16541 #endif
16542
16543 ; return 0; }
16544 EOF
16545 if { (eval echo configure:16546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16546   rm -rf conftest*
16547   eval "ac_cv_func_$ac_func=yes"
16548 else
16549   echo "configure: failed program was:" >&5
16550   cat conftest.$ac_ext >&5
16551   rm -rf conftest*
16552   eval "ac_cv_func_$ac_func=no"
16553 fi
16554 rm -f conftest*
16555 fi
16556
16557 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16558   echo "$ac_t""yes" 1>&6
16559     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16560   cat >> confdefs.h <<EOF
16561 #define $ac_tr_func 1
16562 EOF
16563  
16564 else
16565   echo "$ac_t""no" 1>&6
16566 fi
16567 done
16568
16569         
16570         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16571 echo "configure:16572: checking for LinuxThreads pthread.h" >&5
16572 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16573   echo $ac_n "(cached) $ac_c" 1>&6
16574 else
16575   cat > conftest.$ac_ext <<EOF
16576 #line 16577 "configure"
16577 #include "confdefs.h"
16578 #include <pthread.h>
16579 EOF
16580 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16581   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16582   rm -rf conftest*
16583   ol_cv_header_linux_threads=yes
16584 else
16585   rm -rf conftest*
16586   ol_cv_header_linux_threads=no
16587 fi
16588 rm -f conftest*
16589
16590                 
16591 fi
16592
16593 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16594         if test $ol_cv_header_linux_threads = yes; then
16595                 cat >> confdefs.h <<\EOF
16596 #define HAVE_LINUX_THREADS 1
16597 EOF
16598
16599         fi
16600
16601
16602         for ac_hdr in mach/cthreads.h
16603 do
16604 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16605 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16606 echo "configure:16607: checking for $ac_hdr" >&5
16607 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16608   echo $ac_n "(cached) $ac_c" 1>&6
16609 else
16610   cat > conftest.$ac_ext <<EOF
16611 #line 16612 "configure"
16612 #include "confdefs.h"
16613 #include <$ac_hdr>
16614 EOF
16615 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16616 { (eval echo configure:16617: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16617 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16618 if test -z "$ac_err"; then
16619   rm -rf conftest*
16620   eval "ac_cv_header_$ac_safe=yes"
16621 else
16622   echo "$ac_err" >&5
16623   echo "configure: failed program was:" >&5
16624   cat conftest.$ac_ext >&5
16625   rm -rf conftest*
16626   eval "ac_cv_header_$ac_safe=no"
16627 fi
16628 rm -f conftest*
16629 fi
16630 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16631   echo "$ac_t""yes" 1>&6
16632     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16633   cat >> confdefs.h <<EOF
16634 #define $ac_tr_hdr 1
16635 EOF
16636  
16637 else
16638   echo "$ac_t""no" 1>&6
16639 fi
16640 done
16641
16642         for ac_hdr in lwp/lwp.h
16643 do
16644 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16645 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16646 echo "configure:16647: checking for $ac_hdr" >&5
16647 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16648   echo $ac_n "(cached) $ac_c" 1>&6
16649 else
16650   cat > conftest.$ac_ext <<EOF
16651 #line 16652 "configure"
16652 #include "confdefs.h"
16653 #include <$ac_hdr>
16654 EOF
16655 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16656 { (eval echo configure:16657: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16657 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16658 if test -z "$ac_err"; then
16659   rm -rf conftest*
16660   eval "ac_cv_header_$ac_safe=yes"
16661 else
16662   echo "$ac_err" >&5
16663   echo "configure: failed program was:" >&5
16664   cat conftest.$ac_ext >&5
16665   rm -rf conftest*
16666   eval "ac_cv_header_$ac_safe=no"
16667 fi
16668 rm -f conftest*
16669 fi
16670 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16671   echo "$ac_t""yes" 1>&6
16672     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16673   cat >> confdefs.h <<EOF
16674 #define $ac_tr_hdr 1
16675 EOF
16676  
16677 else
16678   echo "$ac_t""no" 1>&6
16679 fi
16680 done
16681
16682         for ac_hdr in thread.h synch.h
16683 do
16684 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16685 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16686 echo "configure:16687: checking for $ac_hdr" >&5
16687 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16688   echo $ac_n "(cached) $ac_c" 1>&6
16689 else
16690   cat > conftest.$ac_ext <<EOF
16691 #line 16692 "configure"
16692 #include "confdefs.h"
16693 #include <$ac_hdr>
16694 EOF
16695 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16696 { (eval echo configure:16697: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16697 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16698 if test -z "$ac_err"; then
16699   rm -rf conftest*
16700   eval "ac_cv_header_$ac_safe=yes"
16701 else
16702   echo "$ac_err" >&5
16703   echo "configure: failed program was:" >&5
16704   cat conftest.$ac_ext >&5
16705   rm -rf conftest*
16706   eval "ac_cv_header_$ac_safe=no"
16707 fi
16708 rm -f conftest*
16709 fi
16710 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16711   echo "$ac_t""yes" 1>&6
16712     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16713   cat >> confdefs.h <<EOF
16714 #define $ac_tr_hdr 1
16715 EOF
16716  
16717 else
16718   echo "$ac_t""no" 1>&6
16719 fi
16720 done
16721
16722 fi
16723
16724 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16725                         cat >> confdefs.h <<\EOF
16726 #define REENTRANT 1
16727 EOF
16728
16729         cat >> confdefs.h <<\EOF
16730 #define _REENTRANT 1
16731 EOF
16732
16733         cat >> confdefs.h <<\EOF
16734 #define THREAD_SAFE 1
16735 EOF
16736
16737         cat >> confdefs.h <<\EOF
16738 #define _THREAD_SAFE 1
16739 EOF
16740
16741         cat >> confdefs.h <<\EOF
16742 #define THREADSAFE 1
16743 EOF
16744
16745         cat >> confdefs.h <<\EOF
16746 #define _THREADSAFE 1
16747 EOF
16748
16749         cat >> confdefs.h <<\EOF
16750 #define _SGI_MP_SOURCE 1
16751 EOF
16752
16753
16754                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16755 echo "configure:16756: checking for thread specific errno" >&5
16756 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16757   echo $ac_n "(cached) $ac_c" 1>&6
16758 else
16759   
16760                 cat > conftest.$ac_ext <<EOF
16761 #line 16762 "configure"
16762 #include "confdefs.h"
16763 #include <errno.h>
16764 int main() {
16765 errno = 0;
16766 ; return 0; }
16767 EOF
16768 if { (eval echo configure:16769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16769   rm -rf conftest*
16770   ol_cv_errno_thread_specific=yes
16771 else
16772   echo "configure: failed program was:" >&5
16773   cat conftest.$ac_ext >&5
16774   rm -rf conftest*
16775   ol_cv_errno_thread_specific=no
16776 fi
16777 rm -f conftest*
16778         
16779 fi
16780
16781 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16782
16783                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16784 echo "configure:16785: checking for thread specific h_errno" >&5
16785 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16786   echo $ac_n "(cached) $ac_c" 1>&6
16787 else
16788   
16789                 cat > conftest.$ac_ext <<EOF
16790 #line 16791 "configure"
16791 #include "confdefs.h"
16792 #include <netdb.h>
16793 int main() {
16794 h_errno = 0;
16795 ; return 0; }
16796 EOF
16797 if { (eval echo configure:16798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16798   rm -rf conftest*
16799   ol_cv_h_errno_thread_specific=yes
16800 else
16801   echo "configure: failed program was:" >&5
16802   cat conftest.$ac_ext >&5
16803   rm -rf conftest*
16804   ol_cv_h_errno_thread_specific=no
16805 fi
16806 rm -f conftest*
16807         
16808 fi
16809
16810 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16811
16812         if test $ol_cv_errno_thread_specific != yes \
16813                 -o $ol_cv_h_errno_thread_specific != yes ; then
16814                 LIBS="$LTHREAD_LIBS $LIBS"
16815                 LTHREAD_LIBS=""
16816         fi
16817
16818 fi  
16819
16820 if test $ol_link_threads = no ; then
16821         if test $ol_with_threads = yes ; then
16822                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16823         fi
16824
16825         if test $ol_with_threads = auto ; then
16826                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16827                 ol_with_threads=no
16828         fi
16829
16830         cat >> confdefs.h <<\EOF
16831 #define NO_THREADS 1
16832 EOF
16833
16834         LTHREAD_LIBS=""
16835 fi
16836
16837 if test $ol_link_threads != no ; then
16838         cat >> confdefs.h <<\EOF
16839 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16840 EOF
16841
16842 fi
16843
16844 ol_link_ldbm=no 
16845
16846 if test $ol_with_ldbm_api = auto \
16847         -o $ol_with_ldbm_api = berkeley \
16848         -o $ol_with_ldbm_api = bcompat ; then
16849
16850         if test $ol_with_ldbm_api = bcompat; then \
16851                 for ac_hdr in db_185.h db.h
16852 do
16853 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16854 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16855 echo "configure:16856: checking for $ac_hdr" >&5
16856 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16857   echo $ac_n "(cached) $ac_c" 1>&6
16858 else
16859   cat > conftest.$ac_ext <<EOF
16860 #line 16861 "configure"
16861 #include "confdefs.h"
16862 #include <$ac_hdr>
16863 EOF
16864 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16865 { (eval echo configure:16866: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16866 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16867 if test -z "$ac_err"; then
16868   rm -rf conftest*
16869   eval "ac_cv_header_$ac_safe=yes"
16870 else
16871   echo "$ac_err" >&5
16872   echo "configure: failed program was:" >&5
16873   cat conftest.$ac_ext >&5
16874   rm -rf conftest*
16875   eval "ac_cv_header_$ac_safe=no"
16876 fi
16877 rm -f conftest*
16878 fi
16879 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16880   echo "$ac_t""yes" 1>&6
16881     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16882   cat >> confdefs.h <<EOF
16883 #define $ac_tr_hdr 1
16884 EOF
16885  
16886 else
16887   echo "$ac_t""no" 1>&6
16888 fi
16889 done
16890
16891 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16892         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16893 echo "configure:16894: checking if Berkeley DB header compatibility" >&5
16894 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16895   echo $ac_n "(cached) $ac_c" 1>&6
16896 else
16897   
16898                 cat > conftest.$ac_ext <<EOF
16899 #line 16900 "configure"
16900 #include "confdefs.h"
16901
16902 #if HAVE_DB_185_H
16903 #       include <db_185.h>
16904 #else
16905 #       include <db.h>
16906 #endif
16907
16908  /* this check could be improved */
16909 #ifndef DB_VERSION_MAJOR
16910 #       define DB_VERSION_MAJOR 1
16911 #endif
16912
16913 #if DB_VERSION_MAJOR == 1 
16914         __db_version_1
16915 #endif
16916
16917 EOF
16918 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16919   egrep "__db_version_1" >/dev/null 2>&1; then
16920   rm -rf conftest*
16921   ol_cv_header_db1=yes
16922 else
16923   rm -rf conftest*
16924   ol_cv_header_db1=no
16925 fi
16926 rm -f conftest*
16927
16928 fi
16929
16930 echo "$ac_t""$ol_cv_header_db1" 1>&6
16931
16932         if test $ol_cv_header_db1 = yes ; then
16933                 ol_cv_lib_db=no
16934 if test $ol_cv_lib_db = no ; then
16935         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16936 echo "configure:16937: checking for Berkeley DB link (default)" >&5
16937 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16938   echo $ac_n "(cached) $ac_c" 1>&6
16939 else
16940   
16941         ol_DB_LIB=
16942         ol_LIBS=$LIBS
16943         LIBS="$ol_DB_LIB $LIBS"
16944
16945         cat > conftest.$ac_ext <<EOF
16946 #line 16947 "configure"
16947 #include "confdefs.h"
16948
16949 #ifdef HAVE_DB_185_H
16950 # include <db_185.h>
16951 #else
16952 # include <db.h>
16953 #endif
16954
16955 #ifndef DB_VERSION_MAJOR
16956 # define DB_VERSION_MAJOR 1
16957 #endif
16958
16959 #ifndef NULL
16960 #define NULL ((void*)0)
16961 #endif
16962
16963 int main() {
16964
16965 #if DB_VERSION_MAJOR > 1
16966         {
16967                 char *version;
16968                 int major, minor, patch;
16969
16970                 version = db_version( &major, &minor, &patch );
16971
16972                 if( major != DB_VERSION_MAJOR ||
16973                         minor < DB_VERSION_MINOR )
16974                 {
16975                         printf("Berkeley DB version mismatch\n"
16976                                 "\texpected: %s\n\tgot: %s\n",
16977                                 DB_VERSION_STRING, version);
16978                         return 1;
16979                 }
16980         }
16981 #endif
16982
16983 #if DB_VERSION_MAJOR > 2
16984         db_env_create( NULL, 0 );
16985 #elif DB_VERSION_MAJOR > 1
16986         db_appexit( NULL );
16987 #else
16988         (void) dbopen( NULL, 0, 0, 0, NULL);
16989 #endif
16990
16991 ; return 0; }
16992 EOF
16993 if { (eval echo configure:16994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16994   rm -rf conftest*
16995   ol_cv_db_none=yes
16996 else
16997   echo "configure: failed program was:" >&5
16998   cat conftest.$ac_ext >&5
16999   rm -rf conftest*
17000   ol_cv_db_none=no
17001 fi
17002 rm -f conftest*
17003
17004         LIBS="$ol_LIBS"
17005
17006 fi
17007
17008 echo "$ac_t""$ol_cv_db_none" 1>&6
17009
17010         if test $ol_cv_db_none = yes ; then
17011                 ol_cv_lib_db=yes
17012         fi
17013 fi
17014
17015 if test $ol_cv_lib_db = no ; then
17016         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17017 echo "configure:17018: checking for Berkeley DB link (-ldb)" >&5
17018 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17019   echo $ac_n "(cached) $ac_c" 1>&6
17020 else
17021   
17022         ol_DB_LIB=-ldb
17023         ol_LIBS=$LIBS
17024         LIBS="$ol_DB_LIB $LIBS"
17025
17026         cat > conftest.$ac_ext <<EOF
17027 #line 17028 "configure"
17028 #include "confdefs.h"
17029
17030 #ifdef HAVE_DB_185_H
17031 # include <db_185.h>
17032 #else
17033 # include <db.h>
17034 #endif
17035
17036 #ifndef DB_VERSION_MAJOR
17037 # define DB_VERSION_MAJOR 1
17038 #endif
17039
17040 #ifndef NULL
17041 #define NULL ((void*)0)
17042 #endif
17043
17044 int main() {
17045
17046 #if DB_VERSION_MAJOR > 1
17047         {
17048                 char *version;
17049                 int major, minor, patch;
17050
17051                 version = db_version( &major, &minor, &patch );
17052
17053                 if( major != DB_VERSION_MAJOR ||
17054                         minor < DB_VERSION_MINOR )
17055                 {
17056                         printf("Berkeley DB version mismatch\n"
17057                                 "\texpected: %s\n\tgot: %s\n",
17058                                 DB_VERSION_STRING, version);
17059                         return 1;
17060                 }
17061         }
17062 #endif
17063
17064 #if DB_VERSION_MAJOR > 2
17065         db_env_create( NULL, 0 );
17066 #elif DB_VERSION_MAJOR > 1
17067         db_appexit( NULL );
17068 #else
17069         (void) dbopen( NULL, 0, 0, 0, NULL);
17070 #endif
17071
17072 ; return 0; }
17073 EOF
17074 if { (eval echo configure:17075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17075   rm -rf conftest*
17076   ol_cv_db_db=yes
17077 else
17078   echo "configure: failed program was:" >&5
17079   cat conftest.$ac_ext >&5
17080   rm -rf conftest*
17081   ol_cv_db_db=no
17082 fi
17083 rm -f conftest*
17084
17085         LIBS="$ol_LIBS"
17086
17087 fi
17088
17089 echo "$ac_t""$ol_cv_db_db" 1>&6
17090
17091         if test $ol_cv_db_db = yes ; then
17092                 ol_cv_lib_db=-ldb
17093         fi
17094 fi
17095
17096 if test $ol_cv_lib_db = no ; then
17097         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17098 echo "configure:17099: checking for Berkeley DB link (-ldb4)" >&5
17099 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17100   echo $ac_n "(cached) $ac_c" 1>&6
17101 else
17102   
17103         ol_DB_LIB=-ldb4
17104         ol_LIBS=$LIBS
17105         LIBS="$ol_DB_LIB $LIBS"
17106
17107         cat > conftest.$ac_ext <<EOF
17108 #line 17109 "configure"
17109 #include "confdefs.h"
17110
17111 #ifdef HAVE_DB_185_H
17112 # include <db_185.h>
17113 #else
17114 # include <db.h>
17115 #endif
17116
17117 #ifndef DB_VERSION_MAJOR
17118 # define DB_VERSION_MAJOR 1
17119 #endif
17120
17121 #ifndef NULL
17122 #define NULL ((void*)0)
17123 #endif
17124
17125 int main() {
17126
17127 #if DB_VERSION_MAJOR > 1
17128         {
17129                 char *version;
17130                 int major, minor, patch;
17131
17132                 version = db_version( &major, &minor, &patch );
17133
17134                 if( major != DB_VERSION_MAJOR ||
17135                         minor < DB_VERSION_MINOR )
17136                 {
17137                         printf("Berkeley DB version mismatch\n"
17138                                 "\texpected: %s\n\tgot: %s\n",
17139                                 DB_VERSION_STRING, version);
17140                         return 1;
17141                 }
17142         }
17143 #endif
17144
17145 #if DB_VERSION_MAJOR > 2
17146         db_env_create( NULL, 0 );
17147 #elif DB_VERSION_MAJOR > 1
17148         db_appexit( NULL );
17149 #else
17150         (void) dbopen( NULL, 0, 0, 0, NULL);
17151 #endif
17152
17153 ; return 0; }
17154 EOF
17155 if { (eval echo configure:17156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17156   rm -rf conftest*
17157   ol_cv_db_db4=yes
17158 else
17159   echo "configure: failed program was:" >&5
17160   cat conftest.$ac_ext >&5
17161   rm -rf conftest*
17162   ol_cv_db_db4=no
17163 fi
17164 rm -f conftest*
17165
17166         LIBS="$ol_LIBS"
17167
17168 fi
17169
17170 echo "$ac_t""$ol_cv_db_db4" 1>&6
17171
17172         if test $ol_cv_db_db4 = yes ; then
17173                 ol_cv_lib_db=-ldb4
17174         fi
17175 fi
17176
17177 if test $ol_cv_lib_db = no ; then
17178         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17179 echo "configure:17180: checking for Berkeley DB link (-ldb3)" >&5
17180 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17181   echo $ac_n "(cached) $ac_c" 1>&6
17182 else
17183   
17184         ol_DB_LIB=-ldb3
17185         ol_LIBS=$LIBS
17186         LIBS="$ol_DB_LIB $LIBS"
17187
17188         cat > conftest.$ac_ext <<EOF
17189 #line 17190 "configure"
17190 #include "confdefs.h"
17191
17192 #ifdef HAVE_DB_185_H
17193 # include <db_185.h>
17194 #else
17195 # include <db.h>
17196 #endif
17197
17198 #ifndef DB_VERSION_MAJOR
17199 # define DB_VERSION_MAJOR 1
17200 #endif
17201
17202 #ifndef NULL
17203 #define NULL ((void*)0)
17204 #endif
17205
17206 int main() {
17207
17208 #if DB_VERSION_MAJOR > 1
17209         {
17210                 char *version;
17211                 int major, minor, patch;
17212
17213                 version = db_version( &major, &minor, &patch );
17214
17215                 if( major != DB_VERSION_MAJOR ||
17216                         minor < DB_VERSION_MINOR )
17217                 {
17218                         printf("Berkeley DB version mismatch\n"
17219                                 "\texpected: %s\n\tgot: %s\n",
17220                                 DB_VERSION_STRING, version);
17221                         return 1;
17222                 }
17223         }
17224 #endif
17225
17226 #if DB_VERSION_MAJOR > 2
17227         db_env_create( NULL, 0 );
17228 #elif DB_VERSION_MAJOR > 1
17229         db_appexit( NULL );
17230 #else
17231         (void) dbopen( NULL, 0, 0, 0, NULL);
17232 #endif
17233
17234 ; return 0; }
17235 EOF
17236 if { (eval echo configure:17237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17237   rm -rf conftest*
17238   ol_cv_db_db3=yes
17239 else
17240   echo "configure: failed program was:" >&5
17241   cat conftest.$ac_ext >&5
17242   rm -rf conftest*
17243   ol_cv_db_db3=no
17244 fi
17245 rm -f conftest*
17246
17247         LIBS="$ol_LIBS"
17248
17249 fi
17250
17251 echo "$ac_t""$ol_cv_db_db3" 1>&6
17252
17253         if test $ol_cv_db_db3 = yes ; then
17254                 ol_cv_lib_db=-ldb3
17255         fi
17256 fi
17257
17258 if test $ol_cv_lib_db = no ; then
17259         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17260 echo "configure:17261: checking for Berkeley DB link (-ldb2)" >&5
17261 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17262   echo $ac_n "(cached) $ac_c" 1>&6
17263 else
17264   
17265         ol_DB_LIB=-ldb2
17266         ol_LIBS=$LIBS
17267         LIBS="$ol_DB_LIB $LIBS"
17268
17269         cat > conftest.$ac_ext <<EOF
17270 #line 17271 "configure"
17271 #include "confdefs.h"
17272
17273 #ifdef HAVE_DB_185_H
17274 # include <db_185.h>
17275 #else
17276 # include <db.h>
17277 #endif
17278
17279 #ifndef DB_VERSION_MAJOR
17280 # define DB_VERSION_MAJOR 1
17281 #endif
17282
17283 #ifndef NULL
17284 #define NULL ((void*)0)
17285 #endif
17286
17287 int main() {
17288
17289 #if DB_VERSION_MAJOR > 1
17290         {
17291                 char *version;
17292                 int major, minor, patch;
17293
17294                 version = db_version( &major, &minor, &patch );
17295
17296                 if( major != DB_VERSION_MAJOR ||
17297                         minor < DB_VERSION_MINOR )
17298                 {
17299                         printf("Berkeley DB version mismatch\n"
17300                                 "\texpected: %s\n\tgot: %s\n",
17301                                 DB_VERSION_STRING, version);
17302                         return 1;
17303                 }
17304         }
17305 #endif
17306
17307 #if DB_VERSION_MAJOR > 2
17308         db_env_create( NULL, 0 );
17309 #elif DB_VERSION_MAJOR > 1
17310         db_appexit( NULL );
17311 #else
17312         (void) dbopen( NULL, 0, 0, 0, NULL);
17313 #endif
17314
17315 ; return 0; }
17316 EOF
17317 if { (eval echo configure:17318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17318   rm -rf conftest*
17319   ol_cv_db_db2=yes
17320 else
17321   echo "configure: failed program was:" >&5
17322   cat conftest.$ac_ext >&5
17323   rm -rf conftest*
17324   ol_cv_db_db2=no
17325 fi
17326 rm -f conftest*
17327
17328         LIBS="$ol_LIBS"
17329
17330 fi
17331
17332 echo "$ac_t""$ol_cv_db_db2" 1>&6
17333
17334         if test $ol_cv_db_db2 = yes ; then
17335                 ol_cv_lib_db=-ldb2
17336         fi
17337 fi
17338
17339 if test $ol_cv_lib_db = no ; then
17340         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17341 echo "configure:17342: checking for Berkeley DB link (-ldb1)" >&5
17342 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17343   echo $ac_n "(cached) $ac_c" 1>&6
17344 else
17345   
17346         ol_DB_LIB=-ldb1
17347         ol_LIBS=$LIBS
17348         LIBS="$ol_DB_LIB $LIBS"
17349
17350         cat > conftest.$ac_ext <<EOF
17351 #line 17352 "configure"
17352 #include "confdefs.h"
17353
17354 #ifdef HAVE_DB_185_H
17355 # include <db_185.h>
17356 #else
17357 # include <db.h>
17358 #endif
17359
17360 #ifndef DB_VERSION_MAJOR
17361 # define DB_VERSION_MAJOR 1
17362 #endif
17363
17364 #ifndef NULL
17365 #define NULL ((void*)0)
17366 #endif
17367
17368 int main() {
17369
17370 #if DB_VERSION_MAJOR > 1
17371         {
17372                 char *version;
17373                 int major, minor, patch;
17374
17375                 version = db_version( &major, &minor, &patch );
17376
17377                 if( major != DB_VERSION_MAJOR ||
17378                         minor < DB_VERSION_MINOR )
17379                 {
17380                         printf("Berkeley DB version mismatch\n"
17381                                 "\texpected: %s\n\tgot: %s\n",
17382                                 DB_VERSION_STRING, version);
17383                         return 1;
17384                 }
17385         }
17386 #endif
17387
17388 #if DB_VERSION_MAJOR > 2
17389         db_env_create( NULL, 0 );
17390 #elif DB_VERSION_MAJOR > 1
17391         db_appexit( NULL );
17392 #else
17393         (void) dbopen( NULL, 0, 0, 0, NULL);
17394 #endif
17395
17396 ; return 0; }
17397 EOF
17398 if { (eval echo configure:17399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17399   rm -rf conftest*
17400   ol_cv_db_db1=yes
17401 else
17402   echo "configure: failed program was:" >&5
17403   cat conftest.$ac_ext >&5
17404   rm -rf conftest*
17405   ol_cv_db_db1=no
17406 fi
17407 rm -f conftest*
17408
17409         LIBS="$ol_LIBS"
17410
17411 fi
17412
17413 echo "$ac_t""$ol_cv_db_db1" 1>&6
17414
17415         if test $ol_cv_db_db1 = yes ; then
17416                 ol_cv_lib_db=-ldb1
17417         fi
17418 fi
17419
17420
17421                 if test "$ol_cv_lib_db" != no ; then
17422                         ol_cv_berkeley_db=yes
17423                 fi
17424         fi
17425 fi
17426
17427         else
17428                 ol_cv_berkeley_db=no
17429 for ac_hdr in db.h
17430 do
17431 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17432 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17433 echo "configure:17434: checking for $ac_hdr" >&5
17434 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17435   echo $ac_n "(cached) $ac_c" 1>&6
17436 else
17437   cat > conftest.$ac_ext <<EOF
17438 #line 17439 "configure"
17439 #include "confdefs.h"
17440 #include <$ac_hdr>
17441 EOF
17442 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17443 { (eval echo configure:17444: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17444 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17445 if test -z "$ac_err"; then
17446   rm -rf conftest*
17447   eval "ac_cv_header_$ac_safe=yes"
17448 else
17449   echo "$ac_err" >&5
17450   echo "configure: failed program was:" >&5
17451   cat conftest.$ac_ext >&5
17452   rm -rf conftest*
17453   eval "ac_cv_header_$ac_safe=no"
17454 fi
17455 rm -f conftest*
17456 fi
17457 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17458   echo "$ac_t""yes" 1>&6
17459     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17460   cat >> confdefs.h <<EOF
17461 #define $ac_tr_hdr 1
17462 EOF
17463  
17464 else
17465   echo "$ac_t""no" 1>&6
17466 fi
17467 done
17468
17469 if test $ac_cv_header_db_h = yes; then
17470         ol_cv_lib_db=no
17471 if test $ol_cv_lib_db = no ; then
17472         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17473 echo "configure:17474: checking for Berkeley DB link (default)" >&5
17474 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17475   echo $ac_n "(cached) $ac_c" 1>&6
17476 else
17477   
17478         ol_DB_LIB=
17479         ol_LIBS=$LIBS
17480         LIBS="$ol_DB_LIB $LIBS"
17481
17482         cat > conftest.$ac_ext <<EOF
17483 #line 17484 "configure"
17484 #include "confdefs.h"
17485
17486 #ifdef HAVE_DB_185_H
17487 # include <db_185.h>
17488 #else
17489 # include <db.h>
17490 #endif
17491
17492 #ifndef DB_VERSION_MAJOR
17493 # define DB_VERSION_MAJOR 1
17494 #endif
17495
17496 #ifndef NULL
17497 #define NULL ((void*)0)
17498 #endif
17499
17500 int main() {
17501
17502 #if DB_VERSION_MAJOR > 1
17503         {
17504                 char *version;
17505                 int major, minor, patch;
17506
17507                 version = db_version( &major, &minor, &patch );
17508
17509                 if( major != DB_VERSION_MAJOR ||
17510                         minor < DB_VERSION_MINOR )
17511                 {
17512                         printf("Berkeley DB version mismatch\n"
17513                                 "\texpected: %s\n\tgot: %s\n",
17514                                 DB_VERSION_STRING, version);
17515                         return 1;
17516                 }
17517         }
17518 #endif
17519
17520 #if DB_VERSION_MAJOR > 2
17521         db_env_create( NULL, 0 );
17522 #elif DB_VERSION_MAJOR > 1
17523         db_appexit( NULL );
17524 #else
17525         (void) dbopen( NULL, 0, 0, 0, NULL);
17526 #endif
17527
17528 ; return 0; }
17529 EOF
17530 if { (eval echo configure:17531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17531   rm -rf conftest*
17532   ol_cv_db_none=yes
17533 else
17534   echo "configure: failed program was:" >&5
17535   cat conftest.$ac_ext >&5
17536   rm -rf conftest*
17537   ol_cv_db_none=no
17538 fi
17539 rm -f conftest*
17540
17541         LIBS="$ol_LIBS"
17542
17543 fi
17544
17545 echo "$ac_t""$ol_cv_db_none" 1>&6
17546
17547         if test $ol_cv_db_none = yes ; then
17548                 ol_cv_lib_db=yes
17549         fi
17550 fi
17551
17552 if test $ol_cv_lib_db = no ; then
17553         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17554 echo "configure:17555: checking for Berkeley DB link (-ldb)" >&5
17555 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17556   echo $ac_n "(cached) $ac_c" 1>&6
17557 else
17558   
17559         ol_DB_LIB=-ldb
17560         ol_LIBS=$LIBS
17561         LIBS="$ol_DB_LIB $LIBS"
17562
17563         cat > conftest.$ac_ext <<EOF
17564 #line 17565 "configure"
17565 #include "confdefs.h"
17566
17567 #ifdef HAVE_DB_185_H
17568 # include <db_185.h>
17569 #else
17570 # include <db.h>
17571 #endif
17572
17573 #ifndef DB_VERSION_MAJOR
17574 # define DB_VERSION_MAJOR 1
17575 #endif
17576
17577 #ifndef NULL
17578 #define NULL ((void*)0)
17579 #endif
17580
17581 int main() {
17582
17583 #if DB_VERSION_MAJOR > 1
17584         {
17585                 char *version;
17586                 int major, minor, patch;
17587
17588                 version = db_version( &major, &minor, &patch );
17589
17590                 if( major != DB_VERSION_MAJOR ||
17591                         minor < DB_VERSION_MINOR )
17592                 {
17593                         printf("Berkeley DB version mismatch\n"
17594                                 "\texpected: %s\n\tgot: %s\n",
17595                                 DB_VERSION_STRING, version);
17596                         return 1;
17597                 }
17598         }
17599 #endif
17600
17601 #if DB_VERSION_MAJOR > 2
17602         db_env_create( NULL, 0 );
17603 #elif DB_VERSION_MAJOR > 1
17604         db_appexit( NULL );
17605 #else
17606         (void) dbopen( NULL, 0, 0, 0, NULL);
17607 #endif
17608
17609 ; return 0; }
17610 EOF
17611 if { (eval echo configure:17612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17612   rm -rf conftest*
17613   ol_cv_db_db=yes
17614 else
17615   echo "configure: failed program was:" >&5
17616   cat conftest.$ac_ext >&5
17617   rm -rf conftest*
17618   ol_cv_db_db=no
17619 fi
17620 rm -f conftest*
17621
17622         LIBS="$ol_LIBS"
17623
17624 fi
17625
17626 echo "$ac_t""$ol_cv_db_db" 1>&6
17627
17628         if test $ol_cv_db_db = yes ; then
17629                 ol_cv_lib_db=-ldb
17630         fi
17631 fi
17632
17633 if test $ol_cv_lib_db = no ; then
17634         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17635 echo "configure:17636: checking for Berkeley DB link (-ldb4)" >&5
17636 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17637   echo $ac_n "(cached) $ac_c" 1>&6
17638 else
17639   
17640         ol_DB_LIB=-ldb4
17641         ol_LIBS=$LIBS
17642         LIBS="$ol_DB_LIB $LIBS"
17643
17644         cat > conftest.$ac_ext <<EOF
17645 #line 17646 "configure"
17646 #include "confdefs.h"
17647
17648 #ifdef HAVE_DB_185_H
17649 # include <db_185.h>
17650 #else
17651 # include <db.h>
17652 #endif
17653
17654 #ifndef DB_VERSION_MAJOR
17655 # define DB_VERSION_MAJOR 1
17656 #endif
17657
17658 #ifndef NULL
17659 #define NULL ((void*)0)
17660 #endif
17661
17662 int main() {
17663
17664 #if DB_VERSION_MAJOR > 1
17665         {
17666                 char *version;
17667                 int major, minor, patch;
17668
17669                 version = db_version( &major, &minor, &patch );
17670
17671                 if( major != DB_VERSION_MAJOR ||
17672                         minor < DB_VERSION_MINOR )
17673                 {
17674                         printf("Berkeley DB version mismatch\n"
17675                                 "\texpected: %s\n\tgot: %s\n",
17676                                 DB_VERSION_STRING, version);
17677                         return 1;
17678                 }
17679         }
17680 #endif
17681
17682 #if DB_VERSION_MAJOR > 2
17683         db_env_create( NULL, 0 );
17684 #elif DB_VERSION_MAJOR > 1
17685         db_appexit( NULL );
17686 #else
17687         (void) dbopen( NULL, 0, 0, 0, NULL);
17688 #endif
17689
17690 ; return 0; }
17691 EOF
17692 if { (eval echo configure:17693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17693   rm -rf conftest*
17694   ol_cv_db_db4=yes
17695 else
17696   echo "configure: failed program was:" >&5
17697   cat conftest.$ac_ext >&5
17698   rm -rf conftest*
17699   ol_cv_db_db4=no
17700 fi
17701 rm -f conftest*
17702
17703         LIBS="$ol_LIBS"
17704
17705 fi
17706
17707 echo "$ac_t""$ol_cv_db_db4" 1>&6
17708
17709         if test $ol_cv_db_db4 = yes ; then
17710                 ol_cv_lib_db=-ldb4
17711         fi
17712 fi
17713
17714 if test $ol_cv_lib_db = no ; then
17715         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17716 echo "configure:17717: checking for Berkeley DB link (-ldb3)" >&5
17717 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17718   echo $ac_n "(cached) $ac_c" 1>&6
17719 else
17720   
17721         ol_DB_LIB=-ldb3
17722         ol_LIBS=$LIBS
17723         LIBS="$ol_DB_LIB $LIBS"
17724
17725         cat > conftest.$ac_ext <<EOF
17726 #line 17727 "configure"
17727 #include "confdefs.h"
17728
17729 #ifdef HAVE_DB_185_H
17730 # include <db_185.h>
17731 #else
17732 # include <db.h>
17733 #endif
17734
17735 #ifndef DB_VERSION_MAJOR
17736 # define DB_VERSION_MAJOR 1
17737 #endif
17738
17739 #ifndef NULL
17740 #define NULL ((void*)0)
17741 #endif
17742
17743 int main() {
17744
17745 #if DB_VERSION_MAJOR > 1
17746         {
17747                 char *version;
17748                 int major, minor, patch;
17749
17750                 version = db_version( &major, &minor, &patch );
17751
17752                 if( major != DB_VERSION_MAJOR ||
17753                         minor < DB_VERSION_MINOR )
17754                 {
17755                         printf("Berkeley DB version mismatch\n"
17756                                 "\texpected: %s\n\tgot: %s\n",
17757                                 DB_VERSION_STRING, version);
17758                         return 1;
17759                 }
17760         }
17761 #endif
17762
17763 #if DB_VERSION_MAJOR > 2
17764         db_env_create( NULL, 0 );
17765 #elif DB_VERSION_MAJOR > 1
17766         db_appexit( NULL );
17767 #else
17768         (void) dbopen( NULL, 0, 0, 0, NULL);
17769 #endif
17770
17771 ; return 0; }
17772 EOF
17773 if { (eval echo configure:17774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17774   rm -rf conftest*
17775   ol_cv_db_db3=yes
17776 else
17777   echo "configure: failed program was:" >&5
17778   cat conftest.$ac_ext >&5
17779   rm -rf conftest*
17780   ol_cv_db_db3=no
17781 fi
17782 rm -f conftest*
17783
17784         LIBS="$ol_LIBS"
17785
17786 fi
17787
17788 echo "$ac_t""$ol_cv_db_db3" 1>&6
17789
17790         if test $ol_cv_db_db3 = yes ; then
17791                 ol_cv_lib_db=-ldb3
17792         fi
17793 fi
17794
17795 if test $ol_cv_lib_db = no ; then
17796         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17797 echo "configure:17798: checking for Berkeley DB link (-ldb2)" >&5
17798 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17799   echo $ac_n "(cached) $ac_c" 1>&6
17800 else
17801   
17802         ol_DB_LIB=-ldb2
17803         ol_LIBS=$LIBS
17804         LIBS="$ol_DB_LIB $LIBS"
17805
17806         cat > conftest.$ac_ext <<EOF
17807 #line 17808 "configure"
17808 #include "confdefs.h"
17809
17810 #ifdef HAVE_DB_185_H
17811 # include <db_185.h>
17812 #else
17813 # include <db.h>
17814 #endif
17815
17816 #ifndef DB_VERSION_MAJOR
17817 # define DB_VERSION_MAJOR 1
17818 #endif
17819
17820 #ifndef NULL
17821 #define NULL ((void*)0)
17822 #endif
17823
17824 int main() {
17825
17826 #if DB_VERSION_MAJOR > 1
17827         {
17828                 char *version;
17829                 int major, minor, patch;
17830
17831                 version = db_version( &major, &minor, &patch );
17832
17833                 if( major != DB_VERSION_MAJOR ||
17834                         minor < DB_VERSION_MINOR )
17835                 {
17836                         printf("Berkeley DB version mismatch\n"
17837                                 "\texpected: %s\n\tgot: %s\n",
17838                                 DB_VERSION_STRING, version);
17839                         return 1;
17840                 }
17841         }
17842 #endif
17843
17844 #if DB_VERSION_MAJOR > 2
17845         db_env_create( NULL, 0 );
17846 #elif DB_VERSION_MAJOR > 1
17847         db_appexit( NULL );
17848 #else
17849         (void) dbopen( NULL, 0, 0, 0, NULL);
17850 #endif
17851
17852 ; return 0; }
17853 EOF
17854 if { (eval echo configure:17855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17855   rm -rf conftest*
17856   ol_cv_db_db2=yes
17857 else
17858   echo "configure: failed program was:" >&5
17859   cat conftest.$ac_ext >&5
17860   rm -rf conftest*
17861   ol_cv_db_db2=no
17862 fi
17863 rm -f conftest*
17864
17865         LIBS="$ol_LIBS"
17866
17867 fi
17868
17869 echo "$ac_t""$ol_cv_db_db2" 1>&6
17870
17871         if test $ol_cv_db_db2 = yes ; then
17872                 ol_cv_lib_db=-ldb2
17873         fi
17874 fi
17875
17876 if test $ol_cv_lib_db = no ; then
17877         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17878 echo "configure:17879: checking for Berkeley DB link (-ldb1)" >&5
17879 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17880   echo $ac_n "(cached) $ac_c" 1>&6
17881 else
17882   
17883         ol_DB_LIB=-ldb1
17884         ol_LIBS=$LIBS
17885         LIBS="$ol_DB_LIB $LIBS"
17886
17887         cat > conftest.$ac_ext <<EOF
17888 #line 17889 "configure"
17889 #include "confdefs.h"
17890
17891 #ifdef HAVE_DB_185_H
17892 # include <db_185.h>
17893 #else
17894 # include <db.h>
17895 #endif
17896
17897 #ifndef DB_VERSION_MAJOR
17898 # define DB_VERSION_MAJOR 1
17899 #endif
17900
17901 #ifndef NULL
17902 #define NULL ((void*)0)
17903 #endif
17904
17905 int main() {
17906
17907 #if DB_VERSION_MAJOR > 1
17908         {
17909                 char *version;
17910                 int major, minor, patch;
17911
17912                 version = db_version( &major, &minor, &patch );
17913
17914                 if( major != DB_VERSION_MAJOR ||
17915                         minor < DB_VERSION_MINOR )
17916                 {
17917                         printf("Berkeley DB version mismatch\n"
17918                                 "\texpected: %s\n\tgot: %s\n",
17919                                 DB_VERSION_STRING, version);
17920                         return 1;
17921                 }
17922         }
17923 #endif
17924
17925 #if DB_VERSION_MAJOR > 2
17926         db_env_create( NULL, 0 );
17927 #elif DB_VERSION_MAJOR > 1
17928         db_appexit( NULL );
17929 #else
17930         (void) dbopen( NULL, 0, 0, 0, NULL);
17931 #endif
17932
17933 ; return 0; }
17934 EOF
17935 if { (eval echo configure:17936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17936   rm -rf conftest*
17937   ol_cv_db_db1=yes
17938 else
17939   echo "configure: failed program was:" >&5
17940   cat conftest.$ac_ext >&5
17941   rm -rf conftest*
17942   ol_cv_db_db1=no
17943 fi
17944 rm -f conftest*
17945
17946         LIBS="$ol_LIBS"
17947
17948 fi
17949
17950 echo "$ac_t""$ol_cv_db_db1" 1>&6
17951
17952         if test $ol_cv_db_db1 = yes ; then
17953                 ol_cv_lib_db=-ldb1
17954         fi
17955 fi
17956
17957
17958         if test "$ol_cv_lib_db" != no ; then
17959                 ol_cv_berkeley_db=yes
17960                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
17961 echo "configure:17962: checking for Berkeley DB thread support" >&5
17962 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
17963   echo $ac_n "(cached) $ac_c" 1>&6
17964 else
17965   
17966         ol_LIBS="$LIBS"
17967         if test $ol_cv_lib_db != yes ; then
17968                 LIBS="$ol_cv_lib_db"
17969         fi
17970
17971         if test "$cross_compiling" = yes; then
17972   ol_cv_berkeley_db_thread=cross
17973 else
17974   cat > conftest.$ac_ext <<EOF
17975 #line 17976 "configure"
17976 #include "confdefs.h"
17977
17978 #ifdef HAVE_DB_185_H
17979         choke me;
17980 #else
17981 #include <db.h>
17982 #endif
17983 #ifndef NULL
17984 #define NULL ((void *)0)
17985 #endif
17986 main()
17987 {
17988         int rc;
17989         u_int32_t flags = DB_CREATE |
17990 #ifdef DB_PRIVATE
17991                 DB_PRIVATE |
17992 #endif
17993                 DB_THREAD;
17994
17995 #if DB_VERSION_MAJOR > 2
17996         DB_ENV *env = NULL;
17997
17998         rc = db_env_create( &env, 0 );
17999
18000         flags |= DB_INIT_MPOOL;
18001 #ifdef DB_MPOOL_PRIVATE
18002         flags |= DB_MPOOL_PRIVATE;
18003 #endif
18004
18005         if( rc ) {
18006                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18007                 return rc;
18008         }
18009
18010 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
18011         rc = env->open( env, NULL, flags, 0 );
18012 #else
18013         rc = env->open( env, NULL, NULL, flags, 0 );
18014 #endif
18015
18016         if ( rc == 0 ) {
18017                 rc = env->close( env, 0 );
18018         }
18019
18020         if( rc ) {
18021                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18022                 return rc;
18023         }
18024
18025 #else
18026         DB_ENV env;
18027         memset( &env, '\0', sizeof(env) );
18028
18029         rc = db_appinit( NULL, NULL, &env, flags );
18030
18031         if( rc == 0 ) {
18032                 db_appexit( &env );
18033         }
18034
18035         unlink("__db_mpool.share");
18036         unlink("__db_lock.share");
18037 #endif
18038
18039         return rc;
18040 }
18041 EOF
18042 if { (eval echo configure:18043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
18043 then
18044   ol_cv_berkeley_db_thread=yes
18045 else
18046   echo "configure: failed program was:" >&5
18047   cat conftest.$ac_ext >&5
18048   rm -fr conftest*
18049   ol_cv_berkeley_db_thread=no
18050 fi
18051 rm -fr conftest*
18052 fi
18053
18054
18055         LIBS="$ol_LIBS"
18056
18057         if test $ol_cv_berkeley_db_thread != no ; then
18058                 cat >> confdefs.h <<\EOF
18059 #define HAVE_BERKELEY_DB_THREAD 1
18060 EOF
18061
18062         fi
18063
18064 fi
18065
18066 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
18067         fi
18068 fi
18069
18070         fi
18071
18072         if test $ol_cv_berkeley_db != no ; then
18073                 cat >> confdefs.h <<\EOF
18074 #define HAVE_BERKELEY_DB 1
18075 EOF
18076
18077
18078                 ol_link_ldbm=berkeley
18079                 ol_with_ldbm_api=berkeley
18080
18081                 if test $ol_with_ldbm_type = hash ; then
18082                         cat >> confdefs.h <<\EOF
18083 #define LDBM_USE_DBHASH 1
18084 EOF
18085
18086                 else
18087                         cat >> confdefs.h <<\EOF
18088 #define LDBM_USE_DBBTREE 1
18089 EOF
18090
18091                 fi
18092
18093                                                 if test $ol_cv_lib_db != yes ; then
18094                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
18095                 fi
18096         fi
18097 fi
18098
18099 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
18100         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
18101 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
18102         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
18103 echo "configure:18104: checking Berkeley DB version for BDB backend" >&5
18104 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
18105   echo $ac_n "(cached) $ac_c" 1>&6
18106 else
18107   
18108         cat > conftest.$ac_ext <<EOF
18109 #line 18110 "configure"
18110 #include "confdefs.h"
18111
18112 #include <db.h>
18113
18114  /* this check could be improved */
18115 #ifndef DB_VERSION_MAJOR
18116 #       define DB_VERSION_MAJOR 1
18117 #endif
18118
18119 /* require 4.0 or later */
18120 #if DB_VERSION_MAJOR >= 4 
18121         __db_version_compat
18122 #endif
18123         
18124 EOF
18125 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18126   egrep "__db_version_compat" >/dev/null 2>&1; then
18127   rm -rf conftest*
18128   ol_cv_bdb_compat=yes
18129 else
18130   rm -rf conftest*
18131   ol_cv_bdb_compat=no
18132 fi
18133 rm -f conftest*
18134
18135 fi
18136
18137 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
18138
18139
18140         if test $ol_cv_bdb_compat = yes ; then
18141                 ol_enable_bdb=yes
18142         elif test $ol_enable_bdb = yes ; then
18143                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
18144         else
18145                 ol_enable_bdb=no
18146         fi
18147 fi
18148
18149 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
18150         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
18151         ol_with_ldbm_api=none
18152 fi
18153
18154 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
18155         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
18156 echo "configure:18157: checking for MDBM library" >&5
18157 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
18158   echo $ac_n "(cached) $ac_c" 1>&6
18159 else
18160         ol_LIBS="$LIBS"
18161         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
18162 echo "configure:18163: checking for mdbm_set_chain" >&5
18163 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
18164   echo $ac_n "(cached) $ac_c" 1>&6
18165 else
18166   cat > conftest.$ac_ext <<EOF
18167 #line 18168 "configure"
18168 #include "confdefs.h"
18169 /* System header to define __stub macros and hopefully few prototypes,
18170     which can conflict with char mdbm_set_chain(); below.  */
18171 #include <assert.h>
18172 /* Override any gcc2 internal prototype to avoid an error.  */
18173 /* We use char because int might match the return type of a gcc2
18174     builtin and then its argument prototype would still apply.  */
18175 char mdbm_set_chain();
18176 char (*f)();
18177
18178 int main() {
18179
18180 /* The GNU C library defines this for functions which it implements
18181     to always fail with ENOSYS.  Some functions are actually named
18182     something starting with __ and the normal name is an alias.  */
18183 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
18184 choke me
18185 #else
18186 f = mdbm_set_chain;
18187 #endif
18188
18189 ; return 0; }
18190 EOF
18191 if { (eval echo configure:18192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18192   rm -rf conftest*
18193   eval "ac_cv_func_mdbm_set_chain=yes"
18194 else
18195   echo "configure: failed program was:" >&5
18196   cat conftest.$ac_ext >&5
18197   rm -rf conftest*
18198   eval "ac_cv_func_mdbm_set_chain=no"
18199 fi
18200 rm -f conftest*
18201 fi
18202
18203 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
18204   echo "$ac_t""yes" 1>&6
18205   ol_cv_lib_mdbm=yes
18206 else
18207   echo "$ac_t""no" 1>&6
18208
18209                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
18210 echo "configure:18211: checking for mdbm_set_chain in -lmdbm" >&5
18211 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
18212 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18213   echo $ac_n "(cached) $ac_c" 1>&6
18214 else
18215   ac_save_LIBS="$LIBS"
18216 LIBS="-lmdbm  $LIBS"
18217 cat > conftest.$ac_ext <<EOF
18218 #line 18219 "configure"
18219 #include "confdefs.h"
18220 /* Override any gcc2 internal prototype to avoid an error.  */
18221 /* We use char because int might match the return type of a gcc2
18222     builtin and then its argument prototype would still apply.  */
18223 char mdbm_set_chain();
18224
18225 int main() {
18226 mdbm_set_chain()
18227 ; return 0; }
18228 EOF
18229 if { (eval echo configure:18230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18230   rm -rf conftest*
18231   eval "ac_cv_lib_$ac_lib_var=yes"
18232 else
18233   echo "configure: failed program was:" >&5
18234   cat conftest.$ac_ext >&5
18235   rm -rf conftest*
18236   eval "ac_cv_lib_$ac_lib_var=no"
18237 fi
18238 rm -f conftest*
18239 LIBS="$ac_save_LIBS"
18240
18241 fi
18242 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18243   echo "$ac_t""yes" 1>&6
18244   ol_cv_lib_mdbm=-lmdbm
18245 else
18246   echo "$ac_t""no" 1>&6
18247 ol_cv_lib_mdbm=no
18248 fi
18249
18250         
18251 fi
18252
18253         LIBS="$ol_LIBS"
18254
18255 fi
18256
18257 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
18258
18259
18260  for ac_hdr in mdbm.h
18261 do
18262 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18263 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18264 echo "configure:18265: checking for $ac_hdr" >&5
18265 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18266   echo $ac_n "(cached) $ac_c" 1>&6
18267 else
18268   cat > conftest.$ac_ext <<EOF
18269 #line 18270 "configure"
18270 #include "confdefs.h"
18271 #include <$ac_hdr>
18272 EOF
18273 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18274 { (eval echo configure:18275: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18275 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18276 if test -z "$ac_err"; then
18277   rm -rf conftest*
18278   eval "ac_cv_header_$ac_safe=yes"
18279 else
18280   echo "$ac_err" >&5
18281   echo "configure: failed program was:" >&5
18282   cat conftest.$ac_ext >&5
18283   rm -rf conftest*
18284   eval "ac_cv_header_$ac_safe=no"
18285 fi
18286 rm -f conftest*
18287 fi
18288 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18289   echo "$ac_t""yes" 1>&6
18290     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18291   cat >> confdefs.h <<EOF
18292 #define $ac_tr_hdr 1
18293 EOF
18294  
18295 else
18296   echo "$ac_t""no" 1>&6
18297 fi
18298 done
18299
18300  echo $ac_n "checking for db""... $ac_c" 1>&6
18301 echo "configure:18302: checking for db" >&5
18302 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
18303   echo $ac_n "(cached) $ac_c" 1>&6
18304 else
18305   
18306         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
18307                 ol_cv_mdbm=no
18308         else
18309                 ol_cv_mdbm=yes
18310         fi
18311
18312 fi
18313
18314 echo "$ac_t""$ol_cv_mdbm" 1>&6
18315  if test $ol_cv_mdbm = yes ; then
18316         cat >> confdefs.h <<\EOF
18317 #define HAVE_MDBM 1
18318 EOF
18319
18320  fi
18321
18322
18323         if test $ol_cv_mdbm = yes ; then
18324                 ol_link_ldbm=mdbm
18325                 ol_with_ldbm_api=mdbm
18326                 if test $ol_cv_lib_mdbm != yes ; then
18327                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
18328                 fi
18329         fi
18330 fi
18331
18332 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
18333         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
18334 echo "configure:18335: checking for GDBM library" >&5
18335 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
18336   echo $ac_n "(cached) $ac_c" 1>&6
18337 else
18338         ol_LIBS="$LIBS"
18339         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
18340 echo "configure:18341: checking for gdbm_open" >&5
18341 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
18342   echo $ac_n "(cached) $ac_c" 1>&6
18343 else
18344   cat > conftest.$ac_ext <<EOF
18345 #line 18346 "configure"
18346 #include "confdefs.h"
18347 /* System header to define __stub macros and hopefully few prototypes,
18348     which can conflict with char gdbm_open(); below.  */
18349 #include <assert.h>
18350 /* Override any gcc2 internal prototype to avoid an error.  */
18351 /* We use char because int might match the return type of a gcc2
18352     builtin and then its argument prototype would still apply.  */
18353 char gdbm_open();
18354 char (*f)();
18355
18356 int main() {
18357
18358 /* The GNU C library defines this for functions which it implements
18359     to always fail with ENOSYS.  Some functions are actually named
18360     something starting with __ and the normal name is an alias.  */
18361 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
18362 choke me
18363 #else
18364 f = gdbm_open;
18365 #endif
18366
18367 ; return 0; }
18368 EOF
18369 if { (eval echo configure:18370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18370   rm -rf conftest*
18371   eval "ac_cv_func_gdbm_open=yes"
18372 else
18373   echo "configure: failed program was:" >&5
18374   cat conftest.$ac_ext >&5
18375   rm -rf conftest*
18376   eval "ac_cv_func_gdbm_open=no"
18377 fi
18378 rm -f conftest*
18379 fi
18380
18381 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
18382   echo "$ac_t""yes" 1>&6
18383   ol_cv_lib_gdbm=yes
18384 else
18385   echo "$ac_t""no" 1>&6
18386
18387                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
18388 echo "configure:18389: checking for gdbm_open in -lgdbm" >&5
18389 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
18390 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18391   echo $ac_n "(cached) $ac_c" 1>&6
18392 else
18393   ac_save_LIBS="$LIBS"
18394 LIBS="-lgdbm  $LIBS"
18395 cat > conftest.$ac_ext <<EOF
18396 #line 18397 "configure"
18397 #include "confdefs.h"
18398 /* Override any gcc2 internal prototype to avoid an error.  */
18399 /* We use char because int might match the return type of a gcc2
18400     builtin and then its argument prototype would still apply.  */
18401 char gdbm_open();
18402
18403 int main() {
18404 gdbm_open()
18405 ; return 0; }
18406 EOF
18407 if { (eval echo configure:18408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18408   rm -rf conftest*
18409   eval "ac_cv_lib_$ac_lib_var=yes"
18410 else
18411   echo "configure: failed program was:" >&5
18412   cat conftest.$ac_ext >&5
18413   rm -rf conftest*
18414   eval "ac_cv_lib_$ac_lib_var=no"
18415 fi
18416 rm -f conftest*
18417 LIBS="$ac_save_LIBS"
18418
18419 fi
18420 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18421   echo "$ac_t""yes" 1>&6
18422   ol_cv_lib_gdbm=-lgdbm
18423 else
18424   echo "$ac_t""no" 1>&6
18425 ol_cv_lib_gdbm=no
18426 fi
18427
18428         
18429 fi
18430
18431         LIBS="$ol_LIBS"
18432
18433 fi
18434
18435 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
18436
18437
18438  for ac_hdr in gdbm.h
18439 do
18440 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18441 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18442 echo "configure:18443: checking for $ac_hdr" >&5
18443 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18444   echo $ac_n "(cached) $ac_c" 1>&6
18445 else
18446   cat > conftest.$ac_ext <<EOF
18447 #line 18448 "configure"
18448 #include "confdefs.h"
18449 #include <$ac_hdr>
18450 EOF
18451 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18452 { (eval echo configure:18453: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18453 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18454 if test -z "$ac_err"; then
18455   rm -rf conftest*
18456   eval "ac_cv_header_$ac_safe=yes"
18457 else
18458   echo "$ac_err" >&5
18459   echo "configure: failed program was:" >&5
18460   cat conftest.$ac_ext >&5
18461   rm -rf conftest*
18462   eval "ac_cv_header_$ac_safe=no"
18463 fi
18464 rm -f conftest*
18465 fi
18466 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18467   echo "$ac_t""yes" 1>&6
18468     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18469   cat >> confdefs.h <<EOF
18470 #define $ac_tr_hdr 1
18471 EOF
18472  
18473 else
18474   echo "$ac_t""no" 1>&6
18475 fi
18476 done
18477
18478  echo $ac_n "checking for db""... $ac_c" 1>&6
18479 echo "configure:18480: checking for db" >&5
18480 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
18481   echo $ac_n "(cached) $ac_c" 1>&6
18482 else
18483   
18484         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
18485                 ol_cv_gdbm=no
18486         else
18487                 ol_cv_gdbm=yes
18488         fi
18489
18490 fi
18491
18492 echo "$ac_t""$ol_cv_gdbm" 1>&6
18493  if test $ol_cv_gdbm = yes ; then
18494         cat >> confdefs.h <<\EOF
18495 #define HAVE_GDBM 1
18496 EOF
18497
18498  fi
18499
18500
18501         if test $ol_cv_gdbm = yes ; then
18502                 ol_link_ldbm=gdbm
18503                 ol_with_ldbm_api=gdbm
18504
18505                 if test $ol_cv_lib_gdbm != yes ; then
18506                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
18507                 fi
18508         fi
18509 fi
18510
18511 if test $ol_with_ldbm_api = ndbm ; then
18512         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
18513 echo "configure:18514: checking for NDBM library" >&5
18514 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
18515   echo $ac_n "(cached) $ac_c" 1>&6
18516 else
18517         ol_LIBS="$LIBS"
18518         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
18519 echo "configure:18520: checking for dbm_open" >&5
18520 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
18521   echo $ac_n "(cached) $ac_c" 1>&6
18522 else
18523   cat > conftest.$ac_ext <<EOF
18524 #line 18525 "configure"
18525 #include "confdefs.h"
18526 /* System header to define __stub macros and hopefully few prototypes,
18527     which can conflict with char dbm_open(); below.  */
18528 #include <assert.h>
18529 /* Override any gcc2 internal prototype to avoid an error.  */
18530 /* We use char because int might match the return type of a gcc2
18531     builtin and then its argument prototype would still apply.  */
18532 char dbm_open();
18533 char (*f)();
18534
18535 int main() {
18536
18537 /* The GNU C library defines this for functions which it implements
18538     to always fail with ENOSYS.  Some functions are actually named
18539     something starting with __ and the normal name is an alias.  */
18540 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
18541 choke me
18542 #else
18543 f = dbm_open;
18544 #endif
18545
18546 ; return 0; }
18547 EOF
18548 if { (eval echo configure:18549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18549   rm -rf conftest*
18550   eval "ac_cv_func_dbm_open=yes"
18551 else
18552   echo "configure: failed program was:" >&5
18553   cat conftest.$ac_ext >&5
18554   rm -rf conftest*
18555   eval "ac_cv_func_dbm_open=no"
18556 fi
18557 rm -f conftest*
18558 fi
18559
18560 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
18561   echo "$ac_t""yes" 1>&6
18562   ol_cv_lib_ndbm=yes
18563 else
18564   echo "$ac_t""no" 1>&6
18565
18566                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
18567 echo "configure:18568: checking for dbm_open in -lndbm" >&5
18568 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
18569 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18570   echo $ac_n "(cached) $ac_c" 1>&6
18571 else
18572   ac_save_LIBS="$LIBS"
18573 LIBS="-lndbm  $LIBS"
18574 cat > conftest.$ac_ext <<EOF
18575 #line 18576 "configure"
18576 #include "confdefs.h"
18577 /* Override any gcc2 internal prototype to avoid an error.  */
18578 /* We use char because int might match the return type of a gcc2
18579     builtin and then its argument prototype would still apply.  */
18580 char dbm_open();
18581
18582 int main() {
18583 dbm_open()
18584 ; return 0; }
18585 EOF
18586 if { (eval echo configure:18587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18587   rm -rf conftest*
18588   eval "ac_cv_lib_$ac_lib_var=yes"
18589 else
18590   echo "configure: failed program was:" >&5
18591   cat conftest.$ac_ext >&5
18592   rm -rf conftest*
18593   eval "ac_cv_lib_$ac_lib_var=no"
18594 fi
18595 rm -f conftest*
18596 LIBS="$ac_save_LIBS"
18597
18598 fi
18599 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18600   echo "$ac_t""yes" 1>&6
18601   ol_cv_lib_ndbm=-lndbm
18602 else
18603   echo "$ac_t""no" 1>&6
18604
18605                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
18606 echo "configure:18607: checking for dbm_open in -ldbm" >&5
18607 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
18608 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18609   echo $ac_n "(cached) $ac_c" 1>&6
18610 else
18611   ac_save_LIBS="$LIBS"
18612 LIBS="-ldbm  $LIBS"
18613 cat > conftest.$ac_ext <<EOF
18614 #line 18615 "configure"
18615 #include "confdefs.h"
18616 /* Override any gcc2 internal prototype to avoid an error.  */
18617 /* We use char because int might match the return type of a gcc2
18618     builtin and then its argument prototype would still apply.  */
18619 char dbm_open();
18620
18621 int main() {
18622 dbm_open()
18623 ; return 0; }
18624 EOF
18625 if { (eval echo configure:18626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18626   rm -rf conftest*
18627   eval "ac_cv_lib_$ac_lib_var=yes"
18628 else
18629   echo "configure: failed program was:" >&5
18630   cat conftest.$ac_ext >&5
18631   rm -rf conftest*
18632   eval "ac_cv_lib_$ac_lib_var=no"
18633 fi
18634 rm -f conftest*
18635 LIBS="$ac_save_LIBS"
18636
18637 fi
18638 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18639   echo "$ac_t""yes" 1>&6
18640   ol_cv_lib_ndbm=-ldbm
18641 else
18642   echo "$ac_t""no" 1>&6
18643 ol_cv_lib_ndbm=no
18644 fi
18645                 
18646 fi
18647
18648         
18649 fi
18650
18651         LIBS="$ol_LIBS"
18652
18653 fi
18654
18655 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
18656
18657
18658  for ac_hdr in ndbm.h
18659 do
18660 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18661 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18662 echo "configure:18663: checking for $ac_hdr" >&5
18663 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18664   echo $ac_n "(cached) $ac_c" 1>&6
18665 else
18666   cat > conftest.$ac_ext <<EOF
18667 #line 18668 "configure"
18668 #include "confdefs.h"
18669 #include <$ac_hdr>
18670 EOF
18671 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18672 { (eval echo configure:18673: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18673 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18674 if test -z "$ac_err"; then
18675   rm -rf conftest*
18676   eval "ac_cv_header_$ac_safe=yes"
18677 else
18678   echo "$ac_err" >&5
18679   echo "configure: failed program was:" >&5
18680   cat conftest.$ac_ext >&5
18681   rm -rf conftest*
18682   eval "ac_cv_header_$ac_safe=no"
18683 fi
18684 rm -f conftest*
18685 fi
18686 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18687   echo "$ac_t""yes" 1>&6
18688     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18689   cat >> confdefs.h <<EOF
18690 #define $ac_tr_hdr 1
18691 EOF
18692  
18693 else
18694   echo "$ac_t""no" 1>&6
18695 fi
18696 done
18697
18698  echo $ac_n "checking for db""... $ac_c" 1>&6
18699 echo "configure:18700: checking for db" >&5
18700 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
18701   echo $ac_n "(cached) $ac_c" 1>&6
18702 else
18703   
18704         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
18705                 ol_cv_ndbm=no
18706         else
18707                 ol_cv_ndbm=yes
18708         fi
18709
18710 fi
18711
18712 echo "$ac_t""$ol_cv_ndbm" 1>&6
18713  if test $ol_cv_ndbm = yes ; then
18714         cat >> confdefs.h <<\EOF
18715 #define HAVE_NDBM 1
18716 EOF
18717
18718  fi
18719
18720
18721         if test $ol_cv_ndbm = yes ; then
18722                 ol_link_ldbm=ndbm
18723                 ol_with_ldbm_api=ndbm
18724
18725                 if test $ol_cv_lib_ndbm != yes ; then
18726                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
18727                 fi
18728         fi
18729 fi
18730
18731 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
18732         echo "configure: warning: could not find suitable LDBM backend" 1>&2
18733         if test $ol_enable_ldbm = yes ; then
18734                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
18735         fi
18736
18737         echo "configure: warning: disabling LDBM" 1>&2
18738         ol_enable_ldbm=no
18739 fi
18740
18741 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
18742         BUILD_LIBS_DYNAMIC=shared
18743         cat >> confdefs.h <<\EOF
18744 #define LDAP_LIBS_DYNAMIC 1
18745 EOF
18746
18747 else
18748         BUILD_LIBS_DYNAMIC=static
18749 fi
18750
18751 if test $ol_enable_wrappers != no ; then
18752         for ac_hdr in tcpd.h
18753 do
18754 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18755 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18756 echo "configure:18757: checking for $ac_hdr" >&5
18757 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18758   echo $ac_n "(cached) $ac_c" 1>&6
18759 else
18760   cat > conftest.$ac_ext <<EOF
18761 #line 18762 "configure"
18762 #include "confdefs.h"
18763 #include <$ac_hdr>
18764 EOF
18765 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18766 { (eval echo configure:18767: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18767 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18768 if test -z "$ac_err"; then
18769   rm -rf conftest*
18770   eval "ac_cv_header_$ac_safe=yes"
18771 else
18772   echo "$ac_err" >&5
18773   echo "configure: failed program was:" >&5
18774   cat conftest.$ac_ext >&5
18775   rm -rf conftest*
18776   eval "ac_cv_header_$ac_safe=no"
18777 fi
18778 rm -f conftest*
18779 fi
18780 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18781   echo "$ac_t""yes" 1>&6
18782     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18783   cat >> confdefs.h <<EOF
18784 #define $ac_tr_hdr 1
18785 EOF
18786  
18787                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
18788 echo "configure:18789: checking for TCP wrappers library" >&5
18789                 save_LIBS="$LIBS"
18790                 LIBS="$LIBS -lwrap"
18791                 cat > conftest.$ac_ext <<EOF
18792 #line 18793 "configure"
18793 #include "confdefs.h"
18794
18795 #include <tcpd.h>
18796 int allow_severity = 0;
18797 int deny_severity  = 0;
18798
18799 struct request_info *req;
18800                 
18801 int main() {
18802
18803 hosts_access(req)
18804                 
18805 ; return 0; }
18806 EOF
18807 if { (eval echo configure:18808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18808   rm -rf conftest*
18809   echo "$ac_t""-lwrap" 1>&6
18810                 have_wrappers=yes
18811                 LIBS="$save_LIBS"
18812 else
18813   echo "configure: failed program was:" >&5
18814   cat conftest.$ac_ext >&5
18815   rm -rf conftest*
18816   
18817                                 LIBS="$LIBS -lnsl"
18818                 cat > conftest.$ac_ext <<EOF
18819 #line 18820 "configure"
18820 #include "confdefs.h"
18821
18822 #include <tcpd.h>
18823 int allow_severity = 0;
18824 int deny_severity  = 0;
18825
18826 struct request_info *req;
18827                 
18828 int main() {
18829
18830 hosts_access(req)
18831                 
18832 ; return 0; }
18833 EOF
18834 if { (eval echo configure:18835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18835   rm -rf conftest*
18836   echo "$ac_t""-lwrap -lnsl" 1>&6
18837                 have_wrappers=yes
18838                 LIBS="$save_LIBS -lnsl"
18839 else
18840   echo "configure: failed program was:" >&5
18841   cat conftest.$ac_ext >&5
18842   rm -rf conftest*
18843   
18844                 echo "$ac_t""no" 1>&6
18845                 have_wrappers=no
18846                 LIBS=$save_LIBS
18847 fi
18848 rm -f conftest*
18849 fi
18850 rm -f conftest*
18851 else
18852   echo "$ac_t""no" 1>&6
18853 have_wrappers=no
18854 fi
18855 done
18856
18857
18858         if test $have_wrappers = yes ; then
18859                 cat >> confdefs.h <<\EOF
18860 #define HAVE_TCPD 1
18861 EOF
18862
18863                 WRAP_LIBS="-lwrap"
18864         elif test $ol_enable_wrappers = yes ; then
18865                 { echo "configure: error: could not find TCP wrappers, select apppropriate options ore disable" 1>&2; exit 1; }
18866         else
18867                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
18868                 WRAP_LIBS=""
18869         fi
18870 fi
18871
18872 if test $ol_enable_syslog != no ; then
18873         echo $ac_n "checking for openlog""... $ac_c" 1>&6
18874 echo "configure:18875: checking for openlog" >&5
18875 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
18876   echo $ac_n "(cached) $ac_c" 1>&6
18877 else
18878   cat > conftest.$ac_ext <<EOF
18879 #line 18880 "configure"
18880 #include "confdefs.h"
18881 /* System header to define __stub macros and hopefully few prototypes,
18882     which can conflict with char openlog(); below.  */
18883 #include <assert.h>
18884 /* Override any gcc2 internal prototype to avoid an error.  */
18885 /* We use char because int might match the return type of a gcc2
18886     builtin and then its argument prototype would still apply.  */
18887 char openlog();
18888 char (*f)();
18889
18890 int main() {
18891
18892 /* The GNU C library defines this for functions which it implements
18893     to always fail with ENOSYS.  Some functions are actually named
18894     something starting with __ and the normal name is an alias.  */
18895 #if defined (__stub_openlog) || defined (__stub___openlog)
18896 choke me
18897 #else
18898 f = openlog;
18899 #endif
18900
18901 ; return 0; }
18902 EOF
18903 if { (eval echo configure:18904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18904   rm -rf conftest*
18905   eval "ac_cv_func_openlog=yes"
18906 else
18907   echo "configure: failed program was:" >&5
18908   cat conftest.$ac_ext >&5
18909   rm -rf conftest*
18910   eval "ac_cv_func_openlog=no"
18911 fi
18912 rm -f conftest*
18913 fi
18914
18915 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
18916   echo "$ac_t""yes" 1>&6
18917   :
18918 else
18919   echo "$ac_t""no" 1>&6
18920 fi
18921
18922         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
18923                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
18924         fi
18925         ol_enable_syslog=$ac_cv_func_openlog
18926 fi
18927
18928
18929 ol_link_sql=no
18930 if test $ol_enable_sql != no ; then
18931         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
18932 echo "configure:18933: checking for SQLDriverConnect in -liodbc" >&5
18933 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
18934 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18935   echo $ac_n "(cached) $ac_c" 1>&6
18936 else
18937   ac_save_LIBS="$LIBS"
18938 LIBS="-liodbc  $LIBS"
18939 cat > conftest.$ac_ext <<EOF
18940 #line 18941 "configure"
18941 #include "confdefs.h"
18942 /* Override any gcc2 internal prototype to avoid an error.  */
18943 /* We use char because int might match the return type of a gcc2
18944     builtin and then its argument prototype would still apply.  */
18945 char SQLDriverConnect();
18946
18947 int main() {
18948 SQLDriverConnect()
18949 ; return 0; }
18950 EOF
18951 if { (eval echo configure:18952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18952   rm -rf conftest*
18953   eval "ac_cv_lib_$ac_lib_var=yes"
18954 else
18955   echo "configure: failed program was:" >&5
18956   cat conftest.$ac_ext >&5
18957   rm -rf conftest*
18958   eval "ac_cv_lib_$ac_lib_var=no"
18959 fi
18960 rm -f conftest*
18961 LIBS="$ac_save_LIBS"
18962
18963 fi
18964 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18965   echo "$ac_t""yes" 1>&6
18966   have_iodbc=yes
18967 else
18968   echo "$ac_t""no" 1>&6
18969 have_iodbc=no
18970 fi
18971
18972         if test $have_iodbc = yes ; then
18973                 ol_link_sql="-liodbc"
18974         else
18975                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
18976 echo "configure:18977: checking for SQLDriverConnect in -lodbc" >&5
18977 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
18978 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18979   echo $ac_n "(cached) $ac_c" 1>&6
18980 else
18981   ac_save_LIBS="$LIBS"
18982 LIBS="-lodbc  $LIBS"
18983 cat > conftest.$ac_ext <<EOF
18984 #line 18985 "configure"
18985 #include "confdefs.h"
18986 /* Override any gcc2 internal prototype to avoid an error.  */
18987 /* We use char because int might match the return type of a gcc2
18988     builtin and then its argument prototype would still apply.  */
18989 char SQLDriverConnect();
18990
18991 int main() {
18992 SQLDriverConnect()
18993 ; return 0; }
18994 EOF
18995 if { (eval echo configure:18996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18996   rm -rf conftest*
18997   eval "ac_cv_lib_$ac_lib_var=yes"
18998 else
18999   echo "configure: failed program was:" >&5
19000   cat conftest.$ac_ext >&5
19001   rm -rf conftest*
19002   eval "ac_cv_lib_$ac_lib_var=no"
19003 fi
19004 rm -f conftest*
19005 LIBS="$ac_save_LIBS"
19006
19007 fi
19008 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19009   echo "$ac_t""yes" 1>&6
19010   have_odbc=yes
19011 else
19012   echo "$ac_t""no" 1>&6
19013 have_odbc=no
19014 fi
19015
19016                 if test $have_odbc = yes ; then
19017                         ol_link_sql="-lodbc"
19018                 fi
19019         fi
19020
19021         if test $ol_link_sql != no ; then
19022                 SLAPD_SQL_LIBS="$ol_link_sql"
19023
19024         elif test $ol_enable_sql != auto ; then
19025                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
19026         fi
19027 fi
19028
19029 if test $ol_enable_tcl != no ; then
19030         for ac_hdr in tcl.h
19031 do
19032 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19033 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19034 echo "configure:19035: checking for $ac_hdr" >&5
19035 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19036   echo $ac_n "(cached) $ac_c" 1>&6
19037 else
19038   cat > conftest.$ac_ext <<EOF
19039 #line 19040 "configure"
19040 #include "confdefs.h"
19041 #include <$ac_hdr>
19042 EOF
19043 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19044 { (eval echo configure:19045: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19045 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19046 if test -z "$ac_err"; then
19047   rm -rf conftest*
19048   eval "ac_cv_header_$ac_safe=yes"
19049 else
19050   echo "$ac_err" >&5
19051   echo "configure: failed program was:" >&5
19052   cat conftest.$ac_ext >&5
19053   rm -rf conftest*
19054   eval "ac_cv_header_$ac_safe=no"
19055 fi
19056 rm -f conftest*
19057 fi
19058 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19059   echo "$ac_t""yes" 1>&6
19060     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19061   cat >> confdefs.h <<EOF
19062 #define $ac_tr_hdr 1
19063 EOF
19064  
19065 else
19066   echo "$ac_t""no" 1>&6
19067 fi
19068 done
19069
19070
19071         if test $ac_cv_header_tcl_h != yes ; then
19072                 have_tcl=no
19073         else
19074                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
19075                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
19076 echo "configure:19077: checking for main in -l$lib" >&5
19077 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
19078 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19079   echo $ac_n "(cached) $ac_c" 1>&6
19080 else
19081   ac_save_LIBS="$LIBS"
19082 LIBS="-l$lib  $LIBS"
19083 cat > conftest.$ac_ext <<EOF
19084 #line 19085 "configure"
19085 #include "confdefs.h"
19086
19087 int main() {
19088 main()
19089 ; return 0; }
19090 EOF
19091 if { (eval echo configure:19092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19092   rm -rf conftest*
19093   eval "ac_cv_lib_$ac_lib_var=yes"
19094 else
19095   echo "configure: failed program was:" >&5
19096   cat conftest.$ac_ext >&5
19097   rm -rf conftest*
19098   eval "ac_cv_lib_$ac_lib_var=no"
19099 fi
19100 rm -f conftest*
19101 LIBS="$ac_save_LIBS"
19102
19103 fi
19104 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19105   echo "$ac_t""yes" 1>&6
19106   have_tcl=yes
19107                            if test x"$ol_with_tcl_module" = "xstatic" ; then
19108                                         SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
19109                            else
19110                                         MOD_TCL_LIB="-l${lib}"
19111                            fi;break
19112 else
19113   echo "$ac_t""no" 1>&6
19114 have_tcl=no
19115 fi
19116
19117                 done
19118         fi
19119
19120         if test $have_tcl != yes ; then
19121                 echo "configure: warning: could not find -ltcl" 1>&2
19122                 if test $ol_enable_tcl = yes ; then
19123                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
19124                 fi
19125
19126                 ol_enable_tcl=no
19127         fi
19128 fi
19129
19130 ol_link_termcap=no
19131 for ac_hdr in termcap.h ncurses.h
19132 do
19133 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19134 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19135 echo "configure:19136: checking for $ac_hdr" >&5
19136 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19137   echo $ac_n "(cached) $ac_c" 1>&6
19138 else
19139   cat > conftest.$ac_ext <<EOF
19140 #line 19141 "configure"
19141 #include "confdefs.h"
19142 #include <$ac_hdr>
19143 EOF
19144 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19145 { (eval echo configure:19146: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19146 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19147 if test -z "$ac_err"; then
19148   rm -rf conftest*
19149   eval "ac_cv_header_$ac_safe=yes"
19150 else
19151   echo "$ac_err" >&5
19152   echo "configure: failed program was:" >&5
19153   cat conftest.$ac_ext >&5
19154   rm -rf conftest*
19155   eval "ac_cv_header_$ac_safe=no"
19156 fi
19157 rm -f conftest*
19158 fi
19159 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19160   echo "$ac_t""yes" 1>&6
19161     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19162   cat >> confdefs.h <<EOF
19163 #define $ac_tr_hdr 1
19164 EOF
19165  
19166 else
19167   echo "$ac_t""no" 1>&6
19168 fi
19169 done
19170
19171
19172 if test $ol_link_termcap = no ; then
19173         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
19174 echo "configure:19175: checking for tputs in -ltermcap" >&5
19175 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
19176 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19177   echo $ac_n "(cached) $ac_c" 1>&6
19178 else
19179   ac_save_LIBS="$LIBS"
19180 LIBS="-ltermcap  $LIBS"
19181 cat > conftest.$ac_ext <<EOF
19182 #line 19183 "configure"
19183 #include "confdefs.h"
19184 /* Override any gcc2 internal prototype to avoid an error.  */
19185 /* We use char because int might match the return type of a gcc2
19186     builtin and then its argument prototype would still apply.  */
19187 char tputs();
19188
19189 int main() {
19190 tputs()
19191 ; return 0; }
19192 EOF
19193 if { (eval echo configure:19194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19194   rm -rf conftest*
19195   eval "ac_cv_lib_$ac_lib_var=yes"
19196 else
19197   echo "configure: failed program was:" >&5
19198   cat conftest.$ac_ext >&5
19199   rm -rf conftest*
19200   eval "ac_cv_lib_$ac_lib_var=no"
19201 fi
19202 rm -f conftest*
19203 LIBS="$ac_save_LIBS"
19204
19205 fi
19206 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19207   echo "$ac_t""yes" 1>&6
19208   have_termcap=yes
19209 else
19210   echo "$ac_t""no" 1>&6
19211 have_termcap=no
19212 fi
19213
19214         if test $have_termcap = yes ; then
19215                 cat >> confdefs.h <<\EOF
19216 #define HAVE_TERMCAP 1
19217 EOF
19218
19219                 ol_link_termcap=yes
19220                 TERMCAP_LIBS=-ltermcap
19221         fi
19222 fi
19223
19224 if test $ol_link_termcap = no ; then
19225         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
19226 echo "configure:19227: checking for initscr in -lncurses" >&5
19227 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
19228 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19229   echo $ac_n "(cached) $ac_c" 1>&6
19230 else
19231   ac_save_LIBS="$LIBS"
19232 LIBS="-lncurses  $LIBS"
19233 cat > conftest.$ac_ext <<EOF
19234 #line 19235 "configure"
19235 #include "confdefs.h"
19236 /* Override any gcc2 internal prototype to avoid an error.  */
19237 /* We use char because int might match the return type of a gcc2
19238     builtin and then its argument prototype would still apply.  */
19239 char initscr();
19240
19241 int main() {
19242 initscr()
19243 ; return 0; }
19244 EOF
19245 if { (eval echo configure:19246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19246   rm -rf conftest*
19247   eval "ac_cv_lib_$ac_lib_var=yes"
19248 else
19249   echo "configure: failed program was:" >&5
19250   cat conftest.$ac_ext >&5
19251   rm -rf conftest*
19252   eval "ac_cv_lib_$ac_lib_var=no"
19253 fi
19254 rm -f conftest*
19255 LIBS="$ac_save_LIBS"
19256
19257 fi
19258 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19259   echo "$ac_t""yes" 1>&6
19260   have_ncurses=yes
19261 else
19262   echo "$ac_t""no" 1>&6
19263 have_ncurses=no
19264 fi
19265
19266         if test $have_ncurses = yes ; then
19267                 cat >> confdefs.h <<\EOF
19268 #define HAVE_NCURSES 1
19269 EOF
19270
19271                 ol_link_termcap=yes
19272                 TERMCAP_LIBS=-lncurses
19273         fi
19274 fi
19275
19276 if test $ol_link_termcap = no ; then
19277         cat >> confdefs.h <<\EOF
19278 #define NO_TERMCAP 1
19279 EOF
19280
19281         TERMCAP_LIBS=
19282 fi
19283
19284 ol_link_sasl=no
19285 ol_link_spasswd=no
19286 if test $ol_with_cyrus_sasl != no ; then
19287         for ac_hdr in sasl.h
19288 do
19289 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19290 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19291 echo "configure:19292: checking for $ac_hdr" >&5
19292 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19293   echo $ac_n "(cached) $ac_c" 1>&6
19294 else
19295   cat > conftest.$ac_ext <<EOF
19296 #line 19297 "configure"
19297 #include "confdefs.h"
19298 #include <$ac_hdr>
19299 EOF
19300 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19301 { (eval echo configure:19302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19302 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19303 if test -z "$ac_err"; then
19304   rm -rf conftest*
19305   eval "ac_cv_header_$ac_safe=yes"
19306 else
19307   echo "$ac_err" >&5
19308   echo "configure: failed program was:" >&5
19309   cat conftest.$ac_ext >&5
19310   rm -rf conftest*
19311   eval "ac_cv_header_$ac_safe=no"
19312 fi
19313 rm -f conftest*
19314 fi
19315 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19316   echo "$ac_t""yes" 1>&6
19317     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19318   cat >> confdefs.h <<EOF
19319 #define $ac_tr_hdr 1
19320 EOF
19321  
19322 else
19323   echo "$ac_t""no" 1>&6
19324 fi
19325 done
19326
19327
19328         if test $ac_cv_header_sasl_h = yes ; then
19329                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
19330 echo "configure:19331: checking for sasl_client_init in -lsasl" >&5
19331 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
19332 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19333   echo $ac_n "(cached) $ac_c" 1>&6
19334 else
19335   ac_save_LIBS="$LIBS"
19336 LIBS="-lsasl  $LIBS"
19337 cat > conftest.$ac_ext <<EOF
19338 #line 19339 "configure"
19339 #include "confdefs.h"
19340 /* Override any gcc2 internal prototype to avoid an error.  */
19341 /* We use char because int might match the return type of a gcc2
19342     builtin and then its argument prototype would still apply.  */
19343 char sasl_client_init();
19344
19345 int main() {
19346 sasl_client_init()
19347 ; return 0; }
19348 EOF
19349 if { (eval echo configure:19350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19350   rm -rf conftest*
19351   eval "ac_cv_lib_$ac_lib_var=yes"
19352 else
19353   echo "configure: failed program was:" >&5
19354   cat conftest.$ac_ext >&5
19355   rm -rf conftest*
19356   eval "ac_cv_lib_$ac_lib_var=no"
19357 fi
19358 rm -f conftest*
19359 LIBS="$ac_save_LIBS"
19360
19361 fi
19362 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19363   echo "$ac_t""yes" 1>&6
19364   have_cyrus_sasl=yes
19365 else
19366   echo "$ac_t""no" 1>&6
19367 have_cyrus_sasl=no
19368 fi
19369
19370
19371                 if test $have_cyrus_sasl != no ; then
19372                         SASL_LIBS="-lsasl"
19373                         cat >> confdefs.h <<\EOF
19374 #define HAVE_CYRUS_SASL 1
19375 EOF
19376
19377                         ol_link_sasl=yes
19378                 fi
19379         fi
19380
19381         if test $ol_link_sasl = no ; then
19382                 if test $ol_with_cyrus_sasl != auto ; then
19383                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
19384                 else
19385                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
19386                         echo "configure: warning: SASL authentication not supported!" 1>&2
19387                         if test $ol_link_tls = no ; then
19388                                 echo "configure: warning: Strong authentication not supported!" 1>&2
19389                         fi
19390                 fi
19391
19392         elif test $ol_enable_spasswd != no ; then
19393                 ol_link_spasswd=yes
19394         fi
19395
19396 else
19397         echo "configure: warning: SASL authentication not supported!" 1>&2
19398         if test $ol_link_tls = no ; then
19399                 echo "configure: warning: Strong authentication not supported!" 1>&2
19400         fi
19401 fi
19402
19403 if test $cross_compiling != yes -a $ac_cv_mingw32 != yes ; then
19404         dev=no
19405         if test -r /dev/urandom ; then
19406                 dev="/dev/urandom";
19407         elif test -r /idev/urandom ; then
19408                 dev="/idev/urandom";
19409         elif test -r /dev/srandom ; then
19410                 dev="/dev/srandom";
19411         elif test -r /dev/random ; then
19412                 dev="/dev/random";
19413         elif test -r /idev/random ; then
19414                 dev="/idev/random";
19415         fi
19416
19417         if test $dev != no ; then
19418                 cat >> confdefs.h <<EOF
19419 #define URANDOM_DEVICE "$dev"
19420 EOF
19421
19422         fi
19423 fi
19424
19425 ol_link_fetch=no
19426 if test $ol_with_fetch != no ; then
19427         ol_LIBS=$LIBS
19428 LIBS="-lfetch -lcom_err $LIBS"
19429 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
19430 echo "configure:19431: checking fetch(3) library" >&5
19431 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
19432   echo $ac_n "(cached) $ac_c" 1>&6
19433 else
19434   
19435         cat > conftest.$ac_ext <<EOF
19436 #line 19437 "configure"
19437 #include "confdefs.h"
19438
19439 #include <sys/param.h>
19440 #include <stdio.h>
19441 #include <fetch.h>
19442 int main() {
19443 struct url *u = fetchParseURL("file:///"); 
19444 ; return 0; }
19445 EOF
19446 if { (eval echo configure:19447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19447   rm -rf conftest*
19448   ol_cv_lib_fetch=yes
19449 else
19450   echo "configure: failed program was:" >&5
19451   cat conftest.$ac_ext >&5
19452   rm -rf conftest*
19453   ol_cv_lib_fetch=no
19454 fi
19455 rm -f conftest*
19456 fi
19457
19458 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
19459 LIBS=$ol_LIBS
19460 if test $ol_cv_lib_fetch != no ; then
19461         ol_link_fetch="-lfetch -lcom_err"
19462         cat >> confdefs.h <<\EOF
19463 #define HAVE_FETCH 1
19464 EOF
19465
19466 fi
19467
19468
19469         if test $ol_cv_lib_fetch != no ; then
19470                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
19471                 ol_link_fetch=freebsd
19472
19473         elif test $ol_with_fetch != auto ; then
19474                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
19475         fi 
19476 fi
19477
19478 ol_link_readline=no
19479 if test $ol_with_readline != no ; then
19480         for ac_hdr in readline/readline.h readline/history.h
19481 do
19482 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19483 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19484 echo "configure:19485: checking for $ac_hdr" >&5
19485 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19486   echo $ac_n "(cached) $ac_c" 1>&6
19487 else
19488   cat > conftest.$ac_ext <<EOF
19489 #line 19490 "configure"
19490 #include "confdefs.h"
19491 #include <$ac_hdr>
19492 EOF
19493 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19494 { (eval echo configure:19495: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19495 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19496 if test -z "$ac_err"; then
19497   rm -rf conftest*
19498   eval "ac_cv_header_$ac_safe=yes"
19499 else
19500   echo "$ac_err" >&5
19501   echo "configure: failed program was:" >&5
19502   cat conftest.$ac_ext >&5
19503   rm -rf conftest*
19504   eval "ac_cv_header_$ac_safe=no"
19505 fi
19506 rm -f conftest*
19507 fi
19508 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19509   echo "$ac_t""yes" 1>&6
19510     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19511   cat >> confdefs.h <<EOF
19512 #define $ac_tr_hdr 1
19513 EOF
19514  
19515 else
19516   echo "$ac_t""no" 1>&6
19517 fi
19518 done
19519
19520
19521         if test $ac_cv_header_readline_readline_h = yes ; then
19522                 save_LIBS="$LIBS"
19523                 LIBS="$TERMCAP_LIBS $LIBS"
19524                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
19525 echo "configure:19526: checking for readline in -lreadline" >&5
19526 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
19527 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19528   echo $ac_n "(cached) $ac_c" 1>&6
19529 else
19530   ac_save_LIBS="$LIBS"
19531 LIBS="-lreadline  $LIBS"
19532 cat > conftest.$ac_ext <<EOF
19533 #line 19534 "configure"
19534 #include "confdefs.h"
19535 /* Override any gcc2 internal prototype to avoid an error.  */
19536 /* We use char because int might match the return type of a gcc2
19537     builtin and then its argument prototype would still apply.  */
19538 char readline();
19539
19540 int main() {
19541 readline()
19542 ; return 0; }
19543 EOF
19544 if { (eval echo configure:19545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19545   rm -rf conftest*
19546   eval "ac_cv_lib_$ac_lib_var=yes"
19547 else
19548   echo "configure: failed program was:" >&5
19549   cat conftest.$ac_ext >&5
19550   rm -rf conftest*
19551   eval "ac_cv_lib_$ac_lib_var=no"
19552 fi
19553 rm -f conftest*
19554 LIBS="$ac_save_LIBS"
19555
19556 fi
19557 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19558   echo "$ac_t""yes" 1>&6
19559   have_readline=yes
19560 else
19561   echo "$ac_t""no" 1>&6
19562 have_readline=no
19563 fi
19564
19565                 LIBS="$save_LIBS"
19566                         
19567                 if test $have_readline = yes ; then
19568                         ol_with_readline=found
19569                         ol_link_readline=yes
19570
19571                         READLINE_LIBS="-lreadline"
19572                 fi
19573         fi
19574 fi
19575
19576 if test $ol_link_readline = yes ; then
19577         cat >> confdefs.h <<\EOF
19578 #define HAVE_READLINE 1
19579 EOF
19580
19581 fi
19582
19583
19584 if test $ol_enable_crypt != no ; then
19585         echo $ac_n "checking for crypt""... $ac_c" 1>&6
19586 echo "configure:19587: checking for crypt" >&5
19587 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
19588   echo $ac_n "(cached) $ac_c" 1>&6
19589 else
19590   cat > conftest.$ac_ext <<EOF
19591 #line 19592 "configure"
19592 #include "confdefs.h"
19593 /* System header to define __stub macros and hopefully few prototypes,
19594     which can conflict with char crypt(); below.  */
19595 #include <assert.h>
19596 /* Override any gcc2 internal prototype to avoid an error.  */
19597 /* We use char because int might match the return type of a gcc2
19598     builtin and then its argument prototype would still apply.  */
19599 char crypt();
19600 char (*f)();
19601
19602 int main() {
19603
19604 /* The GNU C library defines this for functions which it implements
19605     to always fail with ENOSYS.  Some functions are actually named
19606     something starting with __ and the normal name is an alias.  */
19607 #if defined (__stub_crypt) || defined (__stub___crypt)
19608 choke me
19609 #else
19610 f = crypt;
19611 #endif
19612
19613 ; return 0; }
19614 EOF
19615 if { (eval echo configure:19616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19616   rm -rf conftest*
19617   eval "ac_cv_func_crypt=yes"
19618 else
19619   echo "configure: failed program was:" >&5
19620   cat conftest.$ac_ext >&5
19621   rm -rf conftest*
19622   eval "ac_cv_func_crypt=no"
19623 fi
19624 rm -f conftest*
19625 fi
19626
19627 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
19628   echo "$ac_t""yes" 1>&6
19629   have_crypt=yes
19630 else
19631   echo "$ac_t""no" 1>&6
19632
19633                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
19634 echo "configure:19635: checking for crypt in -lcrypt" >&5
19635 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
19636 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19637   echo $ac_n "(cached) $ac_c" 1>&6
19638 else
19639   ac_save_LIBS="$LIBS"
19640 LIBS="-lcrypt  $LIBS"
19641 cat > conftest.$ac_ext <<EOF
19642 #line 19643 "configure"
19643 #include "confdefs.h"
19644 /* Override any gcc2 internal prototype to avoid an error.  */
19645 /* We use char because int might match the return type of a gcc2
19646     builtin and then its argument prototype would still apply.  */
19647 char crypt();
19648
19649 int main() {
19650 crypt()
19651 ; return 0; }
19652 EOF
19653 if { (eval echo configure:19654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19654   rm -rf conftest*
19655   eval "ac_cv_lib_$ac_lib_var=yes"
19656 else
19657   echo "configure: failed program was:" >&5
19658   cat conftest.$ac_ext >&5
19659   rm -rf conftest*
19660   eval "ac_cv_lib_$ac_lib_var=no"
19661 fi
19662 rm -f conftest*
19663 LIBS="$ac_save_LIBS"
19664
19665 fi
19666 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19667   echo "$ac_t""yes" 1>&6
19668   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
19669                         have_crypt=yes
19670 else
19671   echo "$ac_t""no" 1>&6
19672 have_crypt=no
19673 fi
19674
19675 fi
19676
19677
19678         if test $have_crypt = yes ; then
19679                 cat >> confdefs.h <<\EOF
19680 #define HAVE_CRYPT 1
19681 EOF
19682
19683         else
19684                 echo "configure: warning: could not find crypt" 1>&2
19685                 if test $ol_enable_crypt = yes ; then
19686                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
19687                 fi
19688
19689                 echo "configure: warning: disabling crypt support" 1>&2
19690                 ol_enable_crypt=no
19691         fi
19692 fi
19693
19694 if test $ol_enable_proctitle != no ; then
19695         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
19696 echo "configure:19697: checking for setproctitle" >&5
19697 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
19698   echo $ac_n "(cached) $ac_c" 1>&6
19699 else
19700   cat > conftest.$ac_ext <<EOF
19701 #line 19702 "configure"
19702 #include "confdefs.h"
19703 /* System header to define __stub macros and hopefully few prototypes,
19704     which can conflict with char setproctitle(); below.  */
19705 #include <assert.h>
19706 /* Override any gcc2 internal prototype to avoid an error.  */
19707 /* We use char because int might match the return type of a gcc2
19708     builtin and then its argument prototype would still apply.  */
19709 char setproctitle();
19710 char (*f)();
19711
19712 int main() {
19713
19714 /* The GNU C library defines this for functions which it implements
19715     to always fail with ENOSYS.  Some functions are actually named
19716     something starting with __ and the normal name is an alias.  */
19717 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
19718 choke me
19719 #else
19720 f = setproctitle;
19721 #endif
19722
19723 ; return 0; }
19724 EOF
19725 if { (eval echo configure:19726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19726   rm -rf conftest*
19727   eval "ac_cv_func_setproctitle=yes"
19728 else
19729   echo "configure: failed program was:" >&5
19730   cat conftest.$ac_ext >&5
19731   rm -rf conftest*
19732   eval "ac_cv_func_setproctitle=no"
19733 fi
19734 rm -f conftest*
19735 fi
19736
19737 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
19738   echo "$ac_t""yes" 1>&6
19739   have_setproctitle=yes
19740 else
19741   echo "$ac_t""no" 1>&6
19742
19743                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
19744 echo "configure:19745: checking for setproctitle in -lutil" >&5
19745 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
19746 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19747   echo $ac_n "(cached) $ac_c" 1>&6
19748 else
19749   ac_save_LIBS="$LIBS"
19750 LIBS="-lutil  $LIBS"
19751 cat > conftest.$ac_ext <<EOF
19752 #line 19753 "configure"
19753 #include "confdefs.h"
19754 /* Override any gcc2 internal prototype to avoid an error.  */
19755 /* We use char because int might match the return type of a gcc2
19756     builtin and then its argument prototype would still apply.  */
19757 char setproctitle();
19758
19759 int main() {
19760 setproctitle()
19761 ; return 0; }
19762 EOF
19763 if { (eval echo configure:19764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19764   rm -rf conftest*
19765   eval "ac_cv_lib_$ac_lib_var=yes"
19766 else
19767   echo "configure: failed program was:" >&5
19768   cat conftest.$ac_ext >&5
19769   rm -rf conftest*
19770   eval "ac_cv_lib_$ac_lib_var=no"
19771 fi
19772 rm -f conftest*
19773 LIBS="$ac_save_LIBS"
19774
19775 fi
19776 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19777   echo "$ac_t""yes" 1>&6
19778   have_setproctitle=yes
19779                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
19780 else
19781   echo "$ac_t""no" 1>&6
19782 have_setproctitle=no
19783                         LIBOBJS="$LIBOBJS setproctitle.o"
19784                         LIBSRCS="$LIBSRCS setproctitle.c"
19785 fi
19786
19787 fi
19788
19789
19790         if test $have_setproctitle = yes ; then
19791                 cat >> confdefs.h <<\EOF
19792 #define HAVE_SETPROCTITLE 1
19793 EOF
19794
19795         fi
19796 fi
19797
19798 if test $ol_enable_slp != no ; then
19799         for ac_hdr in slp.h 
19800 do
19801 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19802 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19803 echo "configure:19804: checking for $ac_hdr" >&5
19804 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19805   echo $ac_n "(cached) $ac_c" 1>&6
19806 else
19807   cat > conftest.$ac_ext <<EOF
19808 #line 19809 "configure"
19809 #include "confdefs.h"
19810 #include <$ac_hdr>
19811 EOF
19812 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19813 { (eval echo configure:19814: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19814 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19815 if test -z "$ac_err"; then
19816   rm -rf conftest*
19817   eval "ac_cv_header_$ac_safe=yes"
19818 else
19819   echo "$ac_err" >&5
19820   echo "configure: failed program was:" >&5
19821   cat conftest.$ac_ext >&5
19822   rm -rf conftest*
19823   eval "ac_cv_header_$ac_safe=no"
19824 fi
19825 rm -f conftest*
19826 fi
19827 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19828   echo "$ac_t""yes" 1>&6
19829     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19830   cat >> confdefs.h <<EOF
19831 #define $ac_tr_hdr 1
19832 EOF
19833  
19834 else
19835   echo "$ac_t""no" 1>&6
19836 fi
19837 done
19838
19839
19840         if test $ac_cv_header_slp_h = yes ; then
19841                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
19842 echo "configure:19843: checking for SLPOpen in -lslp" >&5
19843 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
19844 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19845   echo $ac_n "(cached) $ac_c" 1>&6
19846 else
19847   ac_save_LIBS="$LIBS"
19848 LIBS="-lslp  $LIBS"
19849 cat > conftest.$ac_ext <<EOF
19850 #line 19851 "configure"
19851 #include "confdefs.h"
19852 /* Override any gcc2 internal prototype to avoid an error.  */
19853 /* We use char because int might match the return type of a gcc2
19854     builtin and then its argument prototype would still apply.  */
19855 char SLPOpen();
19856
19857 int main() {
19858 SLPOpen()
19859 ; return 0; }
19860 EOF
19861 if { (eval echo configure:19862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19862   rm -rf conftest*
19863   eval "ac_cv_lib_$ac_lib_var=yes"
19864 else
19865   echo "configure: failed program was:" >&5
19866   cat conftest.$ac_ext >&5
19867   rm -rf conftest*
19868   eval "ac_cv_lib_$ac_lib_var=no"
19869 fi
19870 rm -f conftest*
19871 LIBS="$ac_save_LIBS"
19872
19873 fi
19874 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19875   echo "$ac_t""yes" 1>&6
19876   have_slp=yes
19877 else
19878   echo "$ac_t""no" 1>&6
19879 have_slp=no
19880 fi
19881
19882                 if test $have_slp = yes ; then
19883                         cat >> confdefs.h <<\EOF
19884 #define HAVE_SLP 1
19885 EOF
19886
19887                         SLAPD_SLP_LIBS=-lslp
19888                 fi
19889
19890         elif test $ol_enable_slp = yes ; then
19891                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
19892         fi
19893 fi
19894
19895 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
19896 echo "configure:19897: checking for ANSI C header files" >&5
19897 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
19898   echo $ac_n "(cached) $ac_c" 1>&6
19899 else
19900   cat > conftest.$ac_ext <<EOF
19901 #line 19902 "configure"
19902 #include "confdefs.h"
19903 #include <stdlib.h>
19904 #include <stdarg.h>
19905 #include <string.h>
19906 #include <float.h>
19907 EOF
19908 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19909 { (eval echo configure:19910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19910 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19911 if test -z "$ac_err"; then
19912   rm -rf conftest*
19913   ac_cv_header_stdc=yes
19914 else
19915   echo "$ac_err" >&5
19916   echo "configure: failed program was:" >&5
19917   cat conftest.$ac_ext >&5
19918   rm -rf conftest*
19919   ac_cv_header_stdc=no
19920 fi
19921 rm -f conftest*
19922
19923 if test $ac_cv_header_stdc = yes; then
19924   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
19925 cat > conftest.$ac_ext <<EOF
19926 #line 19927 "configure"
19927 #include "confdefs.h"
19928 #include <string.h>
19929 EOF
19930 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19931   egrep "memchr" >/dev/null 2>&1; then
19932   :
19933 else
19934   rm -rf conftest*
19935   ac_cv_header_stdc=no
19936 fi
19937 rm -f conftest*
19938
19939 fi
19940
19941 if test $ac_cv_header_stdc = yes; then
19942   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
19943 cat > conftest.$ac_ext <<EOF
19944 #line 19945 "configure"
19945 #include "confdefs.h"
19946 #include <stdlib.h>
19947 EOF
19948 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19949   egrep "free" >/dev/null 2>&1; then
19950   :
19951 else
19952   rm -rf conftest*
19953   ac_cv_header_stdc=no
19954 fi
19955 rm -f conftest*
19956
19957 fi
19958
19959 if test $ac_cv_header_stdc = yes; then
19960   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
19961 if test "$cross_compiling" = yes; then
19962   :
19963 else
19964   cat > conftest.$ac_ext <<EOF
19965 #line 19966 "configure"
19966 #include "confdefs.h"
19967 #include <ctype.h>
19968 #if ((' ' & 0x0FF) == 0x020)
19969 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
19970 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
19971 #else
19972 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
19973  || ('j' <= (c) && (c) <= 'r') \
19974  || ('s' <= (c) && (c) <= 'z'))
19975 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
19976 #endif
19977 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
19978 int main () { int i; for (i = 0; i < 256; i++)
19979 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
19980 exit (0); }
19981
19982 EOF
19983 if { (eval echo configure:19984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19984 then
19985   :
19986 else
19987   echo "configure: failed program was:" >&5
19988   cat conftest.$ac_ext >&5
19989   rm -fr conftest*
19990   ac_cv_header_stdc=no
19991 fi
19992 rm -fr conftest*
19993 fi
19994
19995 fi
19996 fi
19997
19998 echo "$ac_t""$ac_cv_header_stdc" 1>&6
19999 if test $ac_cv_header_stdc = yes; then
20000   cat >> confdefs.h <<\EOF
20001 #define STDC_HEADERS 1
20002 EOF
20003
20004 fi
20005
20006 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
20007 echo "configure:20008: checking for mode_t" >&5
20008 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
20009   echo $ac_n "(cached) $ac_c" 1>&6
20010 else
20011   cat > conftest.$ac_ext <<EOF
20012 #line 20013 "configure"
20013 #include "confdefs.h"
20014 #include <sys/types.h>
20015 #if STDC_HEADERS
20016 #include <stdlib.h>
20017 #include <stddef.h>
20018 #endif
20019
20020 EOF
20021 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20022   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20023   rm -rf conftest*
20024   eval "ac_cv_type_mode_t=yes"
20025 else
20026   rm -rf conftest*
20027   eval "ac_cv_type_mode_t=no"
20028 fi
20029 rm -f conftest*
20030
20031 fi
20032 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
20033   echo "$ac_t""yes" 1>&6
20034 else
20035   echo "$ac_t""no" 1>&6
20036   cat >> confdefs.h <<EOF
20037 #define mode_t int
20038 EOF
20039
20040 fi
20041
20042 echo $ac_n "checking for off_t""... $ac_c" 1>&6
20043 echo "configure:20044: checking for off_t" >&5
20044 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
20045   echo $ac_n "(cached) $ac_c" 1>&6
20046 else
20047   cat > conftest.$ac_ext <<EOF
20048 #line 20049 "configure"
20049 #include "confdefs.h"
20050 #include <sys/types.h>
20051 #if STDC_HEADERS
20052 #include <stdlib.h>
20053 #include <stddef.h>
20054 #endif
20055
20056 EOF
20057 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20058   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20059   rm -rf conftest*
20060   eval "ac_cv_type_off_t=yes"
20061 else
20062   rm -rf conftest*
20063   eval "ac_cv_type_off_t=no"
20064 fi
20065 rm -f conftest*
20066
20067 fi
20068 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
20069   echo "$ac_t""yes" 1>&6
20070 else
20071   echo "$ac_t""no" 1>&6
20072   cat >> confdefs.h <<EOF
20073 #define off_t long
20074 EOF
20075
20076 fi
20077
20078 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
20079 echo "configure:20080: checking for pid_t" >&5
20080 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
20081   echo $ac_n "(cached) $ac_c" 1>&6
20082 else
20083   cat > conftest.$ac_ext <<EOF
20084 #line 20085 "configure"
20085 #include "confdefs.h"
20086 #include <sys/types.h>
20087 #if STDC_HEADERS
20088 #include <stdlib.h>
20089 #include <stddef.h>
20090 #endif
20091
20092 EOF
20093 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20094   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20095   rm -rf conftest*
20096   eval "ac_cv_type_pid_t=yes"
20097 else
20098   rm -rf conftest*
20099   eval "ac_cv_type_pid_t=no"
20100 fi
20101 rm -f conftest*
20102
20103 fi
20104 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
20105   echo "$ac_t""yes" 1>&6
20106 else
20107   echo "$ac_t""no" 1>&6
20108   cat >> confdefs.h <<EOF
20109 #define pid_t int
20110 EOF
20111
20112 fi
20113
20114 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
20115 echo "configure:20116: checking for ptrdiff_t" >&5
20116 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
20117   echo $ac_n "(cached) $ac_c" 1>&6
20118 else
20119   cat > conftest.$ac_ext <<EOF
20120 #line 20121 "configure"
20121 #include "confdefs.h"
20122 #include <stddef.h>
20123 int main() {
20124 ptrdiff_t p
20125 ; return 0; }
20126 EOF
20127 if { (eval echo configure:20128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20128   rm -rf conftest*
20129   am_cv_type_ptrdiff_t=yes
20130 else
20131   echo "configure: failed program was:" >&5
20132   cat conftest.$ac_ext >&5
20133   rm -rf conftest*
20134   am_cv_type_ptrdiff_t=no
20135 fi
20136 rm -f conftest*
20137 fi
20138
20139 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
20140    if test $am_cv_type_ptrdiff_t = yes; then
20141      cat >> confdefs.h <<\EOF
20142 #define HAVE_PTRDIFF_T 1
20143 EOF
20144
20145    fi
20146
20147 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
20148 echo "configure:20149: checking return type of signal handlers" >&5
20149 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
20150   echo $ac_n "(cached) $ac_c" 1>&6
20151 else
20152   cat > conftest.$ac_ext <<EOF
20153 #line 20154 "configure"
20154 #include "confdefs.h"
20155 #include <sys/types.h>
20156 #include <signal.h>
20157 #ifdef signal
20158 #undef signal
20159 #endif
20160 #ifdef __cplusplus
20161 extern "C" void (*signal (int, void (*)(int)))(int);
20162 #else
20163 void (*signal ()) ();
20164 #endif
20165
20166 int main() {
20167 int i;
20168 ; return 0; }
20169 EOF
20170 if { (eval echo configure:20171: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20171   rm -rf conftest*
20172   ac_cv_type_signal=void
20173 else
20174   echo "configure: failed program was:" >&5
20175   cat conftest.$ac_ext >&5
20176   rm -rf conftest*
20177   ac_cv_type_signal=int
20178 fi
20179 rm -f conftest*
20180 fi
20181
20182 echo "$ac_t""$ac_cv_type_signal" 1>&6
20183 cat >> confdefs.h <<EOF
20184 #define RETSIGTYPE $ac_cv_type_signal
20185 EOF
20186
20187
20188 echo $ac_n "checking for size_t""... $ac_c" 1>&6
20189 echo "configure:20190: checking for size_t" >&5
20190 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
20191   echo $ac_n "(cached) $ac_c" 1>&6
20192 else
20193   cat > conftest.$ac_ext <<EOF
20194 #line 20195 "configure"
20195 #include "confdefs.h"
20196 #include <sys/types.h>
20197 #if STDC_HEADERS
20198 #include <stdlib.h>
20199 #include <stddef.h>
20200 #endif
20201
20202 EOF
20203 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20204   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20205   rm -rf conftest*
20206   eval "ac_cv_type_size_t=yes"
20207 else
20208   rm -rf conftest*
20209   eval "ac_cv_type_size_t=no"
20210 fi
20211 rm -f conftest*
20212
20213 fi
20214 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
20215   echo "$ac_t""yes" 1>&6
20216 else
20217   echo "$ac_t""no" 1>&6
20218   cat >> confdefs.h <<EOF
20219 #define size_t unsigned
20220 EOF
20221
20222 fi
20223
20224
20225 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
20226 echo "configure:20227: checking for ssize_t" >&5
20227 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
20228   echo $ac_n "(cached) $ac_c" 1>&6
20229 else
20230   cat > conftest.$ac_ext <<EOF
20231 #line 20232 "configure"
20232 #include "confdefs.h"
20233 #include <sys/types.h>
20234 #if STDC_HEADERS
20235 #include <stdlib.h>
20236 #include <stddef.h>
20237 #endif
20238
20239 EOF
20240 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20241   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20242   rm -rf conftest*
20243   eval "ac_cv_type_ssize_t=yes"
20244 else
20245   rm -rf conftest*
20246   eval "ac_cv_type_ssize_t=no"
20247 fi
20248 rm -f conftest*
20249
20250 fi
20251 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
20252   echo "$ac_t""yes" 1>&6
20253 else
20254   echo "$ac_t""no" 1>&6
20255   cat >> confdefs.h <<EOF
20256 #define ssize_t signed int
20257 EOF
20258
20259 fi
20260
20261 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
20262 echo "configure:20263: checking for caddr_t" >&5
20263 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
20264   echo $ac_n "(cached) $ac_c" 1>&6
20265 else
20266   cat > conftest.$ac_ext <<EOF
20267 #line 20268 "configure"
20268 #include "confdefs.h"
20269 #include <sys/types.h>
20270 #if STDC_HEADERS
20271 #include <stdlib.h>
20272 #include <stddef.h>
20273 #endif
20274
20275 EOF
20276 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20277   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20278   rm -rf conftest*
20279   eval "ac_cv_type_caddr_t=yes"
20280 else
20281   rm -rf conftest*
20282   eval "ac_cv_type_caddr_t=no"
20283 fi
20284 rm -f conftest*
20285
20286 fi
20287 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
20288   echo "$ac_t""yes" 1>&6
20289 else
20290   echo "$ac_t""no" 1>&6
20291   cat >> confdefs.h <<EOF
20292 #define caddr_t char *
20293 EOF
20294
20295 fi
20296
20297
20298 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
20299 echo "configure:20300: checking for socklen_t" >&5
20300 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
20301   echo $ac_n "(cached) $ac_c" 1>&6
20302 else
20303   cat > conftest.$ac_ext <<EOF
20304 #line 20305 "configure"
20305 #include "confdefs.h"
20306
20307 #ifdef HAVE_SYS_TYPES_H
20308 #include <sys/types.h>
20309 #endif
20310 #ifdef HAVE_SYS_SOCKET_H
20311 #include <sys/socket.h>
20312 #endif
20313
20314 int main() {
20315 socklen_t len;
20316 ; return 0; }
20317 EOF
20318 if { (eval echo configure:20319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20319   rm -rf conftest*
20320   ol_cv_type_socklen_t=yes
20321 else
20322   echo "configure: failed program was:" >&5
20323   cat conftest.$ac_ext >&5
20324   rm -rf conftest*
20325   ol_cv_type_socklen_t=no
20326 fi
20327 rm -f conftest*
20328 fi
20329
20330 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
20331   if test $ol_cv_type_socklen_t = no; then
20332     cat >> confdefs.h <<\EOF
20333 #define socklen_t int
20334 EOF
20335
20336   fi
20337  
20338 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
20339 echo "configure:20340: checking for member st_blksize in aggregate type struct stat" >&5
20340 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
20341   echo $ac_n "(cached) $ac_c" 1>&6
20342 else
20343   cat > conftest.$ac_ext <<EOF
20344 #line 20345 "configure"
20345 #include "confdefs.h"
20346 #include <sys/types.h>
20347 #include <sys/stat.h>
20348 int main() {
20349 struct stat foo; foo.st_blksize;
20350 ; return 0; }
20351 EOF
20352 if { (eval echo configure:20353: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20353   rm -rf conftest*
20354   ac_cv_c_struct_member_st_blksize=yes
20355 else
20356   echo "configure: failed program was:" >&5
20357   cat conftest.$ac_ext >&5
20358   rm -rf conftest*
20359   ac_cv_c_struct_member_st_blksize=no
20360 fi
20361 rm -f conftest*
20362 fi
20363
20364 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
20365 st_blksize="$ac_cv_c_struct_member_st_blksize"
20366 if test $ac_cv_c_struct_member_st_blksize = yes; then
20367   cat >> confdefs.h <<\EOF
20368 #define HAVE_ST_BLKSIZE 1
20369 EOF
20370
20371 fi
20372
20373 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
20374 echo "configure:20375: checking whether time.h and sys/time.h may both be included" >&5
20375 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
20376   echo $ac_n "(cached) $ac_c" 1>&6
20377 else
20378   cat > conftest.$ac_ext <<EOF
20379 #line 20380 "configure"
20380 #include "confdefs.h"
20381 #include <sys/types.h>
20382 #include <sys/time.h>
20383 #include <time.h>
20384 int main() {
20385 struct tm *tp;
20386 ; return 0; }
20387 EOF
20388 if { (eval echo configure:20389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20389   rm -rf conftest*
20390   ac_cv_header_time=yes
20391 else
20392   echo "configure: failed program was:" >&5
20393   cat conftest.$ac_ext >&5
20394   rm -rf conftest*
20395   ac_cv_header_time=no
20396 fi
20397 rm -f conftest*
20398 fi
20399
20400 echo "$ac_t""$ac_cv_header_time" 1>&6
20401 if test $ac_cv_header_time = yes; then
20402   cat >> confdefs.h <<\EOF
20403 #define TIME_WITH_SYS_TIME 1
20404 EOF
20405
20406 fi
20407
20408 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
20409 echo "configure:20410: checking whether struct tm is in sys/time.h or time.h" >&5
20410 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
20411   echo $ac_n "(cached) $ac_c" 1>&6
20412 else
20413   cat > conftest.$ac_ext <<EOF
20414 #line 20415 "configure"
20415 #include "confdefs.h"
20416 #include <sys/types.h>
20417 #include <time.h>
20418 int main() {
20419 struct tm *tp; tp->tm_sec;
20420 ; return 0; }
20421 EOF
20422 if { (eval echo configure:20423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20423   rm -rf conftest*
20424   ac_cv_struct_tm=time.h
20425 else
20426   echo "configure: failed program was:" >&5
20427   cat conftest.$ac_ext >&5
20428   rm -rf conftest*
20429   ac_cv_struct_tm=sys/time.h
20430 fi
20431 rm -f conftest*
20432 fi
20433
20434 echo "$ac_t""$ac_cv_struct_tm" 1>&6
20435 if test $ac_cv_struct_tm = sys/time.h; then
20436   cat >> confdefs.h <<\EOF
20437 #define TM_IN_SYS_TIME 1
20438 EOF
20439
20440 fi
20441
20442 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
20443 echo "configure:20444: checking for uid_t in sys/types.h" >&5
20444 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
20445   echo $ac_n "(cached) $ac_c" 1>&6
20446 else
20447   cat > conftest.$ac_ext <<EOF
20448 #line 20449 "configure"
20449 #include "confdefs.h"
20450 #include <sys/types.h>
20451 EOF
20452 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20453   egrep "uid_t" >/dev/null 2>&1; then
20454   rm -rf conftest*
20455   ac_cv_type_uid_t=yes
20456 else
20457   rm -rf conftest*
20458   ac_cv_type_uid_t=no
20459 fi
20460 rm -f conftest*
20461
20462 fi
20463
20464 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
20465 if test $ac_cv_type_uid_t = no; then
20466   cat >> confdefs.h <<\EOF
20467 #define uid_t int
20468 EOF
20469
20470   cat >> confdefs.h <<\EOF
20471 #define gid_t int
20472 EOF
20473
20474 fi
20475
20476 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
20477 echo "configure:20478: checking for sig_atomic_t" >&5
20478 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
20479   echo $ac_n "(cached) $ac_c" 1>&6
20480 else
20481   cat > conftest.$ac_ext <<EOF
20482 #line 20483 "configure"
20483 #include "confdefs.h"
20484 #include <signal.h>
20485 int main() {
20486 sig_atomic_t atomic;
20487 ; return 0; }
20488 EOF
20489 if { (eval echo configure:20490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20490   rm -rf conftest*
20491   ol_cv_type_sig_atomic_t=yes
20492 else
20493   echo "configure: failed program was:" >&5
20494   cat conftest.$ac_ext >&5
20495   rm -rf conftest*
20496   ol_cv_type_sig_atomic_t=no
20497 fi
20498 rm -f conftest*
20499 fi
20500
20501 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
20502   if test $ol_cv_type_sig_atomic_t = no; then
20503     cat >> confdefs.h <<\EOF
20504 #define sig_atomic_t int
20505 EOF
20506
20507   fi
20508  
20509
20510
20511 # test for pw_gecos in struct passwd
20512 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
20513 echo "configure:20514: checking struct passwd for pw_gecos" >&5
20514 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
20515   echo $ac_n "(cached) $ac_c" 1>&6
20516 else
20517   
20518         cat > conftest.$ac_ext <<EOF
20519 #line 20520 "configure"
20520 #include "confdefs.h"
20521 #include <pwd.h>
20522 int main() {
20523
20524         struct passwd pwd;
20525         pwd.pw_gecos = pwd.pw_name;
20526
20527 ; return 0; }
20528 EOF
20529 if { (eval echo configure:20530: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20530   rm -rf conftest*
20531   ol_cv_struct_passwd_pw_gecos=yes
20532 else
20533   echo "configure: failed program was:" >&5
20534   cat conftest.$ac_ext >&5
20535   rm -rf conftest*
20536   ol_cv_struct_passwd_pw_gecos=no
20537 fi
20538 rm -f conftest*
20539 fi
20540
20541 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
20542 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
20543         cat >> confdefs.h <<\EOF
20544 #define HAVE_PW_GECOS 1
20545 EOF
20546
20547 fi
20548
20549 # test for pw_passwd in struct passwd
20550 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
20551 echo "configure:20552: checking struct passwd for pw_passwd" >&5
20552 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
20553   echo $ac_n "(cached) $ac_c" 1>&6
20554 else
20555   
20556         cat > conftest.$ac_ext <<EOF
20557 #line 20558 "configure"
20558 #include "confdefs.h"
20559 #include <pwd.h>
20560 int main() {
20561
20562         struct passwd pwd;
20563         pwd.pw_passwd = pwd.pw_name;
20564
20565 ; return 0; }
20566 EOF
20567 if { (eval echo configure:20568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20568   rm -rf conftest*
20569   ol_cv_struct_passwd_pw_passwd=yes
20570 else
20571   echo "configure: failed program was:" >&5
20572   cat conftest.$ac_ext >&5
20573   rm -rf conftest*
20574   ol_cv_struct_passwd_pw_passwd=no
20575 fi
20576 rm -f conftest*
20577 fi
20578
20579 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
20580 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
20581         cat >> confdefs.h <<\EOF
20582 #define HAVE_PW_PASSWD 1
20583 EOF
20584
20585 fi
20586
20587
20588 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
20589 echo "configure:20590: checking if toupper() requires islower()" >&5
20590 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
20591   echo $ac_n "(cached) $ac_c" 1>&6
20592 else
20593   
20594         if test "$cross_compiling" = yes; then
20595   ol_cv_c_upper_lower=safe
20596 else
20597   cat > conftest.$ac_ext <<EOF
20598 #line 20599 "configure"
20599 #include "confdefs.h"
20600
20601 #include <ctype.h>
20602 main()
20603 {
20604         if ('C' == toupper('C'))
20605                 exit(0);
20606         else
20607                 exit(1);
20608 }
20609 EOF
20610 if { (eval echo configure:20611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20611 then
20612   ol_cv_c_upper_lower=no
20613 else
20614   echo "configure: failed program was:" >&5
20615   cat conftest.$ac_ext >&5
20616   rm -fr conftest*
20617   ol_cv_c_upper_lower=yes
20618 fi
20619 rm -fr conftest*
20620 fi
20621
20622 fi
20623
20624 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
20625 if test $ol_cv_c_upper_lower != no ; then
20626         cat >> confdefs.h <<\EOF
20627 #define C_UPPER_LOWER 1
20628 EOF
20629
20630 fi
20631
20632 echo $ac_n "checking for working const""... $ac_c" 1>&6
20633 echo "configure:20634: checking for working const" >&5
20634 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
20635   echo $ac_n "(cached) $ac_c" 1>&6
20636 else
20637   cat > conftest.$ac_ext <<EOF
20638 #line 20639 "configure"
20639 #include "confdefs.h"
20640
20641 int main() {
20642
20643 /* Ultrix mips cc rejects this.  */
20644 typedef int charset[2]; const charset x;
20645 /* SunOS 4.1.1 cc rejects this.  */
20646 char const *const *ccp;
20647 char **p;
20648 /* NEC SVR4.0.2 mips cc rejects this.  */
20649 struct point {int x, y;};
20650 static struct point const zero = {0,0};
20651 /* AIX XL C 1.02.0.0 rejects this.
20652    It does not let you subtract one const X* pointer from another in an arm
20653    of an if-expression whose if-part is not a constant expression */
20654 const char *g = "string";
20655 ccp = &g + (g ? g-g : 0);
20656 /* HPUX 7.0 cc rejects these. */
20657 ++ccp;
20658 p = (char**) ccp;
20659 ccp = (char const *const *) p;
20660 { /* SCO 3.2v4 cc rejects this.  */
20661   char *t;
20662   char const *s = 0 ? (char *) 0 : (char const *) 0;
20663
20664   *t++ = 0;
20665 }
20666 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20667   int x[] = {25, 17};
20668   const int *foo = &x[0];
20669   ++foo;
20670 }
20671 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20672   typedef const int *iptr;
20673   iptr p = 0;
20674   ++p;
20675 }
20676 { /* AIX XL C 1.02.0.0 rejects this saying
20677      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20678   struct s { int j; const int *ap[3]; };
20679   struct s *b; b->j = 5;
20680 }
20681 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20682   const int foo = 10;
20683 }
20684
20685 ; return 0; }
20686 EOF
20687 if { (eval echo configure:20688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20688   rm -rf conftest*
20689   ac_cv_c_const=yes
20690 else
20691   echo "configure: failed program was:" >&5
20692   cat conftest.$ac_ext >&5
20693   rm -rf conftest*
20694   ac_cv_c_const=no
20695 fi
20696 rm -f conftest*
20697 fi
20698
20699 echo "$ac_t""$ac_cv_c_const" 1>&6
20700 if test $ac_cv_c_const = no; then
20701   cat >> confdefs.h <<\EOF
20702 #define const 
20703 EOF
20704
20705 fi
20706
20707 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
20708 echo "configure:20709: checking if compiler understands volatile" >&5
20709 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
20710   echo $ac_n "(cached) $ac_c" 1>&6
20711 else
20712   cat > conftest.$ac_ext <<EOF
20713 #line 20714 "configure"
20714 #include "confdefs.h"
20715 int x, y, z;
20716 int main() {
20717 volatile int a; int * volatile b = x ? &y : &z;
20718       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
20719       *b = 0;
20720 ; return 0; }
20721 EOF
20722 if { (eval echo configure:20723: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20723   rm -rf conftest*
20724   ol_cv_c_volatile=yes
20725 else
20726   echo "configure: failed program was:" >&5
20727   cat conftest.$ac_ext >&5
20728   rm -rf conftest*
20729   ol_cv_c_volatile=no
20730 fi
20731 rm -f conftest*
20732 fi
20733
20734 echo "$ac_t""$ol_cv_c_volatile" 1>&6
20735   if test $ol_cv_c_volatile = yes; then
20736     : 
20737   else
20738     cat >> confdefs.h <<\EOF
20739 #define volatile 
20740 EOF
20741
20742   fi
20743  
20744
20745 if test $cross_compiling = yes ; then
20746         cat >> confdefs.h <<\EOF
20747 #define CROSS_COMPILING 1
20748 EOF
20749
20750 else
20751         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
20752 echo "configure:20753: checking whether byte ordering is bigendian" >&5
20753 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
20754   echo $ac_n "(cached) $ac_c" 1>&6
20755 else
20756   ac_cv_c_bigendian=unknown
20757 # See if sys/param.h defines the BYTE_ORDER macro.
20758 cat > conftest.$ac_ext <<EOF
20759 #line 20760 "configure"
20760 #include "confdefs.h"
20761 #include <sys/types.h>
20762 #include <sys/param.h>
20763 int main() {
20764
20765 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
20766  bogus endian macros
20767 #endif
20768 ; return 0; }
20769 EOF
20770 if { (eval echo configure:20771: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20771   rm -rf conftest*
20772   # It does; now see whether it defined to BIG_ENDIAN or not.
20773 cat > conftest.$ac_ext <<EOF
20774 #line 20775 "configure"
20775 #include "confdefs.h"
20776 #include <sys/types.h>
20777 #include <sys/param.h>
20778 int main() {
20779
20780 #if BYTE_ORDER != BIG_ENDIAN
20781  not big endian
20782 #endif
20783 ; return 0; }
20784 EOF
20785 if { (eval echo configure:20786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20786   rm -rf conftest*
20787   ac_cv_c_bigendian=yes
20788 else
20789   echo "configure: failed program was:" >&5
20790   cat conftest.$ac_ext >&5
20791   rm -rf conftest*
20792   ac_cv_c_bigendian=no
20793 fi
20794 rm -f conftest*
20795 else
20796   echo "configure: failed program was:" >&5
20797   cat conftest.$ac_ext >&5
20798 fi
20799 rm -f conftest*
20800 if test $ac_cv_c_bigendian = unknown; then
20801 if test "$cross_compiling" = yes; then
20802     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
20803 else
20804   cat > conftest.$ac_ext <<EOF
20805 #line 20806 "configure"
20806 #include "confdefs.h"
20807 main () {
20808   /* Are we little or big endian?  From Harbison&Steele.  */
20809   union
20810   {
20811     long l;
20812     char c[sizeof (long)];
20813   } u;
20814   u.l = 1;
20815   exit (u.c[sizeof (long) - 1] == 1);
20816 }
20817 EOF
20818 if { (eval echo configure:20819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20819 then
20820   ac_cv_c_bigendian=no
20821 else
20822   echo "configure: failed program was:" >&5
20823   cat conftest.$ac_ext >&5
20824   rm -fr conftest*
20825   ac_cv_c_bigendian=yes
20826 fi
20827 rm -fr conftest*
20828 fi
20829
20830 fi
20831 fi
20832
20833 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
20834 if test $ac_cv_c_bigendian = yes; then
20835   cat >> confdefs.h <<\EOF
20836 #define WORDS_BIGENDIAN 1
20837 EOF
20838
20839 fi
20840
20841 fi
20842
20843 echo $ac_n "checking size of short""... $ac_c" 1>&6
20844 echo "configure:20845: checking size of short" >&5 
20845 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
20846   echo $ac_n "(cached) $ac_c" 1>&6
20847 else
20848   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
20849   cat > conftest.$ac_ext <<EOF
20850 #line 20851 "configure"
20851 #include "confdefs.h"
20852 #include "confdefs.h" 
20853 #include <sys/types.h> 
20854  
20855
20856 int main() {
20857 switch (0) case 0: case (sizeof (short) == $ac_size):;
20858 ; return 0; }
20859 EOF
20860 if { (eval echo configure:20861: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20861   rm -rf conftest*
20862   ac_cv_sizeof_short=$ac_size
20863 else
20864   echo "configure: failed program was:" >&5
20865   cat conftest.$ac_ext >&5
20866 fi
20867 rm -f conftest* 
20868   if test x$ac_cv_sizeof_short != x ; then break; fi 
20869 done 
20870
20871 fi
20872  
20873 if test x$ac_cv_sizeof_short = x ; then 
20874   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
20875 fi 
20876 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
20877 cat >> confdefs.h <<EOF
20878 #define SIZEOF_SHORT $ac_cv_sizeof_short
20879 EOF
20880  
20881  
20882 echo $ac_n "checking size of int""... $ac_c" 1>&6
20883 echo "configure:20884: checking size of int" >&5 
20884 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
20885   echo $ac_n "(cached) $ac_c" 1>&6
20886 else
20887   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
20888   cat > conftest.$ac_ext <<EOF
20889 #line 20890 "configure"
20890 #include "confdefs.h"
20891 #include "confdefs.h" 
20892 #include <sys/types.h> 
20893  
20894
20895 int main() {
20896 switch (0) case 0: case (sizeof (int) == $ac_size):;
20897 ; return 0; }
20898 EOF
20899 if { (eval echo configure:20900: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20900   rm -rf conftest*
20901   ac_cv_sizeof_int=$ac_size
20902 else
20903   echo "configure: failed program was:" >&5
20904   cat conftest.$ac_ext >&5
20905 fi
20906 rm -f conftest* 
20907   if test x$ac_cv_sizeof_int != x ; then break; fi 
20908 done 
20909
20910 fi
20911  
20912 if test x$ac_cv_sizeof_int = x ; then 
20913   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
20914 fi 
20915 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
20916 cat >> confdefs.h <<EOF
20917 #define SIZEOF_INT $ac_cv_sizeof_int
20918 EOF
20919  
20920  
20921 echo $ac_n "checking size of long""... $ac_c" 1>&6
20922 echo "configure:20923: checking size of long" >&5 
20923 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
20924   echo $ac_n "(cached) $ac_c" 1>&6
20925 else
20926   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
20927   cat > conftest.$ac_ext <<EOF
20928 #line 20929 "configure"
20929 #include "confdefs.h"
20930 #include "confdefs.h" 
20931 #include <sys/types.h> 
20932  
20933
20934 int main() {
20935 switch (0) case 0: case (sizeof (long) == $ac_size):;
20936 ; return 0; }
20937 EOF
20938 if { (eval echo configure:20939: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20939   rm -rf conftest*
20940   ac_cv_sizeof_long=$ac_size
20941 else
20942   echo "configure: failed program was:" >&5
20943   cat conftest.$ac_ext >&5
20944 fi
20945 rm -f conftest* 
20946   if test x$ac_cv_sizeof_long != x ; then break; fi 
20947 done 
20948
20949 fi
20950  
20951 if test x$ac_cv_sizeof_long = x ; then 
20952   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
20953 fi 
20954 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
20955 cat >> confdefs.h <<EOF
20956 #define SIZEOF_LONG $ac_cv_sizeof_long
20957 EOF
20958  
20959
20960
20961 if test "$ac_cv_sizeof_int" -lt 4 ; then
20962         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
20963
20964         cat >> confdefs.h <<\EOF
20965 #define LBER_INT_T long
20966 EOF
20967
20968 else
20969         cat >> confdefs.h <<\EOF
20970 #define LBER_INT_T int
20971 EOF
20972
20973 fi
20974
20975 cat >> confdefs.h <<\EOF
20976 #define LBER_LEN_T long
20977 EOF
20978
20979 cat >> confdefs.h <<\EOF
20980 #define LBER_SOCKET_T int
20981 EOF
20982
20983 cat >> confdefs.h <<\EOF
20984 #define LBER_TAG_T long
20985 EOF
20986
20987
20988 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
20989 echo "configure:20990: checking for 8-bit clean memcmp" >&5
20990 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
20991   echo $ac_n "(cached) $ac_c" 1>&6
20992 else
20993   if test "$cross_compiling" = yes; then
20994   ac_cv_func_memcmp_clean=no
20995 else
20996   cat > conftest.$ac_ext <<EOF
20997 #line 20998 "configure"
20998 #include "confdefs.h"
20999
21000 main()
21001 {
21002   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
21003   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
21004 }
21005
21006 EOF
21007 if { (eval echo configure:21008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21008 then
21009   ac_cv_func_memcmp_clean=yes
21010 else
21011   echo "configure: failed program was:" >&5
21012   cat conftest.$ac_ext >&5
21013   rm -fr conftest*
21014   ac_cv_func_memcmp_clean=no
21015 fi
21016 rm -fr conftest*
21017 fi
21018
21019 fi
21020
21021 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
21022 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
21023
21024 echo $ac_n "checking for strftime""... $ac_c" 1>&6
21025 echo "configure:21026: checking for strftime" >&5
21026 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
21027   echo $ac_n "(cached) $ac_c" 1>&6
21028 else
21029   cat > conftest.$ac_ext <<EOF
21030 #line 21031 "configure"
21031 #include "confdefs.h"
21032 /* System header to define __stub macros and hopefully few prototypes,
21033     which can conflict with char strftime(); below.  */
21034 #include <assert.h>
21035 /* Override any gcc2 internal prototype to avoid an error.  */
21036 /* We use char because int might match the return type of a gcc2
21037     builtin and then its argument prototype would still apply.  */
21038 char strftime();
21039 char (*f)();
21040
21041 int main() {
21042
21043 /* The GNU C library defines this for functions which it implements
21044     to always fail with ENOSYS.  Some functions are actually named
21045     something starting with __ and the normal name is an alias.  */
21046 #if defined (__stub_strftime) || defined (__stub___strftime)
21047 choke me
21048 #else
21049 f = strftime;
21050 #endif
21051
21052 ; return 0; }
21053 EOF
21054 if { (eval echo configure:21055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21055   rm -rf conftest*
21056   eval "ac_cv_func_strftime=yes"
21057 else
21058   echo "configure: failed program was:" >&5
21059   cat conftest.$ac_ext >&5
21060   rm -rf conftest*
21061   eval "ac_cv_func_strftime=no"
21062 fi
21063 rm -f conftest*
21064 fi
21065
21066 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
21067   echo "$ac_t""yes" 1>&6
21068   cat >> confdefs.h <<\EOF
21069 #define HAVE_STRFTIME 1
21070 EOF
21071
21072 else
21073   echo "$ac_t""no" 1>&6
21074 # strftime is in -lintl on SCO UNIX.
21075 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
21076 echo "configure:21077: checking for strftime in -lintl" >&5
21077 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
21078 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21079   echo $ac_n "(cached) $ac_c" 1>&6
21080 else
21081   ac_save_LIBS="$LIBS"
21082 LIBS="-lintl  $LIBS"
21083 cat > conftest.$ac_ext <<EOF
21084 #line 21085 "configure"
21085 #include "confdefs.h"
21086 /* Override any gcc2 internal prototype to avoid an error.  */
21087 /* We use char because int might match the return type of a gcc2
21088     builtin and then its argument prototype would still apply.  */
21089 char strftime();
21090
21091 int main() {
21092 strftime()
21093 ; return 0; }
21094 EOF
21095 if { (eval echo configure:21096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21096   rm -rf conftest*
21097   eval "ac_cv_lib_$ac_lib_var=yes"
21098 else
21099   echo "configure: failed program was:" >&5
21100   cat conftest.$ac_ext >&5
21101   rm -rf conftest*
21102   eval "ac_cv_lib_$ac_lib_var=no"
21103 fi
21104 rm -f conftest*
21105 LIBS="$ac_save_LIBS"
21106
21107 fi
21108 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21109   echo "$ac_t""yes" 1>&6
21110   cat >> confdefs.h <<\EOF
21111 #define HAVE_STRFTIME 1
21112 EOF
21113
21114 LIBS="-lintl $LIBS"
21115 else
21116   echo "$ac_t""no" 1>&6
21117 fi
21118
21119 fi
21120
21121
21122 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
21123 echo "configure:21124: checking for inet_aton()" >&5
21124 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
21125   echo $ac_n "(cached) $ac_c" 1>&6
21126 else
21127   cat > conftest.$ac_ext <<EOF
21128 #line 21129 "configure"
21129 #include "confdefs.h"
21130
21131 #ifdef HAVE_SYS_TYPES_H
21132 #       include <sys/types.h>
21133 #endif
21134 #ifdef HAVE_SYS_SOCKET_H
21135 #       include <sys/socket.h>
21136 #       ifdef HAVE_SYS_SELECT_H
21137 #               include <sys/select.h>
21138 #       endif
21139 #       include <netinet/in.h>
21140 #       ifdef HAVE_ARPA_INET_H
21141 #               include <arpa/inet.h>
21142 #       endif
21143 #endif
21144
21145 int main() {
21146 struct in_addr in;
21147 int rc = inet_aton( "255.255.255.255", &in );
21148 ; return 0; }
21149 EOF
21150 if { (eval echo configure:21151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21151   rm -rf conftest*
21152   ol_cv_func_inet_aton=yes
21153 else
21154   echo "configure: failed program was:" >&5
21155   cat conftest.$ac_ext >&5
21156   rm -rf conftest*
21157   ol_cv_func_inet_aton=no
21158 fi
21159 rm -f conftest*
21160 fi
21161
21162 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
21163   if test $ol_cv_func_inet_aton != no; then
21164     cat >> confdefs.h <<\EOF
21165 #define HAVE_INET_ATON 1
21166 EOF
21167
21168   fi
21169  
21170
21171 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
21172 echo "configure:21173: checking for _spawnlp" >&5
21173 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
21174   echo $ac_n "(cached) $ac_c" 1>&6
21175 else
21176   cat > conftest.$ac_ext <<EOF
21177 #line 21178 "configure"
21178 #include "confdefs.h"
21179 /* System header to define __stub macros and hopefully few prototypes,
21180     which can conflict with char _spawnlp(); below.  */
21181 #include <assert.h>
21182 /* Override any gcc2 internal prototype to avoid an error.  */
21183 /* We use char because int might match the return type of a gcc2
21184     builtin and then its argument prototype would still apply.  */
21185 char _spawnlp();
21186 char (*f)();
21187
21188 int main() {
21189
21190 /* The GNU C library defines this for functions which it implements
21191     to always fail with ENOSYS.  Some functions are actually named
21192     something starting with __ and the normal name is an alias.  */
21193 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
21194 choke me
21195 #else
21196 f = _spawnlp;
21197 #endif
21198
21199 ; return 0; }
21200 EOF
21201 if { (eval echo configure:21202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21202   rm -rf conftest*
21203   eval "ac_cv_func__spawnlp=yes"
21204 else
21205   echo "configure: failed program was:" >&5
21206   cat conftest.$ac_ext >&5
21207   rm -rf conftest*
21208   eval "ac_cv_func__spawnlp=no"
21209 fi
21210 rm -f conftest*
21211 fi
21212
21213 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
21214   echo "$ac_t""yes" 1>&6
21215   cat >> confdefs.h <<\EOF
21216 #define HAVE_SPAWNLP 1
21217 EOF
21218
21219 else
21220   echo "$ac_t""no" 1>&6
21221 fi
21222
21223
21224 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
21225 echo "configure:21226: checking for _snprintf" >&5
21226 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
21227   echo $ac_n "(cached) $ac_c" 1>&6
21228 else
21229   cat > conftest.$ac_ext <<EOF
21230 #line 21231 "configure"
21231 #include "confdefs.h"
21232 /* System header to define __stub macros and hopefully few prototypes,
21233     which can conflict with char _snprintf(); below.  */
21234 #include <assert.h>
21235 /* Override any gcc2 internal prototype to avoid an error.  */
21236 /* We use char because int might match the return type of a gcc2
21237     builtin and then its argument prototype would still apply.  */
21238 char _snprintf();
21239 char (*f)();
21240
21241 int main() {
21242
21243 /* The GNU C library defines this for functions which it implements
21244     to always fail with ENOSYS.  Some functions are actually named
21245     something starting with __ and the normal name is an alias.  */
21246 #if defined (__stub__snprintf) || defined (__stub____snprintf)
21247 choke me
21248 #else
21249 f = _snprintf;
21250 #endif
21251
21252 ; return 0; }
21253 EOF
21254 if { (eval echo configure:21255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21255   rm -rf conftest*
21256   eval "ac_cv_func__snprintf=yes"
21257 else
21258   echo "configure: failed program was:" >&5
21259   cat conftest.$ac_ext >&5
21260   rm -rf conftest*
21261   eval "ac_cv_func__snprintf=no"
21262 fi
21263 rm -f conftest*
21264 fi
21265
21266 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
21267   echo "$ac_t""yes" 1>&6
21268   ac_cv_func_snprintf=yes
21269         cat >> confdefs.h <<\EOF
21270 #define snprintf _snprintf
21271 EOF
21272
21273
21274 else
21275   echo "$ac_t""no" 1>&6
21276 fi
21277
21278
21279 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
21280 echo "configure:21281: checking for _vsnprintf" >&5
21281 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
21282   echo $ac_n "(cached) $ac_c" 1>&6
21283 else
21284   cat > conftest.$ac_ext <<EOF
21285 #line 21286 "configure"
21286 #include "confdefs.h"
21287 /* System header to define __stub macros and hopefully few prototypes,
21288     which can conflict with char _vsnprintf(); below.  */
21289 #include <assert.h>
21290 /* Override any gcc2 internal prototype to avoid an error.  */
21291 /* We use char because int might match the return type of a gcc2
21292     builtin and then its argument prototype would still apply.  */
21293 char _vsnprintf();
21294 char (*f)();
21295
21296 int main() {
21297
21298 /* The GNU C library defines this for functions which it implements
21299     to always fail with ENOSYS.  Some functions are actually named
21300     something starting with __ and the normal name is an alias.  */
21301 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
21302 choke me
21303 #else
21304 f = _vsnprintf;
21305 #endif
21306
21307 ; return 0; }
21308 EOF
21309 if { (eval echo configure:21310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21310   rm -rf conftest*
21311   eval "ac_cv_func__vsnprintf=yes"
21312 else
21313   echo "configure: failed program was:" >&5
21314   cat conftest.$ac_ext >&5
21315   rm -rf conftest*
21316   eval "ac_cv_func__vsnprintf=no"
21317 fi
21318 rm -f conftest*
21319 fi
21320
21321 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
21322   echo "$ac_t""yes" 1>&6
21323   ac_cv_func_vsnprintf=yes
21324         cat >> confdefs.h <<\EOF
21325 #define vsnprintf _vsnprintf
21326 EOF
21327
21328
21329 else
21330   echo "$ac_t""no" 1>&6
21331 fi
21332
21333
21334 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
21335 echo "configure:21336: checking for vprintf" >&5
21336 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
21337   echo $ac_n "(cached) $ac_c" 1>&6
21338 else
21339   cat > conftest.$ac_ext <<EOF
21340 #line 21341 "configure"
21341 #include "confdefs.h"
21342 /* System header to define __stub macros and hopefully few prototypes,
21343     which can conflict with char vprintf(); below.  */
21344 #include <assert.h>
21345 /* Override any gcc2 internal prototype to avoid an error.  */
21346 /* We use char because int might match the return type of a gcc2
21347     builtin and then its argument prototype would still apply.  */
21348 char vprintf();
21349 char (*f)();
21350
21351 int main() {
21352
21353 /* The GNU C library defines this for functions which it implements
21354     to always fail with ENOSYS.  Some functions are actually named
21355     something starting with __ and the normal name is an alias.  */
21356 #if defined (__stub_vprintf) || defined (__stub___vprintf)
21357 choke me
21358 #else
21359 f = vprintf;
21360 #endif
21361
21362 ; return 0; }
21363 EOF
21364 if { (eval echo configure:21365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21365   rm -rf conftest*
21366   eval "ac_cv_func_vprintf=yes"
21367 else
21368   echo "configure: failed program was:" >&5
21369   cat conftest.$ac_ext >&5
21370   rm -rf conftest*
21371   eval "ac_cv_func_vprintf=no"
21372 fi
21373 rm -f conftest*
21374 fi
21375
21376 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
21377   echo "$ac_t""yes" 1>&6
21378   cat >> confdefs.h <<\EOF
21379 #define HAVE_VPRINTF 1
21380 EOF
21381
21382 else
21383   echo "$ac_t""no" 1>&6
21384 fi
21385
21386 if test "$ac_cv_func_vprintf" != yes; then
21387 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
21388 echo "configure:21389: checking for _doprnt" >&5
21389 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
21390   echo $ac_n "(cached) $ac_c" 1>&6
21391 else
21392   cat > conftest.$ac_ext <<EOF
21393 #line 21394 "configure"
21394 #include "confdefs.h"
21395 /* System header to define __stub macros and hopefully few prototypes,
21396     which can conflict with char _doprnt(); below.  */
21397 #include <assert.h>
21398 /* Override any gcc2 internal prototype to avoid an error.  */
21399 /* We use char because int might match the return type of a gcc2
21400     builtin and then its argument prototype would still apply.  */
21401 char _doprnt();
21402 char (*f)();
21403
21404 int main() {
21405
21406 /* The GNU C library defines this for functions which it implements
21407     to always fail with ENOSYS.  Some functions are actually named
21408     something starting with __ and the normal name is an alias.  */
21409 #if defined (__stub__doprnt) || defined (__stub____doprnt)
21410 choke me
21411 #else
21412 f = _doprnt;
21413 #endif
21414
21415 ; return 0; }
21416 EOF
21417 if { (eval echo configure:21418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21418   rm -rf conftest*
21419   eval "ac_cv_func__doprnt=yes"
21420 else
21421   echo "configure: failed program was:" >&5
21422   cat conftest.$ac_ext >&5
21423   rm -rf conftest*
21424   eval "ac_cv_func__doprnt=no"
21425 fi
21426 rm -f conftest*
21427 fi
21428
21429 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
21430   echo "$ac_t""yes" 1>&6
21431   cat >> confdefs.h <<\EOF
21432 #define HAVE_DOPRNT 1
21433 EOF
21434
21435 else
21436   echo "$ac_t""no" 1>&6
21437 fi
21438
21439 fi
21440
21441
21442 if test $ac_cv_func_vprintf = yes ; then
21443                 for ac_func in vsnprintf vsprintf
21444 do
21445 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
21446 echo "configure:21447: checking for $ac_func" >&5
21447 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
21448   echo $ac_n "(cached) $ac_c" 1>&6
21449 else
21450   cat > conftest.$ac_ext <<EOF
21451 #line 21452 "configure"
21452 #include "confdefs.h"
21453 /* System header to define __stub macros and hopefully few prototypes,
21454     which can conflict with char $ac_func(); below.  */
21455 #include <assert.h>
21456 /* Override any gcc2 internal prototype to avoid an error.  */
21457 /* We use char because int might match the return type of a gcc2
21458     builtin and then its argument prototype would still apply.  */
21459 char $ac_func();
21460 char (*f)();
21461
21462 int main() {
21463
21464 /* The GNU C library defines this for functions which it implements
21465     to always fail with ENOSYS.  Some functions are actually named
21466     something starting with __ and the normal name is an alias.  */
21467 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21468 choke me
21469 #else
21470 f = $ac_func;
21471 #endif
21472
21473 ; return 0; }
21474 EOF
21475 if { (eval echo configure:21476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21476   rm -rf conftest*
21477   eval "ac_cv_func_$ac_func=yes"
21478 else
21479   echo "configure: failed program was:" >&5
21480   cat conftest.$ac_ext >&5
21481   rm -rf conftest*
21482   eval "ac_cv_func_$ac_func=no"
21483 fi
21484 rm -f conftest*
21485 fi
21486
21487 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
21488   echo "$ac_t""yes" 1>&6
21489     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
21490   cat >> confdefs.h <<EOF
21491 #define $ac_tr_func 1
21492 EOF
21493  
21494 else
21495   echo "$ac_t""no" 1>&6
21496 fi
21497 done
21498
21499 fi
21500
21501 for ac_func in \
21502         bcopy                   \
21503         closesocket             \
21504         chroot                  \
21505         endgrent                \
21506         endpwent                \
21507         fcntl                   \
21508         flock                   \
21509         getdtablesize   \
21510         getgrgid                \
21511         gethostname             \
21512         getpass                 \
21513         getpassphrase   \
21514         getpwuid                \
21515         getpwnam                \
21516         getspnam                \
21517         gettimeofday    \
21518         initgroups              \
21519         lockf                   \
21520         memcpy                  \
21521         memmove                 \
21522         mkstemp                 \
21523         mktemp                  \
21524         pipe                    \
21525         read                    \
21526         recv                    \
21527         recvfrom                \
21528         setpwfile               \
21529         setgid                  \
21530         setegid                 \
21531         setsid                  \
21532         setuid                  \
21533         seteuid                 \
21534         sigaction               \
21535         signal                  \
21536         sigset                  \
21537         strdup                  \
21538         strerror                \
21539         strpbrk                 \
21540         strrchr                 \
21541         strsep                  \
21542         strstr                  \
21543         strtol                  \
21544         strtoul                 \
21545         strspn                  \
21546         sysconf                 \
21547         usleep                  \
21548         waitpid                 \
21549         wait4                   \
21550         write                   \
21551         send                    \
21552         sendto                  \
21553
21554 do
21555 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
21556 echo "configure:21557: checking for $ac_func" >&5
21557 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
21558   echo $ac_n "(cached) $ac_c" 1>&6
21559 else
21560   cat > conftest.$ac_ext <<EOF
21561 #line 21562 "configure"
21562 #include "confdefs.h"
21563 /* System header to define __stub macros and hopefully few prototypes,
21564     which can conflict with char $ac_func(); below.  */
21565 #include <assert.h>
21566 /* Override any gcc2 internal prototype to avoid an error.  */
21567 /* We use char because int might match the return type of a gcc2
21568     builtin and then its argument prototype would still apply.  */
21569 char $ac_func();
21570 char (*f)();
21571
21572 int main() {
21573
21574 /* The GNU C library defines this for functions which it implements
21575     to always fail with ENOSYS.  Some functions are actually named
21576     something starting with __ and the normal name is an alias.  */
21577 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21578 choke me
21579 #else
21580 f = $ac_func;
21581 #endif
21582
21583 ; return 0; }
21584 EOF
21585 if { (eval echo configure:21586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21586   rm -rf conftest*
21587   eval "ac_cv_func_$ac_func=yes"
21588 else
21589   echo "configure: failed program was:" >&5
21590   cat conftest.$ac_ext >&5
21591   rm -rf conftest*
21592   eval "ac_cv_func_$ac_func=no"
21593 fi
21594 rm -f conftest*
21595 fi
21596
21597 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
21598   echo "$ac_t""yes" 1>&6
21599     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
21600   cat >> confdefs.h <<EOF
21601 #define $ac_tr_func 1
21602 EOF
21603  
21604 else
21605   echo "$ac_t""no" 1>&6
21606 fi
21607 done
21608
21609
21610 for ac_func in getopt
21611 do
21612 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
21613 echo "configure:21614: checking for $ac_func" >&5
21614 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
21615   echo $ac_n "(cached) $ac_c" 1>&6
21616 else
21617   cat > conftest.$ac_ext <<EOF
21618 #line 21619 "configure"
21619 #include "confdefs.h"
21620 /* System header to define __stub macros and hopefully few prototypes,
21621     which can conflict with char $ac_func(); below.  */
21622 #include <assert.h>
21623 /* Override any gcc2 internal prototype to avoid an error.  */
21624 /* We use char because int might match the return type of a gcc2
21625     builtin and then its argument prototype would still apply.  */
21626 char $ac_func();
21627 char (*f)();
21628
21629 int main() {
21630
21631 /* The GNU C library defines this for functions which it implements
21632     to always fail with ENOSYS.  Some functions are actually named
21633     something starting with __ and the normal name is an alias.  */
21634 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21635 choke me
21636 #else
21637 f = $ac_func;
21638 #endif
21639
21640 ; return 0; }
21641 EOF
21642 if { (eval echo configure:21643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21643   rm -rf conftest*
21644   eval "ac_cv_func_$ac_func=yes"
21645 else
21646   echo "configure: failed program was:" >&5
21647   cat conftest.$ac_ext >&5
21648   rm -rf conftest*
21649   eval "ac_cv_func_$ac_func=no"
21650 fi
21651 rm -f conftest*
21652 fi
21653
21654 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
21655   echo "$ac_t""yes" 1>&6
21656     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
21657   cat >> confdefs.h <<EOF
21658 #define $ac_tr_func 1
21659 EOF
21660  
21661 else
21662   echo "$ac_t""no" 1>&6
21663 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
21664 fi
21665 done
21666
21667
21668
21669 if test "$ac_cv_func_getopt" != yes; then
21670         LIBSRCS="$LIBSRCS getopt.c"
21671 fi
21672
21673 # Check Configuration
21674 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
21675 echo "configure:21676: checking declaration of sys_errlist" >&5
21676 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
21677   echo $ac_n "(cached) $ac_c" 1>&6
21678 else
21679   
21680         cat > conftest.$ac_ext <<EOF
21681 #line 21682 "configure"
21682 #include "confdefs.h"
21683
21684 #include <stdio.h>
21685 #include <sys/types.h>
21686 #include <errno.h>
21687 #ifdef WINNT
21688 #include <stdlib.h>
21689 #endif 
21690 int main() {
21691 char *c = (char *) *sys_errlist
21692 ; return 0; }
21693 EOF
21694 if { (eval echo configure:21695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21695   rm -rf conftest*
21696   ol_cv_dcl_sys_errlist=yes
21697         ol_cv_have_sys_errlist=yes
21698 else
21699   echo "configure: failed program was:" >&5
21700   cat conftest.$ac_ext >&5
21701   rm -rf conftest*
21702   ol_cv_dcl_sys_errlist=no
21703 fi
21704 rm -f conftest*
21705 fi
21706
21707 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
21708 #
21709 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
21710 if test $ol_cv_dcl_sys_errlist = no ; then
21711         cat >> confdefs.h <<\EOF
21712 #define DECL_SYS_ERRLIST 1
21713 EOF
21714
21715
21716         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
21717 echo "configure:21718: checking existence of sys_errlist" >&5
21718 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
21719   echo $ac_n "(cached) $ac_c" 1>&6
21720 else
21721   
21722                 cat > conftest.$ac_ext <<EOF
21723 #line 21724 "configure"
21724 #include "confdefs.h"
21725 #include <errno.h>
21726 int main() {
21727 char *c = (char *) *sys_errlist
21728 ; return 0; }
21729 EOF
21730 if { (eval echo configure:21731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21731   rm -rf conftest*
21732   ol_cv_have_sys_errlist=yes
21733 else
21734   echo "configure: failed program was:" >&5
21735   cat conftest.$ac_ext >&5
21736   rm -rf conftest*
21737   ol_cv_have_sys_errlist=no
21738 fi
21739 rm -f conftest*
21740 fi
21741
21742 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
21743 fi
21744 if test $ol_cv_have_sys_errlist = yes ; then
21745         cat >> confdefs.h <<\EOF
21746 #define HAVE_SYS_ERRLIST 1
21747 EOF
21748
21749 fi
21750
21751
21752
21753 if test "$ol_enable_debug" != no ; then
21754         cat >> confdefs.h <<\EOF
21755 #define LDAP_DEBUG 1
21756 EOF
21757
21758 fi
21759 if test "$ol_enable_syslog" = yes ; then
21760         cat >> confdefs.h <<\EOF
21761 #define LDAP_SYSLOG 1
21762 EOF
21763
21764 fi
21765 if test "$ol_enable_cache" = no ; then
21766         cat >> confdefs.h <<\EOF
21767 #define LDAP_NOCACHE 1
21768 EOF
21769
21770 fi
21771 if test "$ol_link_kbind" != no ; then
21772         cat >> confdefs.h <<\EOF
21773 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
21774 EOF
21775
21776 fi
21777 if test "$ol_enable_proctitle" != no ; then
21778         cat >> confdefs.h <<\EOF
21779 #define LDAP_PROCTITLE 1
21780 EOF
21781
21782 fi
21783 if test "$ol_enable_referrals" != no ; then
21784         cat >> confdefs.h <<\EOF
21785 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
21786 EOF
21787
21788 fi
21789 if test "$ol_enable_local" != no; then
21790         cat >> confdefs.h <<\EOF
21791 #define LDAP_PF_LOCAL 1
21792 EOF
21793
21794 fi
21795 if test "$ol_link_ipv6" != no; then
21796         cat >> confdefs.h <<\EOF
21797 #define LDAP_PF_INET6 1
21798 EOF
21799
21800 fi
21801 if test "$ol_enable_cleartext" != no ; then
21802         cat >> confdefs.h <<\EOF
21803 #define SLAPD_CLEARTEXT 1
21804 EOF
21805
21806 fi
21807 if test "$ol_enable_crypt" != no ; then
21808         cat >> confdefs.h <<\EOF
21809 #define SLAPD_CRYPT 1
21810 EOF
21811
21812 fi
21813 if test "$ol_link_kpasswd" != no ; then
21814         cat >> confdefs.h <<\EOF
21815 #define SLAPD_KPASSWD 1
21816 EOF
21817
21818 fi
21819 if test "$ol_link_spasswd" != no ; then
21820         cat >> confdefs.h <<\EOF
21821 #define SLAPD_SPASSWD 1
21822 EOF
21823
21824 fi
21825 if test "$ol_enable_phonetic" != no ; then
21826         cat >> confdefs.h <<\EOF
21827 #define SLAPD_PHONETIC 1
21828 EOF
21829
21830 fi
21831 if test "$ol_enable_rlookups" != no ; then
21832         cat >> confdefs.h <<\EOF
21833 #define SLAPD_RLOOKUPS 1
21834 EOF
21835
21836 fi
21837 if test "$ol_enable_aci" != no ; then
21838         cat >> confdefs.h <<\EOF
21839 #define SLAPD_ACI_ENABLED 1
21840 EOF
21841
21842 fi
21843
21844 if test "$ol_link_modules" != no ; then
21845         cat >> confdefs.h <<\EOF
21846 #define SLAPD_MODULES 1
21847 EOF
21848
21849         BUILD_SLAPD=yes
21850         SLAPD_MODULES_LDFLAGS="-dlopen self"
21851 fi
21852
21853 if test "$ol_enable_bdb" != no ; then
21854         cat >> confdefs.h <<\EOF
21855 #define SLAPD_BDB 1
21856 EOF
21857
21858         BUILD_SLAPD=yes
21859         BUILD_BDB=yes
21860         if test "$ol_with_bdb_module" != static ; then
21861                 cat >> confdefs.h <<\EOF
21862 #define SLAPD_BDB_DYNAMIC 1
21863 EOF
21864
21865                 BUILD_BDB=mod
21866                 BUILD_BDB_DYNAMIC=shared
21867                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb/back_bdb.la"
21868                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
21869         else
21870                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
21871         fi
21872 fi
21873
21874 if test "$ol_link_dnssrv" != no ; then
21875         cat >> confdefs.h <<\EOF
21876 #define SLAPD_DNSSRV 1
21877 EOF
21878
21879         BUILD_SLAPD=yes
21880         BUILD_DNSSRV=yes
21881         if test "$ol_with_dnssrv_module" != static ; then
21882                 cat >> confdefs.h <<\EOF
21883 #define SLAPD_DNSSRV_DYNAMIC 1
21884 EOF
21885
21886                 BUILD_DNSSRV=mod
21887                 BUILD_DNSSRV_DYNAMIC=shared
21888                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
21889                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
21890         else
21891                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
21892         fi
21893 fi
21894
21895 if test "$ol_enable_ldap" != no ; then
21896         cat >> confdefs.h <<\EOF
21897 #define SLAPD_LDAP 1
21898 EOF
21899
21900         BUILD_SLAPD=yes
21901         BUILD_LDAP=yes
21902         if test "$ol_with_ldap_module" != static ; then
21903                 cat >> confdefs.h <<\EOF
21904 #define SLAPD_LDAP_DYNAMIC 1
21905 EOF
21906
21907                 BUILD_LDAP=mod
21908                 BUILD_LDAP_DYNAMIC=shared
21909                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
21910                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
21911         else
21912                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
21913         fi
21914 fi
21915
21916 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
21917         cat >> confdefs.h <<\EOF
21918 #define SLAPD_LDBM 1
21919 EOF
21920
21921         BUILD_SLAPD=yes
21922         BUILD_LDBM=yes
21923         LDBM_LIB="-lldbm"
21924         if test "$ol_with_ldbm_module" != static ; then
21925                 cat >> confdefs.h <<\EOF
21926 #define SLAPD_LDBM_DYNAMIC 1
21927 EOF
21928
21929                 BUILD_LDBM=mod
21930                 BUILD_LDBM_DYNAMIC=shared
21931                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
21932                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
21933         else
21934                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
21935         fi
21936 fi
21937
21938 if test "$ol_enable_meta" != no ; then
21939         if test "$ol_enable_ldap" = no ; then
21940                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
21941         fi
21942         if test "$ol_enable_rewrite" = no ; then
21943                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
21944         fi
21945         cat >> confdefs.h <<\EOF
21946 #define SLAPD_META 1
21947 EOF
21948
21949         BUILD_SLAPD=yes
21950         BUILD_META=yes
21951         if test "$ol_with_meta_module" != static ; then
21952                 cat >> confdefs.h <<\EOF
21953 #define SLAPD_META_DYNAMIC 1
21954 EOF
21955
21956                 BUILD_META=mod
21957                 BUILD_META_DYNAMIC=shared
21958                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-meta/back_meta.la"
21959                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
21960         else
21961                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
21962         fi
21963 fi
21964
21965 if test "$ol_enable_monitor" != no ; then
21966         cat >> confdefs.h <<\EOF
21967 #define SLAPD_MONITOR 1
21968 EOF
21969
21970         BUILD_SLAPD=yes
21971         BUILD_MONITOR=yes
21972         if test "$ol_with_monitor_module" != static ; then
21973                 cat >> confdefs.h <<\EOF
21974 #define SLAPD_MONITOR_DYNAMIC 1
21975 EOF
21976
21977                 BUILD_MONITOR=mod
21978                 BUILD_MONITOR_DYNAMIC=shared
21979                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-monitor/back_monitor.la"
21980                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
21981         else
21982                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
21983         fi
21984 fi
21985
21986 if test "$ol_enable_passwd" != no ; then
21987         cat >> confdefs.h <<\EOF
21988 #define SLAPD_PASSWD 1
21989 EOF
21990
21991         BUILD_SLAPD=yes
21992         BUILD_PASSWD=yes
21993         if test "$ol_with_passwd_module" != static ; then
21994                 cat >> confdefs.h <<\EOF
21995 #define SLAPD_PASSWD_DYNAMIC 1
21996 EOF
21997
21998                 BUILD_PASSWD=mod
21999                 BUILD_PASSWD_DYNAMIC=shared
22000                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
22001                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
22002         else
22003                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
22004         fi
22005 fi
22006
22007 if test "$ol_link_perl" != no ; then
22008         cat >> confdefs.h <<\EOF
22009 #define SLAPD_PERL 1
22010 EOF
22011
22012         BUILD_SLAPD=yes
22013         BUILD_PERL=yes
22014         if test "$ol_with_perl_module" != static ; then
22015                 cat >> confdefs.h <<\EOF
22016 #define SLAPD_PERL_DYNAMIC 1
22017 EOF
22018
22019                 BUILD_PERL=mod
22020                 BUILD_PERL_DYNAMIC=shared
22021                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
22022                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
22023         else
22024                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
22025         fi
22026 fi
22027
22028 if test "$ol_enable_shell" != no ; then
22029         cat >> confdefs.h <<\EOF
22030 #define SLAPD_SHELL 1
22031 EOF
22032
22033         BUILD_SLAPD=yes
22034         BUILD_SHELL=yes
22035         if test "$ol_with_shell_module" != static ; then
22036                 cat >> confdefs.h <<\EOF
22037 #define SLAPD_SHELL_DYNAMIC 1
22038 EOF
22039
22040                 BUILD_SHELL=mod
22041                 BUILD_SHELL_DYNAMIC=shared
22042                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
22043                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
22044         else
22045                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
22046         fi
22047 fi
22048
22049 if test "$ol_enable_tcl" != no ; then
22050         cat >> confdefs.h <<\EOF
22051 #define SLAPD_TCL 1
22052 EOF
22053
22054         BUILD_SLAPD=yes
22055         BUILD_TCL=yes
22056         if test "$ol_with_tcl_module" != static; then
22057                 cat >> confdefs.h <<\EOF
22058 #define SLAPD_TCL_DYNAMIC 1
22059 EOF
22060
22061                 BUILD_TCL=mod
22062                 BUILD_TCL_DYNAMIC=shared
22063                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
22064                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-tcl"
22065         else
22066                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-tcl"
22067         fi
22068 fi
22069
22070 if test "$ol_link_sql" != no ; then
22071         cat >> confdefs.h <<\EOF
22072 #define SLAPD_SQL 1
22073 EOF
22074
22075         BUILD_SLAPD=yes
22076         BUILD_SQL=yes
22077         if test "$ol_with_sql_module" != static; then
22078                 cat >> confdefs.h <<\EOF
22079 #define SLAPD_SQL_DYNAMIC 1
22080 EOF
22081
22082                 BUILD_SQL=mod
22083                 BUILD_SQL_DYNAMIC=shared
22084                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
22085                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
22086         else
22087                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
22088         fi
22089 fi
22090
22091 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
22092         $BUILD_SLAPD = yes ; then
22093         BUILD_SLURPD=yes
22094 fi
22095
22096 if test "$ol_enable_rewrite" != no ; then
22097         cat >> confdefs.h <<\EOF
22098 #define ENABLE_REWRITE 1
22099 EOF
22100
22101         BUILD_REWRITE=yes
22102         SLAPD_LIBS="$SLAPD_LIBS -lrewrite"
22103 fi
22104
22105
22106
22107 if test "$ac_cv_mingw32" = yes ; then
22108         PLAT=NT
22109         SLAPD_MODULES_LDFLAGS=
22110         SLAPD_MODULES_LIST=
22111 else
22112         PLAT=UNIX
22113 fi
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
22171
22172
22173
22174
22175
22176
22177
22178
22179
22180
22181
22182
22183 trap '' 1 2 15
22184
22185 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
22186
22187 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22188 # Let make expand exec_prefix.
22189 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22190
22191 # Any assignment to VPATH causes Sun make to only execute
22192 # the first set of double-colon rules, so remove it if not needed.
22193 # If there is a colon in the path, we need to keep it.
22194 if test "x$srcdir" = x.; then
22195   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
22196 fi
22197
22198 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
22199
22200 DEFS=-DHAVE_CONFIG_H
22201
22202 # Without the "./", some shells look in PATH for config.status.
22203 : ${CONFIG_STATUS=./config.status}
22204
22205 echo creating $CONFIG_STATUS
22206 rm -f $CONFIG_STATUS
22207 cat > $CONFIG_STATUS <<EOF
22208 #! /bin/sh
22209 # Generated automatically by configure.
22210 # Run this file to recreate the current configuration.
22211 # This directory was configured as follows,
22212 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
22213 #
22214 # $0 $ac_configure_args
22215 #
22216 # Compiler output produced by configure, useful for debugging
22217 # configure, is in ./config.log if it exists.
22218
22219 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
22220 for ac_option
22221 do
22222   case "\$ac_option" in
22223   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22224     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
22225     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
22226   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
22227     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
22228     exit 0 ;;
22229   -help | --help | --hel | --he | --h)
22230     echo "\$ac_cs_usage"; exit 0 ;;
22231   *) echo "\$ac_cs_usage"; exit 1 ;;
22232   esac
22233 done
22234
22235 ac_given_srcdir=$srcdir
22236 ac_given_INSTALL="$INSTALL"
22237
22238 trap 'rm -fr `echo "\
22239 Makefile:build/top.mk:Makefile.in:build/dir.mk \
22240 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
22241 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
22242 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
22243 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
22244 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
22245 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
22246 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
22247 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
22248 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
22249 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
22250 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
22251 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
22252 include/Makefile:build/top.mk:include/Makefile.in \
22253 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
22254 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
22255 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22256 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22257 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
22258 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
22259 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
22260 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
22261 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
22262 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
22263 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
22264 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
22265 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
22266 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
22267 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
22268 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
22269 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
22270 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
22271 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
22272 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
22273 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
22274 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
22275 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
22276 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
22277 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
22278 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
22279 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
22280 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
22281  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
22282 EOF
22283 cat >> $CONFIG_STATUS <<EOF
22284
22285 # Protect against being on the right side of a sed subst in config.status.
22286 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
22287  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
22288 $ac_vpsub
22289 $extrasub
22290 s%@SHELL@%$SHELL%g
22291 s%@CFLAGS@%$CFLAGS%g
22292 s%@CPPFLAGS@%$CPPFLAGS%g
22293 s%@CXXFLAGS@%$CXXFLAGS%g
22294 s%@FFLAGS@%$FFLAGS%g
22295 s%@DEFS@%$DEFS%g
22296 s%@LDFLAGS@%$LDFLAGS%g
22297 s%@LIBS@%$LIBS%g
22298 s%@exec_prefix@%$exec_prefix%g
22299 s%@prefix@%$prefix%g
22300 s%@program_transform_name@%$program_transform_name%g
22301 s%@bindir@%$bindir%g
22302 s%@sbindir@%$sbindir%g
22303 s%@libexecdir@%$libexecdir%g
22304 s%@datadir@%$datadir%g
22305 s%@sysconfdir@%$sysconfdir%g
22306 s%@sharedstatedir@%$sharedstatedir%g
22307 s%@localstatedir@%$localstatedir%g
22308 s%@libdir@%$libdir%g
22309 s%@includedir@%$includedir%g
22310 s%@oldincludedir@%$oldincludedir%g
22311 s%@infodir@%$infodir%g
22312 s%@mandir@%$mandir%g
22313 s%@SHTOOL@%$SHTOOL%g
22314 s%@host@%$host%g
22315 s%@host_alias@%$host_alias%g
22316 s%@host_cpu@%$host_cpu%g
22317 s%@host_vendor@%$host_vendor%g
22318 s%@host_os@%$host_os%g
22319 s%@target@%$target%g
22320 s%@target_alias@%$target_alias%g
22321 s%@target_cpu@%$target_cpu%g
22322 s%@target_vendor@%$target_vendor%g
22323 s%@target_os@%$target_os%g
22324 s%@build@%$build%g
22325 s%@build_alias@%$build_alias%g
22326 s%@build_cpu@%$build_cpu%g
22327 s%@build_vendor@%$build_vendor%g
22328 s%@build_os@%$build_os%g
22329 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
22330 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
22331 s%@INSTALL_DATA@%$INSTALL_DATA%g
22332 s%@PACKAGE@%$PACKAGE%g
22333 s%@VERSION@%$VERSION%g
22334 s%@ACLOCAL@%$ACLOCAL%g
22335 s%@AUTOCONF@%$AUTOCONF%g
22336 s%@AUTOMAKE@%$AUTOMAKE%g
22337 s%@AUTOHEADER@%$AUTOHEADER%g
22338 s%@MAKEINFO@%$MAKEINFO%g
22339 s%@install_sh@%$install_sh%g
22340 s%@AMTAR@%$AMTAR%g
22341 s%@AWK@%$AWK%g
22342 s%@AMTARFLAGS@%$AMTARFLAGS%g
22343 s%@SET_MAKE@%$SET_MAKE%g
22344 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
22345 s%@top_builddir@%$top_builddir%g
22346 s%@ldap_subdir@%$ldap_subdir%g
22347 s%@CC@%$CC%g
22348 s%@AR@%$AR%g
22349 s%@LN_S@%$LN_S%g
22350 s%@OBJEXT@%$OBJEXT%g
22351 s%@EXEEXT@%$EXEEXT%g
22352 s%@ECHO@%$ECHO%g
22353 s%@RANLIB@%$RANLIB%g
22354 s%@STRIP@%$STRIP%g
22355 s%@DLLTOOL@%$DLLTOOL%g
22356 s%@AS@%$AS%g
22357 s%@OBJDUMP@%$OBJDUMP%g
22358 s%@CPP@%$CPP%g
22359 s%@LIBTOOL@%$LIBTOOL%g
22360 s%@LN_H@%$LN_H%g
22361 s%@SENDMAIL@%$SENDMAIL%g
22362 s%@EDITOR@%$EDITOR%g
22363 s%@FINGER@%$FINGER%g
22364 s%@PERLBIN@%$PERLBIN%g
22365 s%@OL_MKDEP@%$OL_MKDEP%g
22366 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
22367 s%@LIBOBJS@%$LIBOBJS%g
22368 s%@LIBSRCS@%$LIBSRCS%g
22369 s%@PLAT@%$PLAT%g
22370 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
22371 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
22372 s%@BUILD_BDB@%$BUILD_BDB%g
22373 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
22374 s%@BUILD_LDAP@%$BUILD_LDAP%g
22375 s%@BUILD_LDBM@%$BUILD_LDBM%g
22376 s%@BUILD_META@%$BUILD_META%g
22377 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
22378 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
22379 s%@BUILD_PERL@%$BUILD_PERL%g
22380 s%@BUILD_SHELL@%$BUILD_SHELL%g
22381 s%@BUILD_SQL@%$BUILD_SQL%g
22382 s%@BUILD_TCL@%$BUILD_TCL%g
22383 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
22384 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
22385 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
22386 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
22387 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
22388 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
22389 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
22390 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
22391 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
22392 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
22393 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
22394 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
22395 s%@LDBM_LIB@%$LDBM_LIB%g
22396 s%@LDAP_LIBS@%$LDAP_LIBS%g
22397 s%@LDIF_LIBS@%$LDIF_LIBS%g
22398 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
22399 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
22400 s%@LDBM_LIBS@%$LDBM_LIBS%g
22401 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
22402 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
22403 s%@WRAP_LIBS@%$WRAP_LIBS%g
22404 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
22405 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
22406 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
22407 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
22408 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
22409 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
22410 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
22411 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
22412 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
22413 s%@KRB4_LIBS@%$KRB4_LIBS%g
22414 s%@KRB5_LIBS@%$KRB5_LIBS%g
22415 s%@READLINE_LIBS@%$READLINE_LIBS%g
22416 s%@SASL_LIBS@%$SASL_LIBS%g
22417 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
22418 s%@TLS_LIBS@%$TLS_LIBS%g
22419 s%@MODULES_LIBS@%$MODULES_LIBS%g
22420 s%@AUTH_LIBS@%$AUTH_LIBS%g
22421 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
22422 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
22423 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
22424 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
22425
22426 CEOF
22427 EOF
22428
22429 cat >> $CONFIG_STATUS <<\EOF
22430
22431 # Split the substitutions into bite-sized pieces for seds with
22432 # small command number limits, like on Digital OSF/1 and HP-UX.
22433 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
22434 ac_file=1 # Number of current file.
22435 ac_beg=1 # First line for current file.
22436 ac_end=$ac_max_sed_cmds # Line after last line for current file.
22437 ac_more_lines=:
22438 ac_sed_cmds=""
22439 while $ac_more_lines; do
22440   if test $ac_beg -gt 1; then
22441     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
22442   else
22443     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
22444   fi
22445   if test ! -s conftest.s$ac_file; then
22446     ac_more_lines=false
22447     rm -f conftest.s$ac_file
22448   else
22449     if test -z "$ac_sed_cmds"; then
22450       ac_sed_cmds="sed -f conftest.s$ac_file"
22451     else
22452       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
22453     fi
22454     ac_file=`expr $ac_file + 1`
22455     ac_beg=$ac_end
22456     ac_end=`expr $ac_end + $ac_max_sed_cmds`
22457   fi
22458 done
22459 if test -z "$ac_sed_cmds"; then
22460   ac_sed_cmds=cat
22461 fi
22462 EOF
22463
22464 cat >> $CONFIG_STATUS <<EOF
22465
22466 CONFIG_FILES=\${CONFIG_FILES-"\
22467 Makefile:build/top.mk:Makefile.in:build/dir.mk \
22468 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
22469 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
22470 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
22471 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
22472 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
22473 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
22474 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
22475 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
22476 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
22477 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
22478 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
22479 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
22480 include/Makefile:build/top.mk:include/Makefile.in \
22481 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
22482 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
22483 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22484 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22485 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
22486 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
22487 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
22488 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
22489 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
22490 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
22491 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
22492 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
22493 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
22494 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
22495 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
22496 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
22497 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
22498 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
22499 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
22500 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
22501 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
22502 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
22503 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
22504 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
22505 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
22506 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
22507 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
22508 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
22509 "}
22510 EOF
22511 cat >> $CONFIG_STATUS <<\EOF
22512 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
22513   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22514   case "$ac_file" in
22515   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
22516        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
22517   *) ac_file_in="${ac_file}.in" ;;
22518   esac
22519
22520   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
22521
22522   # Remove last slash and all that follows it.  Not all systems have dirname.
22523   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
22524   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22525     # The file is in a subdirectory.
22526     test ! -d "$ac_dir" && mkdir "$ac_dir"
22527     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
22528     # A "../" for each directory in $ac_dir_suffix.
22529     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
22530   else
22531     ac_dir_suffix= ac_dots=
22532   fi
22533
22534   case "$ac_given_srcdir" in
22535   .)  srcdir=.
22536       if test -z "$ac_dots"; then top_srcdir=.
22537       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
22538   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
22539   *) # Relative path.
22540     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
22541     top_srcdir="$ac_dots$ac_given_srcdir" ;;
22542   esac
22543
22544   case "$ac_given_INSTALL" in
22545   [/$]*) INSTALL="$ac_given_INSTALL" ;;
22546   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
22547   esac
22548
22549   echo creating "$ac_file"
22550   rm -f "$ac_file"
22551   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
22552   case "$ac_file" in
22553   *[Mm]akefile*) ac_comsub="1i\\
22554 # $configure_input" ;;
22555   *) ac_comsub= ;;
22556   esac
22557
22558   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
22559   sed -e "$ac_comsub
22560 s%@configure_input@%$configure_input%g
22561 s%@srcdir@%$srcdir%g
22562 s%@top_srcdir@%$top_srcdir%g
22563 s%@INSTALL@%$INSTALL%g
22564 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
22565 fi; done
22566 rm -f conftest.s*
22567
22568 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
22569 # NAME is the cpp macro being defined and VALUE is the value it is being given.
22570 #
22571 # ac_d sets the value in "#define NAME VALUE" lines.
22572 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
22573 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
22574 ac_dC='\3'
22575 ac_dD='%g'
22576 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
22577 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
22578 ac_uB='\([      ]\)%\1#\2define\3'
22579 ac_uC=' '
22580 ac_uD='\4%g'
22581 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
22582 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
22583 ac_eB='$%\1#\2define\3'
22584 ac_eC=' '
22585 ac_eD='%g'
22586
22587 if test "${CONFIG_HEADERS+set}" != set; then
22588 EOF
22589 cat >> $CONFIG_STATUS <<EOF
22590   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
22591 EOF
22592 cat >> $CONFIG_STATUS <<\EOF
22593 fi
22594 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
22595   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22596   case "$ac_file" in
22597   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
22598        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
22599   *) ac_file_in="${ac_file}.in" ;;
22600   esac
22601
22602   echo creating $ac_file
22603
22604   rm -f conftest.frag conftest.in conftest.out
22605   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
22606   cat $ac_file_inputs > conftest.in
22607
22608 EOF
22609
22610 # Transform confdefs.h into a sed script conftest.vals that substitutes
22611 # the proper values into config.h.in to produce config.h.  And first:
22612 # Protect against being on the right side of a sed subst in config.status.
22613 # Protect against being in an unquoted here document in config.status.
22614 rm -f conftest.vals
22615 cat > conftest.hdr <<\EOF
22616 s/[\\&%]/\\&/g
22617 s%[\\$`]%\\&%g
22618 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
22619 s%ac_d%ac_u%gp
22620 s%ac_u%ac_e%gp
22621 EOF
22622 sed -n -f conftest.hdr confdefs.h > conftest.vals
22623 rm -f conftest.hdr
22624
22625 # This sed command replaces #undef with comments.  This is necessary, for
22626 # example, in the case of _POSIX_SOURCE, which is predefined and required
22627 # on some systems where configure will not decide to define it.
22628 cat >> conftest.vals <<\EOF
22629 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
22630 EOF
22631
22632 # Break up conftest.vals because some shells have a limit on
22633 # the size of here documents, and old seds have small limits too.
22634
22635 rm -f conftest.tail
22636 while :
22637 do
22638   ac_lines=`grep -c . conftest.vals`
22639   # grep -c gives empty output for an empty file on some AIX systems.
22640   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
22641   # Write a limited-size here document to conftest.frag.
22642   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
22643   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
22644   echo 'CEOF
22645   sed -f conftest.frag conftest.in > conftest.out
22646   rm -f conftest.in
22647   mv conftest.out conftest.in
22648 ' >> $CONFIG_STATUS
22649   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
22650   rm -f conftest.vals
22651   mv conftest.tail conftest.vals
22652 done
22653 rm -f conftest.vals
22654
22655 cat >> $CONFIG_STATUS <<\EOF
22656   rm -f conftest.frag conftest.h
22657   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
22658   cat conftest.in >> conftest.h
22659   rm -f conftest.in
22660   if cmp -s $ac_file conftest.h 2>/dev/null; then
22661     echo "$ac_file is unchanged"
22662     rm -f conftest.h
22663   else
22664     # Remove last slash and all that follows it.  Not all systems have dirname.
22665       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
22666       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22667       # The file is in a subdirectory.
22668       test ! -d "$ac_dir" && mkdir "$ac_dir"
22669     fi
22670     rm -f $ac_file
22671     mv conftest.h $ac_file
22672   fi
22673 fi; done
22674
22675 EOF
22676 cat >> $CONFIG_STATUS <<EOF
22677
22678 EOF
22679 cat >> $CONFIG_STATUS <<\EOF
22680
22681 date > stamp-h
22682 echo Please \"make depend\" to build dependencies
22683
22684 exit 0
22685 EOF
22686 chmod +x $CONFIG_STATUS
22687 rm -fr confdefs* $ac_clean_files
22688 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
22689